Use wallpaper library

This commit is contained in:
Christopher Mühl 2025-10-30 10:41:32 +01:00
parent ec24b532b9
commit 1e3edc7afa
No known key found for this signature in database
GPG key ID: E919B0F59E14FD47
10 changed files with 57 additions and 44 deletions

View file

@ -17,15 +17,15 @@ available) or run `nix develop .#name` in the flake root directory.
## How to deploy a new host ## How to deploy a new host
Boot into a install medium. Since this repository is public, we don't need to mess Boot into an [install medium](https://nixos.org/download/). Since this repository is
with any SSH keys yet. Clone the repository and enter it. public, we don't need to mess with any SSH keys yet. Clone the repository and enter it.
``` ```
git clone https://github.com/padarom/elements.git git clone https://github.com/padarom/elements.git
cd elements cd elements
``` ```
Then install just, which is the only explicit requirement for this deployment which Then install `just`, which is the only explicit requirement for this deployment which
you must install manually. All other dependencies are installed via the dev shell. you must install manually. All other dependencies are automatically installed in the dev shell.
After installing just, enter the deployment shell. After installing just, enter the deployment shell.
``` ```
@ -34,7 +34,7 @@ After installing just, enter the deployment shell.
``` ```
Now, a basic host configuration (with a disko module) is required. This can either Now, a basic host configuration (with a disko module) is required. This can either
be prepared on another host and comitted, or created now, in the install media. be prepared on another host and comitted, or created now, in the install medium.
Depending on how many hosts I will still onboard, I might end up creating helper Depending on how many hosts I will still onboard, I might end up creating helper
functionality in the dev shell specifically for this use case. functionality in the dev shell specifically for this use case.

12
flake.lock generated
View file

@ -391,11 +391,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754263839, "lastModified": 1760500983,
"narHash": "sha256-ck7lILfCNuunsLvExPI4Pw9OOCJksxXwozum24W8b+8=", "narHash": "sha256-zfY4F4CpeUjTGgecIJZ+M7vFpwLc0Gm9epM/iMQd4w8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1d7abbd5454db97e0af51416f4960b3fb64a4773", "rev": "c53e65ec92f38d30e3c14f8d628ab55d462947aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -874,11 +874,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1755186698, "lastModified": 1760524057,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,7 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
zx # Tool for writing better scripts zx # Tool for writing better scripts
trurl # Parsing and manipulating URLs via CLI # trurl # Parsing and manipulating URLs via CLI
dig # DNS dig # DNS
onefetch # Git information tool onefetch # Git information tool
tokei # Like cloc tokei # Like cloc

View file

@ -7,7 +7,7 @@
# docker has to be installed globally because we have to enable virtualization # docker has to be installed globally because we have to enable virtualization
inputs.docker-compose-1.legacyPackages."x86_64-linux".docker-compose inputs.docker-compose-1.legacyPackages."x86_64-linux".docker-compose
ruby_3_2 ruby_3_4
# Dev environment specifics # Dev environment specifics
libxcrypt # maklerportal-frontend-test-suite libxcrypt # maklerportal-frontend-test-suite

View file

@ -51,7 +51,7 @@ in {
exec-once = swaync & # Notification center exec-once = swaync & # Notification center
exec-once = udiskie # Automatic mounting of USBs exec-once = udiskie # Automatic mounting of USBs
# exec-once = eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) & # exec-once = eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) &
exec-once = ${pkgs._elements.generate-wallpaper}/bin/generate-wallpaper exec-once = sleep 1; ${pkgs._elements.select-wallpapers}/bin/select-wallpapers
exec-once = eww daemon exec-once = eww daemon
exec-once = eww open spraggins exec-once = eww open spraggins
exec-once = sleep 10; eww open spraggins # Open again after a while because the wallpaper will display on top once that is done exec-once = sleep 10; eww open spraggins # Open again after a while because the wallpaper will display on top once that is done
@ -185,12 +185,15 @@ in {
windowrule = center 1, class:(.*zeal.*) windowrule = center 1, class:(.*zeal.*)
windowrule = size 50% 80%, class:(.*zeal.*) windowrule = size 50% 80%, class:(.*zeal.*)
windowrule = minsize 1400 500, class:(.*zeal.*) windowrule = minsize 1400 500, class:(.*zeal.*)
windowrule = opacity 0.9, class:(.*zeal.*)
windowrule = float, class:(.*speedcrunch.*) windowrule = float, class:(.*speedcrunch.*)
windowrule = center 1, class:(.*speedcrunch.*) windowrule = center 1, class:(.*speedcrunch.*)
windowrule = size 30% 60%, class:(.*speedcrunch.*) windowrule = size 30% 60%, class:(.*speedcrunch.*)
windowrule = opacity 0.9, class:(.*speedcrunch.*)
windowrule = float, title:DevTools windowrule = float, title:DevTools
windowrule = opacity 0.9, class:(.*kitty.*)
windowrule=nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$ windowrule=nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$

View file

@ -42,6 +42,7 @@
tofi-hg tofi-hg
open-url open-url
generate-wallpaper generate-wallpaper
select-wallpapers
]; ];
}; };

