mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-22 18:21:58 +01:00
42 lines
602 B
Nix
42 lines
602 B
Nix
{ pkgs, lib, config, options, ... }:
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.personal.services.docker;
|
|
|
|
in
|
|
{
|
|
options = {
|
|
personal = {
|
|
services = {
|
|
docker = {
|
|
enable = mkEnableOption "Docker";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment = {
|
|
systemPackages = with pkgs; [
|
|
lazydocker
|
|
];
|
|
};
|
|
|
|
virtualisation = {
|
|
docker = {
|
|
enable = true;
|
|
|
|
autoPrune = {
|
|
enable = true;
|
|
dates = "weekly";
|
|
};
|
|
};
|
|
|
|
oci-containers = {
|
|
backend = "docker";
|
|
};
|
|
};
|
|
};
|
|
}
|