Add DOTFILES envvar & dotfiles NIX_PATH
This commit is contained in:
parent
fa546d6337
commit
2eb91b8bc3
|
@ -27,7 +27,7 @@
|
||||||
let
|
let
|
||||||
inherit (builtins) baseNameOf;
|
inherit (builtins) baseNameOf;
|
||||||
inherit (lib) nixosSystem mkIf removeSuffix attrNames attrValues;
|
inherit (lib) nixosSystem mkIf removeSuffix attrNames attrValues;
|
||||||
inherit (lib.my) mapModules mapModulesRec mapModulesRec';
|
inherit (lib.my) dotFilesDir mapModules mapModulesRec mapModulesRec';
|
||||||
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
@ -69,13 +69,15 @@
|
||||||
{
|
{
|
||||||
networking.hostName = removeSuffix ".nix" (baseNameOf modulePath);
|
networking.hostName = removeSuffix ".nix" (baseNameOf modulePath);
|
||||||
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
|
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
|
environment.variables.DOTFILES = dotFilesDir;
|
||||||
nixpkgs.pkgs = pkgs;
|
nixpkgs.pkgs = pkgs;
|
||||||
nix = {
|
nix = {
|
||||||
package = unstable.nixFlakes;
|
package = unstable.nixFlakes;
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
nixPath = [
|
nixPath = [
|
||||||
"nixpkgs=${nixos}"
|
"nixpkgs=${nixos}"
|
||||||
"nixpkgs-overlays=${toString ./.}/overlays"
|
"nixpkgs-overlays=${dotFilesDir}/overlays"
|
||||||
|
"dotfiles=${dotFilesDir}"
|
||||||
];
|
];
|
||||||
binaryCaches = [
|
binaryCaches = [
|
||||||
"https://cache.nixos.org/"
|
"https://cache.nixos.org/"
|
||||||
|
|
|
@ -4,11 +4,11 @@ with builtins;
|
||||||
with lib;
|
with lib;
|
||||||
rec {
|
rec {
|
||||||
# ...
|
# ...
|
||||||
dotFiles = toString ../.;
|
dotFilesDir = toString ../.;
|
||||||
modulesDir = "${dotFiles}/modules";
|
modulesDir = "${dotFilesDir}/modules";
|
||||||
configDir = "${dotFiles}/config";
|
configDir = "${dotFilesDir}/config";
|
||||||
binDir = "${dotFiles}/bin";
|
binDir = "${dotFilesDir}/bin";
|
||||||
themeDir = "${modulesDir}/themes";
|
themeDir = "${modulesDir}/themes";
|
||||||
homeDir = "/home/${let name = getEnv "USERNAME"; in
|
homeDir = "/home/${let name = getEnv "USERNAME"; in
|
||||||
if elem name [ "" "root" ]
|
if elem name [ "" "root" ]
|
||||||
then "hlissner" else name}";
|
then "hlissner" else name}";
|
||||||
|
|
Loading…
Reference in a new issue