3
0
Fork 0
forked from mirrors/nixpkgs

Added Gateway6 upstart-job and options for it. Sudo configuration for PAM

is added (it is needed anyway), but still only NOPASSWD entries work.

svn path=/nixos/trunk/; revision=8966
This commit is contained in:
Michael Raskin 2007-07-09 11:21:04 +00:00
parent 2cfd8c9a3a
commit bf1033d2cb
5 changed files with 68 additions and 0 deletions

View file

@ -162,6 +162,7 @@ import ../helpers/make-etc.nix {
"login" "login"
"slim" "slim"
"su" "su"
"sudo"
"other" "other"
"passwd" "passwd"
"shadow" "shadow"

4
etc/pam.d/sudo Normal file
View file

@ -0,0 +1,4 @@
auth include common
account include common
password include common
session include common

View file

@ -1028,6 +1028,37 @@
"; ";
} }
{
name = ["services" "gw6c" "enable"];
default = false;
description = "
Whether to enable Gateway6 client (IPv6 tunnel).
";
}
{
name = ["services" "gw6c" "username"];
default = "";
description = "
Your Gateway6 login name, if any.
";
}
{
name = ["services" "gw6c" "password"];
default = "";
description = "
Your Gateway6 password, if any.
";
}
{
name = ["services" "gw6c" "server"];
default = "anon.freenet6.net";
example = "broker.freenet6.net";
description = "
Used Gateway6 server.
";
}
] ]

View file

@ -175,6 +175,13 @@ import ../upstart-jobs/gather.nix {
inherit (pkgs) writeText cups; inherit (pkgs) writeText cups;
}) })
# Gateway6
++ optional ["services" "gw6c" "enable"]
(import ../upstart-jobs/gw6c.nix {
inherit config pkgs;
})
# ALSA sound support. # ALSA sound support.
++ optional ["sound" "enable"] ++ optional ["sound" "enable"]
(import ../upstart-jobs/alsa.nix { (import ../upstart-jobs/alsa.nix {

25
upstart-jobs/gw6c.nix Normal file
View file

@ -0,0 +1,25 @@
{config, pkgs}:
let
getCfg = option: config.get ["services" "gw6c" option];
procps = pkgs.procps;
gw6cService = import ../services/gw6c {
inherit (pkgs) stdenv gw6c coreutils
procps upstart nettools;
username = getCfg "username";
password = getCfg "password";
server = getCfg "server";
};
in
{
name = "gw6c";
users = [];
groups = [];
job = "
description \"Gateway6 client\"
start on network/interfaces started
stop on network/interfaces stop
respawn ${gw6cService}/bin/control start
";
}