nixos-config/system/app/docker.nix

22 lines
406 B
Nix

{ lib, userSettings, storageDriver ? null, ... }:
assert lib.asserts.assertOneOf "storageDriver" storageDriver [
null
"aufs"
"btrfs"
"devicemapper"
"overlay"
"overlay2"
"zfs"
];
{
virtualisation.docker = {
enable = true;
enableOnBoot = true;
storageDriver = storageDriver;
autoPrune.enable = true;
};
users.users.${userSettings.username}.extraGroups = [ "docker" ];
}