config: set NIX_PATH when channels are enabled

This commit is contained in:
Gabriel Arazas 2023-12-23 18:35:53 +08:00
parent 2df2bd2104
commit 02d7b34bdd
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -193,8 +193,8 @@
nix.channel.enable = lib.mkDefault false;
# Set several paths for the traditional channels.
nix.nixPath =
lib.mapAttrsToList
nix.nixPath = lib.mkIf config.nix.channel.enable
(lib.mapAttrsToList
(name: source:
let
name' = if (name == "self") then "config" else name;
@ -203,7 +203,7 @@
inputs
++ [
"/nix/var/nix/profiles/per-user/root/channels"
];
]);
# Please clean your temporary crap.
boot.tmp.cleanOnBoot = lib.mkDefault true;