refactor(nix): give alias to long symlink func and misc refactor

This commit is contained in:
matt1432 2023-10-03 11:08:56 -04:00
parent 84796a92a8
commit d7ad60297d
3 changed files with 24 additions and 18 deletions

View file

@ -1,26 +1,30 @@
{ config, pkgs, ... }: let
configDir = (import ../vars.nix).configDir;
symlink = config.lib.file.mkOutOfStoreSymlink;
in
{
xdg.configFile = {
"swayosd/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swayosd/style.css";
"swayosd/style.css".source = symlink "${configDir}/swayosd/style.css";
"gtklock/config.ini".source = pkgs.writeText "config.ini" ''
[main]
modules=${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so;${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so
modules=${builtins.concatStringsSep ";" [
"${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so"
"${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so"
]}
'';
"gtklock/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/gtklock/style.css";
"gtklock/style.css".source = symlink "${configDir}/gtklock/style.css";
"ripgrep".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/ripgrep";
"ripgrep".source = symlink "${configDir}/ripgrep";
"discord/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/discord/settings.json";
"discord/settings.json".source = symlink "${configDir}/discord/settings.json";
"dolphinrc".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/dolphinrc";
"kdeglobals".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/kdeglobals";
"kiorc".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/kiorc";
"mimeapps.list".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/mimeapps.list";
"neofetch".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/neofetch";
"swappy".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swappy";
"dolphinrc".source = symlink "${configDir}/dolphinrc";
"kdeglobals".source = symlink "${configDir}/kdeglobals";
"kiorc".source = symlink "${configDir}/kiorc";
"mimeapps.list".source = symlink "${configDir}/mimeapps.list";
"neofetch".source = symlink "${configDir}/neofetch";
"swappy".source = symlink "${configDir}/swappy";
};
programs = {

View file

@ -1,10 +1,10 @@
{ pkgs, config, hyprland, hyprgrass, ags, ... }: let
configDir = (import ../vars.nix).configDir;
symlink = config.lib.file.mkOutOfStoreSymlink;
in
{
home.packages = [
pkgs.sassc
pkgs.flat-remix-icon-theme
pkgs.coloryou
];
@ -16,7 +16,7 @@ in
programs.ags = {
enable = true;
package = ags.packages.x86_64-linux.default;
configDir = config.lib.file.mkOutOfStoreSymlink "${configDir}/ags";
configDir = symlink "${configDir}/ags";
};
wayland.windowManager.hyprland = {
@ -40,7 +40,7 @@ in
};
xdg.configFile = {
"hypr/main.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/main.conf";
"hypr/hyprpaper.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/hyprpaper.conf";
"hypr/main.conf".source = symlink "${configDir}/hypr/main.conf";
"hypr/hyprpaper.conf".source = symlink "${configDir}/hypr/hyprpaper.conf";
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, lib, ... }:
let
{ pkgs, lib, ... }: let
# installs a vim plugin from git with a given tag / branch
plugin = owner: repo: rev: hash: pkgs.vimUtils.buildVimPlugin {
pname = "${lib.strings.sanitizeDerivationName repo}";
@ -9,12 +8,14 @@ let
};
};
in
{
xdg.configFile = {
"../.gradle/gradle.properties".source = pkgs.writeText "gradle.properties" ''
org.gradle.java.home = ${pkgs.temurin-bin-17}
'';
};
programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
@ -67,6 +68,7 @@ in
};
};
};
plugins = with pkgs.vimPlugins; [
vim-which-key