From fc2e6a3a6b568d5ae1004723ea54c123af7e9242 Mon Sep 17 00:00:00 2001 From: azahi Date: Sun, 17 Nov 2024 18:21:17 +0300 Subject: 2024-11-17 --- modules/podman.nix | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'modules/podman.nix') 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" ]; + }; }; } -- cgit 1.4.1