diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-02 20:53:17 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-03 16:21:34 +0100 |
commit | f6e600c20d6a97ebeda23fa2bb5621646222b2b0 (patch) | |
tree | 5551a23218db79e3edbf41557b474121f0745821 /modules/kill-user.nix | |
parent | f4fa33d0d258c4f66f804ed3fc3be590d8039e6e (diff) | |
download | nixos-f6e600c20d6a97ebeda23fa2bb5621646222b2b0.tar nixos-f6e600c20d6a97ebeda23fa2bb5621646222b2b0.tar.gz nixos-f6e600c20d6a97ebeda23fa2bb5621646222b2b0.tar.bz2 nixos-f6e600c20d6a97ebeda23fa2bb5621646222b2b0.tar.xz nixos-f6e600c20d6a97ebeda23fa2bb5621646222b2b0.zip |
sif: import config
Diffstat (limited to 'modules/kill-user.nix')
-rw-r--r-- | modules/kill-user.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/kill-user.nix b/modules/kill-user.nix new file mode 100644 index 00000000..dd897b36 --- /dev/null +++ b/modules/kill-user.nix | |||
@@ -0,0 +1,13 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | { | ||
3 | options = { | ||
4 | systemd.kill-user.enable = lib.mkEnableOption "Systemd kill-user@ services"; | ||
5 | }; | ||
6 | |||
7 | config.systemd.services."kill-user@" = lib.mkIf config.systemd.kill-user.enable { | ||
8 | serviceConfig = { | ||
9 | Type = "oneshot"; | ||
10 | ExecStart = "${pkgs.systemd}/bin/loginctl kill-user %I"; | ||
11 | }; | ||
12 | }; | ||
13 | } | ||