kanshi: Reload on config change
This commit is contained in:
committed by
Austin Horstman
parent
d32537981c
commit
74b38179ac
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user