From 8e201d91f5cc3b432455cdbaf001b25c041f4b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 7 Jan 2026 12:35:21 +0100 Subject: [PATCH] nixos: use upstream xscreensaver module --- nix/configurations/vanadium.nix | 1 - nix/nixosModules/common/xscreensaver.nix | 54 ------------------------ 2 files changed, 55 deletions(-) delete mode 100644 nix/nixosModules/common/xscreensaver.nix diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 6be7ec17..a93a753f 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -109,7 +109,6 @@ in ../nixosModules/common/network.nix ../nixosModules/common/sudo-conf.nix ../nixosModules/common/system-nixconf.nix - ../nixosModules/common/xscreensaver.nix # QUIRK: # Had issue when building the installer as it fails to bootstrap itself diff --git a/nix/nixosModules/common/xscreensaver.nix b/nix/nixosModules/common/xscreensaver.nix deleted file mode 100644 index 49aebbd0..00000000 --- a/nix/nixosModules/common/xscreensaver.nix +++ /dev/null @@ -1,54 +0,0 @@ -# -# This module provides a service react to xscreensaver events -# -{ - config, - lib, - ... -}: -let - cfg = config.services.xscreensaver; -in -{ - options = { - services.xscreensaver.hooks = lib.mkOption { - type = with lib.types; attrsOf str; - description = "An attrset of events mapped a block of shell command to be run"; - default = { }; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.user.services = { - "xscreensaver-hooks" = { - description = "Run commands on xscreensaver events"; - after = [ - "graphical-session.target" - "xscreensaver.service" - ]; - partOf = [ "graphical-session.target" ]; - wantedBy = [ "graphical-session.target" ]; - script = - let - handlers = lib.concatMapAttrsStringSep "\n" (event: action: '' - "${event}") - ( ${action} - ) - ;; - '') cfg.hooks; - in - '' - xscreensaver-command -watch | while read event rest; do - echo "The handler script got \"$event\"" - case $event in - ${handlers} - esac - done - ''; - path = [ - cfg.package # contains xscreensaver-command - ]; - }; - }; - }; -}