1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-31 00:42:50 -05:00

nix: Support specifying systemd target (#1385)

This commit is contained in:
Bailey
2026-01-16 00:01:51 -05:00
committed by bbedward
parent 060cbefc79
commit 0ed595b43d
2 changed files with 17 additions and 7 deletions

View File

@@ -73,6 +73,12 @@ in
default = hasPluginSettings;
description = ''Whether to manage plugin settings. Automatically enabled if any plugins have settings configured.'';
};
systemd.target = lib.mkOption {
type = lib.types.str;
default = config.wayland.systemd.target;
defaultText = lib.literalExpression "config.wayland.systemd.target";
description = "Systemd target to bind to.";
};
config = lib.mkIf cfg.enable {
@@ -84,8 +90,8 @@ in
systemd.user.services.dms = lib.mkIf cfg.systemd.enable {
Unit = {
Description = "DankMaterialShell";
PartOf = [ config.wayland.systemd.target ];
After = [ config.wayland.systemd.target ];
PartOf = [ cfg.systemd.target ];
After = [ cfg.systemd.target ];
};
Service = {
@@ -93,7 +99,7 @@ in
Restart = "on-failure";
};
Install.WantedBy = [ config.wayland.systemd.target ];
Install.WantedBy = [ cfg.systemd.target ];
};
xdg.stateFile."DankMaterialShell/session.json" = lib.mkIf (cfg.session != { }) {