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 = {
|
services = {
|
||||||
|
|
||||||
|
|
||||||
syslogd = {
|
|
||||||
|
|
||||||
tty = mkOption {
|
|
||||||
default = 10;
|
|
||||||
description = "
|
|
||||||
The tty device on which syslogd will print important log
|
|
||||||
messages.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ttyBackgrounds = {
|
ttyBackgrounds = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@ -1775,6 +1762,7 @@ in
|
|||||||
(import ../upstart-jobs/pulseaudio.nix)
|
(import ../upstart-jobs/pulseaudio.nix)
|
||||||
(import ../upstart-jobs/kbd.nix)
|
(import ../upstart-jobs/kbd.nix)
|
||||||
(import ../upstart-jobs/gw6c.nix) # Gateway6
|
(import ../upstart-jobs/gw6c.nix) # Gateway6
|
||||||
|
(import ../upstart-jobs/syslogd.nix)
|
||||||
|
|
||||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||||
(import ../system/nixos-installer.nix)
|
(import ../system/nixos-installer.nix)
|
||||||
|
@ -71,12 +71,6 @@ let
|
|||||||
jobs = map makeJob
|
jobs = map makeJob
|
||||||
([
|
([
|
||||||
|
|
||||||
# Syslogd.
|
|
||||||
(import ../upstart-jobs/syslogd.nix {
|
|
||||||
inherit (pkgs) sysklogd writeText;
|
|
||||||
inherit config;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Klogd.
|
# Klogd.
|
||||||
(import ../upstart-jobs/klogd.nix {
|
(import ../upstart-jobs/klogd.nix {
|
||||||
inherit (pkgs) sysklogd writeText;
|
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
|
let
|
||||||
|
|
||||||
syslogConf = writeText "syslog.conf" ''
|
syslogConf = pkgs.writeText "syslog.conf" ''
|
||||||
kern.warning;*.err;authpriv.none /dev/tty10
|
kern.warning;*.err;authpriv.none /dev/tty10
|
||||||
|
|
||||||
# Send emergency messages to all users.
|
# Send emergency messages to all users.
|
||||||
@ -22,6 +46,12 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
require = [
|
||||||
|
options
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
extraJobs = [{
|
||||||
name = "syslogd";
|
name = "syslogd";
|
||||||
|
|
||||||
job = ''
|
job = ''
|
||||||
@ -32,6 +62,8 @@ in
|
|||||||
|
|
||||||
env TZ=${config.time.timeZone}
|
env TZ=${config.time.timeZone}
|
||||||
|
|
||||||
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
respawn ${pkgs.sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
||||||
'';
|
'';
|
||||||
|
}];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user