feat(caelestia): make idle configurable
This commit is contained in:
@@ -7,7 +7,14 @@
|
|||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.home.desktop.caelestia;
|
cfg = config.home.desktop.caelestia;
|
||||||
in {
|
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 {
|
config.programs.caelestia = mkIf cfg.enable {
|
||||||
inherit (cfg) enable;
|
inherit (cfg) enable;
|
||||||
systemd = {
|
systemd = {
|
||||||
@@ -28,7 +35,7 @@ in {
|
|||||||
inhibitWhenAudio = true;
|
inhibitWhenAudio = true;
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 3600;
|
timeout = cfg.idleTimeout;
|
||||||
idleAction = "lock";
|
idleAction = "lock";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
ollama.gpu = "rocm";
|
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;
|
phundrak.sshKey.content = builtins.readFile ../keys/id_marpa.pub;
|
||||||
};
|
};
|
||||||
programs.caelestia.settings.bar.status = {
|
programs.caelestia.settings.bar.status = {
|
||||||
|
|||||||
Reference in New Issue
Block a user