Added docker

This commit is contained in:
marc
2023-12-29 16:40:08 +01:00
parent 3713e4eca1
commit b898d0af42
2 changed files with 23 additions and 0 deletions

20
modules/dev/docker.nix Normal file
View File

@@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.dev.docker;
in
{
options.samfelag.modules.dev.docker = with lib.types; {
enable = lib.mkEnableOption "docker";
users = lib.my.mkOpt (listOf str) config.user.name;
};
config = lib.mkIf cfg.enable {
virtualisation.docker.enable = true;
users.extraGroups.docker.members = cfg.users;
environment.systemPackages = with pkgs; [
docker
];
};
}