mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
Convert "syslogd"
svn path=/nixos/branches/fix-style/; revision=14367
This commit is contained in:
parent
8a8d387b22
commit
29cca0f34c
@ -383,19 +383,6 @@ in
|
||||
services = {
|
||||
|
||||
|
||||
syslogd = {
|
||||
|
||||
tty = mkOption {
|
||||
default = 10;
|
||||
description = "
|
||||
The tty device on which syslogd will print important log
|
||||
messages.
|
||||
";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
ttyBackgrounds = {
|
||||
|
||||
enable = mkOption {
|
||||
@ -1775,6 +1762,7 @@ in
|
||||
(import ../upstart-jobs/pulseaudio.nix)
|
||||
(import ../upstart-jobs/kbd.nix)
|
||||
(import ../upstart-jobs/gw6c.nix) # Gateway6
|
||||
(import ../upstart-jobs/syslogd.nix)
|
||||
|
||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||
(import ../system/nixos-installer.nix)
|
||||
|
@ -71,12 +71,6 @@ let
|
||||
jobs = map makeJob
|
||||
([
|
||||
|
||||
# Syslogd.
|
||||
(import ../upstart-jobs/syslogd.nix {
|
||||
inherit (pkgs) sysklogd writeText;
|
||||
inherit config;
|
||||
})
|
||||
|
||||
# Klogd.
|
||||
(import ../upstart-jobs/klogd.nix {
|
||||
inherit (pkgs) sysklogd writeText;
|
||||
|
@ -1,8 +1,32 @@
|
||||
{sysklogd, writeText, config}:
|
||||
{pkgs, config, ...}:
|
||||
|
||||
###### interface
|
||||
let
|
||||
inherit (pkgs.lib) mkOption mkIf;
|
||||
|
||||
options = {
|
||||
services = {
|
||||
|
||||
syslogd = {
|
||||
|
||||
tty = mkOption {
|
||||
default = 10;
|
||||
description = "
|
||||
The tty device on which syslogd will print important log
|
||||
messages.
|
||||
";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
###### implementation
|
||||
|
||||
let
|
||||
|
||||
syslogConf = writeText "syslog.conf" ''
|
||||
syslogConf = pkgs.writeText "syslog.conf" ''
|
||||
kern.warning;*.err;authpriv.none /dev/tty10
|
||||
|
||||
# Send emergency messages to all users.
|
||||
@ -22,16 +46,24 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
name = "syslogd";
|
||||
|
||||
job = ''
|
||||
description "Syslog daemon"
|
||||
|
||||
start on udev
|
||||
stop on shutdown
|
||||
require = [
|
||||
options
|
||||
];
|
||||
|
||||
env TZ=${config.time.timeZone}
|
||||
|
||||
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
||||
'';
|
||||
services = {
|
||||
extraJobs = [{
|
||||
name = "syslogd";
|
||||
|
||||
job = ''
|
||||
description "Syslog daemon"
|
||||
|
||||
start on udev
|
||||
stop on shutdown
|
||||
|
||||
env TZ=${config.time.timeZone}
|
||||
|
||||
respawn ${pkgs.sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
||||
'';
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user