# ---------------------- # Wrapper for defining Quadlets in Nix via quadlet-nix # # 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; }; }