mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
hans: rename option
This commit is contained in:
parent
33c34aff2f
commit
30a56d72db
@ -76,10 +76,10 @@ in
|
|||||||
example = "198.51.100.0";
|
example = "198.51.100.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemPings = mkOption {
|
respondToSystemPings = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Respond to ordinary pings";
|
description = "Force hans respond to ordinary pings";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
@ -102,7 +102,7 @@ in
|
|||||||
### implementation
|
### implementation
|
||||||
|
|
||||||
config = mkIf (cfg.server.enable || cfg.clients != {}) {
|
config = mkIf (cfg.server.enable || cfg.clients != {}) {
|
||||||
boot.kernel.sysctl = optionalAttrs cfg.server.systemPings {
|
boot.kernel.sysctl = optionalAttrs cfg.server.respondToSystemPings {
|
||||||
"net.ipv4.icmp_echo_ignore_all" = 1;
|
"net.ipv4.icmp_echo_ignore_all" = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ in
|
|||||||
description = "hans, ip over icmp server daemon";
|
description = "hans, ip over icmp server daemon";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${optionalString cfg.server.systemPings "-r"} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}";
|
script = "${pkgs.hans}/bin/hans -f -u ${hansUser} ${cfg.server.extraConfig} -s ${cfg.server.ip} ${optionalString cfg.server.respondToSystemPings "-r"} ${optionalString (cfg.passwordFile != "") "-p $(cat \"${cfg.passwordFile}\")"}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user