2012-06-02 01:15:07 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
2012-08-06 16:45:59 +01:00
|
|
|
with import ./systemd-unit-options.nix { inherit config pkgs; };
|
2012-06-02 01:15:07 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2012-06-18 04:31:21 +01:00
|
|
|
cfg = config.boot.systemd;
|
|
|
|
|
2012-10-10 22:55:42 +01:00
|
|
|
systemd = pkgs.systemd_tmp;
|
2012-06-02 01:15:07 +01:00
|
|
|
|
2012-06-18 04:31:21 +01:00
|
|
|
makeUnit = name: unit:
|
|
|
|
pkgs.writeTextFile { name = "unit"; inherit (unit) text; destination = "/${name}"; };
|
2012-06-02 01:15:07 +01:00
|
|
|
|
|
|
|
upstreamUnits =
|
2012-06-14 23:44:56 +01:00
|
|
|
[ # Targets.
|
2012-06-02 01:15:07 +01:00
|
|
|
"basic.target"
|
|
|
|
"sysinit.target"
|
|
|
|
"sockets.target"
|
2012-06-14 23:44:56 +01:00
|
|
|
"graphical.target"
|
|
|
|
"multi-user.target"
|
|
|
|
"getty.target"
|
|
|
|
"rescue.target"
|
|
|
|
"network.target"
|
|
|
|
"nss-lookup.target"
|
|
|
|
"nss-user-lookup.target"
|
|
|
|
"syslog.target"
|
|
|
|
"time-sync.target"
|
2012-08-10 23:56:12 +01:00
|
|
|
#"cryptsetup.target"
|
2012-08-14 23:14:48 +01:00
|
|
|
"sigpwr.target"
|
2012-06-14 23:44:56 +01:00
|
|
|
|
2012-06-15 18:09:22 +01:00
|
|
|
# Udev.
|
2012-07-16 22:47:11 +01:00
|
|
|
"systemd-udevd-control.socket"
|
|
|
|
"systemd-udevd-kernel.socket"
|
|
|
|
"systemd-udevd.service"
|
2012-06-15 18:09:22 +01:00
|
|
|
"systemd-udev-settle.service"
|
|
|
|
"systemd-udev-trigger.service"
|
|
|
|
|
2012-08-14 23:14:48 +01:00
|
|
|
# Hardware (started by udev when a relevant device is plugged in).
|
|
|
|
"sound.target"
|
|
|
|
"bluetooth.target"
|
|
|
|
"printer.target"
|
|
|
|
"smartcard.target"
|
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
# Login stuff.
|
|
|
|
"systemd-logind.service"
|
|
|
|
"autovt@.service"
|
|
|
|
"systemd-vconsole-setup.service"
|
|
|
|
"systemd-user-sessions.service"
|
2012-06-15 18:09:22 +01:00
|
|
|
"dbus-org.freedesktop.login1.service"
|
2012-06-15 19:51:48 +01:00
|
|
|
"user@.service"
|
2012-06-14 23:44:56 +01:00
|
|
|
|
|
|
|
# Journal.
|
|
|
|
"systemd-journald.socket"
|
|
|
|
"systemd-journald.service"
|
2012-07-20 17:02:42 +01:00
|
|
|
"systemd-journal-flush.service"
|
2012-07-16 22:47:11 +01:00
|
|
|
"syslog.socket"
|
2012-06-02 01:15:07 +01:00
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
# SysV init compatibility.
|
|
|
|
"systemd-initctl.socket"
|
|
|
|
"systemd-initctl.service"
|
|
|
|
"runlevel0.target"
|
|
|
|
"runlevel1.target"
|
|
|
|
"runlevel2.target"
|
|
|
|
"runlevel3.target"
|
|
|
|
"runlevel4.target"
|
|
|
|
"runlevel5.target"
|
|
|
|
"runlevel6.target"
|
|
|
|
|
|
|
|
# Random seed.
|
|
|
|
"systemd-random-seed-load.service"
|
|
|
|
"systemd-random-seed-save.service"
|
|
|
|
|
|
|
|
# Utmp maintenance.
|
|
|
|
"systemd-update-utmp-runlevel.service"
|
|
|
|
"systemd-update-utmp-shutdown.service"
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-08-06 21:52:08 +01:00
|
|
|
# Kernel module loading.
|
2012-08-10 23:56:12 +01:00
|
|
|
"systemd-modules-load.service"
|
2012-08-06 21:52:08 +01:00
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
# Filesystems.
|
2012-07-16 22:47:11 +01:00
|
|
|
"systemd-fsck@.service"
|
|
|
|
"systemd-fsck-root.service"
|
2012-06-14 23:44:56 +01:00
|
|
|
"systemd-remount-fs.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
"local-fs.target"
|
|
|
|
"local-fs-pre.target"
|
|
|
|
"remote-fs.target"
|
|
|
|
"remote-fs-pre.target"
|
|
|
|
"swap.target"
|
2012-06-14 23:44:56 +01:00
|
|
|
"dev-hugepages.mount"
|
2012-06-02 01:15:07 +01:00
|
|
|
"dev-mqueue.mount"
|
2012-06-14 23:44:56 +01:00
|
|
|
"sys-fs-fuse-connections.mount"
|
|
|
|
"sys-kernel-config.mount"
|
|
|
|
"sys-kernel-debug.mount"
|
|
|
|
|
|
|
|
# Hibernate / suspend.
|
|
|
|
"hibernate.target"
|
|
|
|
"suspend.target"
|
|
|
|
"sleep.target"
|
2012-07-20 20:40:50 +01:00
|
|
|
"systemd-hibernate.service"
|
|
|
|
"systemd-suspend.service"
|
|
|
|
"systemd-shutdownd.socket"
|
|
|
|
"systemd-shutdownd.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
|
|
|
|
# Reboot stuff.
|
|
|
|
"reboot.target"
|
2012-07-16 22:47:11 +01:00
|
|
|
"systemd-reboot.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
"poweroff.target"
|
2012-07-16 22:47:11 +01:00
|
|
|
"systemd-poweroff.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
"halt.target"
|
2012-07-16 22:47:11 +01:00
|
|
|
"systemd-halt.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
"ctrl-alt-del.target"
|
|
|
|
"shutdown.target"
|
|
|
|
"umount.target"
|
|
|
|
"final.target"
|
2012-08-14 23:14:48 +01:00
|
|
|
"kexec.target"
|
2012-06-14 23:44:56 +01:00
|
|
|
|
2012-06-19 22:02:54 +01:00
|
|
|
# Password entry.
|
|
|
|
"systemd-ask-password-console.path"
|
|
|
|
"systemd-ask-password-console.service"
|
|
|
|
"systemd-ask-password-wall.path"
|
|
|
|
"systemd-ask-password-wall.service"
|
2012-06-02 01:15:07 +01:00
|
|
|
];
|
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
upstreamWants =
|
|
|
|
[ "basic.target.wants"
|
|
|
|
"sysinit.target.wants"
|
|
|
|
"sockets.target.wants"
|
|
|
|
"local-fs.target.wants"
|
|
|
|
"multi-user.target.wants"
|
|
|
|
"shutdown.target.wants"
|
|
|
|
];
|
|
|
|
|
2012-06-18 20:28:31 +01:00
|
|
|
rescueService =
|
|
|
|
''
|
|
|
|
[Unit]
|
|
|
|
Description=Rescue Shell
|
|
|
|
DefaultDependencies=no
|
|
|
|
Conflicts=shutdown.target
|
|
|
|
After=sysinit.target
|
|
|
|
Before=shutdown.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=HOME=/root
|
|
|
|
WorkingDirectory=/root
|
|
|
|
ExecStartPre=-${pkgs.coreutils}/bin/echo 'Welcome to rescue mode. Use "systemctl default" or ^D to enter default mode.'
|
|
|
|
#ExecStart=-/sbin/sulogin
|
|
|
|
ExecStart=-${pkgs.bashInteractive}/bin/bash --login
|
|
|
|
ExecStopPost=-${systemd}/bin/systemctl --fail --no-block default
|
|
|
|
Type=idle
|
|
|
|
StandardInput=tty-force
|
|
|
|
StandardOutput=inherit
|
|
|
|
StandardError=inherit
|
|
|
|
KillMode=process
|
|
|
|
|
|
|
|
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
|
|
|
|
# terminates cleanly.
|
|
|
|
KillSignal=SIGHUP
|
|
|
|
'';
|
|
|
|
|
2012-08-14 23:14:16 +01:00
|
|
|
fsTarget =
|
|
|
|
''
|
|
|
|
[Unit]
|
|
|
|
Description=All File Systems
|
|
|
|
Wants=local-fs.target remote-fs.target
|
|
|
|
'';
|
|
|
|
|
2012-07-19 22:41:42 +01:00
|
|
|
makeJobScript = name: content: "${pkgs.writeScriptBin name content}/bin/${name}";
|
|
|
|
|
2012-10-09 20:14:15 +01:00
|
|
|
unitConfig = { name, config, ... }: {
|
|
|
|
config = {
|
|
|
|
unitConfig =
|
|
|
|
{ Requires = concatStringsSep " " config.requires;
|
|
|
|
Wants = concatStringsSep " " config.wants;
|
|
|
|
After = concatStringsSep " " config.after;
|
|
|
|
Before = concatStringsSep " " config.before;
|
2012-10-10 21:50:41 +01:00
|
|
|
BindsTo = concatStringsSep " " config.bindsTo;
|
2012-10-09 20:14:15 +01:00
|
|
|
PartOf = concatStringsSep " " config.partOf;
|
|
|
|
} // optionalAttrs (config.description != "") {
|
|
|
|
Description = config.description;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2012-08-06 16:45:59 +01:00
|
|
|
serviceConfig = { name, config, ... }: {
|
|
|
|
config = {
|
|
|
|
# Default path for systemd services. Should be quite minimal.
|
|
|
|
path =
|
|
|
|
[ pkgs.coreutils
|
|
|
|
pkgs.findutils
|
|
|
|
pkgs.gnugrep
|
|
|
|
pkgs.gnused
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2012-10-01 21:27:42 +01:00
|
|
|
toOption = x:
|
|
|
|
if x == true then "true"
|
|
|
|
else if x == false then "false"
|
|
|
|
else toString x;
|
|
|
|
|
|
|
|
attrsToSection = as:
|
|
|
|
concatStrings (concatLists (mapAttrsToList (name: value:
|
|
|
|
map (x: ''
|
|
|
|
${name}=${toOption x}
|
|
|
|
'')
|
|
|
|
(if isList value then value else [value]))
|
|
|
|
as));
|
|
|
|
|
2012-10-01 23:58:11 +01:00
|
|
|
targetToUnit = name: def:
|
2012-06-18 20:28:31 +01:00
|
|
|
{ inherit (def) wantedBy;
|
2012-10-01 23:58:11 +01:00
|
|
|
text =
|
|
|
|
''
|
|
|
|
[Unit]
|
|
|
|
${attrsToSection def.unitConfig}
|
|
|
|
'';
|
|
|
|
};
|
2012-06-18 20:28:31 +01:00
|
|
|
|
2012-10-01 23:58:11 +01:00
|
|
|
serviceToUnit = name: def:
|
|
|
|
{ inherit (def) wantedBy;
|
2012-06-18 20:28:31 +01:00
|
|
|
text =
|
|
|
|
''
|
|
|
|
[Unit]
|
2012-10-01 21:27:42 +01:00
|
|
|
${attrsToSection def.unitConfig}
|
2012-06-18 20:28:31 +01:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PATH=${def.path}
|
2012-06-19 04:30:26 +01:00
|
|
|
${concatMapStrings (n: "Environment=${n}=${getAttr n def.environment}\n") (attrNames def.environment)}
|
2012-08-17 18:14:42 +01:00
|
|
|
${optionalString (!def.restartIfChanged) "X-RestartIfChanged=false"}
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-18 20:28:31 +01:00
|
|
|
${optionalString (def.preStart != "") ''
|
2012-07-19 22:41:42 +01:00
|
|
|
ExecStartPre=${makeJobScript "${name}-prestart.sh" ''
|
2012-06-18 20:28:31 +01:00
|
|
|
#! ${pkgs.stdenv.shell} -e
|
|
|
|
${def.preStart}
|
|
|
|
''}
|
|
|
|
''}
|
|
|
|
|
|
|
|
${optionalString (def.script != "") ''
|
2012-07-19 22:41:42 +01:00
|
|
|
ExecStart=${makeJobScript "${name}.sh" ''
|
2012-06-18 20:28:31 +01:00
|
|
|
#! ${pkgs.stdenv.shell} -e
|
|
|
|
${def.script}
|
|
|
|
''}
|
|
|
|
''}
|
|
|
|
|
2012-10-01 21:45:49 +01:00
|
|
|
${optionalString (def.postStart != "") ''
|
|
|
|
ExecStartPost=${makeJobScript "${name}-poststart.sh" ''
|
|
|
|
#! ${pkgs.stdenv.shell} -e
|
|
|
|
${def.postStart}
|
|
|
|
''}
|
|
|
|
''}
|
|
|
|
|
2012-10-10 22:55:13 +01:00
|
|
|
${optionalString (def.postStop != "") ''
|
|
|
|
ExecStopPost=${makeJobScript "${name}-poststop.sh" ''
|
|
|
|
#! ${pkgs.stdenv.shell} -e
|
|
|
|
${def.postStop}
|
|
|
|
''}
|
|
|
|
''}
|
|
|
|
|
2012-10-01 21:27:42 +01:00
|
|
|
${attrsToSection def.serviceConfig}
|
2012-06-18 20:28:31 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2012-10-01 23:58:11 +01:00
|
|
|
socketToUnit = name: def:
|
|
|
|
{ inherit (def) wantedBy;
|
|
|
|
text =
|
|
|
|
''
|
|
|
|
[Unit]
|
|
|
|
${attrsToSection def.unitConfig}
|
|
|
|
|
|
|
|
[Socket]
|
|
|
|
${attrsToSection def.socketConfig}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2012-06-18 04:31:21 +01:00
|
|
|
nixosUnits = mapAttrsToList makeUnit cfg.units;
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-16 05:19:43 +01:00
|
|
|
units = pkgs.runCommand "units" { preferLocalBuild = true; }
|
2012-06-02 01:15:07 +01:00
|
|
|
''
|
2012-07-19 22:32:50 +01:00
|
|
|
mkdir -p $out
|
2012-06-02 01:15:07 +01:00
|
|
|
for i in ${toString upstreamUnits}; do
|
|
|
|
fn=${systemd}/example/systemd/system/$i
|
2012-08-10 23:56:12 +01:00
|
|
|
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
|
2012-06-14 23:44:56 +01:00
|
|
|
if [ -L $fn ]; then
|
2012-07-19 22:32:50 +01:00
|
|
|
cp -pd $fn $out/
|
2012-06-14 23:44:56 +01:00
|
|
|
else
|
2012-07-19 22:32:50 +01:00
|
|
|
ln -s $fn $out/
|
2012-06-14 23:44:56 +01:00
|
|
|
fi
|
2012-06-02 01:15:07 +01:00
|
|
|
done
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
for i in ${toString upstreamWants}; do
|
|
|
|
fn=${systemd}/example/systemd/system/$i
|
2012-08-10 23:56:12 +01:00
|
|
|
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
|
2012-07-19 22:32:50 +01:00
|
|
|
x=$out/$(basename $fn)
|
2012-06-14 23:44:56 +01:00
|
|
|
mkdir $x
|
|
|
|
for i in $fn/*; do
|
|
|
|
y=$x/$(basename $i)
|
|
|
|
cp -pd $i $y
|
|
|
|
if ! [ -e $y ]; then rm -v $y; fi
|
|
|
|
done
|
|
|
|
done
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
for i in ${toString nixosUnits}; do
|
2012-08-02 22:26:23 +01:00
|
|
|
ln -s $i/* $out/
|
2012-06-02 01:15:07 +01:00
|
|
|
done
|
2012-06-18 04:31:21 +01:00
|
|
|
|
2012-08-21 16:28:47 +01:00
|
|
|
for i in ${toString cfg.packages}; do
|
|
|
|
ln -s $i/etc/systemd/system/* $out/
|
|
|
|
done
|
|
|
|
|
2012-06-18 04:31:21 +01:00
|
|
|
${concatStrings (mapAttrsToList (name: unit:
|
|
|
|
concatMapStrings (name2: ''
|
2012-07-19 22:32:50 +01:00
|
|
|
mkdir -p $out/${name2}.wants
|
|
|
|
ln -sfn ../${name} $out/${name2}.wants/
|
2012-06-18 04:31:21 +01:00
|
|
|
'') unit.wantedBy) cfg.units)}
|
|
|
|
|
2012-07-19 22:32:50 +01:00
|
|
|
ln -s ${cfg.defaultUnit} $out/default.target
|
2012-07-20 23:32:24 +01:00
|
|
|
|
2012-08-10 23:56:12 +01:00
|
|
|
#ln -s ../getty@tty1.service $out/multi-user.target.wants/
|
2012-08-14 23:14:48 +01:00
|
|
|
ln -s ../remote-fs.target $out/multi-user.target.wants/
|
2012-08-15 20:38:52 +01:00
|
|
|
ln -s ../network.target $out/multi-user.target.wants/
|
2012-06-02 01:15:07 +01:00
|
|
|
''; # */
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
boot.systemd.units = mkOption {
|
2012-06-18 20:28:31 +01:00
|
|
|
description = "Definition of systemd units.";
|
2012-06-18 04:31:21 +01:00
|
|
|
default = {};
|
|
|
|
type = types.attrsOf types.optionSet;
|
|
|
|
options = {
|
|
|
|
text = mkOption {
|
|
|
|
types = types.uniq types.string;
|
|
|
|
description = "Text of this systemd unit.";
|
|
|
|
};
|
|
|
|
wantedBy = mkOption {
|
|
|
|
default = [];
|
|
|
|
types = types.listOf types.string;
|
|
|
|
description = "Units that want (i.e. depend on) this unit.";
|
|
|
|
};
|
|
|
|
};
|
2012-06-18 20:28:31 +01:00
|
|
|
};
|
|
|
|
|
2012-08-21 16:28:47 +01:00
|
|
|
boot.systemd.packages = mkOption {
|
|
|
|
default = [];
|
|
|
|
type = types.listOf types.package;
|
|
|
|
description = "Packages providing systemd units.";
|
|
|
|
};
|
|
|
|
|
2012-10-01 23:58:11 +01:00
|
|
|
boot.systemd.targets = mkOption {
|
|
|
|
default = {};
|
|
|
|
type = types.attrsOf types.optionSet;
|
2012-10-09 20:14:15 +01:00
|
|
|
options = [ unitOptions unitConfig ];
|
2012-10-01 23:58:11 +01:00
|
|
|
description = "Definition of systemd target units.";
|
|
|
|
};
|
|
|
|
|
2012-06-18 20:28:31 +01:00
|
|
|
boot.systemd.services = mkOption {
|
|
|
|
default = {};
|
|
|
|
type = types.attrsOf types.optionSet;
|
2012-10-09 20:14:15 +01:00
|
|
|
options = [ serviceOptions unitConfig serviceConfig ];
|
2012-10-01 23:58:11 +01:00
|
|
|
description = "Definition of systemd service units.";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.systemd.sockets = mkOption {
|
|
|
|
default = {};
|
|
|
|
type = types.attrsOf types.optionSet;
|
2012-10-09 20:14:15 +01:00
|
|
|
options = [ socketOptions unitConfig ];
|
2012-10-01 23:58:11 +01:00
|
|
|
description = "Definition of systemd socket units.";
|
2012-06-14 23:44:56 +01:00
|
|
|
};
|
|
|
|
|
2012-06-18 04:31:21 +01:00
|
|
|
boot.systemd.defaultUnit = mkOption {
|
|
|
|
default = "multi-user.target";
|
|
|
|
type = types.uniq types.string;
|
|
|
|
description = "Default unit started when the system boots.";
|
|
|
|
};
|
2012-07-19 22:32:50 +01:00
|
|
|
|
|
|
|
services.journald.console = mkOption {
|
|
|
|
default = "";
|
|
|
|
type = types.uniq types.string;
|
|
|
|
description = "If non-empty, write log messages to the specified TTY device. Defaults to /dev/console.";
|
|
|
|
};
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-14 23:44:56 +01:00
|
|
|
};
|
|
|
|
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
2012-06-15 18:09:22 +01:00
|
|
|
system.build.systemd = systemd;
|
|
|
|
|
2012-06-16 05:19:43 +01:00
|
|
|
system.build.units = units;
|
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
environment.systemPackages = [ systemd ];
|
2012-08-06 16:45:59 +01:00
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
environment.etc =
|
2012-06-16 05:19:43 +01:00
|
|
|
[ { source = units;
|
2012-07-19 22:32:50 +01:00
|
|
|
target = "systemd/system";
|
|
|
|
}
|
2012-09-22 03:56:13 +01:00
|
|
|
{ source = pkgs.writeText "systemd.conf"
|
|
|
|
''
|
|
|
|
[Manager]
|
|
|
|
'';
|
|
|
|
target = "systemd/system.conf";
|
|
|
|
}
|
2012-07-19 22:32:50 +01:00
|
|
|
{ source = pkgs.writeText "journald.conf"
|
|
|
|
''
|
|
|
|
[Journal]
|
|
|
|
${optionalString (config.services.journald.console != "") ''
|
|
|
|
ForwardToConsole=yes
|
|
|
|
TTYPath=${config.services.journald.console}
|
|
|
|
''}
|
|
|
|
'';
|
|
|
|
target = "systemd/journald.conf";
|
2012-06-02 01:15:07 +01:00
|
|
|
}
|
|
|
|
];
|
2012-06-14 23:44:56 +01:00
|
|
|
|
2012-06-18 20:28:31 +01:00
|
|
|
boot.systemd.units =
|
2012-06-18 22:55:27 +01:00
|
|
|
{ "rescue.service".text = rescueService; }
|
2012-08-14 23:14:16 +01:00
|
|
|
// { "fs.target" = { text = fsTarget; wantedBy = [ "multi-user.target" ]; }; }
|
2012-10-01 23:58:11 +01:00
|
|
|
// mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
|
|
|
|
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services
|
|
|
|
// mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets;
|
2012-06-14 23:44:56 +01:00
|
|
|
|
2012-06-02 01:15:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|