{ config, inputs, lib, pkgs, ... }: let cfg = config.nixfiles.modules.podman; in { options.nixfiles.modules.podman.enable = lib.mkEnableOption "Podman"; config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.enable -> !config.nixfiles.modules.docker.enable; message = "Pick only one!"; } ]; 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 = lib.my.username; inherit (config.my) group; }; virtualisation.podman = { enable = true; dockerCompat = false; dockerSocket.enable = false; }; 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" ]; }; }; }