View file

@ -1,53 +1,32 @@
{pkgs, ...}: { {pkgs, ...}: {
# TODO: Move these into individual modules rather than a catch-all
home.packages = with pkgs; [ home.packages = with pkgs; [
gnupg gnupg
unzip unzip
dua # Interactively view disk space usage dua # Interactively view disk space usage
tldr # Quick man-page replacement
hyperfine # Terminal benchmarks
numbat # Scientific calculations numbat # Scientific calculations
hexyl # Hex viewer
pastel # Color analyzer
yubikey-manager yubikey-manager
croc # File transfer croc # File transfer
zotero # Collect research sources
solaar # Logitech mouse driver solaar # Logitech mouse driver
btop # Better resource monitor
bottom # System resource monitor
copyparty
# GUI # GUI
vcv-rack # Audio synthesizer/eurorack simulator vesktop # Discord client
ardour # General DAW
reaper # Narrating DAW
vlc # Video player vlc # Video player
todoist-electron # Todo application obsidian # Note taking
logseq # Knowledge Base
obsidian # Same as above
calibre # eBook Manager calibre # eBook Manager
vesktop # Discord Messenger
obs-studio # OBS Studio
wasistlos # WhatsApp client
signal-desktop # Messaging
zulip # Self-hosted slack alternative
libreoffice # Productivity Suite (like Microsoft Office)
onlyoffice-bin # libreoffice alternative onlyoffice-bin # libreoffice alternative
cider # Apple Music player
filezilla # FTP Client filezilla # FTP Client
zathura # Document viewer
orca-slicer # Bambu Lab Slicer + Control orca-slicer # Bambu Lab Slicer + Control
weylus # Use iPad Pro as graphics tablet
krita # Drawing software krita # Drawing software
mochi # SRS flashcards mochi # SRS flashcards
# spacedrive # File explorer (Alpha, not usable yet)
thunderbird # Email client thunderbird # Email client
speedcrunch # GUI calculator app speedcrunch # GUI calculator app
davinci-resolve # Video editing
naps2 # Scanning naps2 # Scanning
vcv-rack # Eurorack simulator
davinci-resolve # Video editor
feh # Image viewer feh # Image viewer
xarchiver # Archive viewer/extractor xarchiver # Archive viewer/extractor
zathura # Document viewer
evince # Document viewer evince # Document viewer
]; ];
} }

View file

@ -0,0 +1,18 @@
{pkgs, ...}:
pkgs.writeTextFile rec {
name = "select-wallpapers";
destination = "/bin/${name}";
executable = true;
text = ''
#!/usr/bin/env nu
let wallpaper_dir = "/home/christopher/Wallpapers"
let landscape = (ls $"($wallpaper_dir)/Landscape" | shuffle | get name | first)
let portrait = (ls $"($wallpaper_dir)/Portrait" | shuffle | get name | first)
hyprctl hyprpaper reload $"DP-3,($landscape)"
hyprctl hyprpaper reload $"DP-1,($portrait)"
'';
}

View file

@ -35,7 +35,15 @@
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkUPOw28Cu2LMuzfmvjT/L2ToNHcADwGyGvSpJ4wH2T"; key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkUPOw28Cu2LMuzfmvjT/L2ToNHcADwGyGvSpJ4wH2T";
}; };
apcupsd.enable = true; apcupsd = {
enable = true;
configText = ''
UPSTYPE usb
NISIP 0.0.0.0
BATTERYLEVEL 50
MINUTES 5
'';
};
}; };
# Enable privileged ports for rootless pods # Enable privileged ports for rootless pods

View file

@ -94,6 +94,8 @@ with lib._elements; {
openssh.enable = true; openssh.enable = true;
openssh.settings.PasswordAuthentication = false; openssh.settings.PasswordAuthentication = false;
hardware.openrgb.enable = true;
# Bluetooth manager # Bluetooth manager
blueman.enable = true; blueman.enable = true;
udev.packages = [pkgs.platformio-core.udev]; udev.packages = [pkgs.platformio-core.udev];
@ -131,9 +133,7 @@ with lib._elements; {
]; ];
}; };
logind.extraConfig = '' logind.settings.Login.RuntimeDirectorySize = "6G";
RuntimeDirectorySize=6G
'';
# Smartcard support, necessary for Yubikey logins # Smartcard support, necessary for Yubikey logins
pcscd.enable = true; pcscd.enable = true;
@ -196,6 +196,7 @@ with lib._elements; {
libnotify libnotify
gtk3 gtk3
openrgb-with-all-plugins
lact # GPU tuning lact # GPU tuning
libimobiledevice libimobiledevice
ifuse ifuse
@ -242,6 +243,9 @@ with lib._elements; {
extraBackends = [pkgs.brscan4]; extraBackends = [pkgs.brscan4];
}; };
# 3DConnexion support
spacenavd.enable = true;
# Input emulation from userspace (see weylus). # Input emulation from userspace (see weylus).
uinput.enable = true; uinput.enable = true;