mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 00:51:04 +01:00
wallust: null package support
This commit is contained in:
parent
aa2c7ac404
commit
6a676ee476
1 changed files with 5 additions and 2 deletions
|
|
@ -21,7 +21,9 @@ in
|
||||||
|
|
||||||
options.programs.wallust = {
|
options.programs.wallust = {
|
||||||
enable = mkEnableOption "Wallust color scheme generator";
|
enable = mkEnableOption "Wallust color scheme generator";
|
||||||
package = mkPackageOption pkgs "wallust" { };
|
|
||||||
|
package = mkPackageOption pkgs "wallust" { nullable = true; };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = tomlFormat.type;
|
type = tomlFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
|
|
@ -38,7 +40,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."wallust/wallust.toml" = mkIf (cfg.settings != { }) {
|
xdg.configFile."wallust/wallust.toml" = mkIf (cfg.settings != { }) {
|
||||||
source = tomlFormat.generate "wallust.toml" cfg.settings;
|
source = tomlFormat.generate "wallust.toml" cfg.settings;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue