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

View File

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

View File

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