Automatically append ".service" to the name of service units

This commit is contained in:
Eelco Dolstra 2012-08-23 10:25:27 -04:00
parent cce6e48edf
commit b02c488fde
8 changed files with 9 additions and 9 deletions

View File

@ -105,7 +105,7 @@ in
services.syslogd.extraParams = optional cfg.enableNetworkInput "-r";
# FIXME: restarting syslog seems to break journal logging.
boot.systemd.services."syslog.service" =
boot.systemd.services.syslog =
{ description = "Syslog daemon";
requires = [ "syslog.socket" ];

View File

@ -248,7 +248,7 @@ in
'';
};
boot.systemd.services."nix-daemon.service" =
boot.systemd.services."nix-daemon" =
{ description = "Nix Daemon";
path = [ nix pkgs.openssl pkgs.utillinux ]

View File

@ -314,7 +314,7 @@ in
}
];
boot.systemd.services."set-ssh-keys.service" =
boot.systemd.services."set-ssh-keys" =
{ description = "Update authorized SSH keys";
wantedBy = [ "multi-user.target" ];
@ -328,7 +328,7 @@ in
'';
};
boot.systemd.services."sshd.service" =
boot.systemd.services.sshd =
{ description = "SSH Daemon";
wantedBy = [ "multi-user.target" ];

View File

@ -379,7 +379,7 @@ in
boot.systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
boot.systemd.services."display-manager.service" =
boot.systemd.services."display-manager" =
{ after = [ "systemd-udev-settle.service" ];
restartIfChanged = false;

View File

@ -358,7 +358,7 @@ in
boot.systemd.units =
{ "rescue.service".text = rescueService; }
// { "fs.target" = { text = fsTarget; wantedBy = [ "multi-user.target" ]; }; }
// mapAttrs serviceToUnit cfg.services;
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services;
};

View File

@ -297,7 +297,7 @@ in
boot.systemd.services =
flip mapAttrs' config.jobs (name: job:
nameValuePair "${job.name}.service" job.unit);
nameValuePair job.name job.unit);
};

View File

@ -11,7 +11,7 @@ let kernel = config.boot.kernelPackages.kernel; in
config = {
boot.systemd.services."backdoor.service" =
boot.systemd.services.backdoor =
{ wantedBy = [ "multi-user.target" ];
requires = [ "dev-hvc0.device" ];
after = [ "dev-hvc0.device" ];

View File

@ -39,7 +39,7 @@ if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
boot.extraModulePackages = [ kernel.virtualboxGuestAdditions ];
jobs.virtualbox =
{ description = "VirtualBox service";
{ description = "VirtualBox Guest Services";
wantedBy = [ "multi-user.target" ];
requires = [ "dev-vboxguest.device" ];