diff options
| author | BardMoon <144455455+BardMoon@users.noreply.github.com> | 2025-09-01 17:06:02 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-01 18:06:02 +1000 |
| commit | a17b76dea19cda75cb47feb301b722315919fbe4 (patch) | |
| tree | 24ef9db27bffb6f66f006e791a4a18a13077dd43 /nix | |
| parent | beatdetector: fix pod builder init (diff) | |
| download | caelestia-shell-a17b76dea19cda75cb47feb301b722315919fbe4.tar.gz caelestia-shell-a17b76dea19cda75cb47feb301b722315919fbe4.tar.bz2 caelestia-shell-a17b76dea19cda75cb47feb301b722315919fbe4.zip | |
nix/hm: add systemd.target in home-manager (#532)
* nix: add systemd.target
* fix: format
* Update README.md
* Update hm-module.nix
https://github.com/Vladimir-csp/uwsm/blob/cf2b1d84059f1954d4ec864f2b46a86515acc3c1/example-units/hyprpaper.service#L19
* fix
* Update README.md
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/hm-module.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix index 533b2f6..ef463b8 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -25,6 +25,13 @@ in { default = true; description = "Enable the systemd service for Caelestia shell"; }; + target = mkOption { + type = types.str; + description = '' + The systemd target that will automatically start the Caelestia shell. + ''; + default = "graphical-session.target"; + }; }; settings = mkOption { type = types.attrsOf types.anything; @@ -65,8 +72,8 @@ in { systemd.user.services.caelestia = lib.mkIf cfg.systemd.enable { Unit = { Description = "Caelestia Shell Service"; - After = ["graphical-session.target"]; - PartOf = ["graphical-session.target"]; + After = [cfg.systemd.target]; + PartOf = [cfg.systemd.target]; X-Restart-Triggers = lib.mkIf (cfg.settings != {}) [ "${config.xdg.configFile."caelestia/shell.json".source}" ]; @@ -86,7 +93,7 @@ in { }; Install = { - WantedBy = ["graphical-session.target"]; + WantedBy = [cfg.systemd.target]; }; }; |