flake-parts/setups: update shared Nix config for setting up NIX_PATH

...again.
This commit is contained in:
Gabriel Arazas 2024-07-10 15:46:00 +08:00
parent 6c6ae7ecd6
commit bae6230728
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -10,6 +10,14 @@ let
flakeInputName = name:
if name == "self" then "config" else name;
nixChannels =
lib.mapAttrsToList
(name: source: "${flakeInputName name}=${source}")
inputs'
++ [
"/nix/var/nix/profiles/per-user/root/channels"
];
in
{
config.modules = [(
@ -23,13 +31,10 @@ in
lib.nameValuePair (flakeInputName name) { inherit flake; })
inputs';
nix.settings.nix-path =
(lib.mapAttrsToList
(name: source: "${flakeInputName name}=${source}")
inputs'
++ [
"/nix/var/nix/profiles/per-user/root/channels"
]);
}
nix.settings.nix-path = nixChannels;
# It doesn't work on the traditional tools like nix-shell so ehhh...
nix.nixPath = nixChannels;
}
)];
}