add omada

This commit is contained in:
2023-12-05 08:42:44 +01:00
parent 29952a822a
commit 4f3b06dcdf
3 changed files with 39 additions and 36 deletions

View File

@@ -19,8 +19,8 @@
./modules/avahi.nix ./modules/avahi.nix
./modules/openconnect.nix ./modules/openconnect.nix
./modules/wireguard.nix ./modules/wireguard.nix
# ./modules/podman.nix ./modules/podman.nix
# ./modules/omada.nix ./modules/omada.nix
# git # git
./modules/gitea.nix ./modules/gitea.nix
@@ -65,7 +65,6 @@
ethtool # manage NIC settings (offload, NIC feeatures, ...) ethtool # manage NIC settings (offload, NIC feeatures, ...)
tcpdump # view network traffic tcpdump # view network traffic
conntrack-tools # view network connection states conntrack-tools # view network connection states
omada
]; ];
nix.gc = { nix.gc = {

View File

@@ -24,37 +24,37 @@
}; };
}; };
security.acme.certs."${domain}" = { # security.acme.certs."${domain}" = {
domain = "${domain}"; # domain = "${domain}";
}; # };
containers.omada = { # containers.omada = {
autoStart = true; # autoStart = true;
ephemeral = true; # ephemeral = true;
macvlans = [ "vserver" ]; # macvlans = [ "vserver" ];
bindMounts = { # bindMounts = {
"/var/lib/gitea" = { # "/var/lib/gitea" = {
hostPath = "/var/lib/gitea/"; # hostPath = "/var/lib/gitea/";
isReadOnly = false; # isReadOnly = false;
}; # };
}; # };
bindMounts = { # bindMounts = {
"/var/lib/acme/gitea/" = { # "/var/lib/acme/gitea/" = {
hostPath = "${config.security.acme.certs.${domain}.directory}"; # hostPath = "${config.security.acme.certs.${domain}.directory}";
isReadOnly = true; # isReadOnly = true;
}; # };
}; # };
config = { lib, config, pkgs, ... }: { # config = { lib, config, pkgs, ... }: {
networking = { # networking = {
hostName = "gitea"; # hostName = "gitea";
interfaces.mv-vserver = { # interfaces.mv-vserver = {
useDHCP = true; # useDHCP = true;
}; # };
firewall = { # firewall = {
enable = true; # enable = true;
allowedTCPPorts = [ 22 80 443 ]; # allowedTCPPorts = [ 22 80 443 ];
}; # };
}; # };
}; # };
}; # };
} }

View File

@@ -7,7 +7,11 @@ in {
enable = true; enable = true;
dockerCompat = true; dockerCompat = true;
defaultNetwork.settings = { defaultNetwork.settings = {
# subnets = [{ gateway = "10.42.97.1"; subnet = "10.42.97.0/24"; }]; driver = "macvlan";
master = "vserver";
ipam_options = {
driver = "dhcp";
}
}; };
}; };
}; };