22 lines
389 B
Nix
22 lines
389 B
Nix
{
|
|
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;
|
|
};
|
|
};
|
|
users.users.${username}.extraGroups = [ "docker" ];
|
|
};
|
|
}
|