nixos-config/modules/docker/default.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, pkgs
, config
, ...
2022-03-01 22:19:03 +01:00
}:
with lib; let
cfg = config.eboskma.docker;
in
{
options.eboskma.docker = { enable = mkEnableOption "activate docker"; };
2021-11-21 19:07:12 +01:00
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ docker-compose ];
2021-11-21 19:07:12 +01:00
2022-10-25 09:40:08 +02:00
virtualisation.podman = {
2021-11-21 19:07:12 +01:00
enable = true;
2022-10-25 09:40:08 +02:00
dockerSocket.enable = true;
dockerCompat = true;
defaultNetwork.dnsname.enable = true;
};
# virtualisation.docker = {
# autoPrune = {
# enable = true;
# dates = "weekly";
# };
virtualisation.containers = {
registries = {
insecure = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" "containers.internal.horus.nu" ];
search = [
"docker.io"
"quay.io"
"docker02.bedum.horus.nu:5000"
"yocto-build-server.bedum.horus.nu:5000"
"containers.internal.horus.nu"
];
2022-05-26 11:32:30 +02:00
};
2021-11-21 19:07:12 +01:00
};
2022-10-25 09:40:08 +02:00
# virtualisation.oci-containers.backend = "podman";
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" "podman" ];
2021-11-21 19:07:12 +01:00
};
}