kanshi: Reload on config change
This commit is contained in:
parent
d32537981c
commit
74b38179ac
1 changed files with 7 additions and 1 deletions
|
|
@ -16,6 +16,8 @@ let
|
|||
|
||||
cfg = config.services.kanshi;
|
||||
|
||||
configPath = "kanshi/config";
|
||||
|
||||
directivesTag = types.attrTag {
|
||||
profile = mkOption {
|
||||
type = profileModule;
|
||||
|
|
@ -346,7 +348,7 @@ in
|
|||
{
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."kanshi/config" =
|
||||
xdg.configFile.${configPath} =
|
||||
let
|
||||
generatedConfigStr =
|
||||
if cfg.profiles == { } && cfg.extraConfig == "" then directivesStr else oldDirectivesStr;
|
||||
|
|
@ -361,11 +363,15 @@ in
|
|||
PartOf = cfg.systemdTarget;
|
||||
Requires = cfg.systemdTarget;
|
||||
After = cfg.systemdTarget;
|
||||
X-Reload-Triggers = lib.mkIf (cfg.settings != { }) [
|
||||
"${config.xdg.configFile.${configPath}.source}"
|
||||
];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${cfg.package}/bin/kanshi";
|
||||
ExecReload = "${lib.getExe' cfg.package "kanshictl"} reload";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue