Migrated from import based to config based
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ ];
|
||||
allowedUDPPorts = [ ];
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.hardware.firewall;
|
||||
in {
|
||||
options = {
|
||||
settings.hardware.firewall.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable firewall
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user