docker-compose default to version 2 now

This commit is contained in:
teutat3s 2022-11-22 12:35:42 +01:00
parent e76cbabad9
commit e815ca1293
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -1,23 +1,26 @@
{ lib, config, pkgs, ... }: {
with lib; lib,
let config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar; psCfg = config.pub-solar;
cfg = config.pub-solar.docker; cfg = config.pub-solar.docker;
in in {
{
options.pub-solar.docker = { options.pub-solar.docker = {
enable = mkEnableOption "Life in metal boxes"; enable = mkEnableOption "Life in metal boxes";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.users = with pkgs; pkgs.lib.setAttrByPath [ psCfg.user.name ] { users.users = with pkgs;
pkgs.lib.setAttrByPath [psCfg.user.name] {
extraGroups = ["docker"]; extraGroups = ["docker"];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
docker-compose docker-compose
docker-compose_2
]; ];
}; };
} }