summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-03-07 18:41:30 -0500
committergetchoo-bot[bot] <183349775+getchoo-bot[bot]@users.noreply.github.com>2025-03-08 01:30:54 +0000
commita2a6f14223905fd6963e5a6e424ac1366ec220e6 (patch)
tree9e69cce4b2faee4b9afe4f235b01c78b91e94091
parentb97efe91b5ee07813b740ffc45bc0cc7d4d94a23 (diff)
modules/nix: try to work around flake copying issues
-rw-r--r--modules/nixos/defaults/nix.nix21
-rw-r--r--modules/shared/defaults/nix.nix12
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;
};