mirror of
https://github.com/nix-community/home-manager
synced 2025-02-17 05:35:06 +01:00
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
1 changed files with 9 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue