From a09d7632a587fd68b8d7cad87d8330f24aa12a6d Mon Sep 17 00:00:00 2001 From: surtur Date: Sun, 3 Dec 2023 22:40:10 +0100 Subject: [PATCH] nix(loki): enable podman --- nix/hosts/loki/configuration.nix | 1 + nix/hosts/loki/modules/podman.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 nix/hosts/loki/modules/podman.nix diff --git a/nix/hosts/loki/configuration.nix b/nix/hosts/loki/configuration.nix index 146dbad..838ef03 100644 --- a/nix/hosts/loki/configuration.nix +++ b/nix/hosts/loki/configuration.nix @@ -15,6 +15,7 @@ ./modules/authentik.nix ./modules/gonic.nix ./modules/attic.nix + ./modules/podman.nix ../../modules/base.nix ../../modules/dnscrypt.nix diff --git a/nix/hosts/loki/modules/podman.nix b/nix/hosts/loki/modules/podman.nix new file mode 100644 index 0000000..13719d9 --- /dev/null +++ b/nix/hosts/loki/modules/podman.nix @@ -0,0 +1,27 @@ +{ + config, + pkgs, + ... +}: { + virtualisation = { + containers.storage.settings = { + # configure for zfs. + storage = { + driver = "zfs"; + graphroot = "/var/lib/containers/storage"; + runroot = "/run/containers/storage"; + }; + }; + + ## setup podman. + podman = { + enable = true; + dockerCompat = true; + defaultNetwork.settings.dns_enable = true; + }; + oci-containers = { + ## use podman as the default container engine. + backend = "podman"; + }; + }; +}