feat(modules/programs/eww): make 'configDir' setting optional
Manually configuring 'eww' with 'xdg.configFile."eww".text' in order to leverage Nix' capabilities, is inconvenient due to the required 'xdg.configFile."eww".source' symlink. This change makes the symlink optional.
This commit is contained in:
parent
ae631b0b20
commit
0b8c607be7
|
@ -23,7 +23,8 @@ in {
|
|||
};
|
||||
|
||||
configDir = mkOption {
|
||||
type = types.path;
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = literalExpression "./eww-config-dir";
|
||||
description = ''
|
||||
The directory that gets symlinked to
|
||||
|
@ -32,8 +33,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.configFile."eww".source = cfg.configDir;
|
||||
};
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{ home.packages = [ cfg.package ]; }
|
||||
|
||||
(mkIf (cfg.configDir != null) {
|
||||
xdg.configFile."eww".source = cfg.configDir;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue