-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugtriageIssues or feature request that have not been triaged yetIssues or feature request that have not been triaged yet
Description
Are you following the right branch?
- My Nixpkgs and Home Manager versions are in sync
Is there an existing issue for this?
- I have searched the existing issues
Issue description
When using nixpkgs.config.allowUnfreePackages within HM, values do not combine between functions (as is intended)
{
config,
inputs,
lib,
recursiveImport,
...
}: {
home-manager = {
extraSpecialArgs = {inherit inputs;};
users = {
lyra = lib.mkIf config.users.users.lyra.enable {
imports =
[
({...}: {nixpkgs.config.allowUnfreePackages = ["456"];})
({...}: {nixpkgs.config.allowUnfreePackages = ["123"];})
]
++ (recursiveImport ./lyra); # this does contain further allowUnfreePackage definitions, but these have no effect on the result
};
};
};
}results in
nix-repl> nixosConfigurations.thegosis.config.home-manager.users.lyra.nixpkgs.config.allowUnfreePackages
[ "456" ]
When used outside of home manager (in my case, NixOS configuration)
(shortened for brevity)
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs host recursiveImport;
};
modules =
[./home home-manager.nixosModules.default]
++ [({...}: {nixpkgs.config.allowUnfreePackages = ["123"];}) ({...}: {nixpkgs.config.allowUnfreePackages = ["456"];})];
};results in
nix-repl> nixosConfigurations.thegosis.config.nixpkgs.config.allowUnfreePackages
[
"456"
"123"
]
Maintainer CC
No response
System information
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.18.12, NixOS, 26.05 (Yarara), 26.05.20260217.0182a36`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.31.3`
- nixpkgs: `/nix/store/dx2qikyb4dyb6hbdfywbmsyla0z5a1h3-source`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugtriageIssues or feature request that have not been triaged yetIssues or feature request that have not been triaged yet