From 73fdd4622beabd7a5b807fb2cfd4e5fd422dfb4e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 11 Jun 2023 16:17:42 +0100 Subject: [PATCH] modules: system: add docker --- modules/system/default.nix | 1 + modules/system/docker/default.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 modules/system/docker/default.nix diff --git a/modules/system/default.nix b/modules/system/default.nix index 3c81cac..9fe3b57 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -4,6 +4,7 @@ { imports = [ ./boot + ./docker ./documentation ./language ./nix diff --git a/modules/system/docker/default.nix b/modules/system/docker/default.nix new file mode 100644 index 0000000..f051814 --- /dev/null +++ b/modules/system/docker/default.nix @@ -0,0 +1,27 @@ +# Podman related settings +{ config, lib, ... }: +let + cfg = config.my.system.docker; +in +{ + options.my.system.docker = with lib; { + enable = mkEnableOption "docker configuration"; + }; + + config = lib.mkIf cfg.enable { + virtualisation.docker = { + enable = true; + + # Remove unused data on a weekly basis + autoPrune = { + enable = true; + + dates = "weekly"; + + flags = [ + "--all" + ]; + }; + }; + }; +}