enabled base podman
This commit is contained in:
26
modules/containers/default.nix
Normal file
26
modules/containers/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{self, ...}: {
|
||||
flake.nixosModules.containers = {config, ...}: let
|
||||
modules = with self.nixosModules; [
|
||||
];
|
||||
in {
|
||||
imports = modules;
|
||||
# Runtime
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
dockerCompat = 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";
|
||||
};
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
core
|
||||
server02DiskConfiguration
|
||||
nvidiaDrivers
|
||||
containers
|
||||
]
|
||||
++ (with inputs.nix-config.nixosModules; [
|
||||
nvim
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
networking = {
|
||||
hostName = "server02";
|
||||
};
|
||||
virtualisation.docker.enable = true;
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
|
||||
Reference in New Issue
Block a user