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