Files
Nixos/modules/virtualisation/docker/default.nix
T
Alexander Derevianko 2ed1f0163c Big omen laptop migration
2025-08-01 21:25:58 +02:00

36 lines
692 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.dov.virtualisation.docker;
in {
options.dov.virtualisation.docker = {
enable = mkEnableOption "docker config";
username = mkOption {
default = "susano";
type = types.str;
};
isBtrfsStorageDriver = mkOption {
default = true;
type = types.bool;
};
};
config = mkIf cfg.enable {
users.extraGroups.docker.members = [ cfg.username ];
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
# TODO use if disko is btrfs
storageDriver = mkIf cfg.isBtrfsStorageDriver "btrfs";
};
};
}