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
Boot into a install medium. Since this repository is public, we don't need to mess
with any SSH keys yet. Clone the repository and enter it.
Boot into an [install medium](https://nixos.org/download/). Since this repository is
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
cd elements
```
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.
Then install `just`, which is the only explicit requirement for this deployment which
you must install manually. All other dependencies are automatically installed in the dev 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
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
functionality in the dev shell specifically for this use case.

12
flake.lock generated
View file

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

View file

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

View file

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

View file

@ -51,7 +51,7 @@ in {
exec-once = swaync & # Notification center
exec-once = udiskie # Automatic mounting of USBs
# 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 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
@ -185,12 +185,15 @@ in {
windowrule = center 1, class:(.*zeal.*)
windowrule = size 50% 80%, class:(.*zeal.*)
windowrule = minsize 1400 500, class:(.*zeal.*)
windowrule = opacity 0.9, class:(.*zeal.*)
windowrule = float, class:(.*speedcrunch.*)
windowrule = center 1, class:(.*speedcrunch.*)
windowrule = size 30% 60%, class:(.*speedcrunch.*)
windowrule = opacity 0.9, class:(.*speedcrunch.*)
windowrule = float, title:DevTools
windowrule = opacity 0.9, class:(.*kitty.*)
windowrule=nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$

View file

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

View file

@ -1,53 +1,32 @@
{pkgs, ...}: {
# TODO: Move these into individual modules rather than a catch-all
home.packages = with pkgs; [
gnupg
unzip
dua # Interactively view disk space usage
tldr # Quick man-page replacement
hyperfine # Terminal benchmarks
numbat # Scientific calculations
hexyl # Hex viewer
pastel # Color analyzer
yubikey-manager
croc # File transfer
zotero # Collect research sources
solaar # Logitech mouse driver
btop # Better resource monitor
bottom # System resource monitor
copyparty
# GUI
vcv-rack # Audio synthesizer/eurorack simulator
ardour # General DAW
reaper # Narrating DAW
vesktop # Discord client
vlc # Video player
todoist-electron # Todo application
logseq # Knowledge Base
obsidian # Same as above
obsidian # Note taking
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
cider # Apple Music player
filezilla # FTP Client
zathura # Document viewer
orca-slicer # Bambu Lab Slicer + Control
weylus # Use iPad Pro as graphics tablet
krita # Drawing software
mochi # SRS flashcards
# spacedrive # File explorer (Alpha, not usable yet)
thunderbird # Email client
speedcrunch # GUI calculator app
davinci-resolve # Video editing
naps2 # Scanning
vcv-rack # Eurorack simulator
davinci-resolve # Video editor
feh # Image viewer
xarchiver # Archive viewer/extractor
zathura # 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";
};
apcupsd.enable = true;
apcupsd = {
enable = true;
configText = ''
UPSTYPE usb
NISIP 0.0.0.0
BATTERYLEVEL 50
MINUTES 5
'';
};
};
# Enable privileged ports for rootless pods

View file

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