mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
27 lines
506 B
Nix
27 lines
506 B
Nix
{ 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
|
|
docker-compose
|
|
lazydocker
|
|
];
|
|
}
|