Rename ‘system.build.systemd’ to ‘systemd.package’

This makes it cheaper to test a new systemd and is more consistent
with other modules.
wip/yesman
Eelco Dolstra 12 years ago
parent ae4e94d9ac
commit 4d983d4955
  1. 2
      modules/services/hardware/udev.nix
  2. 2
      modules/services/hardware/upower.nix
  3. 2
      modules/services/misc/nix-gc.nix
  4. 8
      modules/services/networking/dhcpcd.nix
  5. 2
      modules/services/networking/networkmanager.nix
  6. 2
      modules/services/networking/wpa_supplicant.nix
  7. 2
      modules/services/x11/display-managers/default.nix
  8. 4
      modules/services/x11/display-managers/kdm.nix
  9. 4
      modules/services/x11/display-managers/slim.nix
  10. 4
      modules/system/activation/top-level.nix
  11. 2
      modules/system/boot/kernel.nix
  12. 2
      modules/system/boot/stage-1.nix
  13. 10
      modules/system/boot/systemd.nix
  14. 2
      modules/tasks/kbd.nix
  15. 4
      modules/tasks/network-interfaces.nix

@ -6,7 +6,7 @@ let
inherit (pkgs) stdenv writeText procps;
udev = config.system.build.systemd;
udev = config.systemd.package;
cfg = config.services.udev;

@ -56,7 +56,7 @@ with pkgs.lib;
# the daemon.
powerManagement.resumeCommands =
''
${config.system.build.systemd}/bin/systemctl try-restart upower
${config.systemd.package}/bin/systemctl try-restart upower
'';
};

@ -49,7 +49,7 @@ in
config = {
services.cron.systemCronJobs = mkIf cfg.automatic (singleton
"${cfg.dates} root ${config.system.build.systemd}/bin/systemctl start nix-gc.service");
"${cfg.dates} root ${config.systemd.package}/bin/systemctl start nix-gc.service");
systemd.services."nix-gc" =
{ description = "Nix Garbage Collector";

@ -57,13 +57,13 @@ let
# server hostnames in its config file, then it will never do
# anything ever again ("couldn't resolve ..., giving up on
# it"), so we silently lose time synchronisation.
${config.system.build.systemd}/bin/systemctl try-restart ntpd.service
${config.systemd.package}/bin/systemctl try-restart ntpd.service
${config.system.build.systemd}/bin/systemctl start ip-up.target
${config.systemd.package}/bin/systemctl start ip-up.target
fi
#if [ "$reason" = EXPIRE -o "$reason" = RELEASE -o "$reason" = NOCARRIER ] ; then
# ${config.system.build.systemd}/bin/systemctl start ip-down.target
# ${config.systemd.package}/bin/systemctl start ip-down.target
#fi
'';
@ -126,7 +126,7 @@ in
powerManagement.resumeCommands =
''
# Tell dhcpcd to rebind its interfaces if it's running.
${config.system.build.systemd}/bin/systemctl reload dhcpcd.service
${config.systemd.package}/bin/systemctl reload dhcpcd.service
'';
};

@ -39,7 +39,7 @@ let
ipUpScript = pkgs.writeScript "01nixos-ip-up" ''
#!/bin/sh
if test "$2" = "up"; then
${config.system.build.systemd}/bin/systemctl start ip-up.target
${config.systemd.package}/bin/systemctl start ip-up.target
fi
'';

