system/docker: modularize

This commit is contained in:
Felix Buehler 2022-12-05 22:51:46 +01:00
parent 082478e688
commit 19520eae7f
5 changed files with 40 additions and 15 deletions

View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./docker
];
}

View file

@ -0,0 +1,22 @@
# Docker related settings
{ config, inputs, lib, options, pkgs, ... }:
let
cfg = config.my.system.docker;
in
{
options.my.system.docker = with lib; {
enable = mkEnableOption "docker configuration";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
docker
docker-compose
];
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
};
}