about summary refs log tree commit diff
path: root/modules/nixos/podman.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-02-20 00:53:48 +0300
committerAzat Bahawi <azat@bahawi.net>2024-02-20 00:53:48 +0300
commitd907b7b8f0aecee0f9eba12b09b929d720d07a8d (patch)
tree4f6bbbe605ebf96e1aefbc657dc975208b2436d1 /modules/nixos/podman.nix
parent2024-02-11 (diff)
2024-02-20
Diffstat (limited to '')
-rw-r--r--modules/nixos/podman.nix26
1 files changed, 7 insertions, 19 deletions
diff --git a/modules/nixos/podman.nix b/modules/nixos/podman.nix
index f6ee6bf..60f208e 100644
--- a/modules/nixos/podman.nix
+++ b/modules/nixos/podman.nix
@@ -34,25 +34,13 @@ in {
     my.extraGroups = ["podman"];
 
     hm.xdg.configFile = {
-      # This removes a really annoying registry search. 100% of the time I
-      # would need to look up stuff from the Docker and not Quay!
-      "containers/registries.conf".text = ''
-        [registries.search]
-        registries = ["docker.io"]
-      '';
-
-      # As for plain OverlayFS in Podman over ZFS[1]... I guess we are waiting
-      # for Podman to catch up now.
-      #
-      # [1]: https://github.com/openzfs/zfs/pull/14070#issuecomment-1309116666
-      "containers/storage.conf".text = optionalString config.boot.zfs.enabled ''
-        [storage]
-        driver = "overlay"
-
-        [storage.options]
-        mount_program = "${getExe' pkgs.fuse-overlayfs "fuse-overlayfs"}"
-        mountopt = "noatime,nodev,nosuid"
-      '';
+      "containers/registries.conf".source = pkgs.writers.writeTOML "containers-registries.toml" {
+        registries.search.registries = ["docker.io"];
+      };
+
+      "containers/storage.conf".source = pkgs.writers.writeTOML "containers-storage.toml" {
+        storage.driver = "overlay";
+      };
     };
   };
 }

Consider giving Nix/NixOS a try! <3