51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
{self, ...}: {
|
|
flake.nixosModules.containers = {
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: let
|
|
modules = with self.nixosModules; [
|
|
containerArrStack
|
|
containerBlog
|
|
containerCopyparty
|
|
containerCryptpad
|
|
containerGitea
|
|
containerGotify
|
|
containerImmich
|
|
containerJellyfin
|
|
containerMail
|
|
containerN8N
|
|
containerKomga
|
|
containerNginxHomeAssistant
|
|
containerSilverbullet
|
|
];
|
|
in {
|
|
imports = modules;
|
|
# Runtime
|
|
virtualisation.podman = {
|
|
enable = true;
|
|
autoPrune.enable = true;
|
|
dockerCompat = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
podman-compose
|
|
];
|
|
|
|
hardware.nvidia-container-toolkit = {
|
|
enable = true;
|
|
};
|
|
# Enable container name DNS for all Podman networks.
|
|
networking.firewall.interfaces = let
|
|
matchAll =
|
|
if !config.networking.nftables.enable
|
|
then "podman+"
|
|
else "podman*";
|
|
in {
|
|
"${matchAll}".allowedUDPPorts = [53];
|
|
};
|
|
|
|
virtualisation.oci-containers.backend = "podman";
|
|
};
|
|
}
|