mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: convert to flake
feat(zaatar): convert to flake feat(tahina, tabula): convert to flake feat(makanek): convert to flake feat(manakish, zaatar): convert to flake feat(ci): build flake systems fix: ci build feat: secrets via submodule foo foo foo
This commit is contained in:
@@ -2,18 +2,27 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [<stockholm/krebs/3modules/fetchWallpaper.nix>];
|
||||
}: let
|
||||
url = "http://prism.r/realwallpaper-krebs-stars-berlin.png";
|
||||
stateDir = "~/.cache/wallpaper";
|
||||
in {
|
||||
systemd.user.services.wallpaper = {
|
||||
wantedBy = ["graphical-session.target"];
|
||||
after = ["network.target"];
|
||||
script = ''
|
||||
set -euf
|
||||
|
||||
krebs.fetchWallpaper = {
|
||||
enable = true;
|
||||
url = "http://prism.r/realwallpaper-krebs-stars-berlin.png";
|
||||
};
|
||||
|
||||
users.users.fetchWallpaper.isSystemUser = true;
|
||||
|
||||
services.xserver = {
|
||||
display = lib.mkForce 0; # needed for fetchWallpaper to find the X display
|
||||
displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +LOCAL:";
|
||||
mkdir -p ${stateDir}
|
||||
chmod o+rx ${stateDir}
|
||||
cd ${stateDir}
|
||||
(${pkgs.curl}/bin/curl -s -o wallpaper.tmp -z wallpaper.tmp ${lib.escapeShellArg url} && cp wallpaper.tmp wallpaper) || :
|
||||
${pkgs.feh}/bin/feh --no-fehbg --bg-scale wallpaper
|
||||
'';
|
||||
startAt = "*:00,10,20,30,40,50";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "15s";
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user