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 4d149d8 commit ccce575
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos/modules/config/stevenblack.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ 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 then "stevenblack-blocklist-ipv6" else "stevenblack-blocklist";
defaultText = lib.literalExpression ''if config.networking.enableIPv6 then "stevenblack-blocklist-ipv6" else "stevenblack-blocklist"'';
};

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

0 comments on commit ccce575

Please sign in to comment.