about summary refs log tree commit diff
path: root/modules/podman.nix
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2024-11-17 18:21:17 +0300
committerazahi <azat@bahawi.net>2024-11-17 18:21:17 +0300
commitfc2e6a3a6b568d5ae1004723ea54c123af7e9242 (patch)
tree5adf2a7741c6ee319833fe6079f9958961ef56b5 /modules/podman.nix
parent2024-11-10 (diff)
2024-11-17 HEAD master
Diffstat (limited to '')
-rw-r--r--modules/podman.nix29
1 files changed, 13 insertions, 16 deletions
diff --git a/modules/podman.nix b/modules/podman.nix
index bdef5be..6c4b20a 100644
--- a/modules/podman.nix
+++ b/modules/podman.nix
@@ -5,14 +5,13 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.podman;
 in
 {
-  options.nixfiles.modules.podman.enable = mkEnableOption "Podman";
+  options.nixfiles.modules.podman.enable = lib.mkEnableOption "Podman";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     assertions = [
       {
         assertion = cfg.enable -> !config.nixfiles.modules.docker.enable;
@@ -20,33 +19,31 @@ in
       }
     ];
 
+    ark.directories = [ "/var/lib/containers" ];
+
     nixfiles.modules.common.shell.aliases.p = "podman";
 
     secrets.containers-auth = {
       file = "${inputs.self}/secrets/containers-auth";
       path = "${config.dirs.config}/containers/auth.json";
-      owner = my.username;
+      owner = lib.my.username;
       inherit (config.my) group;
     };
 
     virtualisation.podman = {
       enable = true;
-      dockerCompat = true;
-      dockerSocket.enable = true;
+      dockerCompat = false;
+      dockerSocket.enable = false;
     };
 
-    environment.systemPackages = with pkgs; [ podman-compose ];
+    environment.systemPackages = [ pkgs.podman-compose ];
 
     my.extraGroups = [ "podman" ];
 
-    hm.xdg.configFile = {
-      "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";
-      };
-    };
+    hm.xdg.configFile."containers/registries.conf".source =
+      pkgs.writers.writeTOML "containers-registries.toml"
+        {
+          registries.search.registries = [ "docker.io" ];
+        };
   };
 }

Consider giving Nix/NixOS a try! <3