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
|
core
|
||||||
server02DiskConfiguration
|
server02DiskConfiguration
|
||||||
nvidiaDrivers
|
nvidiaDrivers
|
||||||
|
containers
|
||||||
]
|
]
|
||||||
++ (with inputs.nix-config.nixosModules; [
|
++ (with inputs.nix-config.nixosModules; [
|
||||||
nvim
|
nvim
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "server02";
|
hostName = "server02";
|
||||||
};
|
};
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/swapfile";
|
device = "/swapfile";
|
||||||
|
|||||||
Reference in New Issue
Block a user