From f5962d1d272801a5a92d060e68804e01cd42d190 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Tue, 6 May 2025 12:52:09 -0700 Subject: [PATCH 1/5] Niri, Hypr, Flake Bump, tuigreet, init niri Sets up a config for Niri which involved both the host and user config settings. It's a semi basic set up to be improved on further later. This also needs to bump flake so that niri can be added to the flake update. I don't know what the flake bump date was at this point, so I'll have to bump it again soon. This needs to break apart the "waylandcompositors" service to allow niri and hypr to better fit the directory structure. Otherwise Hypr is unchanged. need to update the tuigreet default WM based on the currently selected one. Currently prioritizes Hyprland > Niri because I didn't want to write assert code... --- flake.lock | 250 +++++++++++++----- flake.nix | 2 + hmModules/apps/niri/app.nix | 91 +++++++ hosts/onizuka/host.nix | 1 - hosts/onizuka/users/pan/user.nix | 77 ++---- .../services/displaymanager/service.nix | 10 +- .../service.nix | 0 nixosModules/services/niri/service.nix | 16 ++ 8 files changed, 330 insertions(+), 117 deletions(-) create mode 100644 hmModules/apps/niri/app.nix rename nixosModules/services/{waylandcompositors => hyprland}/service.nix (100%) create mode 100644 nixosModules/services/niri/service.nix diff --git a/flake.lock b/flake.lock index e8276ee..3ce7a51 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1742237177, - "narHash": "sha256-SZO34S9RKyp0Vub/7JFyNrpxtS/i+2q6Vqi4NIF5NH0=", + "lastModified": 1744234873, + "narHash": "sha256-lQOQNEU1z4/oVBpWDjTXidMdelaafNR3jecj6n0hCIU=", "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "796472887bd6362917f26f3ceac019ef21a39e75", + "rev": "8f45b51942618a16e2027a67f054400a32a4b534", "type": "github" }, "original": { @@ -25,11 +25,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1738087375, - "narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=", + "lastModified": 1744557573, + "narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=", "owner": "Aylur", "repo": "ags", - "rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4", + "rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1744289235, + "narHash": "sha256-ZFkHLdimtFzQACsVVyZkZlfYdj4iNy3PkzXfrwmlse8=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "c8282f4982b56dfa5e9b9f659809da93f8d37e7a", "type": "github" }, "original": { @@ -79,11 +79,11 @@ ] }, "locked": { - "lastModified": 1737670815, - "narHash": "sha256-ZCxxshGN7XooabArcoGkYSNx5yVunqjKJi2aTv6cznI=", + "lastModified": 1742571008, + "narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=", "owner": "aylur", "repo": "astal", - "rev": "127e9cdcbf173846a3c40ddc0abfbb038df48042", + "rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e", "type": "github" }, "original": { @@ -184,11 +184,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1742246081, - "narHash": "sha256-1e4oFbtdOOb6NqauHevWWjEUXZnfZ6RUAJJjn9i4YBc=", + "lastModified": 1745024268, + "narHash": "sha256-bcVWOqJ1sDgHmwNvPrdJrF4H659rq7nno1w632BToas=", "owner": "nix-community", "repo": "home-manager", - "rev": "c657142e24a43ea1035889f0b0a7c24598e0e18a", + "rev": "991a4804720669220f7cbba078a2a27e2496eb69", "type": "github" }, "original": { @@ -242,11 +242,11 @@ ] }, "locked": { - "lastModified": 1739049071, - "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", + "lastModified": 1743953322, + "narHash": "sha256-prQ5JKopXtzCMX2eT3dXbaVvGmzjMRE2bXStQDdazpM=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", + "rev": "9d7f2687c84c729afbc3b13f7937655570f2978d", "type": "github" }, "original": { @@ -271,11 +271,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1742245601, - "narHash": "sha256-02OZCZPy6J2dFpKNnWlWkpZHwV8iyi5rPSIWmB0YMvY=", + "lastModified": 1745018190, + "narHash": "sha256-A+qY3YZp9/J6EDaRsCxbfAm6yBJuPtBRnn7pu4HituQ=", "ref": "refs/heads/main", - "rev": "5f60fc7d00eb08ee39cac1f5eceeb97ffbea0e7f", - "revCount": 5901, + "rev": "f48ee7a3d17810c9a0bf229fc3131e15b09ef179", + "revCount": 6008, "type": "git", "url": "https://github.com/hyprwm/Hyprland" }, @@ -289,11 +289,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1742213523, - "narHash": "sha256-I8JVdQRu8eWvY5W8XWYZkdd5pojDHkxeqQV7mMIsbhs=", + "lastModified": 1743417258, + "narHash": "sha256-YItzk1pj8Kz+b7VlC9zN1pSZ6CuX35asYy3HuMQ3lBQ=", "owner": "hyprwm", "repo": "contrib", - "rev": "bd81329944be53b0ffb99e05864804b95f1d7c65", + "rev": "bc2ad24e0b2e66c3e164994c4897cd94a933fd10", "type": "github" }, "original": { @@ -314,11 +314,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743714874, + "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", "type": "github" }, "original": { @@ -411,11 +411,11 @@ ] }, "locked": { - "lastModified": 1741191527, - "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", + "lastModified": 1744468525, + "narHash": "sha256-9HySx+EtsbbKlZDlY+naqqOV679VdxP6x6fP3wxDXJk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", + "rev": "f1000c54d266e6e4e9d646df0774fac5b8a652df", "type": "github" }, "original": { @@ -436,11 +436,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1743950287, + "narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "f2dc70e448b994cef627a157ee340135bd68fbc6", "type": "github" }, "original": { @@ -507,13 +507,69 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_7", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1744991948, + "narHash": "sha256-f4xKjzY64l6e28YExcf/V8aLYzBzDdjNI7ZZJGBBz3Y=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "a70acecb35de8941bac791c82d8e214d4be70567", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1740117926, + "narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b94a5db8790339cf9134873d8b490be69e02ac71", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.02", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1744878694, + "narHash": "sha256-e3jPdRQmlgeWwDTC/wnvKgIy4Ga8KZYoxUPQ8PCNktM=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "7884d3bfea810740fe2ca7021b102af0f049ccae", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1740560979, - "narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", + "lastModified": 1743315132, + "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5135c59491985879812717f4c9fea69604e7f26f", + "rev": "52faf482a3889b7619003c0daec593a1912fddc1", "type": "github" }, "original": { @@ -523,13 +579,29 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1744440957, + "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { - "lastModified": 1737469691, - "narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { @@ -541,11 +613,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1744463964, + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", "type": "github" }, "original": { @@ -557,11 +629,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1742069588, - "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { @@ -605,11 +677,27 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1742069588, - "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { @@ -618,13 +706,13 @@ "type": "indirect" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { - "lastModified": 1741865919, - "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", + "lastModified": 1744502386, + "narHash": "sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9+a/ONO8qNBYJgM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", + "rev": "f6db44a8daa59c40ae41ba6e5823ec77fe0d2124", "type": "github" }, "original": { @@ -644,11 +732,11 @@ ] }, "locked": { - "lastModified": 1742058297, - "narHash": "sha256-b4SZc6TkKw8WQQssbN5O2DaCEzmFfvSTPYHlx/SFW9Y=", + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "59f17850021620cd348ad2e9c0c64f4e6325ce2a", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "type": "github" }, "original": { @@ -665,20 +753,21 @@ "hyprland": "hyprland", "hyprland-contrib": "hyprland-contrib", "lix-module": "lix-module", - "nixpkgs": "nixpkgs_7", + "niri": "niri", + "nixpkgs": "nixpkgs_8", "sops-nix": "sops-nix" } }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1742239755, - "narHash": "sha256-ptn8dR4Uat3UUadGYNnB7CIH9SQm8mK69D2A/twBUXQ=", + "lastModified": 1744669848, + "narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "787afce414bcce803b605c510b60bf43c11f4b55", + "rev": "61154300d945f0b147b30d24ddcafa159148026a", "type": "github" }, "original": { @@ -745,11 +834,11 @@ ] }, "locked": { - "lastModified": 1741934139, - "narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=", + "lastModified": 1744644585, + "narHash": "sha256-p0D/e4J6Sv6GSb+9u8OQcVHSE2gPNYB5ygIfGDyEiXQ=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "150b0b6f52bb422a1b232a53698606fe0320dde0", + "rev": "be6771e754345f18244fb00aae5c9e5ab21ccc26", "type": "github" }, "original": { @@ -757,6 +846,39 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1739246919, + "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.5.1", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1744860839, + "narHash": "sha256-m/p0wFYey7zqlf5yEJ3g/h+4ZNPkjPsGiMZVJ09aWWw=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "2b5288b4b9ad2481a033e9c3cc1205108323e7d9", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index d9b8179..eeb4bd0 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,8 @@ hyprland.url = "git+https://github.com/hyprwm/Hyprland"; hyprland-contrib.url = "github:hyprwm/contrib"; + niri.url = "github:sodiboo/niri-flake"; + sops-nix.url = "github:Mic92/sops-nix"; ags.url = "github:Aylur/ags"; aagl.url = "github:ezKEa/aagl-gtk-on-nix"; diff --git a/hmModules/apps/niri/app.nix b/hmModules/apps/niri/app.nix new file mode 100644 index 0000000..2b84d94 --- /dev/null +++ b/hmModules/apps/niri/app.nix @@ -0,0 +1,91 @@ +{ inputs, config, lib, pkgs, ... }: + +{ + options.niri = { + enable = lib.mkEnableOption "Enables niri"; + outputs = lib.mkOption { default = {}; }; + mouse.accel = lib.mkOption { default = 0.0; }; + }; + + + imports = [ + inputs.niri.homeModules.niri + ]; + + config = lib.mkIf config.niri.enable { + home.packages = [ pkgs.xwayland-satellite ]; + programs.niri = { + enable = true; + settings = { + prefer-no-csd = true; + screenshot-path = config.xdg.userDirs.pictures + "/screenshots"; + spawn-at-startup = [ + { command = [ "xwayland-satellite" ]; } + ]; + environment = { + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + DISPLAY = ":0"; + }; + outputs = config.niri.outputs; + input = { + mouse = { + accel-profile = "flat"; + accel-speed = config.niri.mouse.accel; + }; + }; + layout = { + gaps = 3; + focus-ring.enable = false; + border = { + enable = true; + width = 2; + active.color = "#F5C2E7"; + inactive.color = "#1E1D2F"; + }; + preset-column-widths = [ + { proportion = 1. / 2.; } + { proportion = 1.; } + ]; + }; + animations = { + slowdown = 0.6; + }; + binds = with config.lib.niri.actions; { + "Mod+Return".action= spawn "${config.defaultApps.terminal}"; + "Mod+Shift+Return".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; + "Mod+P".action = screenshot; + "Mod+Shift+P".action = screenshot-window; + + "Mod+Tab".action = switch-preset-column-width; + "Mod+Shift+Q".action = quit; + "Mod+C".action = close-window; + + "Mod+Space".action = maximize-column; + "Mod+SHIFT+Space".action = fullscreen-window; + + "Mod+A".action = focus-monitor-left; + "Mod+F".action = focus-monitor-right; + "Mod+S".action = move-column-to-monitor-left; + "Mod+D".action = move-column-to-monitor-right; + "Mod+SHIFT+A".action = move-workspace-to-monitor-left; + "Mod+SHIFT+F".action = move-workspace-to-monitor-right; + + "Mod+H".action = focus-column-left; + "Mod+J".action = focus-window-or-workspace-down; + "Mod+K".action = focus-window-or-workspace-up; + "Mod+L".action = focus-column-right; + + "Mod+SHIFT+H".action = consume-or-expel-window-left; + "Mod+SHIFT+J".action = move-window-down-or-to-workspace-down; + "Mod+SHIFT+K".action = move-window-up-or-to-workspace-up; + "Mod+SHIFT+L".action = consume-or-expel-window-right; + + "Mod+BracketLeft".action = set-column-width "-10%"; + "Mod+BracketRight".action = set-column-width "+10%"; + + # "MOD+I".action = spawn-scratchpad; + }; + }; + }; + }; +} diff --git a/hosts/onizuka/host.nix b/hosts/onizuka/host.nix index e562908..5b139c5 100644 --- a/hosts/onizuka/host.nix +++ b/hosts/onizuka/host.nix @@ -15,7 +15,6 @@ sshd.enable = true; tuigreet.enable = true; - hyprland.enable = true; niri.enable = true; steam.enable = true; diff --git a/hosts/onizuka/users/pan/user.nix b/hosts/onizuka/users/pan/user.nix index 62ec37a..21abf26 100644 --- a/hosts/onizuka/users/pan/user.nix +++ b/hosts/onizuka/users/pan/user.nix @@ -1,55 +1,36 @@ { config, pkgs, ... }: { - hypr.enable = true; - hypr.monitor.details = [ - "DP-2,2560x1440@144,0x0,1" - "DP-1,2560x1440@144,-2560x0,1" - "HDMI-A-1,disable" - ]; - hypr.workspace = { - workspaces = { - "DP-2" = [ - "home" - "web" - "med" - "game" - ]; - "DP-1" = [ - "chat" - ]; - }; - scratchpad.enable = true; - defaults = { - "name:web" = [ "class:(librewolf)" ]; - "name:med" = [ "class:(librewolf),title:Picture-in-Picture" ]; - "name:chat" = [ "class:(Beeper)" ]; - "name:game" = [ "class:(lutris)" "class:(explorer.exe)" ]; + # "DP-2" = [ + # "home" + # "web" + # "med" + # "game" + # ]; + # "DP-1" = [ + # "chat" + # ]; + # RULES + # "name:web" = [ "class:(librewolf)" ]; + # "name:med" = [ "class:(librewolf),title:Picture-in-Picture" ]; + # "name:chat" = [ "class:(Beeper)" ]; + # "name:game" = [ "class:(lutris)" "class:(explorer.exe)" ]; + # OPAQUE: + # "initialTitle:^(Discord Popout)$" + # "class:^(firefox)$" + # "class:^(Gimp)$" + # "class:^(feh)$" + # "class:^(mpv)$" + # path = "${config.home.homeDirectory}/med/pix/bg.png"; + # theme = "miku"; + niri = { + enable = true; + mouse.accel = -0.53; + outputs = { + "DP-1".mode = { width = 2560; height = 1440; refresh = 144.000; }; + "DP-2".mode = { width = 2560; height = 1440; refresh = 144.000; }; }; }; - hypr.windows.opaque = [ - "initialTitle:^(Discord Popout)$" - "class:^(firefox)$" - "class:^(Gimp)$" - "class:^(feh)$" - "class:^(mpv)$" - ]; - hypr.background = { - enable = true; - path = "${config.home.homeDirectory}/med/pix/bg.png"; - }; - hypr.cursor = { - enable = true; - theme = "miku"; - }; - hypr = { - screenshot.enable = true; - mouse.sensitivity = -0.52; - polkit.enable = true; - master.mfact = 0.53; - xwayland.videobridge.enable = true; - }; - rofi.enable = true; timer.enableHourly = true; timer.enableQuarterly = true; @@ -117,7 +98,5 @@ lutgen # LUT generator prismlauncher # Minecraft launcher jdk8 # For playing older minecraft - zoom-us # Zoom - musescore ]; } diff --git a/nixosModules/services/displaymanager/service.nix b/nixosModules/services/displaymanager/service.nix index 1110828..92f2d75 100644 --- a/nixosModules/services/displaymanager/service.nix +++ b/nixosModules/services/displaymanager/service.nix @@ -6,15 +6,19 @@ }; config = lib.mkIf config.tuigreet.enable { - services.greetd = { + services.greetd = let + wm = + if config.hyprland.enable then "Hyprland" + else (if config.niri.enable then "niri" else null); + in { enable = true; package = pkgs.greetd.tuigreet; settings = { terminal = { vt = 2; }; - default_session = lib.mkIf config.hyprland.enable { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; + default_session = lib.mkIf (wm != null) { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${wm}"; user = "greeter"; }; }; diff --git a/nixosModules/services/waylandcompositors/service.nix b/nixosModules/services/hyprland/service.nix similarity index 100% rename from nixosModules/services/waylandcompositors/service.nix rename to nixosModules/services/hyprland/service.nix diff --git a/nixosModules/services/niri/service.nix b/nixosModules/services/niri/service.nix new file mode 100644 index 0000000..2b9d8e8 --- /dev/null +++ b/nixosModules/services/niri/service.nix @@ -0,0 +1,16 @@ +{ inputs, config, lib, ... }: + +{ + + options.niri = { + enable = lib.mkEnableOption "enables niri"; + }; + + imports = [ + inputs.niri.nixosModules.niri + ]; + + config = lib.mkIf config.niri.enable { + programs.niri.enable = true; + }; +} From 2cde55691b216956142846587b07a57701190020 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 22 May 2025 09:04:33 -0700 Subject: [PATCH 2/5] Fish, add nix-your-shell to fish --- hmModules/apps/fish/app.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hmModules/apps/fish/app.nix b/hmModules/apps/fish/app.nix index 0b00897..8c9c680 100644 --- a/hmModules/apps/fish/app.nix +++ b/hmModules/apps/fish/app.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let functionModule = with lib.types; submodule { options = { @@ -21,6 +21,9 @@ in { config = lib.mkIf config.fish.enable { programs.fish = { enable = true; + interactiveShellInit = '' + ${pkgs.nix-your-shell}/bin/nix-your-shell fish | source + ''; functions = { fish_greeting = ""; fish_prompt = '' From bec3d840cb8951c96243ea180d61e809e64b88dc Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 22 May 2025 09:06:48 -0700 Subject: [PATCH 3/5] Neovim, remove default rust lint enforcement I'm sorry to say but I use 2 spaces instead of 4, and I prefer a line width of 80, not 100. For that reason I'm disabling rust linting if the language is enabled. --- hmModules/apps/neovim/app.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hmModules/apps/neovim/app.nix b/hmModules/apps/neovim/app.nix index 4a1ddfd..4ef6b51 100644 --- a/hmModules/apps/neovim/app.nix +++ b/hmModules/apps/neovim/app.nix @@ -105,9 +105,15 @@ ]); rust-pkg = lopts cfgl.rust.enable (with pkgs.vimPlugins; [ - rustaceanvim + { + plugin = rustaceanvim; + type = "lua"; + config = '' + vim.g.rust_recommended_style = 0 + ''; + } ]); - + go-pkg = lopts cfgl.go.enable (with pkgs.vimPlugins; [ go-nvim ]); From f6e1ff3986b359d65eaaf9dd9923b1e51c425906 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 22 May 2025 09:07:11 -0700 Subject: [PATCH 4/5] Neovim, d to peak diagnostics this helps me see longer diagnostics, and also fixes a weird terminal display error when proxy remoting to Onizuka --- hmModules/apps/neovim/options.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hmModules/apps/neovim/options.lua b/hmModules/apps/neovim/options.lua index dfa4906..db669e2 100644 --- a/hmModules/apps/neovim/options.lua +++ b/hmModules/apps/neovim/options.lua @@ -33,6 +33,9 @@ vim.opt.backup = false vim.opt.undofile = true vim.opt.undodir = '/home/pan/.config/nvim/undodir' +-- Error viewing +vim.keymap.set('n', 'd', function() vim.diagnostic.open_float() end) + -- Easy copy and pasting to external programs -- map "+yy -- map "+P From 7eac8ad44398a1d8f3a2bf4b9f132070a664d94e Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 22 May 2025 09:09:21 -0700 Subject: [PATCH 5/5] Pan@Onizuka, enable catppuccin for neovim --- hosts/onizuka/users/pan/user.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/onizuka/users/pan/user.nix b/hosts/onizuka/users/pan/user.nix index 21abf26..2efdf12 100644 --- a/hosts/onizuka/users/pan/user.nix +++ b/hosts/onizuka/users/pan/user.nix @@ -72,6 +72,7 @@ treesitter.enable = true; wiki.enable = true; }; + neovim.themes.catppuccin.enable = true; lf.enable = true; lf.hiddenfiles = [