flocon/modules/docker.nix

23 lines
389 B
Nix
Raw Normal View History

2024-09-24 13:09:36 +00:00
{
config,
lib,
username,
...
}:
let
cfg = config.modules.docker;
in
2024-09-24 13:09:36 +00:00
{
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" ];
};
}