about summary refs log tree commit diff
path: root/desktop.nix
diff options
context:
space:
mode:
Diffstat (limited to 'desktop.nix')
-rw-r--r--desktop.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop.nix b/desktop.nix
index 836f980261ad..d03cf1244fed 100644
--- a/desktop.nix
+++ b/desktop.nix
@@ -3,6 +3,9 @@
 { config, lib, pkgs, ... }:
 
 let emacs = import ./emacs.nix { inherit pkgs; };
+screenLock = pkgs.writeShellScriptBin "screen-lock" ''
+  find ${pkgs.wallpapers} -name "*.png" | shuf -n1 | xargs i3lock -f -t -i
+'';
 in {
   # Configure basic X-server stuff:
   services.xserver = {
@@ -14,6 +17,8 @@ in {
     displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER";
   };
 
+  # Add a shell script with random screen lock wallpaper selection
+  environment.systemPackages = [ screenLock ];
 
   # Apparently when you have house guests they complain about your screen tearing!
   services.compton.enable = true;