1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: null package support (#6582)

Can generate the config without installing application through home-manager. Helpful when a package is broken (or not provided) on a specific platform through nixpkgs and needs to be installed through other means but you still can benefit from the declarative configuration.
This commit is contained in:
Austin Horstman 2025-03-07 18:17:52 -06:00 committed by GitHub
parent 6c2b79403e
commit d2c014e1c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
83 changed files with 269 additions and 222 deletions

View file

@ -130,7 +130,7 @@ in {
'';
};
package = mkPackageOption pkgs "i3status" { };
package = mkPackageOption pkgs "i3status" { nullable = true; };
};
config = mkIf cfg.enable {
@ -190,7 +190,7 @@ in {
};
};
home.packages = [ cfg.package ];
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."i3status/config".text = concatStringsSep "\n" ([ ]
++ optional (cfg.general != { }) (formatModule "general" cfg.general)