alpha
Login
or
Join now
hermes.pds.lassul.us
/
superconfig
forked from
lass.pds.lassul.us/superconfig
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
tools: init lockscreen
author
lassulus
date
10 months ago
(Dec 2, 2025, 1:45 PM CET)
commit
cd832943
cd8329434c47fb36da3f49211d1b01602a357801
parent
ab2d5797
ab2d57974cd46beb5729557f899fc12db09cd059
+21
1 changed file
Expand all
Collapse all
Unified
Split
tools
lockscreen
flake-module.nix
+21
tools/lockscreen/flake-module.nix
View file
Reviewed
···
1
1
+
{
2
2
+
perSystem =
3
3
+
{ pkgs, lib, ... }:
4
4
+
{
5
5
+
packages.lockscreen = pkgs.writeShellApplication {
6
6
+
name = "lockscreen";
7
7
+
runtimeInputs = [
8
8
+
pkgs.ffmpeg
9
9
+
pkgs.coreutils
10
10
+
pkgs.swaylock-plugin
11
11
+
pkgs.mpvpaper
12
12
+
];
13
13
+
text = ''
14
14
+
VIDEO=$(shuf -n1 -e "$HOME"/lockscreens/*.mp4)
15
15
+
DURATION=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$VIDEO" 2>/dev/null | cut -d. -f1)
16
16
+
START=$((RANDOM % ''${DURATION:-300}))
17
17
+
exec swaylock-plugin --command "mpvpaper -o \"no-audio loop start=$START\" '*' \"$VIDEO\"" "$@"
18
18
+
'';
19
19
+
};
20
20
+
};
21
21
+
}