Better Server cfg

This commit is contained in:
soraefir
2026-05-03 02:20:41 +02:00
parent d3a3941591
commit 9377d1ce45
8 changed files with 99 additions and 70 deletions

View File

@@ -52,26 +52,6 @@ let
type = types.str;
default = "";
};
server = {
enable = mkOption {
type = types.bool;
default = false;
};
peers = mkOption {
type = types.listOf types.str;
default = [];
};
forward = mkOption {
type = types.listOf (types.listOf (types.oneOf [ types.str types.int ]));
default = [];
description = "Forwarding rules: [ [srcInterface dstAddr srcPort dstPort] ... ]";
example = [
[ "ens3" "10.10.1.2" "IPV6" 22 2222 ]
[ "ens3" "10.10.1.2" "IPV6" 80 80 ]
[ "ens3" "10.10.1.2" "IPV6" 443 443 ]
];
};
};
};
};
makeOpt = with lib; {
@@ -114,7 +94,6 @@ let
type = types.str;
default = "3306";
};
configPath = mkOption {
type = types.str;
default = "/media/config";
@@ -123,6 +102,38 @@ let
type = types.str;
default = "/media/data";
};
arion = mkOption {
type = type.bool;
default = false;
};
openssh = mkOption {
type = type.bool;
default = false;
};
wireguard = mkOption {
type = type.bool;
default = false;
};
nftables = {
enable = mkOption {
type = type.bool;
default = false;
};
ifs = mkOption {
type = types.listOf types.str;
default = [ ];
};
ports = mkOption {
type = types.listOf (types.listOf (types.oneOf [ types.str types.int ]));
default = [];
description = "Forwarding rules: [ [srcInterface dstAddr srcPort dstPort] ... ]";
example = [
[ "ens3" "10.10.1.2" "IPV6" 22 2222 ]
[ "ens3" "10.10.1.2" "IPV6" 80 80 ]
[ "ens3" "10.10.1.2" "IPV6" 443 443 ]
];
};
};
};
in with lib; {