3
0
Fork 0
forked from mirrors/nixpkgs

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

This makes it cheaper to test a new systemd and is more consistent
with other modules.
This commit is contained in:
Eelco Dolstra 2013-01-16 13:17:57 +01:00
parent ae4e94d9ac
commit 4d983d4955
15 changed files with 28 additions and 24 deletions

View file

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

View file

@ -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
'';
};

View file

@ -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";

View file

@ -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
'';
};

View file

@ -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
'';

View file

@ -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 != [];

View file

@ -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 ''

View file

@ -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"}
''}

View file

@ -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"}
'';

View file

@ -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 =

View file

@ -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

View file

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

View file

@ -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 ];

View file

@ -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 ];
};

View file

@ -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
''