From 7275698636aa0ea090dcfdd98e22138f7bd2efee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=AD=C3=B0=20Steinn=20Geirsson?= Date: Wed, 4 Feb 2026 00:47:35 +0000 Subject: [PATCH] feat: add _qubesLite options interface to guest config Adds options._qubesLite.{disposable, idleTimeout} for host to pass auto-shutdown configuration to guest. Co-Authored-By: Claude Opus 4.5 --- rootfs-nixos/configuration.nix | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/rootfs-nixos/configuration.nix b/rootfs-nixos/configuration.nix index 1bf2b2d..bd5e98e 100644 --- a/rootfs-nixos/configuration.nix +++ b/rootfs-nixos/configuration.nix @@ -9,10 +9,27 @@ # { config, pkgs, lib, wayland-proxy-virtwl, ... }: -{ - ############################################################################# - # Boot Configuration - Systemd Stage 1 - ############################################################################# +let + cfg = config._qubesLite; +in { + options._qubesLite = { + disposable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Whether this VM should auto-shutdown when idle."; + }; + + idleTimeout = lib.mkOption { + type = lib.types.int; + default = 60; + description = "Seconds to wait after last command before shutdown."; + }; + }; + + config = { + ############################################################################# + # Boot Configuration - Systemd Stage 1 + ############################################################################# boot.initrd.systemd.enable = true; @@ -361,6 +378,7 @@ # Disable services we don't need services.timesyncd.enable = false; - # System version - system.stateVersion = "25.11"; + # System version + system.stateVersion = "25.11"; + }; }