All my system configs and packages in one repo

trim off the fat

pluie.me 29fd919c de3ffdeb

verified
+52 -1881
+42
flake.lock
··· 272 272 "type": "github" 273 273 } 274 274 }, 275 + "hjem": { 276 + "inputs": { 277 + "nixpkgs": [ 278 + "nixpkgs" 279 + ] 280 + }, 281 + "locked": { 282 + "lastModified": 1743956496, 283 + "narHash": "sha256-LguszqsDBTtdBxblQTtN7vOAYmfoe43aHkB8aK1dChE=", 284 + "owner": "feel-co", 285 + "repo": "hjem", 286 + "rev": "e3b63f300f23f2ffeb6efac046cf71b94352fed2", 287 + "type": "github" 288 + }, 289 + "original": { 290 + "owner": "feel-co", 291 + "repo": "hjem", 292 + "type": "github" 293 + } 294 + }, 295 + "hjem-rum": { 296 + "inputs": { 297 + "nixpkgs": [ 298 + "nixpkgs" 299 + ] 300 + }, 301 + "locked": { 302 + "lastModified": 1745861051, 303 + "narHash": "sha256-L1B2KkvbNHCtNbmYNli/DqCwEhshcwrt/p904iIYPNs=", 304 + "owner": "snugnug", 305 + "repo": "hjem-rum", 306 + "rev": "1ad4898417031a6b280894f80f041118b6964432", 307 + "type": "github" 308 + }, 309 + "original": { 310 + "owner": "snugnug", 311 + "repo": "hjem-rum", 312 + "type": "github" 313 + } 314 + }, 275 315 "home-manager": { 276 316 "inputs": { 277 317 "nixpkgs": [ ··· 503 543 "flake-parts": "flake-parts", 504 544 "flake-utils": "flake-utils", 505 545 "ghostty": "ghostty", 546 + "hjem": "hjem", 547 + "hjem-rum": "hjem-rum", 506 548 "home-manager": "home-manager", 507 549 "krunner-nix": "krunner-nix", 508 550 "lanzaboote": "lanzaboote",
+10
flake.nix
··· 52 52 }; 53 53 }; 54 54 55 + hjem = { 56 + url = "github:feel-co/hjem"; 57 + inputs.nixpkgs.follows = "nixpkgs"; 58 + }; 59 + 60 + hjem-rum = { 61 + url = "github:snugnug/hjem-rum"; 62 + inputs.nixpkgs.follows = "nixpkgs"; 63 + }; 64 + 55 65 krunner-nix = { 56 66 url = "github:pluiedev/krunner-nix"; 57 67 inputs.nixpkgs.follows = "nixpkgs";
-1
hm-modules/ctp-plus/default.nix
··· 13 13 in 14 14 { 15 15 imports = map (p: import p args') [ 16 - ./konsole.nix 17 16 ./plasma.nix 18 17 ./vencord.nix 19 18 ];
-56
hm-modules/ctp-plus/konsole.nix
··· 1 - { 2 - config, 3 - lib, 4 - ctpLib, 5 - pkgs, 6 - ... 7 - }: 8 - let 9 - cfg = config.programs.konsole.catppuccin; 10 - enable = cfg.enable && config.programs.konsole.enable; 11 - in 12 - { 13 - options.programs.konsole.catppuccin = ctpLib.mkCatppuccinOption { name = "Konsole"; } // { 14 - profileName = lib.mkOption { 15 - type = lib.types.str; 16 - default = "Catppuccin"; 17 - example = "Catppuccin Custom"; 18 - description = '' 19 - The name of the generated profile. 20 - ''; 21 - }; 22 - font = { 23 - name = lib.mkOption { 24 - type = lib.types.str; 25 - default = "Hack"; 26 - example = "Hack"; 27 - description = '' 28 - Name of the font the profile should use. 29 - ''; 30 - }; 31 - size = lib.mkOption { 32 - # The konsole ui gives you a limited range 33 - type = lib.types.ints.between 4 128; 34 - default = 10; 35 - example = 12; 36 - description = '' 37 - Size of the font. 38 - Needs a font to be set due to konsole limitations. 39 - ''; 40 - }; 41 - }; 42 - }; 43 - 44 - config = lib.mkIf enable { 45 - home.packages = [ (pkgs.catppuccin-konsole.override { flavors = [ cfg.flavor ]; }) ]; 46 - 47 - programs.konsole = { 48 - defaultProfile = cfg.profileName; 49 - profiles.catppuccin = { 50 - name = cfg.profileName; 51 - colorScheme = "Catppuccin-${ctpLib.mkUpper cfg.flavor}"; 52 - inherit (cfg) font; 53 - }; 54 - }; 55 - }; 56 - }
-43
hm-modules/hm-plus/services/nekoray/default.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: 7 - let 8 - cfg = config.services.nekoray; 9 - format = pkgs.formats.json { }; 10 - 11 - profileSubmodule = lib.types.submodule { 12 - freeformType = format.type; 13 - 14 - type = lib.mkOption { 15 - type = lib.types.enum [ "hysteria2" ]; 16 - }; 17 - 18 - bean = { 19 - addr = lib.mkOption { type = lib.types.str; }; 20 - }; 21 - }; 22 - in 23 - { 24 - services.nekoray = { 25 - enable = lib.mkEnableOption "Nekoray"; 26 - 27 - profiles = lib.mkOption { 28 - type = lib.listOf profileSubmodule; 29 - default = [ ]; 30 - }; 31 - }; 32 - 33 - config = lib.mkIf cfg.enable { 34 - home.packages = [ pkgs.nekoray ]; 35 - 36 - xdg.configFile = lib.imap0 ( 37 - i: v: 38 - lib.nameValuePair "nekoray/config/profiles/${toString i}.json" { 39 - source = format.generate "nekoray-profile-${toString i}.json" v; 40 - } 41 - ); 42 - }; 43 - }
-46
packages/catppuccin-konsole/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 - mkUpper = 15 - str: with builtins; (lib.toUpper (substring 0 1 str)) + (substring 1 (stringLength str) str); 16 - in 17 - # 18 - lib.checkListOfEnum "Invalid flavor, valid flavors are ${toString validFlavors}" validFlavors 19 - flavors 20 - stdenvNoCC.mkDerivation 21 - { 22 - pname = "catppuccin-konsole"; 23 - version = "2022-11-09"; 24 - 25 - src = fetchFromGitHub { 26 - owner = "catppuccin"; 27 - repo = "konsole"; 28 - rev = "7d86b8a1e56e58f6b5649cdaac543a573ac194ca"; 29 - hash = "sha256-EwSJMTxnaj2UlNJm1t6znnatfzgm1awIQQUF3VPfCTM="; 30 - }; 31 - 32 - installPhase = 33 - let 34 - flavoursToInstall = builtins.concatStringsSep " " ( 35 - map (x: "Catppuccin-${mkUpper x}.colorscheme") (if flavors == [ ] then [ "*" ] else flavors) 36 - ); 37 - in 38 - '' 39 - runHook preInstall 40 - 41 - mkdir -p $out/share/konsole/ 42 - cp -r ${flavoursToInstall} $out/share/konsole/ 43 - 44 - runHook postInstall 45 - ''; 46 - }
-30
packages/rethink-sans/package.nix
··· 1 - { 2 - lib, 3 - stdenvNoCC, 4 - fetchFromGitHub, 5 - }: 6 - stdenvNoCC.mkDerivation { 7 - pname = "rethink-sans"; 8 - version = "0-unstable-20231011"; 9 - 10 - src = fetchFromGitHub { 11 - owner = "hans-thiessen"; 12 - repo = "Rethink-Sans"; 13 - rev = "20d5980cd14ce827e82d7fc58d758f7cc5086c91"; 14 - hash = "sha256-qoiruy6cSE4Aew3fboYv1lOHDjuFoTMzJqT3xhRkXB8="; 15 - }; 16 - 17 - installPhase = '' 18 - runHook preInstall 19 - install -Dm644 fonts/variable/*.ttf fonts/ttf/*.ttf -t $out/share/fonts/opentype 20 - runHook postInstall 21 - ''; 22 - 23 - meta = { 24 - description = "A humble open source font built on the shoulders of DM Sans and Poppins"; 25 - homepage = "https://github.com/hans-thiessen/Rethink-Sans"; 26 - license = lib.licenses.ofl; 27 - maintainers = with lib.maintainers; [ pluiedev ]; 28 - platforms = lib.platforms.all; 29 - }; 30 - }
-9
roles/hyprland/default.nix
··· 1 - { lib, ... }: 2 - let 3 - inherit (lib) mkEnableOption; 4 - in 5 - { 6 - options.roles.hyprland = { 7 - enable = mkEnableOption "Hyprland"; 8 - }; 9 - }
-42
roles/hyprland/nixos.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: 7 - let 8 - inherit (lib) mkIf mkAliasOptionModule; 9 - cfg = config.roles.hyprland; 10 - in 11 - { 12 - imports = [ 13 - (mkAliasOptionModule 14 - [ 15 - "roles" 16 - "hyprland" 17 - "settings" 18 - ] 19 - [ 20 - "hm" 21 - "wayland" 22 - "windowManager" 23 - "hyprland" 24 - "settings" 25 - ] 26 - ) 27 - ]; 28 - 29 - config = mkIf cfg.enable { 30 - programs.hyprland = { 31 - enable = true; 32 - xwayland.enable = true; 33 - }; 34 - 35 - hm.wayland.windowManager.hyprland = { 36 - enable = true; 37 - xwayland.enable = true; 38 - }; 39 - 40 - hm.home.packages = [ pkgs.wl-clipboard ]; 41 - }; 42 - }
-1
roles/networking/nixos.nix
··· 14 14 roles.base.user.extraGroups = mkIf config.roles.base.canSudo [ "networkmanager" ]; 15 15 16 16 hm.home.packages = [ pkgs.networkmanagerapplet ]; 17 - roles.hyprland.settings.exec-once = [ (getExe pkgs.networkmanagerapplet) ]; 18 17 }; 19 18 }
-8
roles/nvidia/default.nix
··· 1 - # NVIDIA? More like :novideo: 2 - { lib, ... }: 3 - let 4 - inherit (lib) mkEnableOption; 5 - in 6 - { 7 - options.roles.nvidia.enable = mkEnableOption "NVIDIA drivers"; 8 - }
-21
roles/nvidia/nixos.nix
··· 1 - { config, lib, ... }: 2 - let 3 - cfg = config.roles.plasma; 4 - inherit (lib) mkIf; 5 - in 6 - { 7 - config = mkIf cfg.enable { 8 - hardware.nvidia = { 9 - open = true; 10 - 11 - powerManagement = { 12 - enable = true; 13 - # finegrained = true; 14 - }; 15 - }; 16 - services.xserver = { 17 - enable = true; 18 - videoDrivers = [ "nvidia" ]; 19 - }; 20 - }; 21 - }
-1
roles/plasma/nixos.nix
··· 24 24 }; 25 25 26 26 xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ]; 27 - roles.qt.platform = "kde"; 28 27 29 28 hm = { 30 29 imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
-39
roles/qt/default.nix
··· 1 - { lib, ... }: 2 - let 3 - inherit (lib) 4 - mkAliasOptionModule 5 - mkEnableOption 6 - mkOption 7 - types 8 - ; 9 - in 10 - { 11 - imports = [ 12 - (mkAliasOptionModule 13 - [ 14 - "roles" 15 - "qt" 16 - "platform" 17 - ] 18 - [ 19 - "qt" 20 - "platformTheme" 21 - ] 22 - ) 23 - ]; 24 - 25 - options.roles.qt = { 26 - enable = mkEnableOption "Qt" // { 27 - default = true; 28 - }; 29 - 30 - qt5ct.settings = mkOption { 31 - type = types.nullOr (types.attrsOf types.anything); 32 - default = null; 33 - }; 34 - qt6ct.settings = mkOption { 35 - type = types.nullOr (types.attrsOf types.anything); 36 - default = null; 37 - }; 38 - }; 39 - }
-16
roles/qt/nixos.nix
··· 1 - { config, lib, ... }: 2 - let 3 - inherit (lib) mkIf; 4 - toINI = lib.generators.toINI { }; 5 - cfg = config.roles.qt; 6 - in 7 - { 8 - config = mkIf cfg.enable { 9 - qt.enable = true; 10 - 11 - hm.xdg.configFile = mkIf (cfg.platform == "qt5ct") { 12 - "qt5ct/qt5ct.conf".text = mkIf (cfg.qt5ct.settings != null) (toINI cfg.qt5ct.settings); 13 - "qt6ct/qt6ct.conf".text = mkIf (cfg.qt6ct.settings != null) (toINI cfg.qt6ct.settings); 14 - }; 15 - }; 16 - }
-22
roles/xdg/default.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: 7 - let 8 - inherit (lib) mkEnableOption mkIf; 9 - cfg = config.roles.xdg; 10 - in 11 - { 12 - options.roles.xdg = { 13 - enable = mkEnableOption "XDG" // { 14 - default = true; 15 - }; 16 - }; 17 - 18 - config = mkIf cfg.enable { 19 - hm.xdg.enable = true; 20 - hm.home.packages = [ pkgs.xdg-utils ]; 21 - }; 22 - }
-5
users/leah/appearance.nix
··· 34 34 set -x LS_COLORS (${lib.getExe pkgs.vivid} generate catppuccin-${flavor}) 35 35 ''; 36 36 37 - hm.programs.konsole.catppuccin.font = { 38 - name = "Iosevka"; 39 - size = 14; 40 - }; 41 - 42 37 hm.programs.moar.settings.style = "catppuccin-${flavor}"; 43 38 44 39 hm.programs.plasma.fonts =
-1
users/leah/containers/default.nix
··· 1 - { imports = [ ./postgres.nix ]; }
-25
users/leah/containers/postgres.nix
··· 1 - { 2 - containers.postgres = { 3 - autoStart = true; 4 - config = 5 - { 6 - config, 7 - pkgs, 8 - lib, 9 - ... 10 - }: 11 - { 12 - services.postgresql = { 13 - enable = true; 14 - package = pkgs.postgresql_16; 15 - ensureDatabases = [ "postgres" ]; 16 - authentication = '' 17 - # TYPE DATABASE USER ADDRESS METHOD 18 - host all all localhost trust 19 - ''; 20 - }; 21 - 22 - system.stateVersion = "24.05"; 23 - }; 24 - }; 25 - }
-1
users/leah/default.nix
··· 7 7 { 8 8 imports = [ 9 9 ./appearance.nix 10 - ./containers 11 10 ./presets/plasma 12 11 ./programs 13 12 ];
-16
users/leah/presets/hyprland/clipboard.nix
··· 1 - { pkgs, lib, ... }: 2 - { 3 - hm.services.cliphist.enable = true; 4 - 5 - hm.wayland.windowManager.hyprland.settings = { 6 - exec-once = 7 - let 8 - wl-paste = lib.getExe' pkgs.wl-clipboard "wl-paste"; 9 - cliphist = lib.getExe pkgs.cliphist; 10 - in 11 - [ 12 - "${wl-paste} --type text --watch ${cliphist} store" 13 - "${wl-paste} --type image --watch ${cliphist} store" 14 - ]; 15 - }; 16 - }
-64
users/leah/presets/hyprland/default.nix
··· 1 - { pkgs, lib, ... }: 2 - { 3 - imports = [ 4 - ./waybar 5 - 6 - ./clipboard.nix 7 - ./dolphin.nix 8 - ./greetd.nix 9 - ./mako.nix 10 - ./media.nix 11 - ./qt.nix 12 - ./screenshots.nix 13 - ./settings.nix 14 - ]; 15 - 16 - roles.hyprland.enable = true; 17 - 18 - hm.catppuccin.hyprland.enable = true; 19 - 20 - hm.home.packages = with pkgs; [ 21 - networkmanagerapplet # necessary for icons 22 - ]; 23 - 24 - roles.qt = 25 - let 26 - common.settings.Appearance = { 27 - color_scheme_path = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/Catppuccin-Mocha.conf"; 28 - custom_palette = true; 29 - }; 30 - in 31 - lib.genAttrs [ 32 - "qt5ct" 33 - "qt6ct" 34 - ] (_: common); 35 - 36 - hm.programs = { 37 - kitty.enable = true; 38 - 39 - wpaperd = { 40 - enable = true; 41 - settings.default.path = "${./wallpaper.png}"; 42 - }; 43 - 44 - fuzzel = { 45 - enable = true; 46 - settings.main = { 47 - font = "Iosevka Nerd Font:size=13"; 48 - dpi-aware = true; 49 - }; 50 - }; 51 - }; 52 - 53 - hm.services = { 54 - blueman-applet.enable = true; 55 - 56 - mako = { 57 - enable = true; 58 - anchor = "top-right"; 59 - }; 60 - }; 61 - 62 - services.gnome.gnome-keyring.enable = true; 63 - services.upower.enable = true; 64 - }
-10
users/leah/presets/hyprland/dolphin.nix
··· 1 - { pkgs, lib, ... }: 2 - { 3 - hm.home.packages = [ pkgs.dolphin ]; 4 - 5 - # TODO: annoy maintainers to add meta.mainProgram 6 - roles.hyprland.settings.bind = [ "$mod, E, exec, ${lib.getExe' pkgs.dolphin "dolphin"}" ]; 7 - 8 - # Required for detecting storage devices 9 - services.udisks2.enable = true; 10 - }
-23
users/leah/presets/hyprland/greetd.nix
··· 1 - { lib, pkgs, ... }: 2 - { 3 - services.greetd = { 4 - enable = true; 5 - settings.default_session = { 6 - command = "${lib.getExe pkgs.greetd.tuigreet} --time --user-menu -r --remember-user-session -g 'Welcome back! <3' --asterisks --cmd ${lib.getExe pkgs.hyprland}"; 7 - user = "greeter"; 8 - }; 9 - }; 10 - # Stop the damn TUI from bleeding 11 - # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ 12 - # https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 13 - systemd.services.greetd.serviceConfig = { 14 - Type = "idle"; 15 - StandardInput = "tty"; 16 - StandardOutput = "tty"; 17 - StandardError = "journal"; # Without this errors will spam on screen 18 - # Without these bootlogs will spam on screen 19 - TTYReset = true; 20 - TTYVHangup = true; 21 - TTYVTDisallocate = true; 22 - }; 23 - }
-36
users/leah/presets/hyprland/media.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: 7 - { 8 - hm.services = { 9 - mpris-proxy.enable = true; 10 - mpd = { 11 - enable = true; 12 - musicDirectory = "${config.hm.home.homeDirectory}/music"; 13 - }; 14 - mpd-mpris.enable = true; 15 - }; 16 - 17 - hm.wayland.windowManager.hyprland.settings = { 18 - "$pamixer" = lib.getExe pkgs.pamixer; 19 - "$brightnessctl" = lib.getExe pkgs.brightnessctl; 20 - 21 - bind = [ 22 - ", XF86AudioMute, exec, $pamixer -t" 23 - ", XF86AudioMicMute, exec, $pamixer --default-source -t" 24 - ]; 25 - 26 - # Media keys 27 - binde = [ 28 - ", XF86AudioLowerVolume, exec, $pamixer -ud 5" 29 - ", XF86AudioRaiseVolume, exec, $pamixer -ui 5" 30 - ", XF86MonBrightnessDown, exec, $brightnessctl --device=intel_backlight set 5%-" 31 - ", XF86MonBrightnessUp, exec, $brightnessctl --device=intel_backlight set +5%" 32 - ", XF86KbdBrightnessDown, exec, $brightnessctl --device=asus::kbd_backlight set 1-" 33 - ", XF86KbdBrightnessUp, exec, $brightnessctl --device=asus::kbd_backlight set +1" 34 - ]; 35 - }; 36 - }
-54
users/leah/presets/hyprland/qt.nix
··· 1 - { lib, pkgs, ... }: 2 - let 3 - settings = { 4 - Appearance = { 5 - icon_theme = "breeze-dark"; 6 - standard_dialogs = "default"; 7 - style = "Breeze"; 8 - }; 9 - Fonts = { 10 - fixed = "Monospace,11,-1,5,50,0,0,0,0,0"; 11 - general = "Sans Serif,11,-1,5,50,0,0,0,0,0"; 12 - }; 13 - Interface = { 14 - double_click_interval = 400; 15 - cursor_flash_time = 1000; 16 - 17 - activate_item_on_single_click = 1; 18 - gui_effects = "@Invalid()"; 19 - buttonbox_layout = 2; # KDE 20 - keyboard_scheme = 3; # KDE 21 - dialog_buttons_have_icons = 1; 22 - menus_have_icons = true; 23 - show_shortcuts_in_context_menus = true; 24 - underline_shortcut = 1; 25 - toolbutton_style = 4; # Follow the application style 26 - wheel_scroll_lines = 3; 27 - 28 - stylesheets = "@Invalid()"; 29 - }; 30 - Troubleshooting = { 31 - force_raster_widgets = 1; 32 - ignored_applications = "@Invalid()"; 33 - }; 34 - }; 35 - in 36 - { 37 - hm.home.packages = with pkgs; [ 38 - breeze-icons 39 - 40 - qt5.qtwayland 41 - qt6.qtwayland 42 - ]; 43 - 44 - roles.qt = { 45 - platform = "qt5ct"; 46 - 47 - qt5ct = { 48 - inherit settings; 49 - }; 50 - qt6ct = { 51 - inherit settings; 52 - }; 53 - }; 54 - }
-40
users/leah/presets/hyprland/screenshots.nix
··· 1 - { 2 - config, 3 - pkgs, 4 - lib, 5 - ... 6 - }: 7 - { 8 - hm.home.packages = with pkgs; [ 9 - hyprpicker 10 - grimblast 11 - satty 12 - ]; 13 - 14 - hm.wayland.windowManager.hyprland.settings = { 15 - "$grimblast" = "${lib.getExe pkgs.grimblast} --freeze --notify --cursor"; 16 - 17 - env = [ 18 - "GRIMBLAST_EDITOR,${pkgs.writeShellScript "edit.sh" '' 19 - cp $1 ${config.hm.home.homeDirectory}/Pictures/screenshots 20 - ${lib.getExe pkgs.satty} --copy-command ${lib.getExe' pkgs.wl-clipboard "wl-copy"} -f $1 21 - ''}" 22 - ]; 23 - 24 - bind = [ 25 - "CTRL_R, Delete, exec, $grimblast edit area" 26 - "SHIFT_R, Delete, exec, $grimblast edit active" 27 - "CTRL_R SHIFT_R, Delete, exec, $grimblast edit output" 28 - ", Print, exec, $grimblast edit area" 29 - "SHIFT, Print, exec, $grimblast edit active" 30 - "CTRL SHIFT, Print, exec, $grimblast edit output" 31 - 32 - # Because of how cursed ASUS's laptop keyboard works 33 - # (Fn+F6 produces a sequence of keystrokes that correspond to Windows+Shift+S on Windows), 34 - # I need to do this to make it do what it's intended to do 35 - "SUPER SHIFT, S, exec, $grimblast edit area" 36 - "CTRL SUPER SHIFT, S, exec, $grimblast edit output" 37 - "ALT SUPER SHIFT, S, exec, $grimblast edit active" 38 - ]; 39 - }; 40 - }
-154
users/leah/presets/hyprland/settings.nix
··· 1 - { lib, pkgs, ... }: 2 - { 3 - hm.wayland.windowManager.hyprland.settings = 4 - let 5 - inherit (lib) 6 - getExe 7 - flatten 8 - mod 9 - range 10 - pipe 11 - ; 12 - in 13 - with pkgs; 14 - { 15 - "$mod" = "SUPER"; 16 - 17 - monitor = "eDP-1,2560x1600@165,0x0,1.25"; 18 - 19 - env = [ 20 - "WLR_DRM_DEVICES,/dev/dri/card0" # use iGPU 21 - ]; 22 - 23 - exec-once = [ 24 - (getExe config.hm.programs.wpaperd.package) 25 - (getExe config.hm.programs.waybar.package) 26 - "${polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" 27 - 28 - # FIXME: GTK 3 crashes with wayland IM module enabled right now. 29 - # Somehow using native wayland doesn't fix this, gonna do this for now 30 - # FIXME: Running without --disable-gpu results in a blank screen (see nixpkgs#278040) 31 - "[workspace 1 silent; float] GTK_IM_MODULE= ${getExe _1password-gui} --disable-gpu" 32 - ]; 33 - 34 - windowrulev2 = [ 35 - "float,class:(org.kde.polkit-kde-authentication-agent-1)" 36 - "float,class:(firefox),title:(Picture-in-Picture)" 37 - ]; 38 - 39 - input = { 40 - kb_layout = "us"; 41 - kb_variant = ""; 42 - kb_model = ""; 43 - kb_options = "compose:ralt"; 44 - kb_rules = ""; 45 - 46 - follow_mouse = true; 47 - 48 - touchpad = { 49 - natural_scroll = true; 50 - clickfinger_behavior = true; 51 - middle_button_emulation = true; 52 - drag_lock = true; 53 - }; 54 - 55 - sensitivity = 0; 56 - }; 57 - 58 - general = { 59 - gaps_in = 0; 60 - gaps_out = 0; 61 - border_size = 2; 62 - "col.active_border" = "rgba($rosewaterAlphaee) rgba($redAlphaee) 45deg"; 63 - "col.inactive_border" = "rgba($crustAlphaaa)"; 64 - resize_on_border = true; 65 - layout = "dwindle"; 66 - }; 67 - 68 - decoration = { 69 - blur = { 70 - enabled = true; 71 - size = 3; 72 - passes = 1; 73 - }; 74 - 75 - drop_shadow = true; 76 - shadow_range = 4; 77 - shadow_render_power = 3; 78 - "col.shadow" = "rgba($crustAlphaee)"; 79 - }; 80 - 81 - animations = { 82 - enabled = true; 83 - 84 - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; 85 - 86 - animation = [ 87 - "windows, 1, 7, myBezier" 88 - "windowsOut, 1, 7, default, popin 80%" 89 - "border, 1, 10, default" 90 - "borderangle, 1, 8, default" 91 - "fade, 1, 7, default" 92 - "workspaces, 1, 6, default" 93 - ]; 94 - }; 95 - 96 - dwindle = { 97 - pseudotile = true; 98 - preserve_split = true; 99 - }; 100 - 101 - gestures.workspace_swipe = true; 102 - 103 - # some XWayland apps, like say, 1Password, look absolutely horrendous without this on. 104 - xwayland.force_zero_scaling = true; 105 - 106 - # I don't like fun 107 - misc.disable_hyprland_logo = true; 108 - 109 - bind = 110 - [ 111 - "$mod, Q, killactive," 112 - "$mod, T, exec, ${getExe kitty}" 113 - "$mod ALT, Q, exit," 114 - "$mod, V, togglefloating," 115 - "$mod, P, pseudo," 116 - "$mod, J, togglesplit," 117 - 118 - # Move focus with mod + arrow keys 119 - "$mod, left, movefocus, l" 120 - "$mod, right, movefocus, r" 121 - "$mod, up, movefocus, u" 122 - "$mod, down, movefocus, d" 123 - 124 - # Scroll through existing workspaces with mod + scroll 125 - "$mod, mouse_down, workspace, e+1" 126 - "$mod, mouse_up, workspace, e-1" 127 - ] 128 - ++ 129 - # Switch workspaces with mod + [0-9] 130 - # Move active window to a workspace with mod + SHIFT + [0-9] 131 - pipe (range 1 10) [ 132 - (map ( 133 - i: 134 - let 135 - key = mod i 10; 136 - in 137 - [ 138 - "$mod, ${toString key}, workspace, ${toString i}" 139 - "$mod SHIFT, ${toString key}, movetoworkspace, ${toString i}" 140 - ] 141 - )) 142 - flatten 143 - ]; 144 - 145 - # Press Super once to open Fuzzel; twice to close it 146 - bindr = [ "$mod, Super_L, exec, pkill fuzzel || ${getExe fuzzel}" ]; 147 - 148 - bindm = [ 149 - # Move/resize windows with mod + LMB/RMB and dragging 150 - "$mod, mouse:272, movewindow" 151 - "$mod, mouse:273, resizewindow" 152 - ]; 153 - }; 154 - }
users/leah/presets/hyprland/wallpaper.png

This is a binary file and will not be displayed.

-196
users/leah/presets/hyprland/waybar/default.nix
··· 1 - { 2 - config, 3 - pkgs, 4 - lib, 5 - ... 6 - }: 7 - let 8 - # Kill and restart waybar if running 9 - onChange = "(ps aux | grep waybar | grep -v grep) && (${lib.getExe' pkgs.procps "pkill"} -u $USER waybar) && (${lib.getExe pkgs.waybar})"; 10 - in 11 - { 12 - hm.home.packages = with pkgs; [ font-awesome ]; 13 - 14 - hm.xdg.configFile = { 15 - "waybar/config" = { 16 - inherit onChange; 17 - }; 18 - "waybar/style.css" = { 19 - inherit onChange; 20 - }; 21 - }; 22 - 23 - hm.programs.waybar = { 24 - enable = true; 25 - 26 - style = builtins.readFile ./style.css; 27 - 28 - settings = [ 29 - { 30 - layer = "top"; 31 - position = "bottom"; 32 - 33 - modules-left = [ "tray" ]; 34 - modules-center = [ "wlr/taskbar" ]; 35 - modules-right = [ 36 - "pulseaudio" 37 - "backlight" 38 - "battery" 39 - "bluetooth" 40 - "network" 41 - ]; 42 - 43 - tray = { 44 - icon-size = 20; 45 - spacing = 10; 46 - }; 47 - "wlr/taskbar" = { 48 - format = "{icon}"; 49 - icon-size = 20; 50 - tooltip-format = "{title}"; 51 - on-click = "activate"; 52 - ignore-list = [ "kitty" ]; 53 - }; 54 - pulseaudio = { 55 - format = "{icon} {volume}% {format_source}"; 56 - format-muted = "󰝟"; 57 - format-source = "󰍬 {volume}%"; 58 - format-source-muted = "󰍭"; 59 - reverse-scrolling = true; 60 - on-click = lib.getExe pkgs.pavucontrol; 61 - format-icons = { 62 - headphone = ""; 63 - hands-free = ""; 64 - headset = ""; 65 - phone = ""; 66 - portable = ""; 67 - car = ""; 68 - default = [ 69 - "󰕿" 70 - "" 71 - "󰕾" 72 - ]; 73 - }; 74 - }; 75 - backlight = { 76 - device = "intel_backlight"; 77 - format = "{icon} {percent}%"; 78 - format-icons = [ 79 - "󱩎" 80 - "󱩏" 81 - "󱩐" 82 - "󱩑" 83 - "󱩒" 84 - "󱩓" 85 - "󱩔" 86 - "󱩕" 87 - "󱩖" 88 - "󰛨" 89 - ]; 90 - }; 91 - battery = { 92 - interval = 1; 93 - states = { 94 - full = 100; 95 - not-quite-full = 65; 96 - warning = 25; 97 - critical = 10; 98 - }; 99 - 100 - format = "{icon} {capacity}%"; 101 - format-charging = "󰂄 {capacity}%"; 102 - format-critical = "󰂃 {capacity}%"; 103 - format-icons = [ 104 - "󰁺" 105 - "󰁻" 106 - "󰁼" 107 - "󰁽" 108 - "󰁾" 109 - "󰁿" 110 - "󰂀" 111 - "󰂁" 112 - "󰂂" 113 - "󰁹" 114 - ]; 115 - }; 116 - bluetooth = { 117 - format = ""; 118 - format-disabled = "󰂲"; 119 - format-connected = " {device_alias}"; 120 - format-connected-battery = " {device_alias} <small>{device_battery_percentage}%</small>"; 121 - tooltip-format-connected = "{device_enumerate}"; 122 - tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; 123 - }; 124 - network = { 125 - format = "󰌘"; 126 - format-disconnect = "󰌙 {essid}"; 127 - format-ethernet = "󰈀"; 128 - format-wifi = "󰖩 {essid}"; 129 - tooltip = true; 130 - tooltip-format-wifi = "󰢾 {signalStrength}% 󰛶 {bandwidthUpBytes} 󰛴 {bandwidthDownBytes}"; 131 - }; 132 - } 133 - { 134 - layer = "top"; 135 - position = "top"; 136 - 137 - modules-left = [ "hyprland/workspaces" ]; 138 - modules-center = [ "clock" ]; 139 - modules-right = [ 140 - "cpu" 141 - "custom/gpu" 142 - "memory" 143 - "custom/wlogout" 144 - ]; 145 - 146 - clock = { 147 - interval = 1; 148 - timezones = [ 149 - "Europe/Berlin" 150 - "Asia/Shanghai" 151 - ]; 152 - format = "{:<span color='#7f849c'><span color='#f38ba8'>%R</span> | <span color='#fab387'>%a</span> <span color='#f9e2af'>%d</span>.<span color='#a6e3a1'>%m</span>.<span color='#89dceb'>%y</span> | <span color='#b4befe'>%z</span></span>}"; 153 - tooltip-format = "<tt><span color='#7f849c'>{:<span color='#f38ba8'>%T</span> | <span color='#fab387'>%A</span>, <span color='#f9e2af'>%e</span> <span color='#a6e3a1'>%b</span> <span color='#89dceb'>%Y</span> | <span color='#b4befe'>UTC%Ez (%Z)</span>}</span></tt>\n\n<tt><small>{calendar}</small></tt>"; 154 - 155 - calendar = { 156 - mode = "year"; 157 - mode-mon-col = 3; 158 - on-scroll = 1; 159 - on-click-right = "mode"; 160 - format = { 161 - months = "<span color='#a6e3a1'><b>{}</b></span>"; 162 - days = "<span color='#7f849c'><b>{}</b></span>"; 163 - weekdays = "<span color='#fab387'><b>{}</b></span>"; 164 - today = "<span color='#f9e2af'><b>{}</b></span>"; 165 - }; 166 - }; 167 - actions = { 168 - on-click-right = "mode"; 169 - on-click = "tz_up"; 170 - on-scroll-up = "shift_up"; 171 - on-scroll-down = "shift_down"; 172 - }; 173 - }; 174 - 175 - cpu = { 176 - format = " {:.1f}%"; 177 - }; 178 - "custom/gpu" = { 179 - exec = "${lib.getExe' config.hardware.nvidia.package "nvidia-smi"} --query-gpu=utilization.gpu --format=csv,noheader,nounits"; 180 - format = "󰾲  {}%"; 181 - interval = 10; 182 - return-type = ""; 183 - }; 184 - memory = { 185 - format = " {percentage}%"; 186 - format-alt = " {used}/{total} GiB"; 187 - }; 188 - "custom/wlogout" = { 189 - format = ""; 190 - interval = "once"; 191 - on-click = "${lib.getExe pkgs.wlogout} -p layer-shell"; 192 - }; 193 - } 194 - ]; 195 - }; 196 - }
-69
users/leah/presets/hyprland/waybar/style.css
··· 1 - * { 2 - font-family: "Iosevka Nerd Font"; 3 - font-size: 14px; 4 - } 5 - 6 - window#waybar { 7 - background-color: #11111b; 8 - } 9 - 10 - widget label { 11 - padding: 0.5rem 0.75rem; 12 - } 13 - 14 - #tray label { 15 - padding: 0; 16 - } 17 - 18 - tooltip { 19 - border: 1px solid; 20 - } 21 - tooltip label { 22 - padding: 0.5rem; 23 - } 24 - 25 - #cpu { 26 - color: #fab387; 27 - } 28 - #custom-gpu { 29 - color: #b4befe; 30 - } 31 - #memory { 32 - color: #a6e3a1; 33 - } 34 - 35 - #bluetooth { 36 - color: #89b4fa; 37 - } 38 - #network.disabled, 39 - #network.disconnected { 40 - color: #f38ba8; 41 - } 42 - #network.ethernet { 43 - color: #a6e3a1; 44 - } 45 - #network.wifi { 46 - color: #89b4fa; 47 - } 48 - #battery.full { 49 - color: #a6e3a1; 50 - } 51 - #battery.not-quite-full { 52 - color: #f9e2af; 53 - } 54 - #battery.warning { 55 - color: #fab387; 56 - } 57 - #battery.critical { 58 - color: #f38ba8; 59 - } 60 - #battery.charging { 61 - color: #a6e3a1; 62 - } 63 - 64 - #tray { 65 - margin-left: 0.5rem; 66 - } 67 - #custom-wlogout { 68 - margin-right: 0.5rem; 69 - }
-43
users/leah/programs/1password/default.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - config, 5 - ... 6 - }: 7 - { 8 - programs = { 9 - _1password.enable = true; 10 - _1password-gui = { 11 - enable = true; 12 - package = pkgs._1password-gui-beta; 13 - polkitPolicyOwners = lib.optional config.roles.base.canSudo config.roles.base.username; 14 - }; 15 - }; 16 - 17 - hm.programs._1password = { 18 - enable = true; 19 - 20 - # I *somehow* ended up with a local DB whose schema version is newer than stable... 21 - # Welp. Whatever, just use beta lmao 22 - package = pkgs._1password-gui-beta; 23 - 24 - autostart = true; 25 - 26 - enableSshAgent = true; 27 - }; 28 - 29 - # Use the 1Password CLI plugins 30 - # TODO: no workey! 31 - #hm.home.sessionVariables = { 32 - # OP_PLUGIN_ALIASES_SOURCED = "1"; 33 - # OP_BIOMETRIC_UNLOCK_UNABLED = "true"; 34 - #}; 35 - 36 - #hm.programs.fish.shellAliases = lib.pipe ["cargo" "gh"] [ 37 - # (map (name: { 38 - # inherit name; 39 - # value = "${lib.getExe' pkgs._1password "op"} plugin run -- ${name}"; 40 - # })) 41 - # builtins.listToAttrs 42 - #]; 43 - }
-3
users/leah/programs/default.nix
··· 8 8 }: 9 9 { 10 10 imports = [ 11 - ./1password 12 11 ./discord 13 12 ./fcitx5 14 13 ./firefox 15 14 ./ghostty 16 15 ./helix 17 16 ./jj 18 - #./nvim 19 17 ./rust 20 - #./virt-manager 21 18 ]; 22 19 23 20 hm.imports = [ inputs.nix-index-database.hmModules.nix-index ];
-6
users/leah/programs/nvim/.stylua.toml
··· 1 - column_width = 120 2 - line_endings = "Unix" 3 - indent_type = "Spaces" 4 - indent_width = 2 5 - quote_style = "AutoPreferDouble" 6 - call_parentheses = "None"
-28
users/leah/programs/nvim/default.nix
··· 1 - { pkgs, ... }: 2 - { 3 - imports = [ 4 - ./lsp.nix 5 - ./plugins.nix 6 - ]; 7 - 8 - hm = { 9 - xdg.configFile."nvim/lua" = { 10 - source = ./lua; 11 - recursive = true; 12 - }; 13 - 14 - programs.neovim = { 15 - enable = true; 16 - defaultEditor = true; 17 - viAlias = true; 18 - vimAlias = true; 19 - 20 - extraLuaConfig = builtins.readFile ./init.lua; 21 - }; 22 - 23 - home.packages = with pkgs; [ 24 - neovide 25 - nvimpager 26 - ]; 27 - }; 28 - }
-143
users/leah/programs/nvim/init.lua
··· 1 - local util = require("util") 2 - 3 - local g = vim.g 4 - local o = vim.o 5 - 6 - for k, v in pairs({ 7 - laststatus = 3, 8 - showmode = false, 9 - clipboard = "unnamedplus", 10 - cursorline = true, 11 - 12 - -- Indenting 13 - expandtab = true, 14 - shiftwidth = 2, 15 - smartindent = true, 16 - tabstop = 2, 17 - softtabstop = 2, 18 - 19 - fillchars = "eob: ", 20 - ignorecase = true, 21 - smartcase = true, 22 - mouse = "a", 23 - 24 - -- Numbers 25 - number = true, 26 - numberwidth = 2, 27 - ruler = false, 28 - 29 - signcolumn = "yes", 30 - splitbelow = true, 31 - splitright = true, 32 - termguicolors = true, 33 - timeoutlen = 400, 34 - undofile = true, 35 - 36 - -- interval for writing swap file to disk, also used by gitsigns 37 - updatetime = 250, 38 - 39 - -- disable nvim intro 40 - shortmess = o.shortmess .. "sI", 41 - 42 - -- go to previous/next line with h,l,left arrow and right arrow 43 - -- when cursor reaches end/beginning of line 44 - whichwrap = o.whichwrap .. "<>[]hl", 45 - }) do 46 - o[k] = v 47 - end 48 - 49 - g.mapleader = " " 50 - 51 - util.register_keymap({ 52 - n = { 53 - ["<C-s>"] = { ":update<CR>", desc = "Write current buffer" }, 54 - ["<Esc>"] = { ":noh<CR>", desc = "Clear highlights" }, 55 - 56 - ["j"] = util.wrapping_cursor("j", "Move down"), 57 - ["k"] = util.wrapping_cursor("k", "Move up"), 58 - ["<Up>"] = util.wrapping_cursor("k", "Move up"), 59 - ["<Down>"] = util.wrapping_cursor("j", "Move down"), 60 - 61 - ["gD"] = { vim.lsp.buf.declaration, desc = "LSP: Declaration" }, 62 - ["gd"] = { vim.lsp.buf.definition, desc = "LSP: Definition" }, 63 - ["gr"] = { vim.lsp.buf.references, desc = "LSP: References" }, 64 - ["gi"] = { vim.lsp.buf.implementation, desc = "LSP: Implementation" }, 65 - ["ca"] = { vim.lsp.buf.code_action, desc = "LSP: Code action" }, 66 - ["K"] = { vim.lsp.buf.hover, desc = "LSP: Hover" }, 67 - ["<leader>ls"] = { vim.lsp.buf.signature_help, desc = "LSP: Signature help" }, 68 - ["<leader>D"] = { vim.lsp.buf.type_definition, desc = "LSP: Type definition" }, 69 - 70 - ["<leader>di"] = { 71 - function() 72 - vim.diagnostic.open_float({ border = "rounded" }) 73 - end, 74 - desc = "Open diagnostics", 75 - }, 76 - }, 77 - i = { 78 - ["<C-s>"] = { "<ESC>:update<CR>gi", desc = "Write current buffer" }, 79 - }, 80 - v = { 81 - ["<Up>"] = util.wrapping_cursor("k", "Move up"), 82 - ["<Down>"] = util.wrapping_cursor("j", "Move down"), 83 - }, 84 - x = { 85 - ["<Up>"] = util.wrapping_cursor("k", "Move up"), 86 - ["<Down>"] = util.wrapping_cursor("j", "Move down"), 87 - 88 - -- Don't copy the replaced text after pasting in visual mode 89 - -- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste 90 - ["p"] = { 91 - 'p:let @+=@0<CR>:let @"=@0<CR>', 92 - desc = "Dont copy replaced text", 93 - silent = true, 94 - }, 95 - }, 96 - }) 97 - 98 - if g.neovide then 99 - o.guifont = "Iosevka_NF_Light:h13" 100 - 101 - g.neovide_refresh_rate = 165 102 - g.neovide_hide_mouse_when_typing = false 103 - g.neovide_remember_window_size = true 104 - 105 - local function scale(f) 106 - return function() 107 - g.neovide_scale_factor = f(g.neovide_scale_factor) 108 - end 109 - end 110 - 111 - util.register_keymap({ 112 - n = { 113 - ["<C-=>"] = { 114 - scale(function(s) 115 - return s * 1.25 116 - end), 117 - desc = "Neovide: Zoom in", 118 - noremap = true, 119 - }, 120 - ["<C-->"] = { 121 - scale(function(s) 122 - return s / 1.25 123 - end), 124 - desc = "Neovide: Zoom out", 125 - noremap = true, 126 - }, 127 - ["<C-0>"] = { 128 - scale(function(_) 129 - return 1 130 - end), 131 - desc = "Neovide: Reset zoom", 132 - noremap = true, 133 - }, 134 - }, 135 - }) 136 - end 137 - 138 - -- Make nvim understand what just is 139 - vim.filetype.add({ 140 - filename = { 141 - ["justfile"] = "just", 142 - }, 143 - })
-33
users/leah/programs/nvim/lsp.nix
··· 1 - { pkgs, ... }: 2 - { 3 - hm.home.packages = 4 - with pkgs; 5 - [ 6 - # Language servers 7 - lua-language-server 8 - ltex-ls 9 - marksman 10 - nil 11 - pyright 12 - quick-lint-js 13 - ruff-lsp 14 - taplo 15 - typescript-language-server 16 - vscode-langservers-extracted 17 - zls 18 - 19 - # Formatters 20 - black 21 - nixfmt-rfc-style 22 - prettierd 23 - shfmt 24 - stylua 25 - 26 - tree-sitter 27 - ] 28 - ++ (with pkgs.nodePackages_latest; [ 29 - diagnostic-languageserver 30 - graphql-language-service-cli 31 - svelte-language-server 32 - ]); 33 - }
-6
users/leah/programs/nvim/lua/plugins/barbar.lua
··· 1 - vim.g.barbar_auto_setup = false 2 - 3 - require("barbar").setup({ 4 - focus_on_close = "left", 5 - no_name_title = "[Untitled]", 6 - })
-1
users/leah/programs/nvim/lua/plugins/catppuccin.lua
··· 1 - vim.cmd.colorscheme("catppuccin-mocha")
-87
users/leah/programs/nvim/lua/plugins/cmp.lua
··· 1 - local cmp = require("cmp") 2 - 3 - local function border(hl_name) 4 - return { 5 - { "╭", hl_name }, 6 - { "─", hl_name }, 7 - { "╮", hl_name }, 8 - { "│", hl_name }, 9 - { "╯", hl_name }, 10 - { "─", hl_name }, 11 - { "╰", hl_name }, 12 - { "│", hl_name }, 13 - } 14 - end 15 - 16 - cmp.setup({ 17 - completion = { 18 - completeopt = "menu,menuone", 19 - }, 20 - 21 - window = { 22 - completion = { 23 - border = border("CmpBorder"), 24 - side_padding = 1, 25 - winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel", 26 - scrollbar = false, 27 - }, 28 - documentation = { 29 - border = border("CmpDocBorder"), 30 - winhighlight = "Normal:CmpDoc", 31 - }, 32 - }, 33 - snippet = { 34 - expand = function(args) 35 - require("luasnip").lsp_expand(args.body) 36 - end, 37 - }, 38 - 39 - formatting = { 40 - fields = { "abbr", "kind", "menu" }, 41 - }, 42 - 43 - mapping = { 44 - ["<C-p>"] = cmp.mapping.select_prev_item(), 45 - ["<C-n>"] = cmp.mapping.select_next_item(), 46 - ["<C-d>"] = cmp.mapping.scroll_docs(-4), 47 - ["<C-f>"] = cmp.mapping.scroll_docs(4), 48 - ["<C-Space>"] = cmp.mapping.complete(), 49 - ["<C-e>"] = cmp.mapping.close(), 50 - ["<CR>"] = cmp.mapping.confirm({ 51 - behavior = cmp.ConfirmBehavior.Insert, 52 - select = true, 53 - }), 54 - ["<Tab>"] = cmp.mapping(function(fallback) 55 - if cmp.visible() then 56 - cmp.select_next_item() 57 - elseif require("luasnip").expand_or_jumpable() then 58 - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "") 59 - else 60 - fallback() 61 - end 62 - end, { 63 - "i", 64 - "s", 65 - }), 66 - ["<S-Tab>"] = cmp.mapping(function(fallback) 67 - if cmp.visible() then 68 - cmp.select_prev_item() 69 - elseif require("luasnip").jumpable(-1) then 70 - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "") 71 - else 72 - fallback() 73 - end 74 - end, { 75 - "i", 76 - "s", 77 - }), 78 - }, 79 - sources = { 80 - { name = "nvim_lsp" }, 81 - { name = "luasnip" }, 82 - { name = "buffer" }, 83 - { name = "nvim_lua" }, 84 - { name = "path" }, 85 - { name = "crates" }, 86 - }, 87 - })
-17
users/leah/programs/nvim/lua/plugins/colorizer.lua
··· 1 - local colorizer = require("colorizer") 2 - -- local css = { 3 - -- RRGGBBAA = true, 4 - -- css = true, 5 - -- } 6 - 7 - colorizer.setup({ 8 - -- css = css, 9 - -- scss = css, 10 - -- sass = css, 11 - -- "html", 12 - }) 13 - 14 - -- execute colorizer as soon as possible 15 - vim.defer_fn(function() 16 - colorizer.attach_to_buffer(0) 17 - end, 0)
-11
users/leah/programs/nvim/lua/plugins/crates.lua
··· 1 - local util = require("util") 2 - local crates = require("crates") 3 - 4 - crates.setup({}) 5 - crates.show() 6 - 7 - util.register_keymap({ 8 - n = { 9 - ["<leader>cru"] = { crates.upgrade_all_crates, desc = "Upgrade all crates" }, 10 - }, 11 - })
-1
users/leah/programs/nvim/lua/plugins/gitsigns.lua
··· 1 - require("gitsigns").setup({})
-72
users/leah/programs/nvim/lua/plugins/lspconfig.lua
··· 1 - local lspconfig = require("lspconfig") 2 - 3 - local on_attach = function(client, _) 4 - client.server_capabilities.documentFormattingProvider = false 5 - client.server_capabilities.documentRangeFormattingProvider = false 6 - end 7 - 8 - local capabilities = vim.lsp.protocol.make_client_capabilities() 9 - 10 - capabilities.textDocument.completion.completionItem = { 11 - documentationFormat = { "markdown", "plaintext" }, 12 - snippetSupport = true, 13 - preselectSupport = true, 14 - insertReplaceSupport = true, 15 - labelDetailsSupport = true, 16 - deprecatedSupport = true, 17 - commitCharactersSupport = true, 18 - tagSupport = { valueSet = { 1 } }, 19 - resolveSupport = { 20 - properties = { 21 - "documentation", 22 - "detail", 23 - "additionalTextEdits", 24 - }, 25 - }, 26 - } 27 - 28 - local default = { 29 - on_attach = on_attach, 30 - capabilities = capabilities, 31 - } 32 - 33 - -- See `rust.lua` for Rust configs 34 - for k, v in pairs({ 35 - cssls = default, 36 - html = default, 37 - jsonls = default, 38 - 39 - --denols = default, 40 - diagnosticls = default, 41 - graphql = default, 42 - ltex = default, 43 - lua_ls = vim.tbl_extend("force", default, { 44 - settings = { 45 - Lua = { 46 - diagnostics = { 47 - globals = { "vim" }, 48 - }, 49 - workspace = { 50 - library = { 51 - [vim.fn.expand("$VIMRUNTIME/lua")] = true, 52 - [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true, 53 - }, 54 - maxPreload = 100000, 55 - preloadFileSize = 10000, 56 - }, 57 - }, 58 - }, 59 - }), 60 - marksman = default, 61 - hls = default, 62 - nil_ls = default, 63 - pyright = default, 64 - quick_lint_js = default, 65 - ruff_lsp = default, 66 - svelte = default, 67 - taplo = default, 68 - ts_ls = default, 69 - zls = default, 70 - }) do 71 - lspconfig[k].setup(v) 72 - end
-56
users/leah/programs/nvim/lua/plugins/lualine.lua
··· 1 - -- -- stylua: ignore 2 - -- local colors = { 3 - -- blue = '#80a0ff', 4 - -- cyan = '#79dac8', 5 - -- black = '#080808', 6 - -- white = '#c6c6c6', 7 - -- red = '#ff5189', 8 - -- violet = '#d183e8', 9 - -- grey = '#303030', 10 - -- } 11 - -- 12 - -- local bubbles_theme = { 13 - -- normal = { 14 - -- a = { fg = colors.black, bg = colors.violet }, 15 - -- b = { fg = colors.white, bg = colors.grey }, 16 - -- c = { fg = colors.white }, 17 - -- }, 18 - -- 19 - -- insert = { a = { fg = colors.black, bg = colors.blue } }, 20 - -- visual = { a = { fg = colors.black, bg = colors.cyan } }, 21 - -- replace = { a = { fg = colors.black, bg = colors.red } }, 22 - -- 23 - -- inactive = { 24 - -- a = { fg = colors.white, bg = colors.black }, 25 - -- b = { fg = colors.white, bg = colors.black }, 26 - -- c = { fg = colors.white }, 27 - -- }, 28 - -- } 29 - 30 - require("lualine").setup({ 31 - options = { 32 - -- theme = bubbles_theme, 33 - component_separators = "", 34 - section_separators = { left = "", right = "" }, 35 - }, 36 - sections = { 37 - lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } }, 38 - lualine_b = { "filename", "branch", "diff" }, 39 - lualine_c = {}, 40 - lualine_x = { "diagnostics" }, 41 - lualine_y = { "encoding", "filetype", "progress" }, 42 - lualine_z = { 43 - { "location", separator = { right = "" }, left_padding = 2 }, 44 - }, 45 - }, 46 - inactive_sections = { 47 - lualine_a = { "filename" }, 48 - lualine_b = {}, 49 - lualine_c = {}, 50 - lualine_x = {}, 51 - lualine_y = {}, 52 - lualine_z = { "location" }, 53 - }, 54 - tabline = {}, 55 - extensions = {}, 56 - })
-26
users/leah/programs/nvim/lua/plugins/luasnip.lua
··· 1 - local luasnip = require("luasnip") 2 - 3 - luasnip.config.set_config({ 4 - history = true, 5 - updateevents = "TextChanged,TextChangedI", 6 - }) 7 - 8 - -- vscode format 9 - require("luasnip.loaders.from_vscode").lazy_load() 10 - require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.vscode_snippets_path or "" }) 11 - 12 - -- snipmate format 13 - require("luasnip.loaders.from_snipmate").load() 14 - require("luasnip.loaders.from_snipmate").lazy_load({ paths = vim.g.snipmate_snippets_path or "" }) 15 - 16 - -- lua format 17 - require("luasnip.loaders.from_lua").load() 18 - require("luasnip.loaders.from_lua").lazy_load({ paths = vim.g.lua_snippets_path or "" }) 19 - 20 - vim.api.nvim_create_autocmd("InsertLeave", { 21 - callback = function() 22 - if luasnip.session.current_nodes[vim.api.nvim_get_current_buf()] and not luasnip.session.jump_active then 23 - luasnip.unlink_current() 24 - end 25 - end, 26 - })
-36
users/leah/programs/nvim/lua/plugins/mini.lua
··· 1 - require("mini.comment").setup({ 2 - mappings = { 3 - comment_line = "<leader>/", 4 - comment_visual = "<leader>/", 5 - }, 6 - }) 7 - local files = require("mini.files") 8 - files.setup({ 9 - mappings = { 10 - go_in = "<CR>", 11 - go_in_plus = "<S-CR>", 12 - go_out = "<ESC>", 13 - go_out_plus = "<S-ESC>", 14 - }, 15 - }) 16 - require("mini.indentscope").setup({ 17 - draw = { delay = 20 }, -- near-instant draw 18 - }) 19 - require("mini.pairs").setup({}) 20 - require("mini.starter").setup({}) 21 - require("mini.surround").setup({}) 22 - 23 - local util = require("util") 24 - 25 - util.register_keymap({ 26 - n = { 27 - ["<leader><leader>"] = { 28 - function() 29 - if not files.close() then 30 - files.open() 31 - end 32 - end, 33 - desc = "Open file manager", 34 - }, 35 - }, 36 - })
-39
users/leah/programs/nvim/lua/plugins/none-ls.lua
··· 1 - local null_ls = require("null-ls") 2 - 3 - local formatting = null_ls.builtins.formatting 4 - local completion = null_ls.builtins.completion 5 - local diagnostics = null_ls.builtins.diagnostics 6 - 7 - null_ls.setup({ 8 - sources = { 9 - -- formatting.remark, 10 - -- formatting.rustywind, 11 - -- formatting.shellharden, 12 - -- formatting.shfmt, 13 - -- formatting.sqlfluff.with { 14 - -- extra_args = { "--dialect", "postgres" }, 15 - -- }, 16 - -- formatting.stylelint, 17 - formatting.treefmt.with({ 18 - -- treefmt requires a config file 19 - condition = function(utils) 20 - return true 21 - --return utils.root_has_file("treefmt.toml") 22 - end, 23 - }), 24 - -- 25 - -- completion.spell, 26 - -- 27 - -- diagnostics.codespell, 28 - -- diagnostics.commitlint, 29 - -- diagnostics.fish, 30 - -- diagnostics.markdownlint_cli2, 31 - -- diagnostics.proselint, 32 - -- diagnostics.selene, 33 - -- diagnostics.statix, 34 - diagnostics.todo_comments, 35 - diagnostics.trail_space, 36 - -- diagnostics.yamllint, 37 - -- diagnostics.zsh, 38 - }, 39 - })
-1
users/leah/programs/nvim/lua/plugins/rust.lua
··· 1 - vim.g.rustfmt_autosave = 1
-75
users/leah/programs/nvim/lua/plugins/telescope.lua
··· 1 - local util = require("util") 2 - local builtin = require("telescope.builtin") 3 - 4 - require("telescope").setup({ 5 - defaults = { 6 - vimgrep_arguments = { 7 - "rg", 8 - "-L", 9 - "--color=never", 10 - "--no-heading", 11 - "--with-filename", 12 - "--line-number", 13 - "--column", 14 - "--smart-case", 15 - }, 16 - prompt_prefix = "  ", 17 - selection_caret = " ", 18 - entry_prefix = " ", 19 - initial_mode = "insert", 20 - selection_strategy = "reset", 21 - sorting_strategy = "ascending", 22 - layout_strategy = "horizontal", 23 - layout_config = { 24 - horizontal = { 25 - prompt_position = "top", 26 - preview_width = 0.55, 27 - results_width = 0.8, 28 - }, 29 - vertical = { 30 - mirror = false, 31 - }, 32 - width = 0.87, 33 - height = 0.80, 34 - preview_cutoff = 120, 35 - }, 36 - file_sorter = require("telescope.sorters").get_fuzzy_file, 37 - file_ignore_patterns = { "node_modules" }, 38 - generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, 39 - path_display = { "truncate" }, 40 - winblend = 0, 41 - border = {}, 42 - borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, 43 - color_devicons = true, 44 - set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil, 45 - file_previewer = require("telescope.previewers").vim_buffer_cat.new, 46 - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, 47 - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, 48 - -- Developer configurations: Not meant for general override 49 - buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, 50 - mappings = { 51 - n = { ["q"] = require("telescope.actions").close }, 52 - }, 53 - }, 54 - }) 55 - 56 - util.register_keymap({ 57 - n = { 58 - ["<leader>ff"] = { builtin.find_files, desc = "Find files" }, 59 - ["<leader>fw"] = { builtin.live_grep, desc = "Live grep" }, 60 - ["<leader>fb"] = { builtin.buffers, desc = "Find buffers" }, 61 - ["<leader>fh"] = { builtin.help_tags, desc = "Help page" }, 62 - ["<leader>fo"] = { builtin.oldfiles, desc = "Find oldfiles" }, 63 - ["<leader>fz"] = { builtin.current_buffer_fuzzy_find, desc = "Find in current buffer" }, 64 - ["<leader>cm"] = { builtin.git_commits, desc = "Git commits" }, 65 - ["<leader>gt"] = { builtin.git_status, desc = "Git status" }, 66 - ["<leader>ma"] = { builtin.marks, desc = "telescope bookmarks" }, 67 - 68 - ["<leader>fa"] = { 69 - function() 70 - builtin.find_files({ follow = true, no_ignore = true, hidden = true }) 71 - end, 72 - desc = "Find all", 73 - }, 74 - }, 75 - })
-8
users/leah/programs/nvim/lua/plugins/tree-sitter.lua
··· 1 - require("nvim-treesitter.configs").setup({ 2 - highlight = { 3 - enable = true, 4 - use_languagetree = true, 5 - }, 6 - 7 - indent = { enable = true }, 8 - })
-4
users/leah/programs/nvim/lua/plugins/which-key.lua
··· 1 - vim.o.timeout = true 2 - vim.o.timeoutlen = 300 3 - 4 - require("which-key").setup({})
-24
users/leah/programs/nvim/lua/util.lua
··· 1 - --- @module 'util' 2 - local util = {} 3 - 4 - -- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down> 5 - -- empty mode is same as using <cmd> :map 6 - -- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour 7 - function util.wrapping_cursor(key, desc) 8 - return { 9 - 'v:count || mode(1)[0:1] == "no" ? "' .. key .. '" : "g' .. key .. '"', 10 - desc = desc, 11 - expr = true, 12 - } 13 - end 14 - 15 - function util.register_keymap(map) 16 - for mode, key in pairs(map) do 17 - for keybind, settings in pairs(key) do 18 - local action = table.remove(settings, 1) 19 - vim.keymap.set(mode, keybind, action, settings) 20 - end 21 - end 22 - end 23 - 24 - return util
-74
users/leah/programs/nvim/plugins.nix
··· 1 - { pkgs, ... }: 2 - let 3 - # TODO: upstream 4 - #format-on-save = pkgs.vimUtils.buildVimPlugin { 5 - # pname = "format-on-save.nvim"; 6 - # version = "0-unstable-20231104"; 7 - # src = pkgs.fetchFromGitHub { 8 - # owner = "elentok"; 9 - # repo = "format-on-save.nvim"; 10 - # rev = "b7ea8d72391281d14ea1fa10324606c1684180da"; 11 - # hash = "sha256-y5zAZRuRIQEh6pEj/Aq5+ah2Qd+iNzbZgC5Z5tN1MXw="; 12 - # }; 13 - # meta.homepage = "https://github.com/elentok/format-on-save.nvim"; 14 - #}; 15 - 16 - luaConf = 17 - plugin: filename: 18 - if !builtins.isPath ./lua/plugins/${filename}.lua then 19 - throw "Config for ${filename} not found at ./lua/plugins/${filename}.lua" 20 - else 21 - { 22 - inherit plugin; 23 - type = "lua"; 24 - config = "require 'plugins.${filename}'"; 25 - }; 26 - in 27 - { 28 - hm.programs.neovim.plugins = with pkgs.vimPlugins; [ 29 - # UI 30 - (luaConf catppuccin-nvim "catppuccin") 31 - (luaConf lualine-nvim "lualine") 32 - (luaConf barbar-nvim "barbar") 33 - 34 - # Formatting 35 - #(luaConf format-on-save "format-on-save") 36 - (luaConf none-ls-nvim "none-ls") 37 - 38 - # Completion 39 - (luaConf nvim-cmp "cmp") 40 - cmp-buffer 41 - cmp-nvim-lsp 42 - cmp-nvim-lua 43 - cmp-path 44 - 45 - # Snippets 46 - (luaConf luasnip "luasnip") 47 - cmp_luasnip 48 - friendly-snippets 49 - 50 - # Rust 51 - (luaConf rust-vim "rust") 52 - (luaConf crates-nvim "crates") 53 - rustaceanvim 54 - 55 - # LSP 56 - (luaConf nvim-lspconfig "lspconfig") 57 - 58 - # Syntax highlighting 59 - (luaConf nvim-treesitter.withAllGrammars "tree-sitter") 60 - 61 - # Telescope 62 - (luaConf telescope-nvim "telescope") 63 - 64 - # Utilities 65 - (luaConf mini-nvim "mini") 66 - (luaConf gitsigns-nvim "gitsigns") # Git status display 67 - (luaConf nvim-colorizer-lua "colorizer") # Highlight color codes like #21df47 68 - plenary-nvim # Common library for a lot of plugins 69 - nvim-web-devicons 70 - 71 - # Keymap display 72 - (luaConf which-key-nvim "which-key") 73 - ]; 74 - }
-58
users/leah/programs/virt-manager/default.nix
··· 1 - { pkgs, lib, ... }: 2 - { 3 - boot.kernelModules = [ "vfio-pci" ]; 4 - boot.blacklistedKernelModules = [ "nouveau" ]; 5 - boot.kernelParams = [ "intel_iommu=on" ]; 6 - 7 - services.xserver.videoDrivers = lib.mkForce [ ]; 8 - 9 - systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 leah kvm -" ]; 10 - 11 - hm.home.packages = [ pkgs.looking-glass-client ]; 12 - 13 - hm.xdg.configFile."looking-glass/client.ini".text = lib.generators.toINI { } { 14 - win = { 15 - size = "1920x1200"; 16 - autoResize = "yes"; 17 - fullScreen = "no"; 18 - }; 19 - input = { 20 - autoCapture = "yes"; 21 - escapeKey = "KEY_F3"; 22 - }; 23 - }; 24 - 25 - virtualisation = { 26 - libvirtd = { 27 - enable = true; 28 - qemu = { 29 - swtpm.enable = true; 30 - ovmf.enable = true; 31 - ovmf.packages = [ pkgs.OVMFFull.fd ]; 32 - }; 33 - }; 34 - spiceUSBRedirection.enable = true; 35 - }; 36 - 37 - services.spice-vdagentd.enable = true; 38 - 39 - programs.virt-manager.enable = true; 40 - 41 - roles.base.user.extraGroups = [ "libvirtd" ]; 42 - 43 - environment.systemPackages = with pkgs; [ 44 - virt-viewer 45 - spice 46 - spice-gtk 47 - spice-protocol 48 - win-virtio 49 - win-spice 50 - ]; 51 - 52 - hm.dconf.settings = { 53 - "org/virt-manager/virt-manager/connections" = { 54 - autoconnect = [ "qemu:///system" ]; 55 - uris = [ "qemu:///system" ]; 56 - }; 57 - }; 58 - }