diff --git a/flake.nix b/flake.nix index 9e31aaea..ae9d4eba 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ let inherit (builtins) baseNameOf; inherit (lib) nixosSystem mkIf removeSuffix attrNames attrValues; - inherit (lib.my) mapModules mapModulesRec mapModulesRec'; + inherit (lib.my) dotFilesDir mapModules mapModulesRec mapModulesRec'; system = "x86_64-linux"; @@ -69,13 +69,15 @@ { networking.hostName = removeSuffix ".nix" (baseNameOf modulePath); environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; + environment.variables.DOTFILES = dotFilesDir; nixpkgs.pkgs = pkgs; nix = { package = unstable.nixFlakes; extraOptions = "experimental-features = nix-command flakes"; nixPath = [ "nixpkgs=${nixos}" - "nixpkgs-overlays=${toString ./.}/overlays" + "nixpkgs-overlays=${dotFilesDir}/overlays" + "dotfiles=${dotFilesDir}" ]; binaryCaches = [ "https://cache.nixos.org/" diff --git a/lib/paths.nix b/lib/paths.nix index 7d7b12c6..2d7cd03d 100644 --- a/lib/paths.nix +++ b/lib/paths.nix @@ -4,11 +4,11 @@ with builtins; with lib; rec { # ... - dotFiles = toString ../.; - modulesDir = "${dotFiles}/modules"; - configDir = "${dotFiles}/config"; - binDir = "${dotFiles}/bin"; - themeDir = "${modulesDir}/themes"; + dotFilesDir = toString ../.; + modulesDir = "${dotFilesDir}/modules"; + configDir = "${dotFilesDir}/config"; + binDir = "${dotFilesDir}/bin"; + themeDir = "${modulesDir}/themes"; homeDir = "/home/${let name = getEnv "USERNAME"; in if elem name [ "" "root" ] then "hlissner" else name}";