summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--nix/hm-module.nix13
2 files changed, 14 insertions, 4 deletions
diff --git a/README.md b/README.md
index 61034f0..c033353 100644
--- a/README.md
+++ b/README.md
@@ -213,7 +213,10 @@ For NixOS users, a home manager module is also available.
```nix
programs.caelestia = {
enable = true;
- systemd.enable = false; # if you prefer starting from your compositor
+ systemd = {
+ enable = false; # if you prefer starting from your compositor
+ target = "graphical-session.target";
+ };
settings = {
bar.status = {
showBattery = false;
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];
};
};