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
|
|
@ -16,7 +16,7 @@ in {
|
|||
options.programs.cavalier = {
|
||||
enable = mkEnableOption "Cava audio visualizer GUI";
|
||||
|
||||
package = mkPackageOption pkgs "cavalier" { };
|
||||
package = mkPackageOption pkgs "cavalier" { nullable = true; };
|
||||
|
||||
settings = {
|
||||
general = mkOption {
|
||||
|
|
@ -81,7 +81,7 @@ in {
|
|||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile = {
|
||||
"Nickvision Cavalier/config.json" = mkIf (cfg.settings.general != { }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue