diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nixos/defaults/nix.nix | 21 | ||||
| -rw-r--r-- | modules/shared/defaults/nix.nix | 12 |
2 files changed, 7 insertions, 26 deletions
diff --git a/modules/nixos/defaults/nix.nix b/modules/nixos/defaults/nix.nix index fba0efc..847f674 100644 --- a/modules/nixos/defaults/nix.nix +++ b/modules/nixos/defaults/nix.nix @@ -1,32 +1,13 @@ -{ - lib, - pkgs, - inputs, - ... -}: - -let - flakeInputs = pkgs.linkFarm "flake-inputs" ( - lib.mapAttrs (lib.const (flake: flake.outPath)) inputs - ); -in +{ lib, ... }: { nix = { channel.enable = lib.mkDefault false; - nixPath = lib.mkForce ( - lib.mapAttrsToList (name: lib.const "${name}=/run/current-system/inputs/${name}") inputs - ); - settings.trusted-users = [ "@wheel" ]; }; nixpkgs.config.allowAliases = false; - - system.extraSystemBuilderCmds = '' - ln -s ${flakeInputs} $out/inputs - ''; } diff --git a/modules/shared/defaults/nix.nix b/modules/shared/defaults/nix.nix index f5a872f..2754355 100644 --- a/modules/shared/defaults/nix.nix +++ b/modules/shared/defaults/nix.nix @@ -43,12 +43,12 @@ in options = lib.mkDefault "--delete-older-than 5d"; }; - registry = lib.mapAttrs (lib.const (flake: { - to = lib.mkDefault { - type = "path"; - path = lib.mkForce flake.outPath; - }; - })) inputs; + registry = lib.mapAttrs (lib.const ( + flake: + lib.mkForce { + inherit flake; + } + )) inputs; nixPath = lib.mapAttrsToList (name: lib.const "${name}=flake:${name}") inputs; }; |
