All my system configs and packages in one repo

reorganize(users/leah): split -> presets, programs

pluie.me 79dfeea3 c06b71f3

verified
+475 -312
users/leah/1password/default.nix users/leah/programs/1password/default.nix
+10 -60
users/leah/default.nix
··· 1 1 { 2 2 config, 3 - lib, 4 3 pkgs, 5 - nix-gaming, 6 4 ... 7 5 }: { 8 6 imports = [ 9 - ./1password 10 7 ./containers 11 - ./discord 12 - ./fcitx5 13 - ./firefox 14 - ./hyprland 15 - ./nvim 16 - #./plasma 17 - ./qt 18 - ./rust 19 - 20 - ./programs.nix 8 + ./presets/plasma 9 + ./programs 21 10 ]; 22 11 23 12 # Makes testing aarch64 packaging a lot easier ··· 35 24 flavour = "mocha"; 36 25 accent = "maroon"; 37 26 }; 38 - roles.dolphin.enable = true; 39 27 40 28 roles.email = let 41 - migadu = { 29 + realName = config.roles.base.fullName; 30 + host = { 42 31 imap = { 43 32 host = "imap.migadu.com"; 44 33 port = 993; ··· 52 41 enable = true; 53 42 accounts = { 54 43 "hi@pluie.me" = { 44 + inherit realName host; 55 45 primary = true; 56 - realName = config.roles.base.fullName; 57 - host = migadu; 58 46 }; 59 47 "acc@pluie.me" = { 60 - realName = "${config.roles.base.fullName} [accounts]"; 61 - host = migadu; 48 + inherit host; 49 + realName = "${realName} [accounts]"; 62 50 }; 63 51 }; 64 52 }; ··· 70 58 noto-fonts 71 59 noto-fonts-extra 72 60 noto-fonts-emoji 61 + libertinus 73 62 lxgw-wenkai 74 63 lxgw-neoxihei 75 64 rubik 76 65 ]; 77 66 78 67 defaults = { 79 - serif = ["Noto Serif" "LXGW WenKai"]; 68 + serif = ["Libertinus Serif" "LXGW WenKai"]; 80 69 sansSerif = ["Rubik" "LXGW Neo XiHei"]; 81 70 emoji = ["Noto Color Emoji"]; 82 71 monospace = ["Iosevka Nerd Font" "LXGW Neo XiHei"]; ··· 92 81 signing.key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC7uJGE2/25M4a3DIVxtnTA5INqWsFGw+49qHXaN/kqy"; 93 82 }; 94 83 95 - programs = { 96 - steam = { 97 - enable = true; 98 - package = pkgs.steam.override { 99 - extraProfile = '' 100 - export STEAM_EXTRA_COMPAT_TOOLS_PATHS="${nix-gaming.packages.${pkgs.system}.proton-ge}" 101 - ''; 102 - }; 103 - remotePlay.openFirewall = true; 104 - }; 105 - nix-ld.enable = true; 106 - }; 107 - 108 - services.gnome.gnome-keyring.enable = true; 109 - 110 - services.greetd = { 111 - enable = true; 112 - settings.default_session = { 113 - command = "${lib.getExe pkgs.greetd.tuigreet} --time --user-menu -r --remember-user-session -g 'Welcome back! <3' --asterisks --cmd ${lib.getExe pkgs.hyprland}"; 114 - user = "greeter"; 115 - }; 116 - }; 117 - 118 - services.upower.enable = true; 119 - 120 - # Stop the damn TUI from bleeding 121 - # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ 122 - # https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 123 - systemd.services.greetd.serviceConfig = { 124 - Type = "idle"; 125 - StandardInput = "tty"; 126 - StandardOutput = "tty"; 127 - StandardError = "journal"; # Without this errors will spam on screen 128 - # Without these bootlogs will spam on screen 129 - TTYReset = true; 130 - TTYVHangup = true; 131 - TTYVTDisallocate = true; 132 - }; 133 - 134 - environment.sessionVariables.NIXOS_OZONE_WL = "1"; 84 + environment.variables.NIXOS_OZONE_WL = "1"; 135 85 136 86 networking.firewall = { 137 87 enable = true;
users/leah/discord/default.nix users/leah/programs/discord/default.nix
users/leah/discord/vencord.css users/leah/programs/discord/vencord.css
users/leah/fcitx5/default.nix users/leah/programs/fcitx5/default.nix
+49 -15
users/leah/firefox/default.nix users/leah/programs/firefox/default.nix
··· 12 12 isDefault = true; 13 13 name = config.roles.base.realName; 14 14 15 - # HiDPI shenanigans 16 - settings."layout.css.devPixelsPerPx" = 2; 17 - 18 15 extensions = let 19 16 # FIXME: firefox-addons currently receives free-only nixpkgs, 20 17 # and so unfree plugins are blocked from evaluation. ··· 26 23 in 27 24 with firefox-addons.packages.${pkgs.system}; 28 25 map gaslight [ 29 - augmented-steam 26 + # Essentials 30 27 auto-tab-discard 31 - darkreader 32 - decentraleyes 33 - disconnect 34 - firefox-color 35 - furiganaize 36 - languagetool 37 28 onepassword-password-manager 38 - pronoundb 29 + ublock-origin 30 + 31 + # Avoid annoyances 32 + consent-o-matic 33 + don-t-fuck-with-paste 34 + enhanced-h264ify 35 + fastforwardteam 36 + faststream 37 + gaoptout 38 + istilldontcareaboutcookies 39 + link-cleaner 40 + musescore-downloader 41 + native-mathml 42 + privacy-possum 43 + re-enable-right-click 44 + sponsorblock 45 + terms-of-service-didnt-read 46 + youtube-nonstop 47 + 48 + # Redirectors 49 + indie-wiki-buddy 50 + libredirect 51 + localcdn 52 + modrinthify 53 + 54 + # Augmentations 55 + augmented-steam 56 + github-file-icons 57 + octolinker 39 58 protondb-for-steam 40 59 refined-github 60 + widegithub 61 + wikiwand-wikipedia-modernized 62 + 63 + # Language 64 + furiganaize 65 + immersive-translate 66 + languagetool 67 + 68 + # Styling 69 + darkreader 70 + firefox-color 71 + stylus 72 + 73 + # Dev 74 + a11ycss 75 + header-editor 41 76 rust-search-extension 77 + 78 + disconnect 79 + pronoundb 42 80 search-by-image 43 - sponsorblock 44 - terms-of-service-didnt-read 45 - ublock-origin 46 81 unpaywall 47 82 wayback-machine 48 - youtube-nonstop 49 83 ]; 50 84 51 85 search = let
-226
users/leah/hyprland/default.nix
··· 1 - { 2 - config, 3 - pkgs, 4 - lib, 5 - ... 6 - }: { 7 - imports = [ 8 - ./mako.nix 9 - ./waybar 10 - ]; 11 - 12 - roles.hyprland.enable = true; 13 - 14 - hm.home.packages = with pkgs; [ 15 - hyprpicker 16 - font-awesome 17 - networkmanagerapplet # necessary for icons 18 - grimblast 19 - satty 20 - ]; 21 - 22 - hm.programs = { 23 - kitty.enable = true; 24 - 25 - wpaperd.enable = true; 26 - 27 - fuzzel = { 28 - enable = true; 29 - settings.main = { 30 - font = "Iosevka Nerd Font:size=13"; 31 - dpi-aware = true; 32 - }; 33 - }; 34 - }; 35 - 36 - hm.services = { 37 - cliphist.enable = true; 38 - mpris-proxy.enable = true; 39 - mpd = { 40 - enable = true; 41 - musicDirectory = "${config.hm.home.homeDirectory}/music"; 42 - }; 43 - mpd-mpris.enable = true; 44 - }; 45 - 46 - hm.wayland.windowManager.hyprland.settings = let 47 - inherit (lib) getExe getExe' flatten mod range pipe; 48 - in 49 - with pkgs; { 50 - "$mod" = "SUPER"; 51 - "$grimblast" = "${getExe grimblast} --freeze --notify --cursor"; 52 - "$pamixer" = getExe pamixer; 53 - "$brightnessctl" = getExe brightnessctl; 54 - "$wl-paste" = getExe' wl-clipboard "wl-paste"; 55 - 56 - monitor = "eDP-1,2560x1600@165,0x0,1.25"; 57 - 58 - env = [ 59 - "WLR_DRM_DEVICES,/dev/dri/card0" # use iGPU 60 - "GRIMBLAST_EDITOR,${writeShellScript "edit.sh" '' 61 - cp $1 ${config.hm.home.homeDirectory}/Pictures/screenshots 62 - ${getExe satty} --copy-command ${getExe' wl-clipboard "wl-copy"} -f $1 63 - ''}" 64 - ]; 65 - 66 - exec-once = [ 67 - (getExe config.hm.programs.wpaperd.package) 68 - (getExe config.hm.programs.waybar.package) 69 - "${polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" 70 - 71 - "$wl-paste --type text --watch ${getExe cliphist} store" 72 - "$wl-paste --type image --watch ${getExe cliphist} store" 73 - 74 - # FIXME: GTK 3 crashes with wayland IM module enabled right now. 75 - # Somehow using native wayland doesn't fix this, gonna do this for now 76 - # FIXME: Running without --disable-gpu results in a blank screen (see nixpkgs#278040) 77 - "[workspace 1 silent; float] GTK_IM_MODULE= ${getExe _1password-gui} --disable-gpu" 78 - ]; 79 - 80 - windowrulev2 = [ 81 - "float,class:(org.kde.polkit-kde-authentication-agent-1)" 82 - "float,class:(firefox),title:(Picture-in-Picture)" 83 - ]; 84 - 85 - input = { 86 - kb_layout = "us"; 87 - kb_variant = ""; 88 - kb_model = ""; 89 - kb_options = "compose:ralt"; 90 - kb_rules = ""; 91 - 92 - follow_mouse = true; 93 - 94 - touchpad = { 95 - natural_scroll = true; 96 - clickfinger_behavior = true; 97 - middle_button_emulation = true; 98 - drag_lock = true; 99 - }; 100 - 101 - sensitivity = 0; 102 - }; 103 - 104 - general = { 105 - gaps_in = 0; 106 - gaps_out = 0; 107 - border_size = 2; 108 - "col.active_border" = "rgba($rosewaterAlphaee) rgba($redAlphaee) 45deg"; 109 - "col.inactive_border" = "rgba($crustAlphaaa)"; 110 - resize_on_border = true; 111 - layout = "dwindle"; 112 - }; 113 - 114 - decoration = { 115 - blur = { 116 - enabled = true; 117 - size = 3; 118 - passes = 1; 119 - }; 120 - 121 - drop_shadow = true; 122 - shadow_range = 4; 123 - shadow_render_power = 3; 124 - "col.shadow" = "rgba($crustAlphaee)"; 125 - }; 126 - 127 - animations = { 128 - enabled = true; 129 - 130 - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; 131 - 132 - animation = [ 133 - "windows, 1, 7, myBezier" 134 - "windowsOut, 1, 7, default, popin 80%" 135 - "border, 1, 10, default" 136 - "borderangle, 1, 8, default" 137 - "fade, 1, 7, default" 138 - "workspaces, 1, 6, default" 139 - ]; 140 - }; 141 - 142 - dwindle = { 143 - pseudotile = true; 144 - preserve_split = true; 145 - }; 146 - 147 - gestures.workspace_swipe = true; 148 - 149 - # some XWayland apps, like say, 1Password, look absolutely horrendous without this on. 150 - xwayland.force_zero_scaling = true; 151 - 152 - # I don't like fun 153 - misc.disable_hyprland_logo = true; 154 - 155 - bind = 156 - [ 157 - "$mod, Q, killactive," 158 - "$mod, T, exec, ${getExe kitty}" 159 - "$mod ALT, Q, exit," 160 - "$mod, V, togglefloating," 161 - "$mod, P, pseudo," 162 - "$mod, J, togglesplit," 163 - 164 - # Screenshotting 165 - "CTRL_R, Delete, exec, $grimblast edit area" 166 - "SHIFT_R, Delete, exec, $grimblast edit active" 167 - "CTRL_R SHIFT_R, Delete, exec, $grimblast edit output" 168 - ", Print, exec, $grimblast edit area" 169 - "SHIFT, Print, exec, $grimblast edit active" 170 - "CTRL SHIFT, Print, exec, $grimblast edit output" 171 - 172 - # Because of how cursed ASUS's laptop keyboard works 173 - # (Fn+F6 produces a sequence of keystrokes that correspond to Windows+Shift+S on Windows), 174 - # I need to do this to make it do what it's intended to do 175 - "SUPER SHIFT, S, exec, $grimblast edit area" 176 - "CTRL SUPER SHIFT, S, exec, $grimblast edit output" 177 - "ALT SUPER SHIFT, S, exec, $grimblast edit active" 178 - 179 - ", XF86AudioMute, exec, $pamixer -t" 180 - ", XF86AudioMicMute, exec, $pamixer --default-source -t" 181 - 182 - # Move focus with mod + arrow keys 183 - "$mod, left, movefocus, l" 184 - "$mod, right, movefocus, r" 185 - "$mod, up, movefocus, u" 186 - "$mod, down, movefocus, d" 187 - 188 - # Scroll through existing workspaces with mod + scroll 189 - "$mod, mouse_down, workspace, e+1" 190 - "$mod, mouse_up, workspace, e-1" 191 - ] 192 - ++ 193 - # Switch workspaces with mod + [0-9] 194 - # Move active window to a workspace with mod + SHIFT + [0-9] 195 - pipe (range 1 10) [ 196 - (map (i: let 197 - key = mod i 10; 198 - in [ 199 - "$mod, ${toString key}, workspace, ${toString i}" 200 - "$mod SHIFT, ${toString key}, movetoworkspace, ${toString i}" 201 - ])) 202 - flatten 203 - ]; 204 - 205 - # Press Super once to open Fuzzel; twice to close it 206 - bindr = [ 207 - "$mod, Super_L, exec, pkill fuzzel || ${getExe fuzzel}" 208 - ]; 209 - 210 - # Media keys 211 - binde = [ 212 - ", XF86AudioLowerVolume, exec, $pamixer -ud 5" 213 - ", XF86AudioRaiseVolume, exec, $pamixer -ui 5" 214 - ", XF86MonBrightnessDown, exec, $brightnessctl --device=intel_backlight set 5%-" 215 - ", XF86MonBrightnessUp, exec, $brightnessctl --device=intel_backlight set +5%" 216 - ", XF86KbdBrightnessDown, exec, $brightnessctl --device=asus::kbd_backlight set 1-" 217 - ", XF86KbdBrightnessUp, exec, $brightnessctl --device=asus::kbd_backlight set +1" 218 - ]; 219 - 220 - bindm = [ 221 - # Move/resize windows with mod + LMB/RMB and dragging 222 - "$mod, mouse:272, movewindow" 223 - "$mod, mouse:273, resizewindow" 224 - ]; 225 - }; 226 - }
users/leah/hyprland/mako.nix users/leah/presets/hyprland/mako.nix
+2
users/leah/hyprland/waybar/default.nix users/leah/presets/hyprland/waybar/default.nix
··· 7 7 # Kill and restart waybar if running 8 8 onChange = "(ps aux | grep waybar | grep -v grep) && (${lib.getExe' pkgs.procps "pkill"} -u $USER waybar) && (${lib.getExe pkgs.waybar})"; 9 9 in { 10 + hm.home.packages = with pkgs; [font-awesome]; 11 + 10 12 hm.xdg.configFile = { 11 13 "waybar/config" = {inherit onChange;}; 12 14 "waybar/style.css" = {inherit onChange;};
users/leah/hyprland/waybar/style.css users/leah/presets/hyprland/waybar/style.css
users/leah/nvim/.stylua.toml users/leah/programs/nvim/.stylua.toml
users/leah/nvim/LICENSE users/leah/programs/nvim/LICENSE
users/leah/nvim/default.nix users/leah/programs/nvim/default.nix
users/leah/nvim/init.lua users/leah/programs/nvim/init.lua
users/leah/nvim/lua/core/bootstrap.lua users/leah/programs/nvim/lua/core/bootstrap.lua
users/leah/nvim/lua/core/default_config.lua users/leah/programs/nvim/lua/core/default_config.lua
users/leah/nvim/lua/core/init.lua users/leah/programs/nvim/lua/core/init.lua
users/leah/nvim/lua/core/mappings.lua users/leah/programs/nvim/lua/core/mappings.lua
users/leah/nvim/lua/core/utils.lua users/leah/programs/nvim/lua/core/utils.lua
users/leah/nvim/lua/custom/chadrc.lua users/leah/programs/nvim/lua/custom/chadrc.lua
users/leah/nvim/lua/custom/configs/format-on-save.lua users/leah/programs/nvim/lua/custom/configs/format-on-save.lua
users/leah/nvim/lua/custom/configs/lspconfig.lua users/leah/programs/nvim/lua/custom/configs/lspconfig.lua
users/leah/nvim/lua/custom/configs/rust-tools.lua users/leah/programs/nvim/lua/custom/configs/rust-tools.lua
users/leah/nvim/lua/custom/mappings.lua users/leah/programs/nvim/lua/custom/mappings.lua
users/leah/nvim/lua/custom/neovide.lua users/leah/programs/nvim/lua/custom/neovide.lua
users/leah/nvim/lua/custom/plugins.lua users/leah/programs/nvim/lua/custom/plugins.lua
users/leah/nvim/lua/plugins/configs/cmp.lua users/leah/programs/nvim/lua/plugins/configs/cmp.lua
users/leah/nvim/lua/plugins/configs/lazy_nvim.lua users/leah/programs/nvim/lua/plugins/configs/lazy_nvim.lua
users/leah/nvim/lua/plugins/configs/lspconfig.lua users/leah/programs/nvim/lua/plugins/configs/lspconfig.lua
users/leah/nvim/lua/plugins/configs/mason.lua users/leah/programs/nvim/lua/plugins/configs/mason.lua
users/leah/nvim/lua/plugins/configs/nvimtree.lua users/leah/programs/nvim/lua/plugins/configs/nvimtree.lua
users/leah/nvim/lua/plugins/configs/others.lua users/leah/programs/nvim/lua/plugins/configs/others.lua
users/leah/nvim/lua/plugins/configs/telescope.lua users/leah/programs/nvim/lua/plugins/configs/telescope.lua
users/leah/nvim/lua/plugins/configs/treesitter.lua users/leah/programs/nvim/lua/plugins/configs/treesitter.lua
users/leah/nvim/lua/plugins/init.lua users/leah/programs/nvim/lua/plugins/init.lua
users/leah/nvim/plugins.nix users/leah/programs/nvim/plugins.nix
users/leah/nvim/settings.nix users/leah/programs/nvim/settings.nix
+15 -7
users/leah/plasma/default.nix users/leah/presets/plasma/settings.nix
··· 1 - { 1 + {pkgs, ...}: { 2 + hm.home.packages = with pkgs; [lightly-qt]; 3 + 2 4 hm.programs.plasma.configFile = { 3 5 kdeglobals = { 4 6 General = { ··· 8 10 smallestReadableFont = "Rubik,8,-1,5,50,0,0,0,0,0"; 9 11 toolBarFont = "Rubik,10,-1,5,50,0,0,0,0,0"; 10 12 }; 11 - KDE.SingleClick = false; 13 + KDE = { 14 + SingleClick = false; 15 + widgetStyle = "Lightly"; 16 + }; 12 17 KScreen.ScaleFactor = 1.25; 13 18 }; 14 - kwinrc.NightColor = { 15 - Active = true; 16 - EveningBeginFixed = 2200; 17 - Mode = "Times"; 18 - TransitionTime = 120; 19 + kwinrc = { 20 + Tiling.padding = 2; 21 + NightColor = { 22 + Active = true; 23 + EveningBeginFixed = 2200; 24 + Mode = "Times"; 25 + TransitionTime = 120; 26 + }; 19 27 }; 20 28 # Make KRunner appear in the center of the screen, like macOS Spotlight 21 29 krunnerrc.General.FreeFloating = true;
+17
users/leah/presets/hyprland/clipboard.nix
··· 1 + { 2 + pkgs, 3 + lib, 4 + ... 5 + }: { 6 + hm.services.cliphist.enable = true; 7 + 8 + hm.wayland.windowManager.hyprland.settings = { 9 + exec-once = let 10 + wl-paste = lib.getExe' pkgs.wl-clipboard "wl-paste"; 11 + cliphist = lib.getExe pkgs.cliphist; 12 + in [ 13 + "${wl-paste} --type text --watch ${cliphist} store" 14 + "${wl-paste} --type image --watch ${cliphist} store" 15 + ]; 16 + }; 17 + }
+39
users/leah/presets/hyprland/default.nix
··· 1 + {pkgs, ...}: { 2 + imports = [ 3 + ./waybar 4 + 5 + ./clipboard.nix 6 + ./greetd.nix 7 + ./mako.nix 8 + ./media.nix 9 + ./qt.nix 10 + ./screenshots.nix 11 + ./settings.nix 12 + ]; 13 + 14 + roles.hyprland.enable = true; 15 + roles.dolphin.enable = true; 16 + 17 + hm.home.packages = with pkgs; [ 18 + networkmanagerapplet # necessary for icons 19 + ]; 20 + 21 + hm.programs = { 22 + kitty.enable = true; 23 + 24 + wpaperd.enable = true; 25 + 26 + fuzzel = { 27 + enable = true; 28 + settings.main = { 29 + font = "Iosevka Nerd Font:size=13"; 30 + dpi-aware = true; 31 + }; 32 + }; 33 + }; 34 + 35 + hm.services.blueman-applet.enable = true; 36 + 37 + services.gnome.gnome-keyring.enable = true; 38 + services.upower.enable = true; 39 + }
+26
users/leah/presets/hyprland/greetd.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + ... 5 + }: { 6 + services.greetd = { 7 + enable = true; 8 + settings.default_session = { 9 + command = "${lib.getExe pkgs.greetd.tuigreet} --time --user-menu -r --remember-user-session -g 'Welcome back! <3' --asterisks --cmd ${lib.getExe pkgs.hyprland}"; 10 + user = "greeter"; 11 + }; 12 + }; 13 + # Stop the damn TUI from bleeding 14 + # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ 15 + # https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 16 + systemd.services.greetd.serviceConfig = { 17 + Type = "idle"; 18 + StandardInput = "tty"; 19 + StandardOutput = "tty"; 20 + StandardError = "journal"; # Without this errors will spam on screen 21 + # Without these bootlogs will spam on screen 22 + TTYReset = true; 23 + TTYVHangup = true; 24 + TTYVTDisallocate = true; 25 + }; 26 + }
+35
users/leah/presets/hyprland/media.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + hm.services = { 8 + mpris-proxy.enable = true; 9 + mpd = { 10 + enable = true; 11 + musicDirectory = "${config.hm.home.homeDirectory}/music"; 12 + }; 13 + mpd-mpris.enable = true; 14 + }; 15 + 16 + hm.wayland.windowManager.hyprland.settings = { 17 + "$pamixer" = lib.getExe pkgs.pamixer; 18 + "$brightnessctl" = lib.getExe pkgs.brightnessctl; 19 + 20 + bind = [ 21 + ", XF86AudioMute, exec, $pamixer -t" 22 + ", XF86AudioMicMute, exec, $pamixer --default-source -t" 23 + ]; 24 + 25 + # Media keys 26 + binde = [ 27 + ", XF86AudioLowerVolume, exec, $pamixer -ud 5" 28 + ", XF86AudioRaiseVolume, exec, $pamixer -ui 5" 29 + ", XF86MonBrightnessDown, exec, $brightnessctl --device=intel_backlight set 5%-" 30 + ", XF86MonBrightnessUp, exec, $brightnessctl --device=intel_backlight set +5%" 31 + ", XF86KbdBrightnessDown, exec, $brightnessctl --device=asus::kbd_backlight set 1-" 32 + ", XF86KbdBrightnessUp, exec, $brightnessctl --device=asus::kbd_backlight set +1" 33 + ]; 34 + }; 35 + }
+39
users/leah/presets/hyprland/screenshots.nix
··· 1 + { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + hm.home.packages = with pkgs; [ 8 + hyprpicker 9 + grimblast 10 + satty 11 + ]; 12 + 13 + hm.wayland.windowManager.hyprland.settings = { 14 + "$grimblast" = "${lib.getExe pkgs.grimblast} --freeze --notify --cursor"; 15 + 16 + env = [ 17 + "GRIMBLAST_EDITOR,${pkgs.writeShellScript "edit.sh" '' 18 + cp $1 ${config.hm.home.homeDirectory}/Pictures/screenshots 19 + ${lib.getExe pkgs.satty} --copy-command ${lib.getExe' pkgs.wl-clipboard "wl-copy"} -f $1 20 + ''}" 21 + ]; 22 + 23 + bind = [ 24 + "CTRL_R, Delete, exec, $grimblast edit area" 25 + "SHIFT_R, Delete, exec, $grimblast edit active" 26 + "CTRL_R SHIFT_R, Delete, exec, $grimblast edit output" 27 + ", Print, exec, $grimblast edit area" 28 + "SHIFT, Print, exec, $grimblast edit active" 29 + "CTRL SHIFT, Print, exec, $grimblast edit output" 30 + 31 + # Because of how cursed ASUS's laptop keyboard works 32 + # (Fn+F6 produces a sequence of keystrokes that correspond to Windows+Shift+S on Windows), 33 + # I need to do this to make it do what it's intended to do 34 + "SUPER SHIFT, S, exec, $grimblast edit area" 35 + "CTRL SUPER SHIFT, S, exec, $grimblast edit output" 36 + "ALT SUPER SHIFT, S, exec, $grimblast edit active" 37 + ]; 38 + }; 39 + }
+147
users/leah/presets/hyprland/settings.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + ... 5 + }: { 6 + hm.wayland.windowManager.hyprland.settings = let 7 + inherit (lib) getExe flatten mod range pipe; 8 + in 9 + with pkgs; { 10 + "$mod" = "SUPER"; 11 + 12 + monitor = "eDP-1,2560x1600@165,0x0,1.25"; 13 + 14 + env = [ 15 + "WLR_DRM_DEVICES,/dev/dri/card0" # use iGPU 16 + ]; 17 + 18 + exec-once = [ 19 + (getExe config.hm.programs.wpaperd.package) 20 + (getExe config.hm.programs.waybar.package) 21 + "${polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" 22 + 23 + # FIXME: GTK 3 crashes with wayland IM module enabled right now. 24 + # Somehow using native wayland doesn't fix this, gonna do this for now 25 + # FIXME: Running without --disable-gpu results in a blank screen (see nixpkgs#278040) 26 + "[workspace 1 silent; float] GTK_IM_MODULE= ${getExe _1password-gui} --disable-gpu" 27 + ]; 28 + 29 + windowrulev2 = [ 30 + "float,class:(org.kde.polkit-kde-authentication-agent-1)" 31 + "float,class:(firefox),title:(Picture-in-Picture)" 32 + ]; 33 + 34 + input = { 35 + kb_layout = "us"; 36 + kb_variant = ""; 37 + kb_model = ""; 38 + kb_options = "compose:ralt"; 39 + kb_rules = ""; 40 + 41 + follow_mouse = true; 42 + 43 + touchpad = { 44 + natural_scroll = true; 45 + clickfinger_behavior = true; 46 + middle_button_emulation = true; 47 + drag_lock = true; 48 + }; 49 + 50 + sensitivity = 0; 51 + }; 52 + 53 + general = { 54 + gaps_in = 0; 55 + gaps_out = 0; 56 + border_size = 2; 57 + "col.active_border" = "rgba($rosewaterAlphaee) rgba($redAlphaee) 45deg"; 58 + "col.inactive_border" = "rgba($crustAlphaaa)"; 59 + resize_on_border = true; 60 + layout = "dwindle"; 61 + }; 62 + 63 + decoration = { 64 + blur = { 65 + enabled = true; 66 + size = 3; 67 + passes = 1; 68 + }; 69 + 70 + drop_shadow = true; 71 + shadow_range = 4; 72 + shadow_render_power = 3; 73 + "col.shadow" = "rgba($crustAlphaee)"; 74 + }; 75 + 76 + animations = { 77 + enabled = true; 78 + 79 + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; 80 + 81 + animation = [ 82 + "windows, 1, 7, myBezier" 83 + "windowsOut, 1, 7, default, popin 80%" 84 + "border, 1, 10, default" 85 + "borderangle, 1, 8, default" 86 + "fade, 1, 7, default" 87 + "workspaces, 1, 6, default" 88 + ]; 89 + }; 90 + 91 + dwindle = { 92 + pseudotile = true; 93 + preserve_split = true; 94 + }; 95 + 96 + gestures.workspace_swipe = true; 97 + 98 + # some XWayland apps, like say, 1Password, look absolutely horrendous without this on. 99 + xwayland.force_zero_scaling = true; 100 + 101 + # I don't like fun 102 + misc.disable_hyprland_logo = true; 103 + 104 + bind = 105 + [ 106 + "$mod, Q, killactive," 107 + "$mod, T, exec, ${getExe kitty}" 108 + "$mod ALT, Q, exit," 109 + "$mod, V, togglefloating," 110 + "$mod, P, pseudo," 111 + "$mod, J, togglesplit," 112 + 113 + # Move focus with mod + arrow keys 114 + "$mod, left, movefocus, l" 115 + "$mod, right, movefocus, r" 116 + "$mod, up, movefocus, u" 117 + "$mod, down, movefocus, d" 118 + 119 + # Scroll through existing workspaces with mod + scroll 120 + "$mod, mouse_down, workspace, e+1" 121 + "$mod, mouse_up, workspace, e-1" 122 + ] 123 + ++ 124 + # Switch workspaces with mod + [0-9] 125 + # Move active window to a workspace with mod + SHIFT + [0-9] 126 + pipe (range 1 10) [ 127 + (map (i: let 128 + key = mod i 10; 129 + in [ 130 + "$mod, ${toString key}, workspace, ${toString i}" 131 + "$mod SHIFT, ${toString key}, movetoworkspace, ${toString i}" 132 + ])) 133 + flatten 134 + ]; 135 + 136 + # Press Super once to open Fuzzel; twice to close it 137 + bindr = [ 138 + "$mod, Super_L, exec, pkill fuzzel || ${getExe fuzzel}" 139 + ]; 140 + 141 + bindm = [ 142 + # Move/resize windows with mod + LMB/RMB and dragging 143 + "$mod, mouse:272, movewindow" 144 + "$mod, mouse:273, resizewindow" 145 + ]; 146 + }; 147 + }
+17
users/leah/presets/plasma/default.nix
··· 1 + { 2 + krunner-nix, 3 + pkgs, 4 + ... 5 + }: { 6 + imports = [ 7 + ./fusuma.nix 8 + ./sddm.nix 9 + ./settings.nix 10 + ]; 11 + 12 + boot.plymouth.enable = true; 13 + roles.plasma.enable = true; 14 + roles.qt.platform = "kde"; 15 + 16 + hm.home.packages = [krunner-nix.packages.${pkgs.system}.default]; 17 + }
+32
users/leah/presets/plasma/fusuma.nix
··· 1 + {pkgs, ...}: { 2 + users.groups.input = {}; 3 + roles.base.user.extraGroups = ["input"]; 4 + hm.services.fusuma = { 5 + enable = true; 6 + extraPackages = with pkgs; [xdotool wmctrl coreutils]; 7 + settings.swipe."3" = { 8 + left = { 9 + workspace = "next"; # Switch to next workspace 10 + keypress = { 11 + LEFTSHIFT.window = "next"; # Move window to next workspace 12 + LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Left"; # Move window to left side 13 + }; 14 + }; 15 + right = { 16 + workspace = "prev"; # Switch to previous workspace 17 + keypress = { 18 + LEFTSHIFT.window = "prev"; # Move window to previous workspace 19 + LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Right"; # Move window to right side 20 + }; 21 + }; 22 + up = { 23 + command = "xdotool key Control_L+F10"; # Workspace overview 24 + keypress.LEFTMETA.window.maximized = "toggle"; # Toggle Maximize/Unmaximize Window 25 + }; 26 + down = { 27 + command = "xdotool key Control_L+F12"; # Workspace overview 28 + keypress.LEFTMETA.window = "close"; # Toggle Maximize/Unmaximize Window 29 + }; 30 + }; 31 + }; 32 + }
+7
users/leah/presets/plasma/sddm.nix
··· 1 + { 2 + services.xserver.displayManager.sddm = { 3 + enable = true; 4 + # TODO: use ibus if ibus is enabled, or fallback to compose, NEVER use virtual keyboard 5 + settings.General.InputMethod = "compose"; 6 + }; 7 + }
+33 -1
users/leah/programs.nix users/leah/programs/default.nix
··· 3 3 pkgs, 4 4 lib, 5 5 blender-bin, 6 + nix-gaming, 6 7 ... 7 8 }: { 9 + imports = [ 10 + ./1password 11 + ./discord 12 + ./fcitx5 13 + ./firefox 14 + ./nvim 15 + ./rust 16 + ]; 17 + 8 18 virtualisation.docker.enable = true; 9 19 10 20 nixpkgs.overlays = [blender-bin.overlays.default]; ··· 33 43 # Java stuff 34 44 jetbrains.idea-community 35 45 jdk17 36 - glfw 37 46 ]; 47 + 48 + programs = { 49 + steam = { 50 + enable = true; 51 + package = pkgs.steam.override { 52 + extraEnv = { 53 + # nvidia-offload 54 + __NV_PRIME_RENDER_OFFLOAD = 1; 55 + __NV_PRIME_RENDER_OFFLOAD_PROVIDER = "NVIDIA-G0"; 56 + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; 57 + __VK_LAYER_NV_optimus = "NVIDIA_only"; 58 + 59 + # Use Proton GE 60 + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "${nix-gaming.packages.${pkgs.system}.proton-ge}"; 61 + }; 62 + }; 63 + remotePlay.openFirewall = true; 64 + }; 65 + nix-ld.enable = true; 66 + }; 67 + 38 68 hm.programs = { 39 69 bat = { 40 70 enable = true; ··· 82 112 color_align.mode = "horizontal"; 83 113 }; 84 114 }; 115 + 116 + kitty.enable = true; 85 117 86 118 nix-index.enable = true; 87 119 obs-studio.enable = true;
+7 -3
users/leah/qt/default.nix users/leah/presets/hyprland/qt.nix
··· 43 43 qt6.qtwayland 44 44 ]; 45 45 46 - roles.qt.qt5.settings = settings; 47 - # TODO: wait till someone packages Plasma 6 48 - roles.qt.qt6.settings = lib.recursiveUpdate settings {Appearance.style = "Fusion";}; 46 + roles.qt = { 47 + platform = "qt5ct"; 48 + 49 + qt5ct.settings = settings; 50 + # TODO: wait till someone packages Plasma 6 51 + qt6ct.settings = lib.recursiveUpdate settings {Appearance.style = "Fusion";}; 52 + }; 49 53 }
users/leah/rust/default.nix users/leah/programs/rust/default.nix
users/leah/starship.toml users/leah/programs/starship.toml