From 59ed5f04633b4c8666fa4ce8adc4387f03e8fc92 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sun, 5 Oct 2025 23:10:47 -0400 Subject: [PATCH] created easy wrapper for quadlet-nix --- modules/virtualization/quadlet.nix | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) 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; + }; +}