mirror of
https://github.com/tboerger/nixos-config
synced 2024-11-26 07:43:45 +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";
|
|
};
|
|
};
|
|
};
|
|
}
|