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:
parent
6c2b79403e
commit
d2c014e1c7
83 changed files with 269 additions and 222 deletions
|
|
@ -11,9 +11,9 @@ in {
|
|||
enable = mkEnableOption
|
||||
"discocss, a tiny Discord CSS injector for Linux and MacOS";
|
||||
|
||||
package = mkPackageOption pkgs "discocss" { };
|
||||
package = mkPackageOption pkgs "discocss" { nullable = true; };
|
||||
|
||||
discordPackage = mkPackageOption pkgs "discord" { };
|
||||
discordPackage = mkPackageOption pkgs "discord" { nullable = true; };
|
||||
|
||||
discordAlias = mkOption {
|
||||
type = types.bool;
|
||||
|
|
@ -37,10 +37,10 @@ in {
|
|||
"To use discocss with discordAlias you have to remove discord from home.packages, or set discordAlias to false.";
|
||||
}];
|
||||
|
||||
home.packages = [
|
||||
home.packages = lib.mkIf (cfg.package != null) [
|
||||
(cfg.package.override {
|
||||
discordAlias = cfg.discordAlias;
|
||||
discord = cfg.discordPackage;
|
||||
discord = lib.mkIf (cfg.discordPackage != null) cfg.discordPackage;
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue