2022-11-22 11:35:42 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.docker;
|
2022-11-22 11:35:42 +00:00
|
|
|
in {
|
2021-05-30 19:10:28 +00:00
|
|
|
options.pub-solar.docker = {
|
|
|
|
enable = mkEnableOption "Life in metal boxes";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
virtualisation.docker.enable = true;
|
2023-11-11 00:05:42 +00:00
|
|
|
# unstable
|
|
|
|
#virtualisation.docker.package = pkgs.docker_24;
|
2022-11-22 11:35:42 +00:00
|
|
|
users.users = with pkgs;
|
|
|
|
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
|
|
|
extraGroups = ["docker"];
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
docker-compose
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|