refactor: extract 'dotsPath' for 'dots' path
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
inherit system;
|
||||
overlays = [ nixgl.overlay ];
|
||||
};
|
||||
dotsPath = ./dots;
|
||||
in
|
||||
{
|
||||
nix.nixPath = [
|
||||
@@ -74,7 +75,7 @@
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts/${host} ];
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit inputs outputs dotsPath;
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -83,7 +84,7 @@
|
||||
inherit pkgs;
|
||||
modules = [ ./home/hosts/work ];
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit inputs outputs dotsPath;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{ dotsPath, ... }:
|
||||
|
||||
{
|
||||
programs.git.enable = true;
|
||||
home.file = {
|
||||
".gitconfig".source = ../../dots/.gitconfig;
|
||||
".gitconfig.work".source = ../../dots/.gitconfig.work;
|
||||
".gitignore".source = ../../dots/.gitignore;
|
||||
".gitconfig".source = dotsPath + "/.gitconfig";
|
||||
".gitconfig.work".source = dotsPath + "/.gitconfig.work";
|
||||
".gitignore".source = dotsPath + "/.gitignore";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, dotsPath, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
@@ -8,12 +8,12 @@
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/kitty/kitty.conf".source = ../../dots/.config/kitty/kitty.conf;
|
||||
".config/kitty/nvim.conf".source = ../../dots/.config/kitty/nvim.conf;
|
||||
".config/kitty/kitty.conf".source = dotsPath + "/.config/kitty/kitty.conf";
|
||||
".config/kitty/nvim.conf".source = dotsPath + "/.config/kitty/nvim.conf";
|
||||
".config/kitty/themes/zenwritten_light.conf".source =
|
||||
../../dots/.config/kitty/themes/zenwritten_light.conf;
|
||||
dotsPath + "/.config/kitty/themes/zenwritten_light.conf";
|
||||
".config/kitty/themes/zenwritten_dark.conf".source =
|
||||
../../dots/.config/kitty/themes/zenwritten_dark.conf;
|
||||
dotsPath + "/.config/kitty/themes/zenwritten_dark.conf";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
dotsPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.shell.bash;
|
||||
username = config.home.username;
|
||||
dotsPath = ../../../dots;
|
||||
in
|
||||
{
|
||||
options.shell.bash = {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
dotsPath,
|
||||
osConfig ? null,
|
||||
...
|
||||
}:
|
||||
@@ -25,19 +26,19 @@ in
|
||||
home.file = {
|
||||
".config/task/taskrc" = {
|
||||
force = true; # overwrite when present
|
||||
source = ../../dots/.config/task/taskrc;
|
||||
source = dotsPath + "/.config/task/taskrc";
|
||||
};
|
||||
".config/task/taskrc.d/aliases".source = ../../dots/.config/task/taskrc.d/aliases;
|
||||
".config/task/taskrc.d/colors".source = ../../dots/.config/task/taskrc.d/colors;
|
||||
".config/task/taskrc.d/contexts".source = ../../dots/.config/task/taskrc.d/contexts;
|
||||
".config/task/taskrc.d/reports".source = ../../dots/.config/task/taskrc.d/reports;
|
||||
".config/task/taskrc.d/udas".source = ../../dots/.config/task/taskrc.d/udas;
|
||||
".config/task/taskrc.d/urgency".source = ../../dots/.config/task/taskrc.d/urgency;
|
||||
".config/task/taskrc.d/aliases".source = dotsPath + "/.config/task/taskrc.d/aliases";
|
||||
".config/task/taskrc.d/colors".source = dotsPath + "/.config/task/taskrc.d/colors";
|
||||
".config/task/taskrc.d/contexts".source = dotsPath + "/.config/task/taskrc.d/contexts";
|
||||
".config/task/taskrc.d/reports".source = dotsPath + "/.config/task/taskrc.d/reports";
|
||||
".config/task/taskrc.d/udas".source = dotsPath + "/.config/task/taskrc.d/udas";
|
||||
".config/task/taskrc.d/urgency".source = dotsPath + "/.config/task/taskrc.d/urgency";
|
||||
".local/share/task/hooks/on-exit.sync.py" = {
|
||||
source = ../../dots/.local/share/task/hooks/on-exit.sync.py;
|
||||
source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py";
|
||||
};
|
||||
".local/share/task/scripts/sync-and-notify.sh" = {
|
||||
source = ../../dots/.local/share/task/scripts/sync-and-notify.sh;
|
||||
source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh";
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ inputs, outputs, ... }:
|
||||
{ inputs, outputs, dotsPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -19,7 +19,7 @@
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit inputs outputs dotsPath;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user