mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 04:42:07 +03:00
To ease migration to systemd, generate units from the ‘jobs’ option
Also get rid of the ‘buildHook’ job option because it wasn't very useful.
This commit is contained in:
parent
66f4d10843
commit
4a95f8996b
@ -67,7 +67,7 @@ in
|
|||||||
'' + optionalString config.services.nscd.enable ''
|
'' + optionalString config.services.nscd.enable ''
|
||||||
# Invalidate the nscd cache whenever resolv.conf is
|
# Invalidate the nscd cache whenever resolv.conf is
|
||||||
# regenerated.
|
# regenerated.
|
||||||
libc_restart='${pkgs.upstart}/sbin/start invalidate-nscd'
|
libc_restart='${pkgs.systemd}/bin/systemctl start invalidate-nscd.service'
|
||||||
'' );
|
'' );
|
||||||
target = "resolvconf.conf";
|
target = "resolvconf.conf";
|
||||||
}
|
}
|
||||||
|
@ -199,9 +199,6 @@
|
|||||||
./system/boot/stage-2.nix
|
./system/boot/stage-2.nix
|
||||||
./system/boot/systemd.nix
|
./system/boot/systemd.nix
|
||||||
./system/etc/etc.nix
|
./system/etc/etc.nix
|
||||||
./system/upstart-events/control-alt-delete.nix
|
|
||||||
./system/upstart-events/runlevel.nix
|
|
||||||
./system/upstart-events/shutdown.nix
|
|
||||||
./system/upstart/upstart.nix
|
./system/upstart/upstart.nix
|
||||||
./tasks/cpu-freq.nix
|
./tasks/cpu-freq.nix
|
||||||
./tasks/filesystems.nix
|
./tasks/filesystems.nix
|
||||||
|
@ -159,12 +159,7 @@ in
|
|||||||
environment.systemPackages = [ pkgs.nagios ];
|
environment.systemPackages = [ pkgs.nagios ];
|
||||||
|
|
||||||
jobs.nagios =
|
jobs.nagios =
|
||||||
{ # Run `nagios -v' to check the validity of the configuration file so
|
{ description = "Nagios monitoring daemon";
|
||||||
# that a nixos-rebuild fails *before* we kill the running Nagios
|
|
||||||
# daemon.
|
|
||||||
buildHook = "${pkgs.nagios}/bin/nagios -v ${nagiosCfgFile}";
|
|
||||||
|
|
||||||
description = "Nagios monitoring daemon";
|
|
||||||
|
|
||||||
startOn = "started network-interfaces";
|
startOn = "started network-interfaces";
|
||||||
stopOn = "stopping network-interfaces";
|
stopOn = "stopping network-interfaces";
|
||||||
|
@ -329,7 +329,6 @@ in
|
|||||||
${pkgs.openssh}/sbin/sshd -h ${cfg.hostKeyPath} \
|
${pkgs.openssh}/sbin/sshd -h ${cfg.hostKeyPath} \
|
||||||
-f ${pkgs.writeText "sshd_config" cfg.extraConfig}
|
-f ${pkgs.writeText "sshd_config" cfg.extraConfig}
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
|
||||||
Type=forking
|
Type=forking
|
||||||
KillMode=process
|
KillMode=process
|
||||||
PIDFile=/run/sshd.pid
|
PIDFile=/run/sshd.pid
|
||||||
|
@ -20,15 +20,14 @@ in
|
|||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
description = "
|
description = "Whether to enable the Name Service Cache Daemon.";
|
||||||
Whether to enable the Name Service Cache Daemon.
|
|
||||||
";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.nscd.enable {
|
config = mkIf config.services.nscd.enable {
|
||||||
|
@ -56,6 +56,7 @@ with pkgs.lib;
|
|||||||
config = {
|
config = {
|
||||||
|
|
||||||
# Generate a separate job for each tty.
|
# Generate a separate job for each tty.
|
||||||
|
/*
|
||||||
jobs = listToAttrs (map (tty: nameValuePair tty {
|
jobs = listToAttrs (map (tty: nameValuePair tty {
|
||||||
|
|
||||||
startOn =
|
startOn =
|
||||||
@ -72,6 +73,7 @@ with pkgs.lib;
|
|||||||
environment.LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive";
|
environment.LOCALE_ARCHIVE = "/var/run/current-system/sw/lib/locale/locale-archive";
|
||||||
|
|
||||||
}) config.services.mingetty.ttys);
|
}) config.services.mingetty.ttys);
|
||||||
|
*/
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ # Friendly greeting on the virtual consoles.
|
{ # Friendly greeting on the virtual consoles.
|
||||||
|
@ -532,18 +532,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
jobs.httpd =
|
jobs.httpd =
|
||||||
{ # Statically verify the syntactic correctness of the generated
|
{ description = "Apache HTTPD";
|
||||||
# httpd.conf. !!! this is impure! It doesn't just check for
|
|
||||||
# syntax, but also whether the Apache user/group exist,
|
|
||||||
# whether SSL keys exist, etc.
|
|
||||||
buildHook =
|
|
||||||
''
|
|
||||||
echo
|
|
||||||
echo '=== Checking the generated Apache configuration file ==='
|
|
||||||
${httpd}/bin/httpd -f ${httpdConf} -t || true
|
|
||||||
'';
|
|
||||||
|
|
||||||
description = "Apache HTTPD";
|
|
||||||
|
|
||||||
startOn = "started networking and filesystem"
|
startOn = "started networking and filesystem"
|
||||||
# Hacky. Some subservices depend on Postgres
|
# Hacky. Some subservices depend on Postgres
|
||||||
|
@ -192,4 +192,4 @@ fi
|
|||||||
echo "starting systemd..."
|
echo "starting systemd..."
|
||||||
PATH=/var/run/current-system/systemd/lib/systemd \
|
PATH=/var/run/current-system/systemd/lib/systemd \
|
||||||
MODULE_DIR=/var/run/current-system/kernel-modules/lib/modules \
|
MODULE_DIR=/var/run/current-system/kernel-modules/lib/modules \
|
||||||
exec systemd --log-target journal --log-level debug --crash-shell
|
exec systemd --log-target journal # --log-level debug --crash-shell
|
||||||
|
@ -111,7 +111,7 @@ let
|
|||||||
|
|
||||||
nixosUnits = mapAttrsToList makeUnit config.boot.systemd.units;
|
nixosUnits = mapAttrsToList makeUnit config.boot.systemd.units;
|
||||||
|
|
||||||
systemUnits = pkgs.runCommand "system-units" { }
|
units = pkgs.runCommand "units" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out/system
|
mkdir -p $out/system
|
||||||
for i in ${toString upstreamUnits}; do
|
for i in ${toString upstreamUnits}; do
|
||||||
@ -161,10 +161,12 @@ in
|
|||||||
|
|
||||||
system.build.systemd = systemd;
|
system.build.systemd = systemd;
|
||||||
|
|
||||||
|
system.build.units = units;
|
||||||
|
|
||||||
environment.systemPackages = [ systemd ];
|
environment.systemPackages = [ systemd ];
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
[ { source = systemUnits;
|
[ { source = units;
|
||||||
target = "systemd";
|
target = "systemd";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -177,7 +179,7 @@ in
|
|||||||
After=multi-user.target
|
After=multi-user.target
|
||||||
Conflicts=rescue.target
|
Conflicts=rescue.target
|
||||||
AllowIsolate=yes
|
AllowIsolate=yes
|
||||||
Wants=sshd.service autovt@tty1.service # FIXME
|
Wants=sshd.service
|
||||||
'';
|
'';
|
||||||
|
|
||||||
boot.systemd.units."getty@.service" =
|
boot.systemd.units."getty@.service" =
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
###### implementation
|
|
||||||
|
|
||||||
{
|
|
||||||
jobs.control_alt_delete =
|
|
||||||
{ name = "control-alt-delete";
|
|
||||||
|
|
||||||
startOn = "control-alt-delete";
|
|
||||||
|
|
||||||
task = true;
|
|
||||||
|
|
||||||
script =
|
|
||||||
''
|
|
||||||
shutdown -r now 'Ctrl-Alt-Delete pressed'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.poweroff =
|
|
||||||
''
|
|
||||||
# Allow the kernel to find the poweroff command. This is used
|
|
||||||
# (for instance) by Xen's "xm shutdown" command to signal a
|
|
||||||
# guest to shut down cleanly.
|
|
||||||
echo ${config.system.build.upstart}/sbin/poweroff > /proc/sys/kernel/poweroff_cmd
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
with pkgs.lib;
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
# After booting, go to runlevel 2. (NixOS doesn't really use
|
|
||||||
# runlevels, but this keeps wtmp happy.)
|
|
||||||
jobs.boot =
|
|
||||||
{ name = "boot";
|
|
||||||
startOn = "startup";
|
|
||||||
task = true;
|
|
||||||
restartIfChanged = false;
|
|
||||||
script = "telinit 2";
|
|
||||||
};
|
|
||||||
|
|
||||||
jobs.runlevel =
|
|
||||||
{ name = "runlevel";
|
|
||||||
|
|
||||||
startOn = "runlevel [0123456S]";
|
|
||||||
|
|
||||||
task = true;
|
|
||||||
|
|
||||||
restartIfChanged = false;
|
|
||||||
|
|
||||||
script =
|
|
||||||
''
|
|
||||||
case "$RUNLEVEL" in
|
|
||||||
0) initctl start shutdown --no-wait MODE=poweroff;;
|
|
||||||
1) initctl start shutdown --no-wait MODE=maintenance;;
|
|
||||||
2) true;;
|
|
||||||
6) initctl start shutdown --no-wait MODE=reboot;;
|
|
||||||
*) echo "Unsupported runlevel: $RUNLEVEL";;
|
|
||||||
esac
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -12,19 +12,90 @@ let
|
|||||||
groupExists = g:
|
groupExists = g:
|
||||||
(g == "") || any (gg: gg.name == g) (attrValues config.users.extraGroups);
|
(g == "") || any (gg: gg.name == g) (attrValues config.users.extraGroups);
|
||||||
|
|
||||||
# From a job description, generate an Upstart job file.
|
# From a job description, generate an systemd unit file.
|
||||||
makeJob = job:
|
makeUnit = job:
|
||||||
|
|
||||||
let
|
let
|
||||||
hasMain = job.script != "" || job.exec != "";
|
hasMain = job.script != "" || job.exec != "";
|
||||||
|
|
||||||
env = config.system.upstartEnvironment // job.environment;
|
env = config.system.upstartEnvironment // job.environment;
|
||||||
|
|
||||||
jobText =
|
preStartScript = pkgs.writeScript "${job.name}-pre-start.sh"
|
||||||
let log = "/var/log/upstart/${job.name}"; in
|
|
||||||
''
|
''
|
||||||
# Upstart job `${job.name}'. This is a generated file. Do not edit.
|
#! ${pkgs.stdenv.shell} -e
|
||||||
|
${job.preStart}
|
||||||
|
'';
|
||||||
|
|
||||||
|
startScript = pkgs.writeScript "${job.name}-start.sh"
|
||||||
|
''
|
||||||
|
#! ${pkgs.stdenv.shell} -e
|
||||||
|
${if job.script != "" then job.script else ''
|
||||||
|
exec ${job.exec}
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postStartScript = pkgs.writeScript "${job.name}-post-start.sh"
|
||||||
|
''
|
||||||
|
#! ${pkgs.stdenv.shell} -e
|
||||||
|
${job.postStart}
|
||||||
|
'';
|
||||||
|
|
||||||
|
preStopScript = pkgs.writeScript "${job.name}-pre-stop.sh"
|
||||||
|
''
|
||||||
|
#! ${pkgs.stdenv.shell} -e
|
||||||
|
${job.preStop}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postStopScript = pkgs.writeScript "${job.name}-post-stop.sh"
|
||||||
|
''
|
||||||
|
#! ${pkgs.stdenv.shell} -e
|
||||||
|
${job.postStop}
|
||||||
|
'';
|
||||||
|
|
||||||
|
text =
|
||||||
|
''
|
||||||
|
[Unit]
|
||||||
|
Description=${job.description}
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=PATH=${job.path}
|
||||||
|
${concatMapStrings (n: "Environment=${n}=\"${getAttr n env}\"\n") (attrNames env)}
|
||||||
|
|
||||||
|
${optionalString (job.preStart != "" && (job.script != "" || job.exec != "")) ''
|
||||||
|
ExecStartPre=${preStartScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (job.preStart != "" && job.script == "" && job.exec == "") ''
|
||||||
|
ExecStart=${preStartScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (job.script != "" || job.exec != "") ''
|
||||||
|
ExecStart=${startScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (job.postStart != "") ''
|
||||||
|
ExecStartPost=${postStartScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (job.preStop != "") ''
|
||||||
|
ExecStop=${preStopScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${optionalString (job.postStop != "") ''
|
||||||
|
ExecStopPost=${postStopScript}
|
||||||
|
''}
|
||||||
|
|
||||||
|
${if job.script == "" && job.exec == "" then "Type=oneshot\nRemainAfterExit=true" else
|
||||||
|
if job.daemonType == "fork" then "Type=forking\nGuessMainPID=true" else
|
||||||
|
if job.daemonType == "none" then "" else
|
||||||
|
throw "invalid daemon type `${job.daemonType}'"}
|
||||||
|
|
||||||
|
${optionalString (!job.task && job.respawn) "Restart=always"}
|
||||||
|
'';
|
||||||
|
|
||||||
|
/*
|
||||||
|
text =
|
||||||
|
''
|
||||||
${optionalString (job.description != "") ''
|
${optionalString (job.description != "") ''
|
||||||
description "${job.description}"
|
description "${job.description}"
|
||||||
''}
|
''}
|
||||||
@ -45,9 +116,6 @@ let
|
|||||||
${optionalString (job.console != "") "console ${job.console}"}
|
${optionalString (job.console != "") "console ${job.console}"}
|
||||||
|
|
||||||
pre-start script
|
pre-start script
|
||||||
${optionalString (job.console == "") ''
|
|
||||||
exec >> ${log} 2>&1
|
|
||||||
''}
|
|
||||||
ln -sfn "$(readlink -f "/etc/init/${job.name}.conf")" /var/run/upstart-jobs/${job.name}
|
ln -sfn "$(readlink -f "/etc/init/${job.name}.conf")" /var/run/upstart-jobs/${job.name}
|
||||||
${optionalString (job.preStart != "") ''
|
${optionalString (job.preStart != "") ''
|
||||||
source ${jobHelpers}
|
source ${jobHelpers}
|
||||||
@ -60,9 +128,6 @@ let
|
|||||||
else if job.script != "" then
|
else if job.script != "" then
|
||||||
''
|
''
|
||||||
script
|
script
|
||||||
${optionalString (job.console == "") ''
|
|
||||||
exec >> ${log} 2>&1
|
|
||||||
''}
|
|
||||||
source ${jobHelpers}
|
source ${jobHelpers}
|
||||||
${job.script}
|
${job.script}
|
||||||
end script
|
end script
|
||||||
@ -70,7 +135,6 @@ let
|
|||||||
else if job.exec != "" && job.console == "" then
|
else if job.exec != "" && job.console == "" then
|
||||||
''
|
''
|
||||||
script
|
script
|
||||||
exec >> ${log} 2>&1
|
|
||||||
exec ${job.exec}
|
exec ${job.exec}
|
||||||
end script
|
end script
|
||||||
''
|
''
|
||||||
@ -83,9 +147,6 @@ let
|
|||||||
|
|
||||||
${optionalString (job.postStart != "") ''
|
${optionalString (job.postStart != "") ''
|
||||||
post-start script
|
post-start script
|
||||||
${optionalString (job.console == "") ''
|
|
||||||
exec >> ${log} 2>&1
|
|
||||||
''}
|
|
||||||
source ${jobHelpers}
|
source ${jobHelpers}
|
||||||
${job.postStart}
|
${job.postStart}
|
||||||
end script
|
end script
|
||||||
@ -98,9 +159,6 @@ let
|
|||||||
# (upstart 0.6.5, job.c:562)
|
# (upstart 0.6.5, job.c:562)
|
||||||
optionalString (job.preStop != "") (assert hasMain; ''
|
optionalString (job.preStop != "") (assert hasMain; ''
|
||||||
pre-stop script
|
pre-stop script
|
||||||
${optionalString (job.console == "") ''
|
|
||||||
exec >> ${log} 2>&1
|
|
||||||
''}
|
|
||||||
source ${jobHelpers}
|
source ${jobHelpers}
|
||||||
${job.preStop}
|
${job.preStop}
|
||||||
end script
|
end script
|
||||||
@ -108,9 +166,6 @@ let
|
|||||||
|
|
||||||
${optionalString (job.postStop != "") ''
|
${optionalString (job.postStop != "") ''
|
||||||
post-stop script
|
post-stop script
|
||||||
${optionalString (job.console == "") ''
|
|
||||||
exec >> ${log} 2>&1
|
|
||||||
''}
|
|
||||||
source ${jobHelpers}
|
source ${jobHelpers}
|
||||||
${job.postStop}
|
${job.postStop}
|
||||||
end script
|
end script
|
||||||
@ -132,14 +187,9 @@ let
|
|||||||
|
|
||||||
${job.extraConfig}
|
${job.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
*/
|
||||||
|
|
||||||
in
|
in text;
|
||||||
pkgs.runCommand ("upstart-" + job.name + ".conf")
|
|
||||||
{ inherit (job) buildHook; inherit jobText; preferLocalBuild = true; }
|
|
||||||
''
|
|
||||||
eval "$buildHook"
|
|
||||||
echo "$jobText" > $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
# Shell functions for use in Upstart jobs.
|
# Shell functions for use in Upstart jobs.
|
||||||
@ -199,17 +249,6 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
buildHook = mkOption {
|
|
||||||
type = types.string;
|
|
||||||
default = "true";
|
|
||||||
description = ''
|
|
||||||
Command run while building the Upstart job. Can be used
|
|
||||||
to perform simple regression tests (e.g., the Apache
|
|
||||||
Upstart job uses it to check the syntax of the generated
|
|
||||||
<filename>httpd.conf</filename>.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
description = mkOption {
|
description = mkOption {
|
||||||
type = types.string;
|
type = types.string;
|
||||||
default = "";
|
default = "";
|
||||||
@ -401,13 +440,10 @@ let
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
jobDrv = mkOption {
|
unitText = mkOption {
|
||||||
default = makeJob config;
|
default = makeUnit config;
|
||||||
type = types.uniq types.package;
|
type = types.uniq types.string;
|
||||||
description = ''
|
description = "Generated text of the systemd unit corresponding to this job.";
|
||||||
Derivation that builds the Upstart job file. The default
|
|
||||||
value is generated from other options.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -448,16 +484,6 @@ in
|
|||||||
options = [ jobOptions upstartJob ];
|
options = [ jobOptions upstartJob ];
|
||||||
};
|
};
|
||||||
|
|
||||||
tests.upstartJobs = mkOption {
|
|
||||||
internal = true;
|
|
||||||
default = {};
|
|
||||||
description = ''
|
|
||||||
Make it easier to build individual Upstart jobs. (e.g.,
|
|
||||||
<command>nix-build /etc/nixos/nixos -A
|
|
||||||
tests.upstartJobs.xserver</command>).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
system.upstartEnvironment = mkOption {
|
system.upstartEnvironment = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = {};
|
default = {};
|
||||||
@ -476,24 +502,9 @@ in
|
|||||||
|
|
||||||
system.build.upstart = upstart;
|
system.build.upstart = upstart;
|
||||||
|
|
||||||
/*
|
boot.systemd.units =
|
||||||
environment.etc =
|
flip mapAttrs' config.jobs (name: job:
|
||||||
flip map (attrValues config.jobs) (job:
|
nameValuePair "${job.name}.service" job.unitText);
|
||||||
{ source = job.jobDrv;
|
|
||||||
target = "init/${job.name}.conf";
|
|
||||||
} );
|
|
||||||
|
|
||||||
# Upstart can listen on the system bus, allowing normal users to
|
|
||||||
# do status queries.
|
|
||||||
services.dbus.packages = [ upstart ];
|
|
||||||
|
|
||||||
system.activationScripts.chownJobLogs = stringAfter ["var"]
|
|
||||||
(concatMapStrings (job: ''
|
|
||||||
touch /var/log/upstart/${job.name}
|
|
||||||
${optionalString (job.setuid != "") "chown ${job.setuid} /var/log/upstart/${job.name}"}
|
|
||||||
${optionalString (job.setgid != "") "chown :${job.setgid} /var/log/upstart/${job.name}"}
|
|
||||||
'') (attrValues config.jobs));
|
|
||||||
*/
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ in
|
|||||||
system.fsPackages = [ pkgs.dosfstools ];
|
system.fsPackages = [ pkgs.dosfstools ];
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[ pkgs.ntfs3g pkgs.cifs_utils pkgs.mountall ]
|
[ pkgs.ntfs3g pkgs.cifs_utils ]
|
||||||
++ config.system.fsPackages;
|
++ config.system.fsPackages;
|
||||||
|
|
||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
@ -182,6 +182,7 @@ in
|
|||||||
target = "fstab";
|
target = "fstab";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
jobs.mountall =
|
jobs.mountall =
|
||||||
{ startOn = "started udev or config-changed";
|
{ startOn = "started udev or config-changed";
|
||||||
|
|
||||||
@ -309,6 +310,7 @@ in
|
|||||||
initctl start --no-wait mountall
|
initctl start --no-wait mountall
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,9 @@ in
|
|||||||
|
|
||||||
inherit requiredTTYs; # pass it to ./modules/tasks/tty-backgrounds.nix
|
inherit requiredTTYs; # pass it to ./modules/tasks/tty-backgrounds.nix
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.kbd];
|
environment.systemPackages = [ pkgs.kbd ];
|
||||||
|
|
||||||
|
/* FIXME - remove; this is handled by systemd now.
|
||||||
|
|
||||||
jobs.kbd =
|
jobs.kbd =
|
||||||
{ description = "Keyboard / console initialisation";
|
{ description = "Keyboard / console initialisation";
|
||||||
@ -120,6 +122,7 @@ in
|
|||||||
${pkgs.kbd}/bin/loadkeys '${consoleKeyMap}'
|
${pkgs.kbd}/bin/loadkeys '${consoleKeyMap}'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -267,7 +267,8 @@ in
|
|||||||
|
|
||||||
${optionalString (cfg.interfaces != [] || cfg.localCommands != "") ''
|
${optionalString (cfg.interfaces != [] || cfg.localCommands != "") ''
|
||||||
# Emit the ip-up event (e.g. to start ntpd).
|
# Emit the ip-up event (e.g. to start ntpd).
|
||||||
initctl emit -n ip-up
|
#FIXME
|
||||||
|
#initctl emit -n ip-up
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user