Skip to content

Commit

Permalink
Fix the "option nix.settings does not exist" error
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Feb 12, 2024
1 parent ff15fe6 commit 22f875d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
11 changes: 0 additions & 11 deletions lib/builders/modules/nix-commons/default.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
{ lib, inputs, pkgs, ... }:

let

nixSubstituters = import ../nix-commons/substituters.nix;

in

{
nix = {
package = pkgs.nix;
registry = {
nixpkgs.flake = inputs.nixpkgs;
nix-config.flake = inputs.self;
};
settings = {
auto-optimise-store = lib.mkDefault true;
experimental-features = [ "nix-command" "flakes" ];
log-lines = 30;
} // nixSubstituters;
};
}
7 changes: 3 additions & 4 deletions lib/builders/modules/nix-nod/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ in

lib.recursiveUpdate nixCommons {
nix = {
inherit (nixSubstituters) substituters;
trustedPublicKeys = nixSubstituters.trusted-public-keys;
nixPath = [ "nixpkgs=flake:nixpkgs" ];
settings = {
auto-optimise-store = false;
};
} // nixSubstituters;
};
}
6 changes: 5 additions & 1 deletion lib/builders/modules/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
let

nixCommons = import ../nix-commons args;
nixSubstituters = import ../nix-commons/substituters.nix;

in

Expand All @@ -11,7 +12,10 @@ lib.recursiveUpdate nixCommons {
nixPath = [ "nixpkgs=flake:nixpkgs" ];
settings = {
allowed-users = builtins.attrNames config.users.users;
};
auto-optimise-store = lib.mkDefault true;
experimental-features = [ "nix-command" "flakes" ];
log-lines = 30;
} // nixSubstituters;
};

system.activationScripts.diff = {
Expand Down

0 comments on commit 22f875d

Please sign in to comment.