Skip to content

Commit

Permalink
Fix restricted settings warnings on non-nixos hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Sep 7, 2024
1 parent 0b71363 commit 3c27355
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
10 changes: 0 additions & 10 deletions home/base/non-nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ in
'';
};

nix = {
package = lib.mkForce pkgs.nix;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
};

programs.zsh.envExtra = lib.mkAfter ''
hash -f
Expand Down
5 changes: 0 additions & 5 deletions home/users/christian/shell/direnv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,5 @@ in
home.sessionVariables = {
DIRENV_LOG_FORMAT = "";
};

nix.settings = mkIf nonNixosCfg.enable {
keep-derivations = true;
keep-outputs = true;
};
};
}
2 changes: 1 addition & 1 deletion lib/builders/mkHome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
};

modules = [
./modules/nix-commons
./modules/nix-home
"${inputs.self}/hosts/${hostname}/home-${username}.nix"
] ++ homeModules;
}
19 changes: 19 additions & 0 deletions lib/builders/modules/nix-home/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ lib, inputs, pkgs, ... } @args:

let

nixCommons = import ../nix-commons args;

in

{
nix = {
inherit (nixCommons.nix) package registry;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
};
}

0 comments on commit 3c27355

Please sign in to comment.