1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-18 09:19:39 +01:00

Podman container on Metis

This commit is contained in:
Stefan Ellmauthaler 2024-02-09 16:46:39 +01:00
parent 77f4541d04
commit 9394fe5ee3
Signed by: ellmau
GPG Key ID: C804A9C1B7AF8256
2 changed files with 28 additions and 0 deletions

View File

@ -46,6 +46,9 @@
# enable wireguard
wireguard.enable = true;
# enable podman
container.podman.enable = true;
# user setup
users = {
enable = true;
@ -89,6 +92,9 @@
externalInterface = "ens3";
internalInterfaces = ["wg-stelnet"];
};
# port for podman container
firewall.allowedTCPPorts = [8888];
};
system.stateVersion = "22.05";
}

22
modules/container.nix Normal file
View File

@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}:
with lib; {
options.elss.container.podman.enable = mkEnableOption "enable podman dockerisation";
config = let
cfg = config.elss.container.podman;
in
mkIf cfg.enable {
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
};
}