diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-17 18:52:31 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-17 18:52:31 +0200 |
commit | 179acfb664ed06519ac515eada7bbef677cbee87 (patch) | |
tree | 76c599294fe8ce8530b92c8a36f9b2adc7ee0595 /nixos/modules/config/sysctl.nix | |
parent | 8dcf76480c34520997816d1bf4cfd68c6280ebbd (diff) |
Allow upstream systemd units to be extended
If you define a unit, and either systemd or a package in systemd.packages already provides that unit, then we now generate a file /etc/systemd/system/<unit>.d/overrides.conf. This makes it possible to use upstream units, while allowing them to be customised from the NixOS configuration. For instance, the module nix-daemon.nix now uses the units provided by the Nix package. And all unit definitions that duplicated upstream systemd units are finally gone. This makes the baseUnit option unnecessary, so I've removed it.
Diffstat (limited to 'nixos/modules/config/sysctl.nix')
-rw-r--r-- | nixos/modules/config/sysctl.nix | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index b4cd22caa79d4..542360219193d 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -45,19 +45,8 @@ in ) config.boot.kernel.sysctl); systemd.services.systemd-sysctl = - { description = "Apply Kernel Variables"; - before = [ "sysinit.target" "shutdown.target" ]; - wantedBy = [ "sysinit.target" "multi-user.target" ]; + { wantedBy = [ "multi-user.target" ]; restartTriggers = [ config.environment.etc."sysctl.d/nixos.conf".source ]; - unitConfig = { - DefaultDependencies = false; # needed to prevent a cycle - ConditionPathIsReadWrite = "/proc/sys/"; # prevent systemd-sysctl in containers - }; - serviceConfig = { - Type = "oneshot"; - RemainAfterExit = true; - ExecStart = "${config.systemd.package}/lib/systemd/systemd-sysctl"; - }; }; # Enable hardlink and symlink restrictions. See |