2021-11-21 19:07:12 +01:00
|
|
|
{
|
2022-03-01 22:19:03 +01:00
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
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 {
|
2022-03-01 22:19:03 +01:00
|
|
|
environment.systemPackages = with pkgs; [docker-compose];
|
2021-11-21 19:07:12 +01:00
|
|
|
|
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
autoPrune = {
|
|
|
|
enable = true;
|
|
|
|
dates = "weekly";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-01 22:19:03 +01:00
|
|
|
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = ["docker"];
|
2021-11-21 19:07:12 +01:00
|
|
|
};
|
|
|
|
}
|