Skip to content

Commit

Permalink
nixos/stevenblack: use ipv6 hostfile when using ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 committed Jan 21, 2025
1 parent 2130bee commit 0bd54cf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/modules/config/stevenblack.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,19 @@ in
options.networking.stevenblack = {
enable = mkEnableOption "the stevenblack hosts file blocklist";

package = mkPackageOption pkgs "stevenblack-blocklist" { };
package = mkPackageOption pkgs "stevenblack-blocklist" {
default =
if (config.networking.enableIPv6 or false) then
"stevenblack-blocklist-ipv6"
else
"stevenblack-blocklist";
defaultText = lib.literalExpression ''
if (config.networking.enableIPv6 or false) then
pkgs.stevenblack-blocklist-ipv6
else
pkgs.stevenblack-blocklist
'';
};

block = mkOption {
type = types.listOf (
Expand Down

0 comments on commit 0bd54cf

Please sign in to comment.