nixos-config/modules/docker/default.nix

27 lines
481 B
Nix
Raw Normal View History

2021-11-21 19:07:12 +01:00
{ lib, pkgs, config, ... }:
with lib;
2021-11-22 18:56:59 +01:00
let
cfg = config.eboskma.docker;
2021-11-21 19:07:12 +01:00
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";
};
};
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups =
[ "docker" ];
};
}