summary refs log tree commit diff
path: root/nixos/modules/services/ttys
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-17 18:52:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-17 18:52:31 +0200
commit179acfb664ed06519ac515eada7bbef677cbee87 (patch)
tree76c599294fe8ce8530b92c8a36f9b2adc7ee0595 /nixos/modules/services/ttys
parent8dcf76480c34520997816d1bf4cfd68c6280ebbd (diff)
downloadnixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar.gz
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar.bz2
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar.lz
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar.xz
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.tar.zst
nixlib-179acfb664ed06519ac515eada7bbef677cbee87.zip
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/services/ttys')
-rw-r--r--nixos/modules/services/ttys/agetty.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix
index c4571ef856f4..df21ebbd9743 100644
--- a/nixos/modules/services/ttys/agetty.nix
+++ b/nixos/modules/services/ttys/agetty.nix
@@ -49,22 +49,19 @@ with lib;
   config = {
 
     systemd.services."getty@" =
-      { baseUnit = "${config.systemd.package}/example/systemd/system/getty@.service";
-        serviceConfig.ExecStart = "@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login --keep-baud %I 115200,38400,9600 $TERM";
+      { serviceConfig.ExecStart = "@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login --keep-baud %I 115200,38400,9600 $TERM";
         restartIfChanged = false;
       };
 
     systemd.services."serial-getty@" =
-      { baseUnit = "${config.systemd.package}/example/systemd/system/serial-getty@.service";
-        serviceConfig.ExecStart =
+      { serviceConfig.ExecStart =
           let speeds = concatStringsSep "," (map toString config.services.mingetty.serialSpeed);
           in "@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login %I ${speeds} $TERM";
         restartIfChanged = false;
       };
 
     systemd.services."container-getty@" =
-      { baseUnit = "${config.systemd.package}/example/systemd/system/container-getty@.service";
-        unitConfig.ConditionPathExists = "/dev/pts/%I"; # Work around being respawned when "machinectl login" exits.
+      { unitConfig.ConditionPathExists = "/dev/pts/%I"; # Work around being respawned when "machinectl login" exits.
         serviceConfig.ExecStart = "@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login --keep-baud pts/%I 115200,38400,9600 $TERM";
         restartIfChanged = false;
       };