From 8bc51c80ba8e839cbf8b255d3894f7362963ec92 Mon Sep 17 00:00:00 2001 From: oluceps Date: Tue, 2 May 2023 02:05:20 +0800 Subject: [PATCH] foot: add WantedBy systemd target option --- modules/programs/foot.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/programs/foot.nix b/modules/programs/foot.nix index 2b08f3acd..5153e3ea7 100644 --- a/modules/programs/foot.nix +++ b/modules/programs/foot.nix @@ -22,6 +22,15 @@ in { server.enable = mkEnableOption "Foot terminal server"; + server.systemdTarget = mkOption { + type = types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + The systemd target that will automatically start the foot server. + ''; + }; + settings = mkOption { type = iniFormat.type; default = { }; @@ -74,7 +83,7 @@ in { OOMPolicy = "continue"; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { WantedBy = [ cfg.server.systemdTarget ]; }; }; }; };