Compare commits

...

3 commits

Author SHA1 Message Date
Jermeiah S
55220177d2
fix import comment error on arma
All checks were successful
/ check (push) Successful in 2m58s
/ deploy (push) Has been skipped
2025-07-01 17:39:10 -04:00
Jermeiah S
9e3f2a5982
incus now behind enable flag 2025-07-01 17:33:31 -04:00
Jermeiah S
9fc3927c86
firewall improved to use module tables feature 2025-07-01 17:32:55 -04:00
3 changed files with 53 additions and 52 deletions

View file

@ -14,7 +14,7 @@ in
{ {
imports = [ imports = [
self.nixosModules.default self.nixosModules.default
# "${modulesPath}/virtualisation/lxc-container.nix" "${modulesPath}/virtualisation/lxc-container.nix"
]; ];
services.arma.enable = true; services.arma.enable = true;

View file

@ -1,14 +1,17 @@
{ {
lib, # lib,
pkgs, # pkgs,
config, # config,
... ...
}: }:
{ {
networking.nftables = { networking.nftables = {
enable = true; enable = true;
ruleset = '' tables = {
table inet filter { yggSsh = {
name = "yggSsh";
family = "inet";
content = ''
chain input { chain input {
type filter hook input priority filter; policy accept; type filter hook input priority filter; policy accept;
ct state related,established accept ct state related,established accept
@ -27,7 +30,8 @@
chain output { chain output {
type filter hook output priority filter; policy accept; type filter hook output priority filter; policy accept;
} }
}
''; '';
}; };
};
};
} }

View file

@ -1,9 +1,17 @@
{ {
lib,
config,
pkgs,
...
}:
{
options.iscontainer.enable = lib.mkEnableOption "iscontainer" // {
default = true;
};
config = lib.mkIf config.iscontainer.enable {
systemd.network = { systemd.network = {
enable = true; enable = true;
networks."50-eth0" = { networks."50-eth0" = {
matchConfig.Name = "eth0"; matchConfig.Name = "eth0";
networkConfig = { networkConfig = {
DHCP = "ipv4"; DHCP = "ipv4";
@ -14,21 +22,10 @@
}; };
networking = { networking = {
# firewall = {
firewall.enable = false; firewall.enable = false;
# interfaces = {
# ygg0 = {
# allowedTCPPorts = [ 22 ];
# allowedUDPPorts = [ ];
# };
# };
# # Default deny policy for all interfaces (including ygg0)
# allowedTCPPorts = [ ];
# allowedUDPPorts = [ ];
# };
dhcpcd.enable = false; dhcpcd.enable = false;
useDHCP = false; useDHCP = false;
useHostResolvConf = false; useHostResolvConf = false;
}; };
};
} }