mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
This commit is contained in:
commit
c9569af3e0
18 changed files with 43 additions and 18 deletions
|
@ -164,7 +164,8 @@ in
|
|||
"local-fs.target"
|
||||
"systemd-journald-audit.socket"
|
||||
];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig = {
|
||||
Description="Load AppArmor policies";
|
||||
|
|
|
@ -13,6 +13,8 @@ with lib;
|
|||
systemd.services.auditd = {
|
||||
description = "Linux Audit daemon";
|
||||
wantedBy = [ "basic.target" ];
|
||||
before = [ "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target "];
|
||||
|
||||
unitConfig = {
|
||||
ConditionVirtualization = "!container";
|
||||
|
@ -23,7 +25,7 @@ with lib;
|
|||
path = [ pkgs.audit ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStartPre="${pkgs.coreutils}/bin/mkdir -p /var/log/audit";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/log/audit";
|
||||
ExecStart = "${pkgs.audit}/bin/auditd -l -n -s nochange";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -195,7 +195,8 @@ in
|
|||
|
||||
systemd.services.login-duo = lib.mkIf cfg.ssh.enable {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
script = ''
|
||||
if test -f "${cfg.secretKeyFile}"; then
|
||||
|
@ -216,7 +217,8 @@ in
|
|||
|
||||
systemd.services.pam-duo = lib.mkIf cfg.ssh.enable {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
script = ''
|
||||
if test -f "${cfg.secretKeyFile}"; then
|
||||
|
|
|
@ -278,7 +278,8 @@ in
|
|||
systemd.services.suid-sgid-wrappers = {
|
||||
description = "Create SUID/SGID Wrappers";
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
unitConfig.RequiresMountsFor = [ "/nix/store" "/run/wrappers" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue