refactor(firewall): drop the firewall wrapper module
This commit is contained in:
@@ -33,10 +33,6 @@ in
|
||||
bluetooth.enable = true;
|
||||
bootloader.enable = true;
|
||||
desktop.niri.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
gaming.enable = true;
|
||||
git.enable = true;
|
||||
keyboard.enable = true;
|
||||
|
||||
@@ -67,11 +67,6 @@ in
|
||||
docker.enable = true;
|
||||
nfc.enable = true;
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = true;
|
||||
# https://wiki.nixos.org/wiki/Intel_Graphics
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
in
|
||||
{
|
||||
options.firewall = {
|
||||
enable = mkEnableOption "firewall";
|
||||
|
||||
allowedTCPPorts = mkOption {
|
||||
type = types.listOf types.port;
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
allowedUDPPorts = mkOption {
|
||||
type = types.listOf types.port;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.firewall.enable {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
inherit (config.firewall) allowedTCPPorts allowedUDPPorts;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -28,6 +28,6 @@ in
|
||||
inherit (iface) macAddress;
|
||||
}) config.wol.interfaces;
|
||||
|
||||
# firewall.allowedUDPPorts = [ 9 ];
|
||||
# networking.firewall.allowedUDPPorts = [ 9 ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user