diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-09-07 08:39:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-09-07 08:39:35 +0200 |
commit | 850adcf4b17afb6f5429b030f3c814d502d2b53e (patch) | |
tree | 9e30459cec309e4b04bed476f9444a9335dac0af /modules/private/vpn | |
parent | de6d17ec97a1946f628372e5b0854cb21a91a55f (diff) | |
download | Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.tar.gz Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.tar.zst Nix-850adcf4b17afb6f5429b030f3c814d502d2b53e.zip |
Put services in slices in systemd
Diffstat (limited to 'modules/private/vpn')
-rw-r--r-- | modules/private/vpn/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/private/vpn/default.nix b/modules/private/vpn/default.nix index fbcba2f..a9051af 100644 --- a/modules/private/vpn/default.nix +++ b/modules/private/vpn/default.nix | |||
@@ -46,12 +46,17 @@ in | |||
46 | fi | 46 | fi |
47 | ''; | 47 | ''; |
48 | 48 | ||
49 | systemd.slices.tinc = { | ||
50 | description = "Tinc slice"; | ||
51 | }; | ||
52 | |||
49 | systemd.services.tinc-Immae = { | 53 | systemd.services.tinc-Immae = { |
50 | description = "Tinc Daemon - Immae"; | 54 | description = "Tinc Daemon - Immae"; |
51 | wantedBy = [ "multi-user.target" ]; | 55 | wantedBy = [ "multi-user.target" ]; |
52 | after = [ "network.target" ]; | 56 | after = [ "network.target" ]; |
53 | path = [ pkgs.tinc pkgs.bashInteractive pkgs.iproute pkgs.gnused pkgs.gawk pkgs.git pkgs.glibc ]; | 57 | path = [ pkgs.tinc pkgs.bashInteractive pkgs.iproute pkgs.gnused pkgs.gawk pkgs.git pkgs.glibc ]; |
54 | serviceConfig = { | 58 | serviceConfig = { |
59 | Slice = "tinc.slice"; | ||
55 | Type = "simple"; | 60 | Type = "simple"; |
56 | Restart = "always"; | 61 | Restart = "always"; |
57 | RestartSec = "3"; | 62 | RestartSec = "3"; |