diff options
| author | Seth Flynn <[email protected]> | 2025-02-01 07:52:30 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-01 07:52:30 -0500 |
| commit | 81d7539b3afb1ceb75fdc65508e3e4ef20a1c5b1 (patch) | |
| tree | 4fcdd534b5e75e7c06d8a9c67ba896aee9b55a05 /modules/shared | |
| parent | 460607357fbf6e9a4a1f5335224f6312768fd912 (diff) | |
nixos/nix: use systemd-tmpfiles for inputs in $NIX_PATH
Diffstat (limited to 'modules/shared')
| -rw-r--r-- | modules/shared/defaults/nix.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/shared/defaults/nix.nix b/modules/shared/defaults/nix.nix index eb678a4..8ecdfe1 100644 --- a/modules/shared/defaults/nix.nix +++ b/modules/shared/defaults/nix.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + inputs, ... }: let @@ -13,6 +14,10 @@ let || lib.versionAtLeast config.nix.package.version "2.90.0"; # but not in lix yet hasAlwaysAllowSubstitutes = lib.versionAtLeast config.nix.package.version "2.19.0"; + + # Use systemd-tmpfiles on Linux + nixPathFromInput = + name: input: "${name}=${if isLinux then "/etc/nix/inputs/${name}" else input.outPath}"; in { config = lib.mkMerge [ @@ -33,7 +38,7 @@ in }; # See comment below - nixPath = [ "nixpkgs=${config.nixpkgs.flake.source}" ]; + nixPath = lib.mapAttrsToList nixPathFromInput inputs; }; nixpkgs = { |
