Skip to content

Commit f88d5e2

Browse files
authored
nixos/bacula: add system-bacula.slice (#338739)
2 parents b12aa42 + 50afd1e commit f88d5e2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nixos/modules/services/backup/bacula.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,11 @@ in {
656656
};
657657

658658
config = mkIf (fd_cfg.enable || sd_cfg.enable || dir_cfg.enable) {
659+
systemd.slices.system-bacula = {
660+
description = "Bacula Slice";
661+
documentation = [ "man:bacula(8)" "https://www.bacula.org/" ];
662+
};
663+
659664
systemd.services.bacula-fd = mkIf fd_cfg.enable {
660665
after = [ "network.target" ];
661666
description = "Bacula File Daemon";
@@ -666,6 +671,7 @@ in {
666671
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
667672
LogsDirectory = "bacula";
668673
StateDirectory = "bacula";
674+
Slice = "system-bacula.slice";
669675
};
670676
};
671677

@@ -679,6 +685,7 @@ in {
679685
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
680686
LogsDirectory = "bacula";
681687
StateDirectory = "bacula";
688+
Slice = "system-bacula.slice";
682689
};
683690
};
684691

@@ -694,6 +701,7 @@ in {
694701
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
695702
LogsDirectory = "bacula";
696703
StateDirectory = "bacula";
704+
Slice = "system-bacula.slice";
697705
};
698706
preStart = ''
699707
if ! test -e "${libDir}/db-created"; then

0 commit comments

Comments
 (0)