From b785372e53755787d389bebbd278766198f7f09c Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 12:32:34 -0400 Subject: [PATCH 1/6] feat: add river --- home/fabric/desktop/river.nix | 136 ++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 home/fabric/desktop/river.nix diff --git a/home/fabric/desktop/river.nix b/home/fabric/desktop/river.nix new file mode 100644 index 0000000..d9bbee5 --- /dev/null +++ b/home/fabric/desktop/river.nix @@ -0,0 +1,136 @@ +{...}: { + wayland.windowManager.river = { + enable = true; + extraConfig = '' + # This file is executed by river at startup + + # Set rivertile as the default layout generator + riverctl default-layout rivertile + # Start the rivertile layout generator process + rivertile -view-padding 0 -outer-padding 0 & + + # Set gaps similar to your Hyprland config + # Your config: gaps_out = "0, 440, 0, 440" (top, right, bottom, left) + # This command sets the padding around the edge of the layout area. + # rivertile has -outer-padding-top, -outer-padding-right, etc. + riverctl send-layout-cmd rivertile "outer-padding-right 440" + riverctl send-layout-cmd rivertile "outer-padding-left 440" + # Your config: gaps_in = 0 + riverctl send-layout-cmd rivertile "view-padding 0" + + # --- Autostart Applications (exec-once) --- + riverctl spawn "fcitx5" + riverctl spawn "wlsunset -l 43.6 -L -79.3" + + # --- Input Settings --- + # repeat_delay = 300; repeat_rate = 50; + riverctl set-repeat 50 300 + + # --- Variables --- + # River does not have shell-like variables in its config, + # so we define them here for clarity if this were a script. + # In this Nix string, we will just use the values directly. + # mainMod="Mod4" (Super key) + # terminal="kitty" + # browser="firefox" + # fileManager="dolphin" + # menu="wofi --show drun" + + # --- Key Mappings (bind) --- + # $mainMod, T, exec, $terminal + riverctl map normal Mod4 T spawn 'kitty' + + # $mainMod, B, exec, $browser + riverctl map normal Mod4 B spawn 'firefox' + + # $mainMod, S, exec, sh -c "grim -g '$(slurp -d)' - | wl-copy" + riverctl map normal Mod4 S spawn 'grim -g "$(slurp -d)" - | wl-copy' + + # $mainMod, Q, killactive + riverctl map normal Mod4 Q close + + # $mainMod, M, exit + riverctl map normal Mod4 M exit + + # $mainMod, E, exec, $fileManager + riverctl map normal Mod4 E spawn 'dolphin' + + # $mainMod, V, togglefloating + riverctl map normal Mod4 V toggle-float + + # $mainMod, SPACE, exec, $menu + riverctl map normal Mod4 Space spawn 'wofi --show drun' + + # --- Focus Movement --- + # $mainMod, H, movefocus, l + riverctl map normal Mod4 H focus-view left + # $mainMod, L, movefocus, r + riverctl map normal Mod4 L focus-view right + # $mainMod, K, movefocus, u + riverctl map normal Mod4 K focus-view up + # $mainMod, J, movefocus, d + riverctl map normal Mod4 J focus-view down + + # --- Switch Tags (Workspaces) --- + # Tags are a bitmask: tag 1 = 1, tag 2 = 2, tag 3 = 4, tag n = 1 << (n-1) + riverctl map normal Mod4 1 set-focused-tags 1 + riverctl map normal Mod4 2 set-focused-tags 2 + riverctl map normal Mod4 3 set-focused-tags 4 + riverctl map normal Mod4 4 set-focused-tags 8 + riverctl map normal Mod4 5 set-focused-tags 16 + riverctl map normal Mod4 6 set-focused-tags 32 + riverctl map normal Mod4 7 set-focused-tags 64 + riverctl map normal Mod4 8 set-focused-tags 128 + riverctl map normal Mod4 9 set-focused-tags 256 + riverctl map normal Mod4 0 set-focused-tags 512 + + # --- Move Window to Tag (movetoworkspace) --- + riverctl map normal Mod4+Shift 1 set-view-tags 1 + riverctl map normal Mod4+Shift 2 set-view-tags 2 + riverctl map normal Mod4+Shift 3 set-view-tags 4 + riverctl map normal Mod4+Shift 4 set-view-tags 8 + riverctl map normal Mod4+Shift 5 set-view-tags 16 + riverctl map normal Mod4+Shift 6 set-view-tags 32 + riverctl map normal Mod4+Shift 7 set-view-tags 64 + riverctl map normal Mod4+Shift 8 set-view-tags 128 + riverctl map normal Mod4+Shift 9 set-view-tags 256 + riverctl map normal Mod4+Shift 0 set-view-tags 512 + + # --- Mouse Bindings (bindm) --- + # Super + Left Mouse to move + riverctl map-pointer normal Mod4 BTN_LEFT move-view + # Super + Right Mouse to resize + riverctl map-pointer normal Mod4 BTN_RIGHT resize-view + + # --- Window Rules (windowrule) --- + # River uses app-id (for class) and title. Tags are set with a bitmask. + # workspace 1 silent,initialTitle:^EVE$ -> tags 1 + riverctl rule-add -title 'EVE' tags 1 + # tile, initialTitle:^EVE$ -> This is default, but we can be explicit with no-float + riverctl rule-add -title 'EVE' no-float + + # workspace 6 silent,class:^QQ$ -> tags 32 + riverctl rule-add -app-id 'QQ' tags 32 + + # float, title:^图片查看器$ + riverctl rule-add -title '图片查看器' float + + # workspace 6 silent,class:^(discord)$ -> tags 32 + riverctl rule-add -app-id 'discord' tags 32 + + # workspace 4 silent,class:^(kitty)$ -> tags 8 + riverctl rule-add -app-id 'kitty' tags 8 + + # workspace 5 silent,class:^(firefox)$ -> tags 16 + riverctl rule-add -app-id 'firefox' tags 16 + + # Note on Monitor config: + # River itself doesn't manage output resolutions and refresh rates. + # This should be handled by another utility like kanshi, or by manually + # running wlr-randr commands in your startup script. Your NixOS setup + # might already handle this through services.wayland.wdisplays.enable or similar. + riverctl spawn "wlr-randr --output DP-3 --mode 3440x1440@144Hz" + riverctl spawn "wlr-randr --output DP-5 --mode 3440x1440@144Hz" + ''; + }; +} From a28cc71ef2605d8f55aeee3a12d340d3f9dd9ae5 Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 12:33:04 -0400 Subject: [PATCH 2/6] feat: add neomutt --- home/fabric/programs/neomutt.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 home/fabric/programs/neomutt.nix diff --git a/home/fabric/programs/neomutt.nix b/home/fabric/programs/neomutt.nix new file mode 100644 index 0000000..f6959fd --- /dev/null +++ b/home/fabric/programs/neomutt.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + programs = { + neomutt = { + enable = true; + }; + }; + home.packages = with pkgs; [ + msmtp + ]; +} From 813906ee3ff99985aecc43805b6520fde436dde6 Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 12:33:39 -0400 Subject: [PATCH 3/6] update: misc --- flake.lock | 26 +++++++++++++------------- home/fabric/default.nix | 10 +++++++++- home/fabric/programs/zsh.nix | 4 ++++ hosts/common/global/default.nix | 6 +++--- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index b203a0c..e3bffa0 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1754696903, - "narHash": "sha256-H+qoDZddFhYq8lT2E3NahF7wiDJLMYE6Pe0E6izz+cg=", + "lastModified": 1754939243, + "narHash": "sha256-5fHK2rNNiz1VHxv6ogUyOIlxGWQ0p8YaGYngjTJTFEs=", "ref": "refs/heads/main", - "rev": "3ac2d7261d747ee5cf6721a570993fdcd2300726", - "revCount": 1335, + "rev": "d54aabb31ae9697656862f7abeefccc0ef00b8ba", + "revCount": 1339, "type": "git", "url": "https://codeberg.org/FabricSoul/dwl" }, @@ -104,11 +104,11 @@ ] }, "locked": { - "lastModified": 1754613544, - "narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=", + "lastModified": 1754924470, + "narHash": "sha256-asI/or9AcUMydwzodCgpHGytnMSNUlciw3uaycpXm4E=", "owner": "nix-community", "repo": "home-manager", - "rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f", + "rev": "67393957c27b4e4c6c48a60108a201413ced7800", "type": "github" }, "original": { @@ -164,11 +164,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754651824, - "narHash": "sha256-aB7ft6njy9EJfuW+rdToNChfRrHNRw/yTg5cSEnG+HI=", + "lastModified": 1754800730, + "narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b069b7c1e2fe1a3a24221428558bf44128d3d5c8", + "rev": "641d909c4a7538f1539da9240dedb1755c907e40", "type": "github" }, "original": { @@ -204,11 +204,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1754682350, - "narHash": "sha256-4Dgf0cA/ZJtj9eTzG0yNMRBcd5fll3hhWx2WdwltAP8=", + "lastModified": 1754921951, + "narHash": "sha256-KY+/livAp6l3fI8SdNa+CLN/AA4Z038yL/pQL2PaW7g=", "owner": "nix-community", "repo": "nixvim", - "rev": "832de87d40f9a40430372552ab0b583680187cf3", + "rev": "7b53322d75a1c66f84fb145e4b5f0f411d9edc6b", "type": "github" }, "original": { diff --git a/home/fabric/default.nix b/home/fabric/default.nix index 236a4bf..ca57b6c 100644 --- a/home/fabric/default.nix +++ b/home/fabric/default.nix @@ -16,9 +16,11 @@ ./programs/zsh.nix ./programs/ssh.nix ./programs/yazi.nix + ./programs/neomutt.nix + ./programs/gpg.nix # Import desktop configurations - # ./desktop/hyprland.nix + ./desktop/hyprland.nix # ./desktop/hyprpanel.nix # ./desktop/river.nix # ./desktop/hyprpaper.nix @@ -68,6 +70,7 @@ fd lsd brightnessctl + neomutt nerd-fonts.fira-mono @@ -114,6 +117,11 @@ openssl psmisc air + w3m + gopass + pinentry + gnupg + dig ]; # Enable home-manager diff --git a/home/fabric/programs/zsh.nix b/home/fabric/programs/zsh.nix index 8955168..e33c0d2 100644 --- a/home/fabric/programs/zsh.nix +++ b/home/fabric/programs/zsh.nix @@ -23,6 +23,9 @@ export PATH=$PATH:(go env GOPATH)/bin export PATH="/home/fabric/.cargo/bin:$PATH" export PATH="/home/fabric/.config/emacs/bin:$PATH" + export GPG_TTY=$(tty) + export GPG_AGENT_INFO= + export GPGPINENTRYMODE=loopback GOPATH=$HOME/go PATH=$PATH:/usr/local/go/bin:$GOPATH/bin PATH="$HOME/.govm/shim:$PATH" @@ -44,6 +47,7 @@ fi rm -f -- "$tmp" } + gpg --quiet --decrypt /home/fabric/.local/share/gopass/stores/root/websites/codeberg.org/FabricSoul.gpg >/dev/null ''; prezto = { tmux = { diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 0920637..298c0d6 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -22,8 +22,8 @@ environment.systemPackages = with pkgs; [ vim git - greetd.greetd - greetd.tuigreet + greetd + tuigreet zsh home-manager findutils @@ -38,7 +38,7 @@ enable = true; settings = { default_session = { - command = "''${pkgs.greetd.tuigreet}/bin/tuigreet --time"; + command = "''${pkgs.tuigreet}/bin/tuigreet --time"; user = "fabric"; }; }; From a07659f1d4c128a411a9cd48d0445d2305ee44b9 Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 12:34:16 -0400 Subject: [PATCH 4/6] feat: gopass --- files/scripts/gopass.sh | 6 ++++++ home/fabric/programs/gpg.nix | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 files/scripts/gopass.sh create mode 100644 home/fabric/programs/gpg.nix diff --git a/files/scripts/gopass.sh b/files/scripts/gopass.sh new file mode 100755 index 0000000..9e27839 --- /dev/null +++ b/files/scripts/gopass.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +selection=$(gopass list -f | wmenu -p "Search:" -l 10) +if [ -n "$selection" ]; then + gopass show -c "$selection" +fi diff --git a/home/fabric/programs/gpg.nix b/home/fabric/programs/gpg.nix new file mode 100644 index 0000000..a35d7dc --- /dev/null +++ b/home/fabric/programs/gpg.nix @@ -0,0 +1,12 @@ +{...}: { + services.gpg-agent = { + enable = true; + enableZshIntegration = true; + extraConfig = '' + pinentry-program /home/fabric/.nix-profile/bin/pinentry-curses + allow-loopback-pinentry + default-cache-ttl 86400 + max-cache-ttl 31536000 + ''; + }; +} From 88b599c24489f57985d9738f11d921890b82f3cd Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 14:43:08 -0400 Subject: [PATCH 5/6] feat: add jellyfin and navidrome --- hosts/common/optional/plex.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/common/optional/plex.nix b/hosts/common/optional/plex.nix index 15b3dbb..1c04525 100644 --- a/hosts/common/optional/plex.nix +++ b/hosts/common/optional/plex.nix @@ -3,4 +3,16 @@ enable = true; openFirewall = true; }; + services.jellyfin = { + enable = true; + openFirewall = true; + }; + services.navidrome = { + enable = true; + openFirewall = true; + settings = { + MusicFolder = "/nas/music"; + Address = "0.0.0.0"; + }; + }; } From 331b72680919aa48edcccfdc2ebfa4b7e66067db Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 12 Aug 2025 16:13:33 -0400 Subject: [PATCH 6/6] update: misc --- files/keyboard.kbd | 22 +++++++++++----------- home/fabric/default.nix | 2 +- home/fabric/programs/zsh.nix | 2 +- hosts/solaris/default.nix | 1 + 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/files/keyboard.kbd b/files/keyboard.kbd index 0d3a65c..63db781 100644 --- a/files/keyboard.kbd +++ b/files/keyboard.kbd @@ -57,15 +57,15 @@ left down rght ) (defalias -a (tap-hold 200 a lalt) -o (tap-hold 200 o lmet) -e (tap-hold 200 e lsft) -u (tap-hold 200 u lctl) -h (tap-hold 200 h lctl) -t (tap-hold 200 t lsft) -n (tap-hold 200 n lmet) -s (tap-hold 200 s lalt) -spc (tap-hold 200 spc (layer-toggle num)) -bspc (tap-hold 200 bspc (layer-toggle symbol)) -tab (tap-hold 200 tab (layer-toggle arrow)) +a (tap-hold 150 a lalt) +o (tap-hold 150 o lmet) +e (tap-hold 150 e lsft) +u (tap-hold 150 u lctl) +h (tap-hold 150 h lctl) +t (tap-hold 150 t lsft) +n (tap-hold 150 n lmet) +s (tap-hold 150 s lalt) +spc (tap-hold 150 spc (layer-toggle num)) +bspc (tap-hold 150 bspc (layer-toggle symbol)) +tab (tap-hold 150 tab (layer-toggle arrow)) ) diff --git a/home/fabric/default.nix b/home/fabric/default.nix index ca57b6c..fec2ffd 100644 --- a/home/fabric/default.nix +++ b/home/fabric/default.nix @@ -20,7 +20,7 @@ ./programs/gpg.nix # Import desktop configurations - ./desktop/hyprland.nix + # ./desktop/hyprland.nix # ./desktop/hyprpanel.nix # ./desktop/river.nix # ./desktop/hyprpaper.nix diff --git a/home/fabric/programs/zsh.nix b/home/fabric/programs/zsh.nix index e33c0d2..fce4208 100644 --- a/home/fabric/programs/zsh.nix +++ b/home/fabric/programs/zsh.nix @@ -47,7 +47,7 @@ fi rm -f -- "$tmp" } - gpg --quiet --decrypt /home/fabric/.local/share/gopass/stores/root/websites/codeberg.org/FabricSoul.gpg >/dev/null + gpg --pinentry-mode=loopback --quiet --decrypt /home/fabric/.local/share/gopass/stores/root/websites/codeberg.org/FabricSoul.gpg >/dev/null ''; prezto = { tmux = { diff --git a/hosts/solaris/default.nix b/hosts/solaris/default.nix index b842a86..fb459a7 100644 --- a/hosts/solaris/default.nix +++ b/hosts/solaris/default.nix @@ -13,6 +13,7 @@ ../common/global ../common/optional/fcitx5.nix ../common/optional/bluetooth.nix + ../common/optional/steam.nix ../common/optional/kmonad.nix ../common/optional/auto-cpufreq.nix