pinwheel: Remove docker and podman in favor of containers

This commit is contained in:
Alexander Heldt
2024-01-10 15:26:55 +01:00
parent 5bb14cc504
commit 6dc8b14dea
4 changed files with 40 additions and 58 deletions

View File

@@ -0,0 +1,36 @@
{ pkgs, lib, config, ... }:
let
dockerEnabled = config.mod.containers.docker.enable;
podmanEnabled = config.mod.containers.podman.enable;
in
{
options = {
mod.containers = {
docker = {
enable = lib.mkEnableOption "enable docker";
};
podman = {
enable = lib.mkEnableOption "enable podman";
};
};
};
config = {
virtualisation = {
docker = lib.mkIf dockerEnabled {
enable = true;
};
podman = lib.mkIf podmanEnabled {
enable = true;
};
};
users.users.alex.extraGroups = lib.mkIf dockerEnabled [ "docker" ];
home-manager.users.alex = lib.mkIf dockerEnabled {
home.packages = [ pkgs.docker-compose ];
};
};
}