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:
parent
2cfd8c9a3a
commit
bf1033d2cb
|
@ -162,6 +162,7 @@ import ../helpers/make-etc.nix {
|
|||
"login"
|
||||
"slim"
|
||||
"su"
|
||||
"sudo"
|
||||
"other"
|
||||
"passwd"
|
||||
"shadow"
|
||||
|
|
4
etc/pam.d/sudo
Normal file
4
etc/pam.d/sudo
Normal file
|
@ -0,0 +1,4 @@
|
|||
auth include common
|
||||
account include common
|
||||
password include common
|
||||
session include common
|
|
@ -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.
|
||||
";
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -175,6 +175,13 @@ import ../upstart-jobs/gather.nix {
|
|||
inherit (pkgs) writeText cups;
|
||||
})
|
||||
|
||||
# Gateway6
|
||||
++ optional ["services" "gw6c" "enable"]
|
||||
(import ../upstart-jobs/gw6c.nix {
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
|
||||
# ALSA sound support.
|
||||
++ optional ["sound" "enable"]
|
||||
(import ../upstart-jobs/alsa.nix {
|
||||
|
|
25
upstart-jobs/gw6c.nix
Normal file
25
upstart-jobs/gw6c.nix
Normal 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
|
||||
";
|
||||
}
|
Loading…
Reference in a new issue