* Don't include the hostname in option default values. Default values
are included in the manual, so this causes a different manual to be built for each machine. * Clean up indentation of cntlm module. svn path=/nixos/trunk/; revision=34387
This commit is contained in:
parent
6aa4120f3a
commit
87e06b97a3
@ -44,7 +44,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
hostName = mkOption {
|
hostName = mkOption {
|
||||||
default = config.networking.hostName;
|
type = types.uniq types.string;
|
||||||
description = ''Host name advertised on the LAN.'';
|
description = ''Host name advertised on the LAN.'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,6 +93,8 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
services.avahi.hostName = mkDefault config.networking.hostName;
|
||||||
|
|
||||||
users.extraUsers = singleton
|
users.extraUsers = singleton
|
||||||
{ name = "avahi";
|
{ name = "avahi";
|
||||||
uid = config.ids.uids.avahi;
|
uid = config.ids.uids.avahi;
|
||||||
|
@ -13,7 +13,7 @@ in
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.cntlm= {
|
services.cntlm = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
@ -39,9 +39,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
netbios_hostname = mkOption {
|
netbios_hostname = mkOption {
|
||||||
default = config.networking.hostName;
|
type = types.uniq types.string;
|
||||||
description = ''
|
description = ''
|
||||||
The hostname of your workstation.
|
The hostname of your machine.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -73,28 +73,28 @@ in
|
|||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.cntlm.enable {
|
config = mkIf config.services.cntlm.enable {
|
||||||
|
|
||||||
|
services.cntlm.netbios_hostname = mkDefault config.networking.hostName;
|
||||||
|
|
||||||
users.extraUsers = singleton {
|
users.extraUsers = singleton {
|
||||||
name = "cntlm";
|
name = "cntlm";
|
||||||
description = "cntlm system-wide daemon";
|
description = "cntlm system-wide daemon";
|
||||||
home = "/var/empty";
|
home = "/var/empty";
|
||||||
};
|
};
|
||||||
|
|
||||||
jobs.cntlm = {
|
jobs.cntlm =
|
||||||
description = "cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy.";
|
{ description = "CNTLM is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy";
|
||||||
|
|
||||||
startOn = "started network-interfaces";
|
startOn = "started network-interfaces";
|
||||||
environment = {
|
|
||||||
};
|
|
||||||
|
|
||||||
preStart = '' '';
|
daemonType = "fork";
|
||||||
|
|
||||||
daemonType = "fork";
|
exec =
|
||||||
|
''
|
||||||
exec =
|
${pkgs.cntlm}/bin/cntlm -U cntlm \
|
||||||
''
|
-c ${pkgs.writeText "cntlm_config" cfg.extraConfig}
|
||||||
${pkgs.cntlm}/bin/cntlm -U cntlm \
|
'';
|
||||||
-c ${pkgs.writeText "cntlm_config" cfg.extraConfig}
|
};
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.cntlm.extraConfig =
|
services.cntlm.extraConfig =
|
||||||
''
|
''
|
||||||
@ -109,5 +109,7 @@ in
|
|||||||
Listen ${toString port}
|
Listen ${toString port}
|
||||||
'') cfg.port}
|
'') cfg.port}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user