diff --git a/modules/virtualization/quadlet.nix b/modules/virtualization/quadlet.nix index 484f9da..e794fe2 100644 --- a/modules/virtualization/quadlet.nix +++ b/modules/virtualization/quadlet.nix @@ -3,3 +3,45 @@ # # Still WIP # ---------------------- +{ + config, + lib, + ... +}: +let + cfg = config.quadlet; +in { + options = { + quadlet = { + enable = lib.mkEnableOption "Enable Podman's Quadlet systemd integration"; + + autoUpdate = { + enable = lib.mkEnableOption "Enable the auto update mechanism"; + + calendar = lib.mkOption { + type = lib.types.str; + default = "*-*-* 03:30:00"; + description = "When the auto update mechanism is triggered, the calendar option will tell the auto update when to start"; + }; + }; + + extraPackages = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = []; + description = "Additional container-related packages to install (these likely will be installed with Podman though)"; + }; + }; + }; + + config = lib.mkIf cfg.enable { + virtualisation.quadlet = { + enable = true; + autoUpdate = { + enable = cfg.autoUpdate.enable; + calendar = cfg.autoUpdate.calendar; + }; + }; + + environment.systemPackages = cfg.extraPackages; + }; +}