{ config, inputs, lib, pkgs, ... }: let cfg = config.nixfiles.modules.docker; in { options.nixfiles.modules.docker.enable = lib.mkEnableOption "Docker"; config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.enable -> !config.nixfiles.modules.podman.enable; message = "Pick only one!"; } ]; ark.directories = [ "/var/lib/docker" ]; nixfiles.modules.common.shell.aliases.d = "docker"; secrets.containers-auth = { file = "${inputs.self}/secrets/containers-auth"; path = "${config.my.home}/.docker/config.json"; owner = lib.my.username; inherit (config.my) group; }; virtualisation.docker.enable = true; environment.systemPackages = with pkgs; [ docker-compose ]; my.extraGroups = [ "docker" ]; }; }