mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-27 05:11:30 +00:00
Add systemd slices to all SP modules
This commit is contained in:
parent
d7f283468a
commit
80dfbf3d5c
|
@ -116,5 +116,12 @@ in
|
|||
# NixOS upstream bug? Otherwise, backup-vaultwarden cannot find sqlite DB.
|
||||
systemd.services.backup-vaultwarden.unitConfig.ConditionPathExists =
|
||||
"/var/lib/bitwarden_rs/db.sqlite3";
|
||||
|
||||
systemd = {
|
||||
services.vaultwarden.serviceConfig.Slice = "bitwarden.slice";
|
||||
slices.bitwarden = {
|
||||
description = "Bitwarden service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -146,14 +146,17 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
systemd.services.forgejo = {
|
||||
unitConfig.RequiresMountsFor = lib.mkIf sp.useBinds "/volumes/${cfg.location}/gitea";
|
||||
serviceConfig = {
|
||||
Slice = "gitea.slice";
|
||||
systemd = {
|
||||
services.forgejo = {
|
||||
unitConfig.RequiresMountsFor = lib.mkIf sp.useBinds "/volumes/${cfg.location}/gitea";
|
||||
serviceConfig = {
|
||||
Slice = "gitea.slice";
|
||||
};
|
||||
};
|
||||
slices.gitea = {
|
||||
description = "Forgejo service slice";
|
||||
};
|
||||
};
|
||||
systemd.slices.gitea = {
|
||||
description = "Forgejo service slice";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,5 +40,15 @@ in
|
|||
useACMEHost = domain;
|
||||
enableACME = false;
|
||||
};
|
||||
systemd = {
|
||||
services = {
|
||||
jicofo.serviceConfig.Slice = "jitsi-meet.slice";
|
||||
jitsi-videobridge2.serviceConfig.Slice = "jitsi-meet.slice";
|
||||
prosody.serviceConfig.Slice = "jitsi-meet.slice";
|
||||
};
|
||||
slices.jitsi-meet = {
|
||||
description = "Jitsi Meet service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{config, lib, ...}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.selfprivacy.modules.monitoring;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.selfprivacy.modules.monitoring = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
|
@ -54,5 +56,15 @@ in {
|
|||
}
|
||||
];
|
||||
};
|
||||
systemd = {
|
||||
services = {
|
||||
prometheus.serviceConfig.Slice = "monitoring.slice";
|
||||
prometheus-node-exporter.serviceConfig.Slice = "monitoring.slice";
|
||||
cadvisor.serviceConfig.Slice = "monitoring.slice";
|
||||
};
|
||||
slices.monitoring = {
|
||||
description = "Monitoring service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -83,5 +83,13 @@
|
|||
useACMEHost = sp.domain;
|
||||
forceSSL = true;
|
||||
};
|
||||
systemd = {
|
||||
services = {
|
||||
phpfpm-nextcloud.serviceConfig.Slice = "nextcloud.slice";
|
||||
};
|
||||
slices.nextcloud = {
|
||||
description = "Nextcloud service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -76,5 +76,13 @@ in
|
|||
'';
|
||||
};
|
||||
systemd.services.ocserv.unitConfig.ConditionPathExists = [ cert key ];
|
||||
systemd = {
|
||||
services = {
|
||||
ocserv.serviceConfig.Slice = "ocserv.slice";
|
||||
};
|
||||
slices.ocserv = {
|
||||
description = "ocserv service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -126,5 +126,13 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
services = {
|
||||
pleroma.serviceConfig.Slice = "pleroma.slice";
|
||||
};
|
||||
slices.pleroma = {
|
||||
description = "Pleroma service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -35,5 +35,13 @@ in
|
|||
useACMEHost = domain;
|
||||
enableACME = false;
|
||||
};
|
||||
systemd = {
|
||||
services = {
|
||||
phpfpm-roundcube.serviceConfig.Slice = "roundcube.slice";
|
||||
};
|
||||
slices.roundcube = {
|
||||
description = "Roundcube service slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -89,4 +89,17 @@ lib.mkIf sp.modules.simple-nixos-mailserver.enable
|
|||
|
||||
virusScanning = false;
|
||||
};
|
||||
|
||||
systemd = {
|
||||
services = {
|
||||
dovecot2.serviceConfig.Slice = "simple-nixos-mailserver.slice";
|
||||
postfix.serviceConfig.Slice = "simple-nixos-mailserver.slice";
|
||||
rspamd.serviceConfig.Slice = "simple-nixos-mailserver.slice";
|
||||
redis-rspamd.serviceConfig.Slice = "simple-nixos-mailserver.slice";
|
||||
opendkim.serviceConfig.Slice = "simple-nixos-mailserver.slice";
|
||||
};
|
||||
slices.simple-nixos-mailserver = {
|
||||
description = "Simple NixOS Mailserver service slice";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue