mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
nix: restart service on dms update (#636)
This commit is contained in:
@@ -10,11 +10,19 @@
|
|||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(lib.mkRemovedOptionModule ["programs" "dankMaterialShell" "enableNightMode"] "Night mode is now always available.")
|
(lib.mkRemovedOptionModule ["programs" "dankMaterialShell" "enableNightMode"] "Night mode is now always available.")
|
||||||
|
(lib.mkRenamedOptionModule ["programs" "dankMaterialShell" "enableSystemd"] ["programs" "dankMaterialShell" "systemd" "enable"])
|
||||||
];
|
];
|
||||||
options.programs.dankMaterialShell = with lib.types; {
|
options.programs.dankMaterialShell = with lib.types; {
|
||||||
enable = lib.mkEnableOption "DankMaterialShell";
|
enable = lib.mkEnableOption "DankMaterialShell";
|
||||||
|
|
||||||
enableSystemd = lib.mkEnableOption "DankMaterialShell systemd startup";
|
systemd = {
|
||||||
|
enable = lib.mkEnableOption "DankMaterialShell systemd startup";
|
||||||
|
restartIfChanged = lib.mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "Auto-restart dms.service when dankMaterialShell changes";
|
||||||
|
};
|
||||||
|
};
|
||||||
enableSystemMonitoring = lib.mkOption {
|
enableSystemMonitoring = lib.mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
@@ -105,11 +113,12 @@ in {
|
|||||||
configs.dms = "${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms";
|
configs.dms = "${dmsPkgs.dankMaterialShell}/etc/xdg/quickshell/dms";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.dms = lib.mkIf cfg.enableSystemd {
|
systemd.user.services.dms = lib.mkIf cfg.systemd.enable {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "DankMaterialShell";
|
Description = "DankMaterialShell";
|
||||||
PartOf = [ config.wayland.systemd.target ];
|
PartOf = [ config.wayland.systemd.target ];
|
||||||
After = [ config.wayland.systemd.target ];
|
After = [ config.wayland.systemd.target ];
|
||||||
|
X-Restart-Triggers = lib.optional cfg.systemd.restartIfChanged config.programs.quickshell.configs.dms;
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|||||||
Reference in New Issue
Block a user