All my system configs and packages in one repo

switch to niri

pluie.me 2efbb524 fa8247f2

verified
+1126 -105
+2 -2
.gitignore
··· 1 - result/ 2 - .direnv/ 1 + result 2 + .direnv
+11 -11
flake.lock
··· 89 89 ] 90 90 }, 91 91 "locked": { 92 - "lastModified": 1743956496, 93 - "narHash": "sha256-LguszqsDBTtdBxblQTtN7vOAYmfoe43aHkB8aK1dChE=", 92 + "lastModified": 1746251417, 93 + "narHash": "sha256-u6snZSfmjgHmdyr57mDcGZ+h9mEQhl1rcagC+PQSEuQ=", 94 94 "owner": "feel-co", 95 95 "repo": "hjem", 96 - "rev": "e3b63f300f23f2ffeb6efac046cf71b94352fed2", 96 + "rev": "b034b70f8850729b828a7327e29bbecd287e09c6", 97 97 "type": "github" 98 98 }, 99 99 "original": { ··· 109 109 ] 110 110 }, 111 111 "locked": { 112 - "lastModified": 1745973953, 113 - "narHash": "sha256-s1ZHPUq9mi0VHVLI927tFdsMQqB5ClEBrYCwI8C7BMA=", 112 + "lastModified": 1746160248, 113 + "narHash": "sha256-IGYDY1TtHNEY5snzzWr0J+LhIa7Gk9Y6efwnl7hQsN8=", 114 114 "owner": "snugnug", 115 115 "repo": "hjem-rum", 116 - "rev": "d152f54bcd38dff8badc9449f6aa8f44944e1b17", 116 + "rev": "5519659f967bf6c8910c59fada57bb9b2aa50251", 117 117 "type": "github" 118 118 }, 119 119 "original": { ··· 129 129 ] 130 130 }, 131 131 "locked": { 132 - "lastModified": 1745725746, 132 + "lastModified": 1746054057, 133 133 "narHash": "sha256-iR+idGZJ191cY6NBXyVjh9QH8GVWTkvZw/w+1Igy45A=", 134 134 "owner": "nix-community", 135 135 "repo": "nix-index-database", 136 - "rev": "187524713d0d9b2d2c6f688b81835114d4c2a7c6", 136 + "rev": "13ba07d54c6ccc5af30a501df669bf3fe3dd4db8", 137 137 "type": "github" 138 138 }, 139 139 "original": { ··· 160 160 }, 161 161 "nixpkgs": { 162 162 "locked": { 163 - "lastModified": 1745930157, 164 - "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", 163 + "lastModified": 1746232882, 164 + "narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=", 165 165 "owner": "NixOS", 166 166 "repo": "nixpkgs", 167 - "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", 167 + "rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008", 168 168 "type": "github" 169 169 }, 170 170 "original": {
+1
modules/hjem-ctp/default.nix
··· 18 18 19 19 ./fcitx5.nix 20 20 ./fish.nix 21 + ./fuzzel.nix 21 22 # ./plasma.nix 22 23 ./vencord.nix 23 24 ];
+9 -4
modules/hjem-ctp/fish.nix
··· 9 9 let 10 10 cfg = config.ctp.fish; 11 11 themeName = "Catppuccin ${ctp-lib.mkUpper cfg.flavor}"; 12 + 13 + src = pkgs.fetchFromGitHub { 14 + owner = "catppuccin"; 15 + repo = "fish"; 16 + rev = "6a85af2ff722ad0f9fbc8424ea0a5c454661dfed"; 17 + hash = "sha256-Oc0emnIUI4LV7QJLs4B2/FQtCFewRFVp7EDv8GawFsA="; 18 + }; 12 19 in 13 20 { 14 21 options.ctp.fish = ctp-lib.mkCatppuccinOptions "Fish" {}; 15 22 16 23 config = lib.mkIf cfg.enable { 17 - files = { 18 - ".config/fish/themes/${themeName}.theme".source = 19 - "${pkgs.catppuccin-fish}/share/fish/themes/${themeName}.theme"; 20 - }; 24 + files.".config/fish/themes/${themeName}.theme".source = 25 + "${src}/themes/${themeName}.theme"; 21 26 22 27 rum.programs.fish.earlyConfigFiles.ctp-fish = '' 23 28 fish_config theme choose "${themeName}"
+26
modules/hjem-ctp/fuzzel.nix
··· 1 + # Catppuccin theme for Fuzzel 2 + { 3 + config, 4 + ctp-lib, 5 + lib, 6 + pkgs, 7 + ... 8 + }: 9 + let 10 + cfg = config.ctp.fuzzel; 11 + 12 + src = pkgs.fetchFromGitHub { 13 + owner = "catppuccin"; 14 + repo = "fuzzel"; 15 + rev = "0af0e26901b60ada4b20522df739f032797b07c3"; 16 + hash = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg="; 17 + }; 18 + in 19 + { 20 + options.ctp.fuzzel = ctp-lib.mkCatppuccinOptions "Fuzzel" { withAccent = true; }; 21 + 22 + config = lib.mkIf cfg.enable { 23 + rum.programs.fuzzel.settings.main.include = 24 + "${src}/themes/catppuccin-${cfg.flavor}/${cfg.accent}.ini"; 25 + }; 26 + }
-22
packages/catppuccin-fish/package.nix
··· 1 - { 2 - stdenvNoCC, 3 - fetchFromGitHub, 4 - }: 5 - stdenvNoCC.mkDerivation { 6 - pname = "catppuccin-fish"; 7 - version = "0-unstable-2025-03-01"; 8 - 9 - src = fetchFromGitHub { 10 - owner = "catppuccin"; 11 - repo = "fish"; 12 - rev = "6a85af2ff722ad0f9fbc8424ea0a5c454661dfed"; 13 - hash = "sha256-Oc0emnIUI4LV7QJLs4B2/FQtCFewRFVp7EDv8GawFsA="; 14 - }; 15 - 16 - installPhase = '' 17 - runHook preInstall 18 - mkdir -p $out/share/fish 19 - cp -r themes $out/share/fish/themes 20 - runHook postInstall 21 - ''; 22 - }
-43
packages/catppuccin-sddm/package.nix
··· 1 - { 2 - lib, 3 - stdenvNoCC, 4 - fetchFromGitHub, 5 - flavors ? [ ], 6 - }: 7 - let 8 - validFlavors = [ 9 - "mocha" 10 - "macchiato" 11 - "frappe" 12 - "latte" 13 - ]; 14 - in 15 - lib.checkListOfEnum "Invalid flavor, valid flavors are ${toString validFlavors}" validFlavors 16 - flavors 17 - stdenvNoCC.mkDerivation 18 - { 19 - pname = "catppuccin-sddm"; 20 - version = "2023-12-05"; 21 - 22 - src = fetchFromGitHub { 23 - owner = "catppuccin"; 24 - repo = "sddm"; 25 - rev = "95bfcba80a3b0cb5d9a6fad422a28f11a5064991"; 26 - hash = "sha256-Jf4xfgJEzLM7WiVsERVkj5k80Fhh1edUl6zsSBbQi6Y="; 27 - }; 28 - 29 - installPhase = 30 - let 31 - flavoursToInstall = builtins.concatStringsSep " " ( 32 - map (x: "src/catppuccin-${x}") (if flavors == [ ] then [ "*" ] else flavors) 33 - ); 34 - in 35 - '' 36 - runHook preInstall 37 - 38 - mkdir -p $out/share/sddm/themes/ 39 - cp -r ${flavoursToInstall} $out/share/sddm/themes/ 40 - 41 - runHook postInstall 42 - ''; 43 - }
+5
packages/darkly-qt5/package.nix
··· 1 + { 2 + darkly, 3 + libsForQt5, 4 + }: 5 + darkly.override { qtPackages = libsForQt5; }
+72
packages/darkly/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + cmake, 6 + ninja, 7 + kdePackages, 8 + qtPackages ? kdePackages, 9 + gitUpdater, 10 + }: 11 + let 12 + qtMajorVersion = lib.versions.major qtPackages.qtbase.version; 13 + in 14 + stdenv.mkDerivation (finalAttrs: { 15 + pname = "darkly-qt${qtMajorVersion}"; 16 + version = "0.5.18"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "Bali10050"; 20 + repo = "Darkly"; 21 + tag = "v${finalAttrs.version}"; 22 + hash = "sha256-IwN6eZusfeGIEtdubpJpp1wrzToi0Umwi9jbXc4AF90="; 23 + }; 24 + 25 + nativeBuildInputs = [ 26 + cmake 27 + ninja 28 + qtPackages.wrapQtAppsHook 29 + qtPackages.extra-cmake-modules 30 + ]; 31 + 32 + buildInputs = 33 + with qtPackages; 34 + [ 35 + qtbase 36 + kconfig 37 + kcoreaddons 38 + kcmutils 39 + kguiaddons 40 + ki18n 41 + kiconthemes 42 + kwindowsystem 43 + ] 44 + ++ lib.optionals (qtMajorVersion == "5") [ 45 + kirigami2 46 + ] 47 + ++ lib.optionals (qtMajorVersion == "6") [ 48 + kcolorscheme 49 + kdecoration 50 + kirigami 51 + ]; 52 + 53 + cmakeFlags = map (v: lib.cmakeBool "BUILD_QT${v}" (v == qtMajorVersion)) [ 54 + "5" 55 + "6" 56 + ]; 57 + 58 + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; 59 + 60 + meta = 61 + { 62 + description = "Modern style for Qt applications (fork of Lightly)"; 63 + homepage = "https://github.com/Bali10050/Darkly"; 64 + changelog = "https://github.com/Bali10050/Darkly/releases/tag/v${finalAttrs.version}"; 65 + platforms = lib.platforms.linux; 66 + license = with lib.licenses; [ gpl2Plus ]; 67 + maintainers = with lib.maintainers; [ pluiedev ]; 68 + } 69 + // lib.optionalAttrs (qtMajorVersion == "6") { 70 + mainProgram = "darkly-settings6"; 71 + }; 72 + })
+1 -23
systems/common.nix
··· 31 31 "configurable-impure-env" 32 32 ]; 33 33 trusted-users = [ "@wheel" ]; 34 - impure-env = [ "all_proxy=http://127.0.0.1:2080" ]; 34 + # impure-env = [ "all_proxy=http://127.0.0.1:2080" ]; 35 35 }; 36 36 }; 37 37 ··· 49 49 enable = true; 50 50 maxGenerations = 10; 51 51 enrollConfig = true; 52 - 53 - style.wallpapers = [ ]; 54 - style.graphicalTerminal = { 55 - palette = "1e1e2e;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4"; 56 - brightPalette = "585b70;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4"; 57 - background = "1e1e2e"; 58 - foreground = "cdd6f4"; 59 - brightBackground = "585b70"; 60 - brightForeground = "cdd6f4"; 61 - font.scale = "2x2"; 62 - }; 63 52 }; 64 53 efi.canTouchEfiVariables = true; 65 54 }; ··· 82 71 SDL_VIDEODRIVER = "wayland,x11"; 83 72 }; 84 73 85 - i18n.supportedLocales = [ "all" ]; 86 - 87 74 services = { 88 75 flatpak.enable = true; 89 - 90 - desktopManager.plasma6.enable = true; 91 - displayManager = { 92 - defaultSession = "plasma"; 93 - sddm = { 94 - enable = true; 95 - wayland.enable = true; 96 - }; 97 - }; 98 76 99 77 pulseaudio.enable = false; 100 78 pipewire = {
+13
users/leah/appearance.nix
··· 13 13 theme = "blahaj"; 14 14 }; 15 15 16 + boot.loader.limine.style = { 17 + wallpapers = [ ]; 18 + graphicalTerminal = { 19 + palette = "1e1e2e;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4"; 20 + brightPalette = "585b70;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4"; 21 + background = "1e1e2e"; 22 + foreground = "cdd6f4"; 23 + brightBackground = "585b70"; 24 + brightForeground = "cdd6f4"; 25 + font.scale = "2x2"; 26 + }; 27 + }; 28 + 16 29 hjem.users.leah = { 17 30 ctp = { 18 31 enable = true;
+17
users/leah/default.nix
··· 1 + { inputs, config, ... }: 1 2 { 2 3 imports = [ 3 4 ../common.nix 4 5 ./appearance.nix 5 6 # ./presets/plasma 7 + ./presets/niri 6 8 ./programs 9 + 10 + inputs.hjem.nixosModules.hjem 7 11 ]; 8 12 9 13 users.users.leah = { ··· 15 19 "networkmanager" # Manage networks 16 20 ]; 17 21 home = "/home/leah"; 22 + 23 + # FIXME: huge fucking hack 24 + # Why isn't this working? who knows 25 + packages = config.hjem.users.leah.packages; 18 26 }; 19 27 20 28 # Name and directory should be populated by users.users 21 29 hjem.users.leah.enable = true; 30 + 31 + i18n = { 32 + defaultLocale = "en_US.UTF-8"; 33 + extraLocales = [ 34 + "zh_CN.UTF-8" 35 + "de_DE.UTF-8" 36 + ]; 37 + extraLocaleSettings.LC_TIME = "de_DE.UTF-8"; 38 + }; 22 39 }
+263
users/leah/presets/niri/config.kdl
··· 1 + input { 2 + keyboard { 3 + xkb { 4 + layout "us" 5 + options "compose:ralt" 6 + } 7 + } 8 + 9 + touchpad { 10 + tap 11 + natural-scroll 12 + // macOS-style right click 13 + click-method "clickfinger" 14 + middle-emulation 15 + } 16 + 17 + workspace-auto-back-and-forth 18 + } 19 + 20 + output "eDP-1" { 21 + mode "2560x1600" 22 + scale 1.25 23 + transform "normal" 24 + variable-refresh-rate 25 + } 26 + 27 + layout { 28 + gaps 24 29 + center-focused-column "on-overflow" 30 + always-center-single-column 31 + 32 + preset-column-widths { 33 + proportion 0.33333 34 + proportion 0.5 35 + proportion 0.66667 36 + } 37 + 38 + default-column-width {} 39 + 40 + focus-ring { 41 + width 1.5 42 + active-color "#eba0ac" 43 + inactive-color "#505050" 44 + } 45 + 46 + shadow { 47 + on 48 + softness 30 49 + spread 10 50 + offset x=0 y=5 51 + color "#0007" 52 + } 53 + } 54 + 55 + screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" 56 + 57 + window-rule { 58 + geometry-corner-radius 12 59 + clip-to-geometry true 60 + } 61 + 62 + window-rule { 63 + match app-id="com.mitchellh.ghostty" 64 + draw-border-with-background false 65 + } 66 + 67 + window-rule { 68 + match app-id=r#"firefox$"# title="^Picture-in-Picture$" 69 + open-floating true 70 + } 71 + 72 + window-rule { 73 + match app-id=r#"^org\.gnome\.World\.Secrets$"# 74 + 75 + block-out-from "screen-capture" 76 + } 77 + 78 + binds { 79 + Mod+Shift+Slash { show-hotkey-overlay; } 80 + 81 + // Suggested binds for running programs: terminal, app launcher, screen locker. 82 + Mod+T repeat=false { spawn "ghostty"; } 83 + Super+D repeat=false { spawn "bash" "-c" "pkill fuzzel || fuzzel"; } 84 + Super+Alt+L { spawn "swaylock"; } 85 + 86 + XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } 87 + XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } 88 + XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } 89 + XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } 90 + 91 + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=intel_backlight" "s" "10%-"; } 92 + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=intel_backlight" "s" "10%+"; } 93 + XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=asus::kbd_backlight" "s" "1-"; } 94 + XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=asus::kbd_backlight" "s" "1+"; } 95 + 96 + Mod+Q { close-window; } 97 + 98 + Mod+Left { focus-column-left; } 99 + Mod+Down { focus-window-down; } 100 + Mod+Up { focus-window-up; } 101 + Mod+Right { focus-column-right; } 102 + Mod+H { focus-column-left; } 103 + Mod+J { focus-window-down; } 104 + Mod+K { focus-window-up; } 105 + Mod+L { focus-column-right; } 106 + 107 + Mod+Ctrl+Left { move-column-left; } 108 + Mod+Ctrl+Down { move-window-down; } 109 + Mod+Ctrl+Up { move-window-up; } 110 + Mod+Ctrl+Right { move-column-right; } 111 + Mod+Ctrl+H { move-column-left; } 112 + Mod+Ctrl+J { move-window-down; } 113 + Mod+Ctrl+K { move-window-up; } 114 + Mod+Ctrl+L { move-column-right; } 115 + 116 + Mod+Home { focus-column-first; } 117 + Mod+End { focus-column-last; } 118 + Mod+Ctrl+Home { move-column-to-first; } 119 + Mod+Ctrl+End { move-column-to-last; } 120 + 121 + Mod+Shift+Left { focus-monitor-left; } 122 + Mod+Shift+Down { focus-monitor-down; } 123 + Mod+Shift+Up { focus-monitor-up; } 124 + Mod+Shift+Right { focus-monitor-right; } 125 + Mod+Shift+H { focus-monitor-left; } 126 + Mod+Shift+J { focus-monitor-down; } 127 + Mod+Shift+K { focus-monitor-up; } 128 + Mod+Shift+L { focus-monitor-right; } 129 + 130 + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } 131 + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } 132 + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } 133 + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } 134 + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } 135 + Mod+Shift+Ctrl+J { move-column-to-monitor-down; } 136 + Mod+Shift+Ctrl+K { move-column-to-monitor-up; } 137 + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } 138 + 139 + Mod+Page_Down { focus-workspace-down; } 140 + Mod+Page_Up { focus-workspace-up; } 141 + Mod+U { focus-workspace-down; } 142 + Mod+I { focus-workspace-up; } 143 + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } 144 + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } 145 + Mod+Ctrl+U { move-column-to-workspace-down; } 146 + Mod+Ctrl+I { move-column-to-workspace-up; } 147 + 148 + Mod+Shift+Page_Down { move-workspace-down; } 149 + Mod+Shift+Page_Up { move-workspace-up; } 150 + Mod+Shift+U { move-workspace-down; } 151 + Mod+Shift+I { move-workspace-up; } 152 + 153 + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } 154 + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } 155 + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } 156 + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } 157 + 158 + Mod+WheelScrollRight { focus-column-right; } 159 + Mod+WheelScrollLeft { focus-column-left; } 160 + Mod+Ctrl+WheelScrollRight { move-column-right; } 161 + Mod+Ctrl+WheelScrollLeft { move-column-left; } 162 + 163 + Mod+Shift+WheelScrollDown { focus-column-right; } 164 + Mod+Shift+WheelScrollUp { focus-column-left; } 165 + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } 166 + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } 167 + 168 + Mod+1 { focus-workspace 1; } 169 + Mod+2 { focus-workspace 2; } 170 + Mod+3 { focus-workspace 3; } 171 + Mod+4 { focus-workspace 4; } 172 + Mod+5 { focus-workspace 5; } 173 + Mod+6 { focus-workspace 6; } 174 + Mod+7 { focus-workspace 7; } 175 + Mod+8 { focus-workspace 8; } 176 + Mod+9 { focus-workspace 9; } 177 + Mod+Ctrl+1 { move-column-to-workspace 1; } 178 + Mod+Ctrl+2 { move-column-to-workspace 2; } 179 + Mod+Ctrl+3 { move-column-to-workspace 3; } 180 + Mod+Ctrl+4 { move-column-to-workspace 4; } 181 + Mod+Ctrl+5 { move-column-to-workspace 5; } 182 + Mod+Ctrl+6 { move-column-to-workspace 6; } 183 + Mod+Ctrl+7 { move-column-to-workspace 7; } 184 + Mod+Ctrl+8 { move-column-to-workspace 8; } 185 + Mod+Ctrl+9 { move-column-to-workspace 9; } 186 + 187 + Mod+Tab { focus-workspace-previous; } 188 + 189 + Mod+BracketLeft { consume-or-expel-window-left; } 190 + Mod+BracketRight { consume-or-expel-window-right; } 191 + 192 + Mod+Comma { consume-window-into-column; } 193 + Mod+Period { expel-window-from-column; } 194 + 195 + Mod+R { switch-preset-column-width; } 196 + Mod+Shift+R { switch-preset-window-height; } 197 + Mod+Ctrl+R { reset-window-height; } 198 + Mod+F { maximize-column; } 199 + Mod+Shift+F { fullscreen-window; } 200 + 201 + Mod+Ctrl+F { expand-column-to-available-width; } 202 + 203 + Mod+C { center-column; } 204 + 205 + Mod+Minus { set-column-width "-10%"; } 206 + Mod+Equal { set-column-width "+10%"; } 207 + 208 + Mod+Shift+Minus { set-window-height "-10%"; } 209 + Mod+Shift+Equal { set-window-height "+10%"; } 210 + 211 + Mod+V { toggle-window-floating; } 212 + Mod+Shift+V { switch-focus-between-floating-and-tiling; } 213 + Mod+W { toggle-column-tabbed-display; } 214 + 215 + Print { screenshot; } 216 + Ctrl+Print { screenshot-screen; } 217 + Alt+Print { screenshot-window; } 218 + 219 + // Fn + F6 gets translated into this on fettuccine 220 + Super+Shift+S { screenshot; } 221 + Super+Ctrl+Shift+S { screenshot-screen; } 222 + Super+Alt+Shift+S { screenshot-window; } 223 + 224 + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } 225 + Ctrl+Alt+Delete { quit; } 226 + } 227 + 228 + cursor { 229 + xcursor-theme "BreezeX-Black" 230 + xcursor-size 32 231 + } 232 + 233 + hotkey-overlay { 234 + skip-at-startup 235 + } 236 + 237 + environment { 238 + DISPLAY ":0" 239 + ELECTRON_OZONE_PLATFORM_HINT "auto" 240 + } 241 + 242 + 243 + // Workspaces & default apps 244 + workspace "chat" 245 + workspace "dev" 246 + workspace "gaming" 247 + 248 + spawn-at-startup "ghostty" 249 + spawn-at-startup "firefox" 250 + 251 + window-rule { 252 + match at-startup=true app-id="vesktop" 253 + open-on-workspace "chat" 254 + } 255 + window-rule { 256 + match at-startup=true app-id="com.mitchellh.ghostty" 257 + match at-startup=true app-id="firefox" 258 + open-on-workspace "dev" 259 + } 260 + window-rule { 261 + match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"# 262 + default-floating-position x=10 y=10 relative-to="top-right" 263 + }
+52
users/leah/presets/niri/default.nix
··· 1 + { 2 + pkgs, 3 + ... 4 + }: 5 + { 6 + imports = [ 7 + ./gui-toolkits.nix 8 + ./services.nix 9 + ]; 10 + 11 + programs.niri.enable = true; 12 + 13 + hjem.users.leah = { 14 + packages = with pkgs; [ 15 + # I'm using Nautilus here because it a) looks nice 16 + # and b) avoids configuring XDP GNOME to use a XDP GTK's file chooser 17 + nautilus 18 + 19 + networkmanagerapplet 20 + swaynotificationcenter 21 + waybar 22 + xwayland-satellite 23 + brightnessctl 24 + swaylock-effects 25 + ]; 26 + 27 + files.".config/niri/config.kdl".source = ./config.kdl; 28 + 29 + files.".config/swaync/style.css".source = ./swaync/style.css; 30 + files.".config/swaync/config.json".source = ./swaync/config.json; 31 + 32 + files.".config/waybar/style.css".source = ./waybar/style.css; 33 + files.".config/waybar/config.jsonc".source = ./waybar/config.jsonc; 34 + }; 35 + 36 + hjem.users.leah.rum.programs.fuzzel = { 37 + enable = true; 38 + 39 + settings.main = { 40 + font = "Sans:size=8"; 41 + use-bold = true; 42 + dpi-aware = "yes"; 43 + show-actions = true; 44 + lines = 10; 45 + keyboard-focus = "on-demand"; 46 + horizontal-pad = 32; 47 + vertical-pad = 24; 48 + anchor = "bottom"; 49 + layer = "top"; 50 + }; 51 + }; 52 + }
+27
users/leah/presets/niri/gui-toolkits.nix
··· 1 + # All sorts of Qt 5/6 + GTK 3/4 pain and suffering 2 + { 3 + pkgs, 4 + ... 5 + }: 6 + { 7 + hjem.users.leah.packages = with pkgs; [ 8 + darkly 9 + darkly-qt5 10 + adw-gtk3 11 + adwaita-icon-theme 12 + ]; 13 + 14 + # Theme Qt apps via qt{5,6}ct + Darkly 15 + qt = { 16 + enable = true; 17 + platformTheme = "qt5ct"; 18 + }; 19 + 20 + # TODO: Declaratively configure qt*ct and GTK3/4 gsettings appearance flags 21 + 22 + # On native Wayland compositors that support text-input-v3 23 + # (incl. Niri), it's recommended to set this flag to true, 24 + # which removes environment variables like `GTK_IM_MODULES` 25 + # that are only present for backwards compatibility. 26 + i18n.inputMethod.fcitx5.waylandFrontend = true; 27 + }
+108
users/leah/presets/niri/services.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: 7 + let 8 + mkStartupService = run: { 9 + enable = true; 10 + wantedBy = [ "graphical-session.target" ]; 11 + partOf = [ "graphical-session.target" ]; 12 + after = [ "graphical-session.target" ]; 13 + serviceConfig = { 14 + ExecStart = run; 15 + Restart = "on-failure"; 16 + }; 17 + }; 18 + 19 + swaylock-config = { 20 + screenshots = true; 21 + scaling = "fit"; 22 + clock = true; 23 + indicator-idle-visible = true; 24 + grace = 3; 25 + effect-blur = "10x10"; 26 + effect-vignette = "0.5:0.8"; 27 + effect-pixelate = 4; 28 + 29 + text-color = "#cdd6f4"; 30 + inside-color = "#181825"; 31 + inside-clear-color = "#a6e3a1"; 32 + inside-ver-color = "#cba6f7"; 33 + inside-wrong-color = "#f38ba8"; 34 + ring-color = "#1e1e2e"; 35 + ring-clear-color = "#a6e3a1"; 36 + ring-ver-color = "#cba6f7"; 37 + ring-wrong-color = "#f38ba8"; 38 + key-hl-color = "#eba0ac"; 39 + bs-hl-color = "#6c7086"; 40 + line-color = "#313244"; 41 + 42 + timestr = "%H:%M"; 43 + datestr = "%e %b '%y / %a"; 44 + }; 45 + 46 + swaylock' = pkgs.writeShellScript "swaylock-wrapped" '' 47 + ${lib.getExe pkgs.swaylock} -f ${lib.cli.toGNUCommandLineShell { } swaylock-config} 48 + ''; 49 + 50 + swayidle' = pkgs.writeShellScript "swayidle-wrapped" '' 51 + ${lib.getExe pkgs.swayidle} -w \ 52 + timeout 300 ${swaylock'} \ 53 + timeout 600 'niri msg action power-off-monitors' \ 54 + resume 'niri msg action power-on-monitors' \ 55 + before-sleep ${swaylock'} \ 56 + lock ${swaylock'} \ 57 + unlock 'pkill -SIGUSR1 -ux $USER ${swaylock'}' 58 + ''; 59 + in 60 + { 61 + systemd.packages = with pkgs; [ 62 + waybar 63 + swaynotificationcenter 64 + xwayland-satellite 65 + ]; 66 + 67 + systemd.user.services = { 68 + polkit-gnome-authentication-agent-1 = mkStartupService "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 69 + 70 + swaybg = mkStartupService "${lib.getExe pkgs.swaybg} -i ${../../wallpaper.jpg}"; 71 + 72 + fcitx5 = lib.mkIf (config.i18n.inputMethod.type == "fcitx5") ( 73 + mkStartupService (lib.getExe config.i18n.inputMethod.package) 74 + ); 75 + 76 + swayidle = mkStartupService swayidle'; 77 + }; 78 + 79 + security.polkit.enable = true; 80 + 81 + # Needed by the Waybar config 82 + services.power-profiles-daemon.enable = true; 83 + 84 + programs.regreet = { 85 + enable = true; 86 + settings = { 87 + background = { 88 + path = ../../wallpaper.jpg; 89 + fit = "Cover"; 90 + }; 91 + GTK.application_prefer_dark_theme = true; 92 + }; 93 + cursorTheme.name = "BreezeX-Black"; 94 + font = { 95 + name = "DM Sans"; 96 + size = 14; 97 + }; 98 + }; 99 + 100 + # Niri installs XDP GNOME by default but not XDP GTK, 101 + # which is required for certain functionality such as opening files 102 + xdg.portal = { 103 + xdgOpenUsePortal = true; 104 + extraPortals = [ 105 + pkgs.xdg-desktop-portal-gtk 106 + ]; 107 + }; 108 + }
+23
users/leah/presets/niri/swaync/config.json
··· 1 + { 2 + "$schema": "/etc/xdg/swaync/configSchema.json", 3 + "positionX": "right", 4 + "positionY": "top", 5 + "layer": "overlay", 6 + "control-center-margin-bottom": 10, 7 + "control-center-margin-right": 10, 8 + "control-center-margin-left": 10, 9 + "fit-to-screen": false, 10 + "timeout": 5, 11 + "timeout-low": 3, 12 + "timeout-critical": 0, 13 + "relative-timestamps": true, 14 + "control-center-width": 400, 15 + "control-center-height": 600, 16 + "widgets": [ 17 + "inhibitors", 18 + "title", 19 + "dnd", 20 + "notifications", 21 + "mpris" 22 + ] 23 + }
+207
users/leah/presets/niri/swaync/style.css
··· 1 + /* FIXME: Needs to be cleaned up more. */ 2 + 3 + @define-color cc-bg rgba(24, 24, 37, 0.9); 4 + @define-color noti-border-color rgb(235, 160, 172); 5 + @define-color noti-border-color-low rgb(108, 112, 134); 6 + @define-color noti-border-color-critical rgb(243, 139, 168); 7 + @define-color noti-bg rgba(24, 24, 37, 0.9); 8 + @define-color noti-bg-opaque rgb(24, 24, 37); 9 + @define-color noti-bg-darker rgb(17, 17, 27); 10 + @define-color noti-bg-hover rgb(30, 30, 46); 11 + @define-color noti-bg-hover-opaque rgb(30, 30, 46); 12 + @define-color noti-bg-focus rgba(30, 30, 46, 0.6); 13 + @define-color noti-close-bg rgb(49, 50, 68); 14 + @define-color noti-close-bg-hover rgb(69, 71, 90); 15 + @define-color text-color rgb(205, 214, 244); 16 + @define-color text-color-disabled rgb(150, 150, 150); 17 + @define-color bg-selected rgb(235, 160, 172); 18 + 19 + * { 20 + color: @text-color; 21 + } 22 + 23 + .notification-row:focus, .notification-row:hover { 24 + background: @noti-bg-focus; 25 + } 26 + 27 + .close-button, .notification-group-collapse-button, .notification-group-close-all-button { 28 + background: @noti-close-bg; 29 + } 30 + .close-button:hover, .notification-group-collapse-button:hover, .notification-group-close-all-button:hover { 31 + background: @noti-close-bg-hover; 32 + } 33 + 34 + .notification-row .notification-background .notification { 35 + border-color: @noti-border-color; 36 + border-width: 1.5px; 37 + background: @noti-bg; 38 + } 39 + 40 + .notification-row .notification-background .notification.low { 41 + border-color: @noti-border-color-low; 42 + } 43 + 44 + .notification-row .notification-background .notification.critical { 45 + border-color: @noti-border-color-critical; 46 + border-width: 2px; 47 + } 48 + 49 + .notification-row .notification-background .notification .notification-action:hover, .notification-row .notification-background .notification .notification-default-action:hover { 50 + background: @noti-bg-hover; 51 + } 52 + 53 + 54 + .notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary { 55 + font-size: 14pt; 56 + } 57 + 58 + .notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time { 59 + font-size: 10pt; 60 + } 61 + 62 + .notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body { 63 + font-size: 12pt; 64 + } 65 + 66 + .notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry { 67 + background: @noti-bg-darker; 68 + color: @text-color; 69 + caret-color: @text-color; 70 + border: 1px solid @noti-border-color; 71 + border-radius: 12px; 72 + } 73 + 74 + .notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button { 75 + background: @noti-bg; 76 + border: 1px solid @noti-border-color; 77 + color: @text-color; 78 + } 79 + 80 + .notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled { 81 + color: @text-color-disabled; 82 + border: 1px solid @noti-border-color; 83 + } 84 + 85 + .notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:hover { 86 + background: @noti-bg-hover; 87 + } 88 + 89 + .notification-row .notification-background .notification .notification-action { 90 + /* The alternative actions below the default action */ 91 + border-top: 1px solid @noti-border-color; 92 + border-right: 1px solid @noti-border-color; 93 + } 94 + 95 + .notification-group-header { 96 + font-size: 1.25rem; 97 + font-weight: bold; 98 + } 99 + 100 + .notification-group-icon { 101 + -gtk-icon-transform: scale(0.75); 102 + } 103 + 104 + .notification-group.collapsed .notification-row .notification { 105 + background-color: @noti-bg-opaque; 106 + } 107 + .notification-group.collapsed:hover .notification-row:not(:only-child) .notification { 108 + background-color: @noti-bg-hover; 109 + } 110 + 111 + .control-center { 112 + /* The Control Center which contains the old notifications + widgets */ 113 + background: @cc-bg; 114 + color: @text-color; 115 + padding: 3px 6px; 116 + } 117 + 118 + .control-center .control-center-list .notification .notification-default-action:hover, 119 + .control-center .control-center-list .notification .notification-action:hover { 120 + background-color: @noti-bg-hover; 121 + } 122 + 123 + /*** Widgets ***/ 124 + /* Title widget */ 125 + .widget-title { 126 + color: @text-color; 127 + margin: 8px; 128 + padding-bottom: 8px; 129 + font-size: 1.5rem; 130 + font-weight: bold; 131 + 132 + border-bottom: 1px solid rgb(108, 112, 134); 133 + } 134 + 135 + .widget-title > button { 136 + color: @text-color; 137 + background: @noti-bg; 138 + border: 1px solid @noti-border-color; 139 + } 140 + 141 + .widget-title > button:hover { 142 + background: @noti-bg-hover; 143 + } 144 + 145 + /* DND widget */ 146 + .widget-dnd { 147 + color: @text-color; 148 + margin: 4px 8px; 149 + } 150 + 151 + .widget-dnd > switch { 152 + background: @noti-bg; 153 + border: 1px solid @noti-border-color; 154 + } 155 + 156 + .widget-dnd > switch:checked { 157 + background: @bg-selected; 158 + } 159 + 160 + .widget-dnd > switch:checked image { 161 + color: @noti-bg; 162 + } 163 + 164 + .widget-dnd > switch slider { 165 + border: 1px solid @noti-border-color; 166 + background: @noti-bg-hover; 167 + } 168 + 169 + /* Mpris widget */ 170 + @define-color mpris-album-art-overlay rgba(17, 17, 27, 0.25); 171 + @define-color mpris-button-hover rgba(205, 214, 244, 0.25); 172 + 173 + .widget-mpris .widget-mpris-player { 174 + padding: 8px; 175 + margin: 8px 10px; 176 + background-color: @mpris-album-art-overlay; 177 + } 178 + 179 + .widget-mpris .widget-mpris-player button:hover { 180 + /* The media player buttons (play, pause, next, etc...) */ 181 + background: @noti-bg-hover; 182 + } 183 + 184 + .widget-mpris .widget-mpris-player .widget-mpris-title { 185 + font-weight: bold; 186 + font-size: 1.25rem; 187 + } 188 + 189 + .widget-mpris .widget-mpris-player > box > button:hover { 190 + background-color: @mpris-button-hover; 191 + } 192 + 193 + /* Inhibitors widget */ 194 + .widget-inhibitors { 195 + margin: 4px; 196 + font-size: 1.5rem; 197 + } 198 + 199 + .widget-inhibitors > button { 200 + color: @text-color; 201 + background: @noti-bg; 202 + border: 1px solid @noti-border-color; 203 + } 204 + 205 + .widget-inhibitors > button:hover { 206 + background: @noti-bg-hover; 207 + }
+147
users/leah/presets/niri/waybar/config.jsonc
··· 1 + [ 2 + { 3 + "name": "top", 4 + "layer": "top", 5 + "position": "top", 6 + "reload_style_on_change": true, 7 + "modules-left": ["group/dials"], 8 + "modules-center": ["clock"], 9 + "modules-right": [ 10 + "group/apps", 11 + "privacy", 12 + "group/appearance", 13 + "group/connectivity", 14 + "group/energy", 15 + ], 16 + "group/apps": { 17 + "orientation": "inherit", 18 + "modules": ["custom/notification", "tray"], 19 + "drawer": {}, 20 + }, 21 + "group/dials": { 22 + "orientation": "inherit", 23 + "modules": ["cpu", "custom/gpu", "memory"], 24 + }, 25 + "group/appearance": { 26 + "orientation": "inherit", 27 + "modules": [ 28 + "pulseaudio", 29 + "backlight", 30 + ], 31 + "drawer": {}, 32 + }, 33 + "group/connectivity": { 34 + "orientation": "inherit", 35 + "modules": [ 36 + "network", 37 + "bluetooth", 38 + ], 39 + "drawer": {}, 40 + }, 41 + "group/energy": { 42 + "orientation": "inherit", 43 + "modules": [ 44 + "battery", 45 + "power-profiles-daemon", 46 + ], 47 + "drawer": {}, 48 + }, 49 + "tray": { 50 + "icon-size": 24, 51 + "spacing": 6 52 + }, 53 + "custom/gpu": { 54 + "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", 55 + "format": " {}%", 56 + "interval": 5, 57 + "return-type": "" 58 + }, 59 + "cpu": { 60 + "format": " {usage}%", 61 + }, 62 + "memory": { 63 + "format": " {percentage}%", 64 + }, 65 + "network": { 66 + "format-wifi": " {essid}", 67 + "format-ethernet": "{essid}", 68 + "format-disconnected": "", 69 + }, 70 + "pulseaudio": { 71 + "format": " {volume}%" 72 + }, 73 + "backlight": { 74 + "format": " {percent}%" 75 + }, 76 + "clock": { 77 + "format": "<b>{0:%H:%M}</b> <span size='small' color='#a6adc8'>{0:%e %b '%y / %a}</span>" 78 + }, 79 + "bluetooth": { 80 + "format-off": " ", 81 + "format-on": " ", 82 + "format-connected": " {device_alias}", 83 + "format-connected-battery": " {device_alias} {device_battery_percentage}%", 84 + }, 85 + "battery": { 86 + "interval": 15, 87 + "states": { 88 + "full": 100, 89 + "not-quite-full": 65, 90 + "warning": 25, 91 + "critical": 10 92 + }, 93 + "format": "{icon} {capacity}%", 94 + "format-plugged": " {capacity}%", 95 + "format-charging": " {capacity}%", 96 + "format-critical": "󰂃 {capacity}%", 97 + "format-icons": ["", "", "", "", ""], 98 + }, 99 + "custom/notification": { 100 + "tooltip": false, 101 + "format": "{icon} {}", 102 + "format-icons": { 103 + "notification": "", 104 + "none": "", 105 + "dnd-notification": "", 106 + "dnd-none": "", 107 + "inhibited-notification": "", 108 + "inhibited-none": "", 109 + "dnd-inhibited-notification": "", 110 + "dnd-inhibited-none": "" 111 + }, 112 + "return-type": "json", 113 + "exec-if": "which swaync-client", 114 + "exec": "swaync-client -swb", 115 + "on-click": "swaync-client -t -sw", 116 + "on-click-right": "swaync-client -d -sw", 117 + "escape": true 118 + }, 119 + }, 120 + { 121 + "layer": "top", 122 + "position": "bottom", 123 + "name": "dock", 124 + "reload_style_on_change": true, 125 + "modules-center": ["wlr/taskbar"], 126 + "wlr/taskbar": { 127 + "icon-size": 64, 128 + "on-click": "activate", 129 + }, 130 + }, 131 + { 132 + "layer": "top", 133 + "position": "left", 134 + "reload_style_on_change": true, 135 + "modules-center": ["niri/workspaces"], 136 + 137 + "niri/workspaces": { 138 + "format": "{icon}", 139 + "format-icons": { 140 + "chat": "<b></b>", 141 + "dev": "", 142 + "gaming": "", 143 + "default": "•" 144 + } 145 + } 146 + } 147 + ]
+12
users/leah/presets/niri/waybar/default.nix
··· 1 + { 2 + pkgs, 3 + ... 4 + }: 5 + { 6 + hjem.users.leah = { 7 + packages = [ pkgs.waybar ]; 8 + 9 + files.".config/waybar/style.css".source = ./style.css; 10 + files.".config/waybar/config.jsonc".source = ./config.jsonc; 11 + }; 12 + }
+127
users/leah/presets/niri/waybar/style.css
··· 1 + /* General styles */ 2 + @define-color fg rgb(205, 214, 244); /* Text */ 3 + @define-color bg rgba(24, 24, 37, 0.8); /* Mantle */ 4 + @define-color bg-opaque rgb(24, 24, 37); /* Mantle */ 5 + @define-color accent rgb(235, 160, 172); /* Maroon */ 6 + @define-color separator rgba(255, 255, 255, 0.1); 7 + 8 + * { 9 + font-family: "DM Sans", "Font Awesome 6 Free"; 10 + color: @fg; 11 + } 12 + 13 + window { 14 + background: transparent; 15 + } 16 + 17 + /* Skip over the "overall" box */ 18 + window > * > box { 19 + background: @bg; 20 + border-radius: 12px; 21 + margin: 0.5rem; 22 + } 23 + 24 + widget label { 25 + margin: 0.5rem; 26 + } 27 + 28 + tooltip { 29 + background: @bg; 30 + border: none; 31 + border-radius: 12px; 32 + } 33 + 34 + button { 35 + padding: 0px; 36 + border-radius: 0px; 37 + border-color: @separator; 38 + transition: 0.25s; 39 + } 40 + .vertical button:first-child { 41 + border-radius: 12px 12px 0px 0px; 42 + border-top-width: 0px; 43 + } 44 + .vertical button:not(:first-child) { 45 + border-bottom-width: 1px; 46 + } 47 + .vertical button:last-child { 48 + border-radius: 0px 0px 12px 12px; 49 + border-bottom-width: 0px; 50 + } 51 + .horizontal button:first-child { 52 + border-radius: 12px 0px 0px 12px; 53 + border-left-width: 0px; 54 + } 55 + .vertical button:not(:first-child) { 56 + border-right-width: 1px; 57 + } 58 + .horizontal button:last-child { 59 + border-radius: 0px 12px 12px 0px; 60 + border-right-width: 0px; 61 + } 62 + button:hover, button.active { 63 + background: @accent; 64 + box-shadow: unset; 65 + text-shadow: unset; 66 + } 67 + button:hover label, button.active label { 68 + color: @bg-opaque; 69 + } 70 + 71 + /* Make each top segment a *bit* chubbier */ 72 + window.top > * > box { 73 + padding: 0 0.5rem; 74 + } 75 + 76 + /* Dials */ 77 + #cpu { 78 + color: #fab387; /* Peach */ 79 + } 80 + #custom-gpu { 81 + color: #b4befe; /* Lavender */ 82 + } 83 + #memory { 84 + color: #a6e3a1; /* Green */ 85 + } 86 + #clock { 87 + font-size: 14pt; 88 + } 89 + 90 + /* Connectivity */ 91 + #bluetooth, #network.wifi { 92 + color: #89b4fa; /* Blue */ 93 + } 94 + #network.disabled, 95 + #network.disconnected { 96 + color: #6c7086; /* Overlay0 */ 97 + } 98 + #network.ethernet { 99 + color: #a6e3a1; /* Green */ 100 + } 101 + 102 + /* Energy */ 103 + #battery.full, #battery.charging { 104 + color: #a6e3a1; /* Green */ 105 + } 106 + #battery.not-quite-full { 107 + color: #f9e2af; /* Yellow */ 108 + } 109 + #battery.warning { 110 + color: #fab387; /* Peach */ 111 + } 112 + #battery.critical { 113 + color: #f38ba8; /* Red */ 114 + } 115 + 116 + /* Workspaces */ 117 + #workspaces button label { 118 + margin: 0.5rem 0.4rem; 119 + } 120 + 121 + /* Dock */ 122 + window.dock .modules-center { 123 + border-radius: 12px; 124 + } 125 + #taskbar button image { 126 + margin: 0.4rem 0.5rem; 127 + }
users/leah/presets/plasma/settings/wallpaper.jpg users/leah/wallpaper.jpg
+3
users/leah/programs/ghostty.nix
··· 4 4 ... 5 5 }: 6 6 { 7 + # Required by apps like Fuzzel for determing the default terminal 8 + hjem.users.leah.environment.sessionVariables.TERMINAL = "ghostty"; 9 + 7 10 hjem.users.leah.rum.programs.ghostty = { 8 11 enable = true; 9 12 package = inputs.ghostty.packages.${pkgs.system}.default;