Disable various services when running inside a container

This commit is contained in:
Eelco Dolstra
2013-11-26 18:19:45 +01:00
parent da093461a2
commit 2b1f212494
11 changed files with 35 additions and 14 deletions
+4 -1
View File
@@ -46,7 +46,10 @@ in
before = [ "sysinit.target" "shutdown.target" ];
wantedBy = [ "sysinit.target" "multi-user.target" ];
restartTriggers = [ config.environment.etc."sysctl.d/nixos.conf".source ];
unitConfig.DefaultDependencies = false; # needed to prevent a cycle
unitConfig = {
DefaultDependencies = false; # needed to prevent a cycle
ConditionPathIsReadWrite = "/proc/sys/"; # prevent systemd-sysctl in containers
};
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;