More derp? It's 5am...

This commit is contained in:
Parnell Springmeyer 2017-01-29 05:36:47 -06:00
parent 1cc500ea8e
commit a3e9d77640
No known key found for this signature in database
GPG Key ID: DCCF89258EAD874A

View File

@ -898,7 +898,8 @@ in
# Capabilities won't work unless we have at-least a 4.3 Linux # Capabilities won't work unless we have at-least a 4.3 Linux
# kernel because we need the ambient capability # kernel because we need the ambient capability
security.wrappers = mkIf (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") { security = mkIf (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") {
wrappers = {
ping = { ping = {
source = "${pkgs.iputils.out}/bin/ping"; source = "${pkgs.iputils.out}/bin/ping";
capabilities = "cap_net_raw+p"; capabilities = "cap_net_raw+p";
@ -909,13 +910,16 @@ in
capabilities = "cap_net_raw+p"; capabilities = "cap_net_raw+p";
}; };
}; };
};
# If the linux kernel IS older than 4.3, create setuid wrappers # If the linux kernel IS older than 4.3, create setuid wrappers
# for ping and ping6 # for ping and ping6
security.wrappers = mkIf (versionOlder (getVersion config.boot.kernelPackages.kernel) "4.3") { security = mkIf (versionOlder (getVersion config.boot.kernelPackages.kernel) "4.3") {
wrappers = {
ping.source = "${pkgs.iputils.out}/bin/ping"; ping.source = "${pkgs.iputils.out}/bin/ping";
"ping6".source = "${pkgs.iputils.out}/bin/ping6"; "ping6".source = "${pkgs.iputils.out}/bin/ping6";
}; };
};
# Set the host and domain names in the activation script. Don't # Set the host and domain names in the activation script. Don't
# clear it if it's not configured in the NixOS configuration, # clear it if it's not configured in the NixOS configuration,