mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Podman container on Metis
This commit is contained in:
parent
77f4541d04
commit
9394fe5ee3
@ -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
22
modules/container.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user