From b315247f33cc46eb3ab14f5c0cb11622e38f7ab7 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Thu, 20 Aug 2026 22:03:24 +0200 Subject: [PATCH] feat(caelestia): make idle configurable --- users/modules/desktop/caelestia.nix | 11 +++++++++-- users/phundrak/host/marpa.nix | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/users/modules/desktop/caelestia.nix b/users/modules/desktop/caelestia.nix index 6e1b038..2591b10 100644 --- a/users/modules/desktop/caelestia.nix +++ b/users/modules/desktop/caelestia.nix @@ -7,7 +7,14 @@ with lib; let cfg = config.home.desktop.caelestia; in { - options.home.desktop.caelestia.enable = mkEnableOption "Enables Caelestia Shell"; + options.home.desktop.caelestia = { + enable = mkEnableOption "Enables Caelestia Shell"; + idleTimeout = mkOption { + description = "Idle duration in seconds before locking the session"; + default = 60 * 60; # an hour + type = types.int; + }; + }; config.programs.caelestia = mkIf cfg.enable { inherit (cfg) enable; systemd = { @@ -28,7 +35,7 @@ in { inhibitWhenAudio = true; timeouts = [ { - timeout = 3600; + timeout = cfg.idleTimeout; idleAction = "lock"; } ]; diff --git a/users/phundrak/host/marpa.nix b/users/phundrak/host/marpa.nix index f7c7c1a..e868f46 100644 --- a/users/phundrak/host/marpa.nix +++ b/users/phundrak/host/marpa.nix @@ -7,7 +7,10 @@ enable = true; ollama.gpu = "rocm"; }; - desktop.hyprland.host = "marpa"; + desktop = { + hyprland.host = "marpa"; + caelestia.idleTimeout = 60 * 60 * 24; # a day + }; phundrak.sshKey.content = builtins.readFile ../keys/id_marpa.pub; }; programs.caelestia.settings.bar.status = {