flocon/modules/docker.nix

18 lines
384 B
Nix
Raw Normal View History

2024-09-08 14:00:25 +00:00
{ config, lib, username, ... }:
let
cfg = config.modules.docker;
in
{
options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
2024-09-08 14:00:25 +00:00
users.users.${username}.extraGroups = [ "docker" ];
};
}