Compare commits

...

2 commits

Author SHA1 Message Date
16fade92b4 home: packages: add 'allowAliases', 'allowUnfree'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
With [1], this should now be taken into account properly.

[1]: https://github.com/nix-community/home-manager/pull/4304
2023-12-08 11:50:44 +00:00
22fa05ca0c home: packages: refactor config format 2023-12-08 11:49:52 +00:00

View file

@ -6,6 +6,10 @@ in
options.my.home.packages = with lib; {
enable = my.mkDisableOption "user packages";
allowAliases = mkEnableOption "allow package aliases";
allowUnfree = my.mkDisableOption "allow unfree packages";
additionalPackages = mkOption {
type = with types; listOf package;
default = [ ];
@ -17,9 +21,15 @@ in
};
};
config.home.packages = with pkgs; lib.mkIf cfg.enable ([
fd
file
ripgrep
] ++ cfg.additionalPackages);
config = lib.mkIf cfg.enable {
home.packages = with pkgs; ([
fd
file
ripgrep
] ++ cfg.additionalPackages);
nixpkgs.config = {
inherit (cfg) allowAliases allowUnfree;
};
};
}