vicinae: restart service on config change

This commit is contained in:
leiserfg 2026-03-02 11:22:56 +01:00 committed by Austin Horstman
parent 6ac68b96a8
commit 9d83727001
3 changed files with 8 additions and 2 deletions

View file

@ -13,6 +13,7 @@ let
packageVersion = if cfg.package != null then lib.getVersion cfg.package else null;
themeIsToml = lib.versionAtLeast packageVersion "0.15.0";
versionPost0_17 = lib.versionAtLeast packageVersion "0.17.0";
settingsPath = if versionPost0_17 then "vicinae/settings.json" else "vicinae/vicinae.json";
in
{
meta.maintainers = [ lib.maintainers.leiserfg ];
@ -228,7 +229,6 @@ in
source = themeFormat.generate "vicinae-${name}-theme" theme;
}
) cfg.themes;
settingsPath = if versionPost0_17 then "vicinae/settings.json" else "vicinae/vicinae.json";
in
{
configFile = {
@ -266,6 +266,9 @@ in
USE_LAYER_SHELL=${if cfg.useLayerShell then toString 1 else toString 0}
''
);
X-Restart-Triggers = lib.mkIf (cfg.settings != { }) [
config.xdg.configFile.${settingsPath}.source
];
};
Install = lib.mkIf cfg.systemd.autoStart {
WantedBy = [ cfg.systemd.target ];