2021-05-30 19:10:28 +00:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.docker;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.pub-solar.docker = {
|
|
|
|
enable = mkEnableOption "Life in metal boxes";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
users.users = with pkgs; pkgs.lib.setAttrByPath [ psCfg.user.name ] {
|
|
|
|
extraGroups = [ "docker" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
docker-compose
|
2021-10-23 23:17:50 +00:00
|
|
|
docker-compose_2
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|