mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
Merge pull request #60377 from joachifm/feat/apparmor-systemd
nixos/apparmor: service unit improvements
This commit is contained in:
commit
b2a165e786
@ -33,7 +33,12 @@ in
|
||||
paths = concatMapStrings (s: " -I ${s}/etc/apparmor.d")
|
||||
([ pkgs.apparmor-profiles ] ++ cfg.packages);
|
||||
in {
|
||||
wantedBy = [ "local-fs.target" ];
|
||||
after = [ "local-fs.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig = {
|
||||
DefaultDependencies = "no";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
@ -43,6 +48,9 @@ in
|
||||
ExecStop = map (p:
|
||||
''${pkgs.apparmor-parser}/bin/apparmor_parser -Rv "${p}"''
|
||||
) cfg.profiles;
|
||||
ExecReload = map (p:
|
||||
''${pkgs.apparmor-parser}/bin/apparmor_parser --reload ${paths} "${p}"''
|
||||
) cfg.profiles;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user