@ -124,7 +124,7 @@ in
powerManagement.resumeCommands =
''
${config.system.build.systemd}/bin/systemctl try-restart wpa_supplicant
${config.systemd.package}/bin/systemctl try-restart wpa_supplicant
'';
assertions = [{ assertion = !cfg.userControlled.enable || cfg.interfaces != [];

@ -36,7 +36,7 @@ let
# since presumably the desktop environment will handle these.
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
export _INHIBITION_LOCK_TAKEN=1
exec ${config.system.build.systemd}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
fi
${optionalString cfg.startOpenSSHAgent ''

@ -12,8 +12,8 @@ let
defaultConfig =
''
[Shutdown]
HaltCmd=${config.system.build.systemd}/sbin/shutdown -h now
RebootCmd=${config.system.build.systemd}/sbin/shutdown -r now
HaltCmd=${config.systemd.package}/sbin/shutdown -h now
RebootCmd=${config.systemd.package}/sbin/shutdown -r now
${optionalString (config.system.boot.loader.id == "grub") ''
BootManager=${if config.boot.loader.grub.version == 2 then "Grub2" else "Grub"}
''}

@ -14,8 +14,8 @@ let
xserver_arguments ${dmcfg.xserverArgs}
sessions ${pkgs.lib.concatStringsSep "," (dmcfg.session.names ++ ["custom"])}
login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
halt_cmd ${config.system.build.systemd}/sbin/shutdown -h now
reboot_cmd ${config.system.build.systemd}/sbin/shutdown -r now
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
reboot_cmd ${config.systemd.package}/sbin/shutdown -r now
${optionalString (cfg.defaultUser != "") ("default_user " + cfg.defaultUser)}
${optionalString cfg.autoLogin "auto_login yes"}
'';

@ -120,7 +120,7 @@ let
echo -n "$kernelParams" > $out/kernel-params
echo -n "$configurationName" > $out/configuration-name
echo -n "systemd ${toString config.system.build.systemd.interfaceVersion}" > $out/init-interface-version
echo -n "systemd ${toString config.systemd.package.interfaceVersion}" > $out/init-interface-version
echo -n "$nixosVersion" > $out/nixos-version
mkdir $out/fine-tune
@ -149,7 +149,7 @@ let
buildCommand = systemBuilder;
inherit (pkgs) utillinux;
inherit (config.system.build) systemd;
systemd = config.systemd.package;
inherit children;
kernelParams =

@ -224,7 +224,7 @@ in
serviceConfig =
{ Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${config.system.build.systemd}/lib/systemd/systemd-modules-load";
ExecStart = "${config.systemd.package}/lib/systemd/systemd-modules-load";
# Ignore failed module loads. Typically some of the
# modules in ‘boot.kernelModules’ are "nice to have but
# not required" (e.g. acpi-cpufreq), so we don't want to

@ -9,7 +9,7 @@ with pkgs.lib;
let
udev = config.system.build.systemd;
udev = config.systemd.package;
options = {

@ -8,7 +8,7 @@ let
cfg = config.systemd;
systemd = pkgs.systemd;
systemd = cfg.package;
makeUnit = name: unit:
pkgs.runCommand "unit" { inherit (unit) text; }
@ -340,6 +340,12 @@ in
options = {
systemd.package = mkOption {
default = pkgs.systemd;
type = types.package;
description = "The systemd package.";
};
systemd.units = mkOption {
description = "Definition of systemd units.";
default = {};
@ -457,8 +463,6 @@ in
config = {
system.build.systemd = systemd;
system.build.units = units;
environment.systemPackages = [ systemd ];

@ -85,7 +85,7 @@ in
serviceConfig =
{ Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${config.system.build.systemd}/lib/systemd/systemd-vconsole-setup /dev/tty1";
ExecStart = "${config.systemd.package}/lib/systemd/systemd-vconsole-setup /dev/tty1";
};
restartTriggers = [ vconsoleConf ];
};

@ -350,11 +350,11 @@ in
ip -4 addr add "${i.ipAddress}/${mask}" dev "${i.name}"
# Ensure that the default gateway remains set.
# (Flushing this interface may have removed it.)
${config.system.build.systemd}/bin/systemctl try-restart --no-block network-setup.service
${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
else
echo "skipping configuring interface"
fi
${config.system.build.systemd}/bin/systemctl start ip-up.target
${config.systemd.package}/bin/systemctl start ip-up.target
''
+ optionalString i.proxyARP
''

Loading…
Cancel
Save