nixos-config/modules/docker/default.nix

28 lines
617 B
Nix

{ lib
, pkgs
, config
, ...
}:
with lib; let
cfg = config.eboskma.docker;
in
{
options.eboskma.docker = { enable = mkEnableOption "activate docker"; };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ docker-compose ];
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
daemon.settings = {
insecure-registries = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" ];
};
};
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" ];
};
}