From ff82426194be7ee787dae4cf93dd884441fe4572 Mon Sep 17 00:00:00 2001 From: Mora Unie Youer Date: Sun, 30 Mar 2025 14:17:02 +0300 Subject: feat(mora): use NeoVim config and Niri from flakes --- flake.lock | 394 +++++++++++++++++++++++++++++++++++++++++++++++++++------- flake.nix | 6 + user-mora.nix | 25 +++- 3 files changed, 378 insertions(+), 47 deletions(-) diff --git a/flake.lock b/flake.lock index 460c53b..faa1de5 100644 --- a/flake.lock +++ b/flake.lock @@ -67,11 +67,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1741675036, - "narHash": "sha256-sb0mRPmUK//i6F6hhjJg2fShlha452ipS94fQDxqWgw=", + "lastModified": 1742452566, + "narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=", "owner": "nix-community", "repo": "fenix", - "rev": "f2c879a1319e0eb6b842a68791f3ae625bfc8724", + "rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06", "type": "github" }, "original": { @@ -133,6 +133,38 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -153,6 +185,50 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "neovim-configuration", + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1740872218, + "narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3876f6b87db82f33775b1ef5ea343986105db764", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "neovim-configuration", + "neovim-nightly-overlay", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "flake-schemas": { "locked": { "lastModified": 1721999734, @@ -220,6 +296,30 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_4", + "gitignore": "gitignore_2", + "nixpkgs": [ + "neovim-configuration", + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1740915799, + "narHash": "sha256-JvQvtaphZNmeeV+IpHgNdiNePsIpHD5U/7QN5AeY44A=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "42b1ba089d2034d910566bf6b40830af6b8ec732", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -242,6 +342,29 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "neovim-configuration", + "neovim-nightly-overlay", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "harfbuzz": { "flake": false, "locked": { @@ -259,6 +382,29 @@ "type": "github" } }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": [ + "neovim-configuration", + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1739595404, + "narHash": "sha256-0CjCfbq0yHWexOrpO06e2WU1r5JAqR6ffy1zgM3NksI=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "06519cec8fb32d219006da6eacd255504a9996af", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -266,11 +412,11 @@ ] }, "locked": { - "lastModified": 1741879521, - "narHash": "sha256-GylyCwdUe2Kd69bC8txEX+A3H/DXBZl2a+GcmTcJw/g=", + "lastModified": 1742996658, + "narHash": "sha256-snxgTLVq6ooaD3W3mPHu7LVWpoZKczhxHAUZy2ea4oA=", "owner": "nix-community", "repo": "home-manager", - "rev": "1b0efe3d335f452595512c7b275e5dddfbfb28a5", + "rev": "693840c01b9bef9e54100239cef937e53d4661bf", "type": "github" }, "original": { @@ -288,11 +434,11 @@ ] }, "locked": { - "lastModified": 1741673443, - "narHash": "sha256-GsiWbJqN87Y+8BQl55O/Tlr5syhLzt8kUAPJ7kWMgSA=", + "lastModified": 1742465245, + "narHash": "sha256-gpjtkoeq5Ye9J8GoR+rWg3NL4bbEtcLvvF4nN6MtxdU=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "8c44f7f637f85a60cec8affb5ce1a75549c010f4", + "rev": "a95606cae5c9e1f5b84debe7865ef171d4deb287", "type": "github" }, "original": { @@ -385,21 +531,83 @@ "type": "github" } }, + "neovim-configuration": { + "inputs": { + "neovim-nightly-overlay": "neovim-nightly-overlay", + "nixCats": "nixCats", + "nixpkgs": "nixpkgs_3", + "plugins-leap-spooky-nvim": "plugins-leap-spooky-nvim", + "plugins-telepath-nvim": "plugins-telepath-nvim" + }, + "locked": { + "lastModified": 1741288044, + "narHash": "sha256-kGegO61TOqddoMwSQ1zSXqX2yKU1t5tk0gG/+2+ELe8=", + "ref": "refs/heads/master", + "rev": "f0ece4441abda2643791dafa88c42707a5e12bd1", + "revCount": 20, + "type": "git", + "url": "https://git.140041.xyz/neovim-configuration" + }, + "original": { + "type": "git", + "url": "https://git.140041.xyz/neovim-configuration" + } + }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-src": "neovim-src", + "nixpkgs": "nixpkgs_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1741220969, + "narHash": "sha256-qX4d8ZLCx2MenmvxCSE+b9WMzgMdCgOFYxu1utsSLr4=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "7d7175e30c2a79483e1bf7dfd2ddc4c0bdd0e8af", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" + } + }, + "neovim-src": { + "flake": false, + "locked": { + "lastModified": 1741217955, + "narHash": "sha256-NKXFdxXJDj6XoTafm2VqkYP2XQVlJ68/fz3xScO4oYA=", + "owner": "neovim", + "repo": "neovim", + "rev": "a261f602a067c7cb4de39fa6330053c08dcfd5e5", + "type": "github" + }, + "original": { + "owner": "neovim", + "repo": "neovim", + "type": "github" + } + }, "niri": { "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1741868560, - "narHash": "sha256-z+IHcxeE15LWfwXZkt3EgfGmIb3iZ8NwqteN1C16gyg=", + "lastModified": 1742954683, + "narHash": "sha256-ZJBJzpWQcZYuxiX7YbLCaiZl1aOt8xQphXt0ZO0st+8=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "74d3f0a78988d699671d607609475285f1cc43c9", + "rev": "41db28938147dfa2a2d528f24b59b6962b96f0c5", "type": "github" }, "original": { @@ -428,11 +636,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1741864494, - "narHash": "sha256-fA5RlPWldAtOliZeG+fr/ZtElk6VS/vGg5cnDjWxk9A=", + "lastModified": 1742877599, + "narHash": "sha256-3Xy1mlAUcYSQSpt0Q/flA+o6Y1ZACDW52vVP2CX52w8=", "owner": "YaLTeR", "repo": "niri", - "rev": "1c6037e6125870205a878f5267ffb02d3b02db64", + "rev": "4534d3726676a403eb3dd19d28371bd8acd98401", "type": "github" }, "original": { @@ -494,6 +702,21 @@ "type": "github" } }, + "nixCats": { + "locked": { + "lastModified": 1740837766, + "narHash": "sha256-LKeBL3gjm+Fg2yVDKqB2gIiVnccv4TSUtt5NmQcasrk=", + "owner": "BirdeeHub", + "repo": "nixCats-nvim", + "rev": "83264cfaf7d7438c52db28a95934d87ae45faaae", + "type": "github" + }, + "original": { + "owner": "BirdeeHub", + "repo": "nixCats-nvim", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1739446958, @@ -528,11 +751,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1741724370, - "narHash": "sha256-WsD+8uodhl58jzKKcPH4jH9dLTLFWZpVmGq4W1XDVF4=", + "lastModified": 1742751704, + "narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "95600680c021743fd87b3e2fe13be7c290e1cac4", + "rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092", "type": "github" }, "original": { @@ -544,27 +767,43 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1741037377, + "narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "02032da4af073d0f6110540c8677f16d4be0117f", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_3": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1741037377, + "narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "02032da4af073d0f6110540c8677f16d4be0117f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1742669843, + "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "1e5b653dff12029333a6546c11e108ede13052eb", "type": "github" }, "original": { @@ -574,7 +813,23 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { + "locked": { + "lastModified": 1742889210, + "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "698214a32beb4f4c8e3942372c694f40848b360d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1735821806, "narHash": "sha256-cuNapx/uQeCgeuhUhdck3JKbgpsml259sjUQnWM7zW8=", @@ -598,14 +853,14 @@ "nixpkgs": [ "nixpkgs" ], - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1741876958, - "narHash": "sha256-p1gTaY4MihMZqEIbL0C1LNtzCF7UTqfVpxb/DJs9Ss8=", + "lastModified": 1743058919, + "narHash": "sha256-o8Uh5+5DbEuwoaYo1d9G0mLyIQ6LcN4GcWpOvdoZIMY=", "owner": "nix-community", "repo": "NUR", - "rev": "127448d05a0d15a884c56d2a3ee4a4934fb491ff", + "rev": "28d3daa92d92a61134fba2cddcd85e80d83fc0ad", "type": "github" }, "original": { @@ -627,11 +882,11 @@ ] }, "locked": { - "lastModified": 1741811606, - "narHash": "sha256-MbcmR9FaybY/YOmL+Rf2t5tdk8IcVu1Uut9NOGACZOU=", + "lastModified": 1743023245, + "narHash": "sha256-rxn7xuq0788rIZ5cUB1cvuzcYbSgMRCXPcfQIR4VBqM=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "61f1012e025ce811bfe45017c696065064e4aec6", + "rev": "eaf8e601cd3ba55caa3b44668c0006e80b9b2fff", "type": "github" }, "original": { @@ -640,6 +895,38 @@ "type": "github" } }, + "plugins-leap-spooky-nvim": { + "flake": false, + "locked": { + "lastModified": 1707412269, + "narHash": "sha256-XpWDFpiMZ6Up6gLzC6L0XWSiysgh5+6g0vxqi2vzdqE=", + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "rev": "5f44a1f63dc1c4ce50244e92da5bc0d8d1f6eb47", + "type": "github" + }, + "original": { + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "type": "github" + } + }, + "plugins-telepath-nvim": { + "flake": false, + "locked": { + "lastModified": 1713157094, + "narHash": "sha256-h1NILk/EAbhb9jONHAApFs9Z2f8oZsWy15Ici6+TLxw=", + "owner": "rasulomaroff", + "repo": "telepath.nvim", + "rev": "2879da05463db7bdc8824b13cccd8e8920c62a55", + "type": "github" + }, + "original": { + "owner": "rasulomaroff", + "repo": "telepath.nvim", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -677,9 +964,10 @@ "home-manager": "home-manager", "lanzaboote": "lanzaboote", "musnix": "musnix", + "neovim-configuration": "neovim-configuration", "niri": "niri", "nix-filter": "nix-filter_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "nixpkgs-pinned": "nixpkgs-pinned", "nurpkgs": "nurpkgs", "nyxpkgs": "nyxpkgs", @@ -690,11 +978,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1741630355, - "narHash": "sha256-8icmsH+PAqJbhYjor1rWLZGWII3z4MqXfLGS3rIxQnk=", + "lastModified": 1742296961, + "narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "44f18c3d05dab7505ac0689e690f3c47f3be1418", + "rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4", "type": "github" }, "original": { @@ -776,6 +1064,28 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "neovim-configuration", + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1739829690, + "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "3d0579f5cc93436052d94b73925b48973a104204", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nurpkgs", @@ -802,7 +1112,7 @@ "freetype2": "freetype2", "harfbuzz": "harfbuzz", "libpng": "libpng", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2", "zlib": "zlib" }, @@ -842,11 +1152,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1741757154, - "narHash": "sha256-Gr0m144I3kTZ4HZxOpAnQYyyhvyAAN0lEMrSQ3HyxMI=", + "lastModified": 1742773235, + "narHash": "sha256-YhJex62HHVF6EfdGLIC01uM6jH8XJu5ryZ+LlhG7wMs=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "3c50b7da7963e299e47295352c9a1da1c37b4254", + "rev": "b2613aec05f9e3f8488ef924203d62cafb712642", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ef62d0e..481a7fc 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,9 @@ #inputs.flake-utils.follows = "flake-utils"; #inputs.rust-overlay.follows = "rust-overlay"; }; + + # NOTE: re-following inputs breaks Cachix + neovim-configuration.url = "git+https://git.140041.xyz/neovim-configuration"; }; nixConfig = { @@ -136,6 +139,8 @@ niri, wezterm, + neovim-configuration, + ... } @ inputs: let @@ -167,6 +172,7 @@ # System Configuration ./system-sapphire.nix + neovim-configuration.nixosModules.default # User Configurations # mora@sapphire diff --git a/user-mora.nix b/user-mora.nix index 3a00430..c5ea169 100644 --- a/user-mora.nix +++ b/user-mora.nix @@ -7,6 +7,11 @@ let }; in { + imports = [ + inputs.niri.homeModules.niri + inputs.neovim-configuration.homeModules.default + ]; + home.stateVersion = "24.11"; home.username = "mora"; home.homeDirectory = "/home/mora"; @@ -21,6 +26,13 @@ in programs.carapace.enable = true; + ### + ### NeoVim + ### + # NOTE: this section works only due to neovim-configuration module + nvim.enable = true; + + ### ### Software ### @@ -28,9 +40,6 @@ in programs.ripgrep.enable = true; programs.zoxide.enable = true; - programs.neovim.enable = true; - programs.neovim.defaultEditor = true; - programs.git = { enable = true; delta.enable = true; @@ -102,6 +111,13 @@ in }; + ### + ### Graphical Session + ### + programs.niri.enable = true; + programs.niri.package = pkgs.niri-unstable; + + ### ### Extra Packages ### @@ -129,7 +145,6 @@ in wireguard-tools # Applications - niri-unstable fuzzel inputs.aylurs-gtk-shell.packages.${pkgs.system}.agsFull inputs.wezterm.packages.${pkgs.system}.default @@ -172,7 +187,7 @@ in Unit.Wants = [ "niri.service" ]; Install.WantedBy = [ "graphical-session.target" ]; Service = { - ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite"; + ExecStart = "${pkgs.xwayland-satellite-unstable}/bin/xwayland-satellite"; Restart = "on-failure"; }; }; -- cgit v1.2.3-70-g09d2