nixos-config/system/app/docker.nix

26 lines
495 B
Nix
Raw Normal View History

{ pkgs, 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" ];
environment.systemPackages = with pkgs; [
docker-compose
lazydocker
];
}