diff --git a/flake.lock b/flake.lock index 7a11a25e..2e214f7f 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ ] }, "locked": { - "lastModified": 1724850097, - "narHash": "sha256-3BHxvFb3NJzch1X8puRMkVZujOoarQ1llu3ZcwuvsKU=", + "lastModified": 1725199881, + "narHash": "sha256-jsmipf/u1GFZE5tBUkr56CHMN6VpUWCAjfLIhvQijU0=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "23c7925dd31e79e8c06086ace3edb129a070ac01", + "rev": "f8a687dd29ff019657498f1bd14da2fbbf0e604b", "type": "github" }, "original": { @@ -123,12 +123,12 @@ "yafas": "yafas" }, "locked": { - "lastModified": 1724976120, - "narHash": "sha256-ab+ioJFNMI0K2k3ZAaDJKW+B/kQajiPaw4Bmk++uAq8=", - "rev": "c6aca01e74579088d643a5bd1bfcf7a99f9066e7", - "revCount": 1377, + "lastModified": 1725043054, + "narHash": "sha256-wNKROMH0TmS3yqpces3ldlRLE75Bec0gfmaP9DF6OPc=", + "rev": "1de4f25728a7f37785da5742f6d3fe98daffe83f", + "revCount": 1380, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1377%2Brev-c6aca01e74579088d643a5bd1bfcf7a99f9066e7/0191a0ac-7734-737a-bdbd-10af179ac962/source.tar.gz?rev=c6aca01e74579088d643a5bd1bfcf7a99f9066e7&revCount=1377" + "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nyx/0.1.1380%2Brev-1de4f25728a7f37785da5742f6d3fe98daffe83f/0191a49c-732a-7a6a-9953-1c706c477d86/source.tar.gz?rev=1de4f25728a7f37785da5742f6d3fe98daffe83f&revCount=1380" }, "original": { "type": "tarball", @@ -192,27 +192,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "fenix": { "inputs": { "nixpkgs": [ @@ -222,11 +201,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1724913098, - "narHash": "sha256-CgAGpxcTUwkbA2pjjnpLclSKI/DYZ55B8uPmwoXCorI=", + "lastModified": 1724999484, + "narHash": "sha256-AIR8uYGteWS/RyHyZJAHQAUEJ/Mv4ktkPe2mzbJ2zCE=", "owner": "nix-community", "repo": "fenix", - "rev": "2d808ed09caffa0984a6d54bc1558959d48b012b", + "rev": "e3bb9176e807e2b166d54153ce8caea5cb2c6700", "type": "github" }, "original": { @@ -243,11 +222,11 @@ "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { - "lastModified": 1724999484, - "narHash": "sha256-AIR8uYGteWS/RyHyZJAHQAUEJ/Mv4ktkPe2mzbJ2zCE=", + "lastModified": 1725258763, + "narHash": "sha256-7s5RfYlTljWnKGkK4hOMJCJ0sNQoLYjMxezX3Vijy/0=", "owner": "nix-community", "repo": "fenix", - "rev": "e3bb9176e807e2b166d54153ce8caea5cb2c6700", + "rev": "0774f58cf1025bbb713971deecc7f07c856be6ed", "type": "github" }, "original": { @@ -265,11 +244,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1725014336, - "narHash": "sha256-4sLMoyIIRR2eRNCcQN1N7UEtuETpa0KrnJOe3vKJm3I=", + "lastModified": 1725190550, + "narHash": "sha256-wztoBEipe+oTrGeP7B7N+WP1FfRlLvJhFuiLJt4FYsQ=", "owner": "rycee", "repo": "nur-expressions", - "rev": "c4261180db65409bd3a71bd300c97313d5d37051", + "rev": "c0a6c29b335f318c50205c5cf2f4109f68618eb2", "type": "gitlab" }, "original": { @@ -290,11 +269,11 @@ ] }, "locked": { - "lastModified": 1724980034, - "narHash": "sha256-aihnQNfqq9W5C6OPZIGpScwyhjZpP92oT2aepc+vKFA=", + "lastModified": 1725280340, + "narHash": "sha256-JkluhQQf1CYyK0waHXHqwAlxWBIDVIh0oLemwBEXhmM=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "85f50a52e3c33477599b7463398d2ddca68d21ad", + "rev": "46df43b5ca2b01723101e5ccd2a1ae7b7008b369", "type": "github" }, "original": { @@ -349,20 +328,6 @@ "type": "github" } }, - "flake-compat_4": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -391,11 +356,11 @@ ] }, "locked": { - "lastModified": 1725015982, - "narHash": "sha256-1WXS/BBKZUcWlfeZL7U8ujuCdlLktImbpmJgN9zsZXM=", + "lastModified": 1725234343, + "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4f37dc19b47b50512008f38858734f8fa8a4e0cc", + "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", "type": "github" }, "original": { @@ -425,27 +390,6 @@ "type": "github" } }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-schemas": { "locked": { "lastModified": 1693491534, @@ -513,54 +457,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_7" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724857454, - "narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -583,28 +479,6 @@ "type": "github" } }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "nixvim", - "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" - } - }, "hardware": { "locked": { "lastModified": 1724878143, @@ -652,11 +526,11 @@ ] }, "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", + "lastModified": 1725180166, + "narHash": "sha256-fzssXuGR/mCeGbzM1ExaTqDz7QDGta3WA4jJsZyRruo=", "owner": "nix-community", "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", + "rev": "471e3eb0a114265bcd62d11d58ba8d3421ee68eb", "type": "github" }, "original": { @@ -707,27 +581,6 @@ "type": "github" } }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -757,6 +610,39 @@ "type": "github" } }, + "hypridle": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725204025, + "narHash": "sha256-DdPf2Hm/ywtXqQutmxuzvMLgTzuV1nuzbrsahyhB8uU=", + "owner": "hyprwm", + "repo": "hypridle", + "rev": "22b058b47a57b609e00c5c8a90697f33c7fe1fd3", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hypridle", + "type": "github" + } + }, "hyprland": { "inputs": { "aquamarine": "aquamarine", @@ -769,11 +655,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1724967012, - "narHash": "sha256-Zn5Eq6Elq0SRInPrEYGGoo972JzVxd5zExF7FSuTKlo=", + "lastModified": 1725219211, + "narHash": "sha256-17WA01XfBTuH1CJdGje3095K/7RUUL6lwQHEFq9t2Go=", "ref": "refs/heads/main", - "rev": "604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d", - "revCount": 5157, + "rev": "6934e7aa2b300bc4565855a4092fb34de8a9a8d2", + "revCount": 5178, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -792,11 +678,11 @@ ] }, "locked": { - "lastModified": 1722636442, - "narHash": "sha256-+7IS0n3/F0I5j6ZbrVlLcIIPHY3o+/vLAqg/G48sG+w=", + "lastModified": 1725276753, + "narHash": "sha256-kcV2M7xIoQvLRIrMndysM4E0d2zGSwIDejamT4LKnDg=", "owner": "hyprwm", "repo": "contrib", - "rev": "9d67858b437d4a1299be496d371b66fc0d3e01f6", + "rev": "ae618eafa81b596db034c5df1d75d4eddf785824", "type": "github" }, "original": { @@ -848,11 +734,11 @@ ] }, "locked": { - "lastModified": 1724174162, - "narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=", + "lastModified": 1725188252, + "narHash": "sha256-yBH8c4GDaEAtBrh+BqIlrx5vp6gG/Gu8fQQK63KAQgs=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c", + "rev": "c12ab785ce1982f82594aff03b3104c598186ddd", "type": "github" }, "original": { @@ -881,11 +767,11 @@ ] }, "locked": { - "lastModified": 1724927767, - "narHash": "sha256-ktnK4QJsbM4+8TQCxeWujvozDo50CldgNGCJ6Omuz/0=", + "lastModified": 1725203994, + "narHash": "sha256-N7Kfq8tpOWjtRKBnH5RqcDtQFGZPZ5vXgmxbnZVPCuU=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "9c1e9e7db2f2746ad9ee144543a786a4da591c7b", + "rev": "73b0fc26c0e2f6f82f9d9f5b02e660a958902763", "type": "github" }, "original": { @@ -894,6 +780,40 @@ "type": "github" } }, + "hyprpaper": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": "hyprwayland-scanner_2", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725200438, + "narHash": "sha256-3Cqu8jz19YyWqhneac6QFfadlyxZ4s3saSLmmpYMOe4=", + "owner": "hyprwm", + "repo": "hyprpaper", + "rev": "1c18ad65032adb891b341292a1edf9e13adf4751", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprpaper", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -906,11 +826,11 @@ ] }, "locked": { - "lastModified": 1724863980, - "narHash": "sha256-7Ke9wFRYPUIXwm5ZndGHkWBKj6BsFTkSEXUNXQRHE54=", + "lastModified": 1724966483, + "narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "aadf9a27dddd2272ca354ba5a22a0c2d1f919039", + "rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2", "type": "github" }, "original": { @@ -944,6 +864,31 @@ "type": "github" } }, + "hyprwayland-scanner_2": { + "inputs": { + "nixpkgs": [ + "hyprpaper", + "nixpkgs" + ], + "systems": [ + "hyprpaper", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "jovian": { "inputs": { "nix-github-actions": "nix-github-actions", @@ -953,11 +898,11 @@ ] }, "locked": { - "lastModified": 1724908834, - "narHash": "sha256-QYtm4H+nzO8lYJYN6TfitmZ5jvb94YqY5MGWvZRCre8=", + "lastModified": 1724999205, + "narHash": "sha256-Lc9kb5hhUohcJlUye5Pu8BNYHDPIOUtejYySTvHTlio=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "0ce5684924f553c65828041a86e7e3e09aeaac29", + "rev": "a14f978f74e89213a5f565f827454dd6178b2bb5", "type": "github" }, "original": { @@ -995,11 +940,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1724587851, - "narHash": "sha256-+tnTRvR9TzXQDl5OynS+tKBZyPB6viT99zs4fXI0lfk=", + "lastModified": 1725192674, + "narHash": "sha256-xEAVzgkjtdi9b4nl1yHWtiaPqYuvB7pwU9OurXv9Lls=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "eda1cdaddc64064f53e65ae614e061010e5fb92f", + "rev": "3f10d853f98081feec35b736e38da91202a87c3a", "type": "github" }, "original": { @@ -1042,27 +987,6 @@ "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724561770, - "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nix-gaming": { "inputs": { "flake-parts": [ @@ -1074,11 +998,11 @@ "umu": "umu" }, "locked": { - "lastModified": 1724549799, - "narHash": "sha256-F4lN1qmMJpJALwZ2ENb6MDSXG40om7ktZyAt7yh/DS8=", + "lastModified": 1725154929, + "narHash": "sha256-AONhBZQgiJb/teEJF7PV6EpyLLpF2ddSbY7HJNdFSxw=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "963803d3be8ed721b21326804513dec884e9d494", + "rev": "76446e879c956930a7f5f6f1d0440b3df67e0dda", "type": "github" }, "original": { @@ -1152,11 +1076,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1724547350, - "narHash": "sha256-WKkGeNpenNMKD1gOF0Xuqi3VsKX/QCAiwz9qe5PDvzA=", + "lastModified": 1725152544, + "narHash": "sha256-Tm344cnFM9f2YZsgWtJduvhIrvLr3Bi8J4Xc+UZDKYE=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "b741d900fecd2f0c32d90f853b24be9f5f098b7d", + "rev": "7f0b9e4fbd91826cb9ce6babbc11c87903191051", "type": "github" }, "original": { @@ -1167,11 +1091,11 @@ }, "nixpkgs-small": { "locked": { - "lastModified": 1724938759, - "narHash": "sha256-1fBHjcU/bh+ivx/uttMjgF5eTI1s9nyxyrZmgEeutns=", + "lastModified": 1725274606, + "narHash": "sha256-xXINAjCR8eTmp3AxZTk/PIH9nNoFNN0OM7MUw6eB7oQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "314ab2d44863ce4e5fd47b6575938b323804f1f4", + "rev": "66a352a3f27a2eb2f27e42a13c6fe245d3be2b98", "type": "github" }, "original": { @@ -1231,11 +1155,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1724819573, - "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "type": "github" }, "original": { @@ -1278,11 +1202,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1724819573, - "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", "type": "github" }, "original": { @@ -1292,70 +1216,6 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1724819573, - "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts_4", - "git-hooks": "git-hooks", - "home-manager": "home-manager_3", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_8", - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1724968633, - "narHash": "sha256-eb2NCdLwfXL1MuTAkoDncSl2lCJwyylV5/NM1Ws2P/U=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "2704133fe3ca616b22ed6685cc67180456eb4160", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724584782, - "narHash": "sha256-7FfHv7b1jwMPSu9SPY9hdxStk8E6EeSwzqdvV69U4BM=", - "owner": "NuschtOS", - "repo": "search", - "rev": "5a08d691de30b6fc28d58ce71a5e420f2694e087", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -1397,27 +1257,28 @@ "flake-utils": "flake-utils_3", "hardware": "hardware", "hm": "hm", + "hypridle": "hypridle", "hyprland": "hyprland", "hyprland-contrib": "hyprland-contrib", "hyprlock": "hyprlock", + "hyprpaper": "hyprpaper", "lanzaboote": "lanzaboote", "microfetch": "microfetch", "nix-gaming": "nix-gaming", "nixpak": "nixpak", "nixpkgs": "nixpkgs_7", "nixpkgs-small": "nixpkgs-small", - "nixvim": "nixvim", - "systems": "systems_8" + "systems": "systems_7" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1724841371, - "narHash": "sha256-k6WsRPDn+mZ67Aggh6miUZdGvDmbqlI+N1PJ+hi3znw=", + "lastModified": 1724937894, + "narHash": "sha256-M/28TIG+fm5x3GtQ6qSGDw1NHS4nHttz0DM7JcDs4g8=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "f454ea877180f0fd8d53390a1d9e6bdd6047b35d", + "rev": "0ae42bd42576566540a84c62e118aa823edcf2ec", "type": "github" }, "original": { @@ -1430,11 +1291,11 @@ "rust-analyzer-src_2": { "flake": false, "locked": { - "lastModified": 1724937894, - "narHash": "sha256-M/28TIG+fm5x3GtQ6qSGDw1NHS4nHttz0DM7JcDs4g8=", + "lastModified": 1725191098, + "narHash": "sha256-YH0kH5CSOnAuPUB1BUzUqvnKiv5SgDhfMNjrkki9Ahk=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "0ae42bd42576566540a84c62e118aa823edcf2ec", + "rev": "779d9eee2ea403da447278a7007c9627c8878856", "type": "github" }, "original": { @@ -1556,21 +1417,6 @@ } }, "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_8": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1585,27 +1431,6 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724833132, - "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "umu": { "inputs": { "nixpkgs": [ @@ -1648,11 +1473,11 @@ ] }, "locked": { - "lastModified": 1724073926, - "narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=", + "lastModified": 1725203932, + "narHash": "sha256-VLULC/OnI+6R9KEP2OIGk+uLJJsfRlaLouZ5gyFd2+Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "a08ecbbf33598924e93542f737fc6169a26b481e", + "rev": "2425e8f541525fa7409d9f26a8ffaf92a3767251", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5975ab3d..15ffc61f 100644 --- a/flake.nix +++ b/flake.nix @@ -45,10 +45,6 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixvim = { - url = "github:nix-community/nixvim"; - # inputs.nixpkgs.follows = "nixpkgs"; - }; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; @@ -71,6 +67,24 @@ systems.follows = "hyprland/systems"; }; }; + hypridle = { + url = "github:hyprwm/hypridle"; + inputs = { + hyprlang.follows = "hyprland/hyprlang"; + hyprutils.follows = "hyprland/hyprutils"; + nixpkgs.follows = "hyprland/nixpkgs"; + systems.follows = "hyprland/systems"; + }; + }; + hyprpaper = { + url = "github:hyprwm/hyprpaper"; + inputs = { + hyprlang.follows = "hyprland/hyprlang"; + hyprutils.follows = "hyprland/hyprutils"; + nixpkgs.follows = "hyprland/nixpkgs"; + systems.follows = "hyprland/systems"; + }; + }; nix-gaming = { url = "github:fufexan/nix-gaming"; inputs = { @@ -99,5 +113,9 @@ url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; + # naersk = { + # url = "github:nix-community/naersk"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; }; } diff --git a/home/modules/browsers/firefox/default.nix b/home/modules/browsers/firefox/default.nix index 6c037a67..a64e07d3 100644 --- a/home/modules/browsers/firefox/default.nix +++ b/home/modules/browsers/firefox/default.nix @@ -40,5 +40,11 @@ in { }; }; }; + xdg.mimeApps.defaultApplications = { + "text/html" = ["firefox.desktop"]; + "text/xml" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + }; }; } diff --git a/home/modules/default.nix b/home/modules/default.nix index cf2b05e0..aeda17ab 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -3,14 +3,14 @@ "${userModules}/browsers/chromium" "${userModules}/browsers/firefox" "${userModules}/comm/discord" - #"${userModules}/devtools/neovim" - "${userModules}/devtools/nixvim" + "${userModules}/devtools/neovim" "${userModules}/devtools/vscode" "${userModules}/gaming/lutris" "${userModules}/gaming/mangohud" "${userModules}/terminal/alacritty" "${userModules}/terminal/foot" "${userModules}/terminal/kitty" + "${userModules}/terminal/wezterm" "${userModules}/terminal/zellij" "${userModules}/userd/copyq" "${userModules}/userd/mako" @@ -21,6 +21,7 @@ "${userModules}/utils/rofi" "${userModules}/utils/waybar" "${userModules}/utils/yazi" + "${userModules}/utils/zathura" "${userModules}/wm/hyprland" "${userModules}/wm/utils/hypridle" "${userModules}/wm/utils/hyprlock" diff --git a/home/modules/devtools/neovim/config/init.lua b/home/modules/devtools/neovim/config/init.lua deleted file mode 100644 index f3409928..00000000 --- a/home/modules/devtools/neovim/config/init.lua +++ /dev/null @@ -1,61 +0,0 @@ --- Faster completion -vim.opt.updatetime = 100 - --- Line numbers -vim.opt.relativenumber = false -- Relative line numbers -vim.opt.number = true -- Display the absolute line number of the current line - --- Buffer and window options -vim.opt.hidden = true -- Keep closed buffer open in the background -vim.opt.showmode = false -- Do not show the mode in the command line -vim.opt.mouse = "a" -- Enable mouse control -vim.opt.mousemodel = "popup" -- Mouse right-click extends the current selection -vim.opt.splitbelow = true -- A new window is put below the current one -vim.opt.splitright = true -- A new window is put right of the current one - --- List options -vim.opt.list = true -vim.opt.listchars = { - tab = "▷ ", - trail = "·", - nbsp = "○", - extends = "◣", - precedes = "◢", -} - --- Swap and undo files -vim.opt.swapfile = false -- Disable the swap file -vim.opt.modeline = true -- Tags such as 'vim:ft=sh' -vim.opt.modelines = 100 -- Sets the type of modelines -vim.opt.undofile = true -- Automatically save and restore undo history - --- Search options -vim.opt.incsearch = true -- Incremental search: show match for partly typed search command -vim.opt.inccommand = "split" -- Search and replace: preview changes in quickfix list -vim.opt.ignorecase = true -- When the search query is lower-case, match both lower and upper-case patterns -vim.opt.smartcase = true -- Override the 'ignorecase' option if the search pattern contains upper case characters - --- Scrolling and cursor options -vim.opt.scrolloff = 4 -- Number of screen lines to show around the cursor -vim.opt.cursorline = true -- Highlight the screen line of the cursor -vim.opt.cursorcolumn = false -- Highlight the screen column of the cursor -vim.opt.signcolumn = "yes" -- Whether to show the signcolumn - --- Display options -vim.opt.colorcolumn = "" -- Columns to highlight -vim.opt.laststatus = 3 -- When to use a status line for the last window -vim.opt.fileencoding = "utf-8" -- File-content encoding for the current buffer -vim.opt.spell = false -- Highlight spelling mistakes (local to window) -vim.opt.wrap = false -- Prevent text from wrapping - --- Tab options -vim.opt.tabstop = 4 -- Number of spaces a in the text stands for (local to buffer) -vim.opt.shiftwidth = 4 -- Number of spaces used for each step of (auto)indent (local to buffer) -vim.opt.expandtab = true -- Expand to spaces in Insert mode (local to buffer) -vim.opt.autoindent = true -- Do clever autoindenting - --- Text width -vim.opt.textwidth = 0 -- Maximum width of text that is being inserted - --- Folding -vim.opt.foldlevel = 99 -- Folds with a level higher than this number will be closed diff --git a/home/modules/devtools/neovim/config/lspconfig.lua b/home/modules/devtools/neovim/config/lspconfig.lua deleted file mode 100644 index b4e34a88..00000000 --- a/home/modules/devtools/neovim/config/lspconfig.lua +++ /dev/null @@ -1,39 +0,0 @@ -local lspc = require'lspconfig' - --- Setup for LSP servers -lspc.tsserver.setup({ - on_attach = function(client, bufnr) - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - - local ts_utils = require("nvim-lsp-ts-utils") - ts_utils.setup({}) - ts_utils.setup_client(client) - - local buf_map = function(bufnr, mode, lhs, rhs, opts) - vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or { silent = true }) - end - - buf_map(bufnr, "n", "gs", ":TSLspOrganize") - buf_map(bufnr, "n", "gi", ":TSLspRenameFile") - buf_map(bufnr, "n", "go", ":TSLspImportAll") - - -- Custom on_attach functionality - on_attach(client, bufnr) - end, -}) -lspc.cssls.setup{} -lspc.clangd.setup{} -lspc.tailwindcss.setup{} -lspc.html.setup{} -lspc.astro.setup{} -lspc.phpactor.setup{} -lspc.pyright.setup{} -lspc.marksman.setup{} -lspc.nixd.setup{} -lspc.dockerls.setup{} -lspc.bashls.setup{} -lspc.csharp_ls.setup{} -lspc.yamlls.setup{} -lspc.lua_ls.setup({ -}) diff --git a/home/modules/devtools/neovim/config/nvim-cmp.lua b/home/modules/devtools/neovim/config/nvim-cmp.lua deleted file mode 100644 index 589191b6..00000000 --- a/home/modules/devtools/neovim/config/nvim-cmp.lua +++ /dev/null @@ -1,73 +0,0 @@ -local has_words_before = function() - local line, col = table.unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil -end - -local feedkey = function(key, mode) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true) -end - -local cmp = require("cmp") -local lspkind = require("lspkind") - -cmp.setup({ - sources = { - { name = "nvim_lsp" }, - { name = "cmp_tabnine" }, - { name = "treesitter" }, - { name = "buffer" }, - { name = "path" }, - { name = "vsnip" }, - -- { name = "copilot" }, - }, - - snippet = { - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) - end, - }, - - formatting = { - format = lspkind.cmp_format({ - with_text = true, - menu = { - buffer = "[Buf]", - nvim_lsp = "[LSP]", - nvim_lua = "[Lua]", - latex_symbols = "[Latex]", - treesitter = "[TS]", - cmp_tabnine = "[TN]", - vsnip = "[Snip]", - }, - }), - }, - - mapping = { - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.fn["vsnip#available"](1) == 1 then - feedkey("(vsnip-expand-or-jump)", "") - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { - "i", - "s", - }), - - [""] = cmp.mapping(function() - if cmp.visible() then - cmp.select_prev_item() - elseif vim.fn["vsnip#jumpable"](-1) == 1 then - feedkey("(vsnip-jump-prev)", "") - end - end, { - "i", - "s", - }), - }, -}) diff --git a/home/modules/devtools/neovim/config/theming.lua b/home/modules/devtools/neovim/config/theming.lua deleted file mode 100644 index 1f33fdbd..00000000 --- a/home/modules/devtools/neovim/config/theming.lua +++ /dev/null @@ -1,20 +0,0 @@ --- Set colorscheme -vim.cmd("set termguicolors") - --- Configure gruvbox-material -vim.g.gruvbox_material_background = "medium" -- Options: 'hard', 'medium', 'soft' -vim.g.gruvbox_material_palette = "material" -- Options: 'material', 'original', 'palenight' - --- Load the gruvbox-material colorscheme -vim.cmd([[colorscheme gruvbox-material]]) - --- Enable colorizer -require("colorizer").setup() --- set sign -vim.cmd("sign define DiagnosticSignError text= linehl= texthl=DiagnosticSignError numhl=") -vim.cmd("sign define DiagnosticSignHint text= linehl= texthl=DiagnosticSignHint numhl=") -vim.cmd("sign define DiagnosticSignInfo text= linehl= texthl=DiagnosticSignInfo numhl=") -vim.cmd("sign define DiagnosticSignWarn text= linehl= texthl=DiagnosticSignWarn numhl=") - --- set lightline theme to horizon -vim.g.lightline = { colorscheme = "apprentice" } diff --git a/home/modules/devtools/neovim/config/treesitter-textobjects.lua b/home/modules/devtools/neovim/config/treesitter-textobjects.lua deleted file mode 100644 index 8f2c6d6a..00000000 --- a/home/modules/devtools/neovim/config/treesitter-textobjects.lua +++ /dev/null @@ -1,14 +0,0 @@ -require'nvim-treesitter.configs'.setup { - textobjects = { - select = { - enable = true, - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - }, -} diff --git a/home/modules/devtools/neovim/config/treesitter.lua b/home/modules/devtools/neovim/config/treesitter.lua deleted file mode 100644 index b5d1b77e..00000000 --- a/home/modules/devtools/neovim/config/treesitter.lua +++ /dev/null @@ -1,25 +0,0 @@ -require("nvim-treesitter.configs").setup({ - highlight = { - enable = true, - disable = {}, - }, - rainbow = { - enable = true, - extended_mode = true, - }, - autotag = { - enable = true, - }, - context_commentstring = { - enable = true, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "gnn", - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, -}) diff --git a/home/modules/devtools/neovim/config/utils.lua b/home/modules/devtools/neovim/config/utils.lua deleted file mode 100644 index ad33663a..00000000 --- a/home/modules/devtools/neovim/config/utils.lua +++ /dev/null @@ -1,39 +0,0 @@ --- telescope -require("telescope").load_extension("fzy_native") - --- null-ls -local nb = require("null-ls").builtins - -require("null-ls").setup({ - sources = { - nb.formatting.alejandra, - nb.code_actions.statix, - nb.diagnostics.cppcheck, - nb.diagnostics.deadnix, - nb.diagnostics.statix, - nb.diagnostics.eslint, - nb.completion.spell, - }, -}) - -require("gitsigns").setup() - --- autopairs -require("nvim-autopairs").setup({}) - --- copy to system clipboard -vim.api.nvim_set_keymap("v", "y", '"+y', { noremap = true }) -vim.api.nvim_set_keymap("n", "y", ":%+y", { noremap = true }) - --- paste from system clipboard -vim.api.nvim_set_keymap("n", "p", '"+p', { noremap = true }) - --- textyankpost autocmd -vim.api.nvim_create_augroup("highlight_yank", { clear = true }) -vim.api.nvim_create_autocmd("TextYankPost", { - group = "highlight_yank", - desc = "Highlight when yanking (copying) text", - callback = function() - vim.highlight.on_yank() - end, -}) diff --git a/home/modules/devtools/neovim/config/which-key.lua b/home/modules/devtools/neovim/config/which-key.lua deleted file mode 100644 index 6de6be9e..00000000 --- a/home/modules/devtools/neovim/config/which-key.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Updated Which-Key Spec -local wk = require("which-key") - -wk.setup {} - -wk.register({ - [""] = { - ["/"] = { "Telescope live_grep", "Live Grep" }, - P = { '"+P', "Paste from clipboard before cursor" }, - a = { "lua require('telescope.builtin').lsp_code_actions()", "Code Actions" }, - ac = { "CopilotChatToggle", "Toggle Copilot chat" }, - b = { "Telescope buffers", "Buffers" }, - d = { "lua require('telescope.builtin').lsp_document_diagnostics()", "LSP Diagnostics" }, - f = { "Telescope find_files", "Find File" }, - g = { - b = { "ToggleBlameLine", "Toggle BlameLine" }, - c = { "Neogit commit", "Commit" }, - i = { "lua require('telescope').extensions.gh.issues()", "Github Issues" }, - name = "Git / VCS", - p = { "lua require('telescope').extensions.gh.pull_request()", "Github PRs" }, - s = { "Neogit kind=split", "Staging" } - }, - k = { "lua vim.lsp.buf.signature_help()", "Signature Help" }, - l = { - e = { "lua vim.lsp.diagnostic.show_line_diagnostics()", "Show Line Diagnostics" }, - f = { "lua vim.lsp.buf.formatting_sync()", "Format file" }, - name = "LSP", - q = { "lua vim.lsp.diagnostic.set_loclist()", "Set Loclist" } - }, - p = { '"+p', "Paste from clipboard" }, - qc = { "lua local input = vim.fn.input('Quick Chat: '); if input ~= '' then require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer }) end", "CopilotChat - Quick chat" }, - y = { '"+y', "Yank to clipboard" } - }, - g = { - e = { "G", "Bottom" }, - h = { "0", "Line start" }, - l = { "$", "Line end" }, - s = { "^", "First non-blank in line" } - }, - i = { - [""] = { "p", "Paste in Insert Mode" } - }, - v = { - ["<"] = { ""] = { "y", "Yank Selection" }, - [""] = { ""] = { ">gv", "Indent Right" }, - [">"] = { ">gv", "Indent Right" }, - J = { ":m '>+1gv=gv", "Move Down" }, - K = { ":m '<-2gv=gv", "Move Up" } - } -}, { prefix = "" }) diff --git a/home/modules/devtools/neovim/default.nix b/home/modules/devtools/neovim/default.nix index 2f86bfc8..8fac5df2 100644 --- a/home/modules/devtools/neovim/default.nix +++ b/home/modules/devtools/neovim/default.nix @@ -1,81 +1,224 @@ +# Yanked from Misterio77's great config: https://github.com/Misterio77/nix-config { pkgs, - lib, config, + lib, ... }: let inherit (lib) mkIf mkEnableOption; cfg = config.modules.devtools.neovim; in { + imports = [ + ./plugins + ./lsp.nix + ./syntaxes.nix + ]; options = { - modules.devtools.neovim.enable = mkEnableOption "Enables neovim"; + modules.devtools.neovim.enable = mkEnableOption "Enable neovim"; }; + config = mkIf cfg.enable { programs.neovim = { enable = true; - vimAlias = true; - viAlias = true; - vimdiffAlias = true; + extraConfig = + /* + vim + */ + '' + "Use system clipboard + set clipboard=unnamedplus + "colorscheme + colorscheme gruvbox-material + + set number + + "Lets us easily trigger completion from binds + set wildcharm= + + "Folding + set foldmethod=manual + "Should be expr, but it's slow. So just use ':set fdm=expr' when it's needed. + + "Tabs + set tabstop=4 "4 char-wide tab + set expandtab "Use spaces + set softtabstop=0 "Use same length as 'tabstop' + set shiftwidth=0 "Use same length as 'tabstop' + "2 char-wide overrides + augroup two_space_tab + autocmd! + autocmd FileType json,html,htmldjango,hamlet,nix,scss,typescript,php,haskell,terraform setlocal tabstop=2 + augroup END + + "Set tera to use htmldjango syntax + augroup tera_htmldjango + autocmd! + autocmd BufRead,BufNewFile *.tera setfiletype htmldjango + augroup END + + "Options when composing mutt mail + augroup mail_settings + autocmd FileType mail set noautoindent wrapmargin=0 textwidth=0 linebreak wrap formatoptions +=w + augroup END + + "Fix nvim size according to terminal + "(https://github.com/neovim/neovim/issues/11330) + augroup fix_size + autocmd VimEnter * silent exec "!kill -s SIGWINCH" getpid() + augroup END + + "Scroll up and down + nmap + nmap + + "Buffers + nmap b :buffers + nmap :bnext + nmap :bprev + nmap :bdel + + "Navigate + nmap e :e + nmap e :e %:h + "CD to current dir + nmap c :cd + nmap C :cd %:h + + "Loclist + nmap l :lwindow + nmap [l :lprev + nmap ]l :lnext + + nmap L :lhistory + nmap [L :lolder + nmap ]L :lnewer + + "Quickfix + nmap q :cwindow + nmap [q :cprev + nmap ]q :cnext + + nmap Q :chistory + nmap [Q :colder + nmap ]Q :cnewer + + "Make + nmap m :make + + "Grep (replace with ripgrep) + nmap g :grep + if executable('rg') + set grepprg=rg\ --vimgrep + set grepformat=%f:%l:%c:%m + endif + + "Close other splits + nmap o :only + + "Sudo save + cmap w!! w !sudo tee > /dev/null % + ''; + extraLuaConfig = + /* + lua + */ + '' + vim.g.have_nerd_font = true + vim.wo.relativenumber = false + vim.opt.cursorline = true + + vim.keymap.set("n", "", "ggVG", { desc = "Select all" }) + vim.keymap.set("n", "", "p", { desc = "Paste" }) + vim.keymap.set("i", "", "p", { desc = "Paste" }) + vim.keymap.set("v", "", "y", { desc = "Yank" }) + + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Go to declaration" }) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" }) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" }) + vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Hover Documentation" }) + vim.keymap.set("n", "a", vim.lsp.buf.code_action, { desc = "Code action" }) + + -- Diagnostic + vim.keymap.set("n", "d", vim.diagnostic.open_float, { desc = "Floating diagnostic" }) + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" }) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" }) + vim.keymap.set("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics on loclist" }) + vim.keymap.set("n", "gq", vim.diagnostic.setqflist, { desc = "Diagnostics on quickfix" }) + + function add_sign(name, text) + vim.fn.sign_define(name, { text = text, texthl = name, numhl = name }) + end + + add_sign("DiagnosticSignError", "󰅚 ") + add_sign("DiagnosticSignWarn", " ") + add_sign("DiagnosticSignHint", "󰌶 ") + add_sign("DiagnosticSignInfo", " ") + + vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" + -- When it releases + -- vim.opt.foldexpr = "v:lua.vim.treesitter.foldtext()" + + -- Highlight when yanking (copying) text + vim.api.nvim_create_autocmd("TextYankPost", { + desc = "Highlight when yanking (copying) text", + group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }), + callback = function() + vim.highlight.on_yank() + end, + }) + ''; plugins = with pkgs.vimPlugins; [ + vim-table-mode + editorconfig-nvim + vim-surround gruvbox-material-nvim - nvim-web-devicons - comment-nvim - cmp-buffer - cmp-nvim-lsp - cmp-path - cmp-spell - cmp-treesitter - cmp-vsnip - friendly-snippets - gitsigns-nvim - lightline-vim - lspkind-nvim - neogit - null-ls-nvim - nvim-autopairs - nvim-cmp - nvim-colorizer-lua - nvim-lspconfig - nvim-tree-lua - (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) - plenary-nvim - rainbow-delimiters-nvim - telescope-fzy-native-nvim - telescope-nvim - vim-floaterm - vim-sneak - vim-vsnip - which-key-nvim - copilot-lua - copilot-cmp - statix - phpactor + { + plugin = nvim-autopairs; + type = "lua"; + config = + /* + lua + */ + '' + require("nvim-autopairs").setup({}) + ''; + } ]; + }; - extraPackages = with pkgs; [nixd gcc ripgrep fd deadnix lua-language-server yaml-language-server bash-language-server]; - - extraConfig = let - luaRequire = module: - builtins.readFile (builtins.toString - ./config - + "/${module}.lua"); - luaConfig = builtins.concatStringsSep "\n" (map luaRequire [ - "init" - "lspconfig" - "nvim-cmp" - "theming" - "treesitter" - "treesitter-textobjects" - "utils" - "which-key" - ]); - in '' - lua <<  - ${luaConfig} -  - ''; + xdg.desktopEntries = { + nvim = { + name = "Neovim"; + genericName = "Text Editor"; + comment = "Edit text files"; + exec = "nvim %F"; + icon = "nvim"; + mimeType = [ + "text/english" + "text/plain" + "text/x-makefile" + "text/x-c++hdr" + "text/x-c++src" + "text/x-chdr" + "text/x-csrc" + "text/x-java" + "text/x-moc" + "text/x-pascal" + "text/x-tcl" + "text/x-tex" + "application/x-shellscript" + "text/x-c" + "text/x-c++" + ]; + terminal = true; + type = "Application"; + categories = [ + "Utility" + "TextEditor" + ]; + }; }; }; } diff --git a/home/modules/devtools/neovim/lsp.nix b/home/modules/devtools/neovim/lsp.nix new file mode 100644 index 00000000..6941e7ae --- /dev/null +++ b/home/modules/devtools/neovim/lsp.nix @@ -0,0 +1,144 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + # LSP and completions for injected langs + otter-nvim + phpactor + # LSP + { + plugin = nvim-lspconfig; + type = "lua"; + config = + /* + lua + */ + '' + local lspconfig = require("lspconfig") + + function add_lsp(server, options) + if not options["cmd"] then + options["cmd"] = server["document_config"]["default_config"]["cmd"] + end + if not options["capabilities"] then + options["capabilities"] = require("cmp_nvim_lsp").default_capabilities() + end + + if vim.fn.executable(options["cmd"][1]) == 1 then + server.setup(options) + end + end + + -- Add LSPs with lsp-format attached + add_lsp(lspconfig.lua_ls, {}) + + add_lsp(lspconfig.nixd, { + settings = { + nixd = { + formatting = { + command = { "alejandra" }, + }, + }, + }, + }) + + -- Other LSPs + add_lsp(lspconfig.bashls, {}) + add_lsp(lspconfig.clangd, {}) + add_lsp(lspconfig.dartls, {}) + add_lsp(lspconfig.dockerls, {}) + add_lsp(lspconfig.gopls, {}) + add_lsp(lspconfig.hls, {}) + add_lsp(lspconfig.jdtls, {}) + add_lsp(lspconfig.kotlin_language_server, {}) + add_lsp(lspconfig.phpactor, { init_options = { ["language_server_php_cs_fixer.enabled"] = true } }) + add_lsp(lspconfig.rust_analyzer, {}) + add_lsp(lspconfig.pylsp, {}) + add_lsp(lspconfig.solargraph, {}) + add_lsp(lspconfig.terraformls, {}) + add_lsp(lspconfig.texlab, { chktex = { + onEdit = true, + onOpenAndSave = true, + } }) + add_lsp(lspconfig.tsserver, {}) + add_lsp(lspconfig.typst_lsp, {}) + add_lsp(lspconfig.elixirls, { cmd = { "elixir-ls" } }) + ''; + } + { + plugin = ltex_extra-nvim; + type = "lua"; + config = + /* + lua + */ + '' + local ltex_extra = require("ltex_extra") + add_lsp(lspconfig.ltex, { + on_attach = function(client, bufnr) + ltex_extra.setup({ + path = vim.fn.expand("~") .. "/.local/state/ltex", + }) + end, + }) + ''; + } + + # Snippets + luasnip + + # Completions + cmp-nvim-lsp + cmp_luasnip + cmp-rg + cmp-buffer + cmp-path + { + plugin = cmp-git; + type = "lua"; + config = + /* + lua + */ + '' + require("cmp_git").setup({}) + ''; + } + + lspkind-nvim + { + plugin = nvim-cmp; + type = "lua"; + config = + /* + lua + */ + '' + local cmp = require("cmp") + + cmp.setup({ + formatting = { + format = require("lspkind").cmp_format({ + before = function(entry, vim_item) + return vim_item + end, + }), + }, + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({}), + sources = { + { name = "otter" }, + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "git" }, + { name = "buffer", option = { get_bufnrs = vim.api.nvim_list_bufs } }, + { name = "path" }, + { name = "rg" }, + }, + }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/alpha-nvim.nix b/home/modules/devtools/neovim/plugins/alpha-nvim.nix new file mode 100644 index 00000000..c8dc1268 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/alpha-nvim.nix @@ -0,0 +1,38 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = alpha-nvim; + type = "lua"; + config = + /* + lua + */ + '' + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") + + dashboard.section.header.val = { + " ", + " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", + " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", + " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", + " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", + " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", + " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", + " ", + } + dashboard.section.header.opts.hl = "Title" + + dashboard.section.buttons.val = { + dashboard.button( "n", "󰈔 New file" , ":enew"), + dashboard.button( "e", " Explore", ":Explore"), + dashboard.button( "g", " Git summary", ":Git | :only"), + dashboard.button( "c", " Nix config flake" , ":e ~/.nix-config/flake.nix"), + } + + alpha.setup(dashboard.opts) + vim.keymap.set("n", "h", ":Alpha", { desc = "Open home dashboard" }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/bufferline-nvim.nix b/home/modules/devtools/neovim/plugins/bufferline-nvim.nix new file mode 100644 index 00000000..abed2a88 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/bufferline-nvim.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = bufferline-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('bufferline').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/comment-nvim.nix b/home/modules/devtools/neovim/plugins/comment-nvim.nix new file mode 100644 index 00000000..7032d006 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/comment-nvim.nix @@ -0,0 +1,22 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = comment-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('Comment').setup{ + opleader = { + line = '' + }, + toggler = { + line = '' + }, + } + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/conform-nvim.nix b/home/modules/devtools/neovim/plugins/conform-nvim.nix new file mode 100644 index 00000000..1a3a45d5 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/conform-nvim.nix @@ -0,0 +1,41 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = conform-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require("conform").setup({ + formatters_by_ft = { + bash = { "shfmt" }, + css = { "prettierd" }, + html = { "prettierd" }, + javascript = { "prettierd" }, + json = { "fixjson" }, + lua = { "stylua" }, + nix = { "alejandra" }, + php = { "php_cs_fixer" }, + python = { "black" }, + rust = { "rustfmt" }, + sh = { "shfmt" }, + typescript = { "prettierd" }, + query = { "sql_formatter" }, + yaml = { "prettierd" }, + ["*"] = { "injected" }, + }, + }) + + -- Optionally, set up a command or auto-command to format on save + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*", + callback = function(args) + require("conform").format({ bufnr = args.buf }) + end, + }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/copilot-lua.nix b/home/modules/devtools/neovim/plugins/copilot-lua.nix new file mode 100644 index 00000000..0c5aa122 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/copilot-lua.nix @@ -0,0 +1,45 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = copilot-lua; + type = "lua"; + config = + /* + lua + */ + '' + require('copilot').setup({ + panel = { + enabled = true, + auto_refresh = true, + keymap = { + jump_prev = "[[", + jump_next = "]]", + accept = "", + refresh = "gr", + open = "" + }, + layout = { + position = "bottom", -- | top | left | right + ratio = 0.4 + }, + }, + suggestion = { + enabled = true, + auto_trigger = true, + hide_during_completion = true, + debounce = 75, + keymap = { + accept = "", + accept_word = false, + accept_line = false, + next = "", + prev = "", + dismiss = "", + }, + }, + }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/default.nix b/home/modules/devtools/neovim/plugins/default.nix new file mode 100644 index 00000000..9b6d7b33 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/default.nix @@ -0,0 +1,24 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + vim-illuminate + ]; + imports = [ + ./alpha-nvim.nix + ./bufferline-nvim.nix + ./comment-nvim.nix + ./copilot-lua.nix + ./fidget-nvim.nix + ./gitsigns-nvim.nix + ./treesitter.nix + ./conform-nvim.nix + ./gx-nvim.nix + ./nvim-bqf.nix + ./nvim-colorizer-lua.nix + ./nvim-web-devicons.nix + ./oil.nix + ./lualine.nix + ./range-highlight-nvim.nix + ./vim-fugitive.nix + ./which-key.nix + ]; +} diff --git a/home/modules/devtools/neovim/plugins/fidget-nvim.nix b/home/modules/devtools/neovim/plugins/fidget-nvim.nix new file mode 100644 index 00000000..2e228cf6 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/fidget-nvim.nix @@ -0,0 +1,21 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = fidget-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('fidget').setup{ + progress = { + display = { + progress_icon = { pattern = "dots", period = 1 }, + }, + }, + } + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/gitsigns-nvim.nix b/home/modules/devtools/neovim/plugins/gitsigns-nvim.nix new file mode 100644 index 00000000..bf4af5a4 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/gitsigns-nvim.nix @@ -0,0 +1,23 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = gitsigns-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('gitsigns').setup{ + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + } + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/gx-nvim.nix b/home/modules/devtools/neovim/plugins/gx-nvim.nix new file mode 100644 index 00000000..a95159fb --- /dev/null +++ b/home/modules/devtools/neovim/plugins/gx-nvim.nix @@ -0,0 +1,28 @@ +{pkgs, ...}: let + gx-nvim = pkgs.vimUtils.buildVimPlugin { + name = "gx-nvim"; + src = pkgs.fetchFromGitHub { + owner = "chrishrb"; + repo = "gx.nvim"; + rev = "f29a87454b02880e0d76264c21be8316224a7395"; + hash = "sha256-QWJ/cPvSyMTJoWLg51BNFf9+/9i7G+nzennpHP/eQ4g="; + }; + }; +in { + programs.neovim.plugins = [ + { + plugin = gx-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('gx').setup{} + vim.keymap.set({"n", "x"}, "gx", ":Browse", { + desc = "Open the file under cursor with system app" + }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/lualine.nix b/home/modules/devtools/neovim/plugins/lualine.nix new file mode 100644 index 00000000..4ed8b2e4 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/lualine.nix @@ -0,0 +1,54 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = lualine-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('lualine').setup{ + options = { + icons_enabled = true, + theme = 'gruvbox-material', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + } + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/nvim-bqf.nix b/home/modules/devtools/neovim/plugins/nvim-bqf.nix new file mode 100644 index 00000000..063e93f2 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/nvim-bqf.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-bqf; + type = "lua"; + config = + /* + lua + */ + '' + require('bqf').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/nvim-colorizer-lua.nix b/home/modules/devtools/neovim/plugins/nvim-colorizer-lua.nix new file mode 100644 index 00000000..2851aebe --- /dev/null +++ b/home/modules/devtools/neovim/plugins/nvim-colorizer-lua.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-colorizer-lua; + type = "lua"; + config = + /* + lua + */ + '' + require('colorizer').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/nvim-web-devicons.nix b/home/modules/devtools/neovim/plugins/nvim-web-devicons.nix new file mode 100644 index 00000000..38957bf1 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/nvim-web-devicons.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-web-devicons; + type = "lua"; + config = + /* + lua + */ + '' + require('nvim-web-devicons').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/oil.nix b/home/modules/devtools/neovim/plugins/oil.nix new file mode 100644 index 00000000..6eaefd19 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/oil.nix @@ -0,0 +1,35 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = oil-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('oil').setup{ + buf_options = { + buflisted = true, + bufhidden = "delete", + }, + cleanup_delay_ms = false, + use_default_keymaps = false, + keymaps = { + [""] = "actions.select", + ["-"] = "actions.parent", + ["_"] = "actions.open_cwd", + ["`"] = "actions.cd", + ["~"] = "actions.tcd", + ["gc"] = "actions.close", + ["gr"] = "actions.refresh", + ["gs"] = "actions.change_sort", + ["gx"] = "actions.open_external", + ["g."] = "actions.toggle_hidden", + ["g\\"] = "actions.toggle_trash", + }, + } + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/range-highlight-nvim.nix b/home/modules/devtools/neovim/plugins/range-highlight-nvim.nix new file mode 100644 index 00000000..4fdf2e71 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/range-highlight-nvim.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = range-highlight-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('range-highlight').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/treesitter.nix b/home/modules/devtools/neovim/plugins/treesitter.nix new file mode 100644 index 00000000..4f78959a --- /dev/null +++ b/home/modules/devtools/neovim/plugins/treesitter.nix @@ -0,0 +1,25 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = nvim-treesitter.withAllGrammars; + type = "lua"; + config = + /* + lua + */ + '' + require("nvim-treesitter.configs").setup({ + -- ensure_installed = { "nix", "lua" }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + disable = function(lang, bufnr) + return vim.fn.getfsize(vim.api.nvim_buf_get_name(bufnr)) > 1048576 + end, + }, + parser_install_dir = vim.fn.stdpath("data") .. "/parsers", + }) + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/vim-fugitive.nix b/home/modules/devtools/neovim/plugins/vim-fugitive.nix new file mode 100644 index 00000000..470461a7 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/vim-fugitive.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = vim-fugitive; + type = "viml"; + config = + /* + vim + */ + '' + nmap G :Git + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/plugins/which-key.nix b/home/modules/devtools/neovim/plugins/which-key.nix new file mode 100644 index 00000000..60dfc0d3 --- /dev/null +++ b/home/modules/devtools/neovim/plugins/which-key.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.neovim.plugins = with pkgs.vimPlugins; [ + { + plugin = which-key-nvim; + type = "lua"; + config = + /* + lua + */ + '' + require('which-key').setup{} + ''; + } + ]; +} diff --git a/home/modules/devtools/neovim/syntaxes.nix b/home/modules/devtools/neovim/syntaxes.nix new file mode 100644 index 00000000..27a2a6b0 --- /dev/null +++ b/home/modules/devtools/neovim/syntaxes.nix @@ -0,0 +1,54 @@ +{ + pkgs, + config, + lib, + ... +}: { + programs.neovim = { + extraConfig = + lib.mkAfter # vim + + '' + function! SetCustomKeywords() + syn match Todo /TODO/ + syn match Done /DONE/ + syn match Start /START/ + syn match End /END/ + endfunction + + autocmd Syntax * call SetCustomKeywords() + ''; + plugins = with pkgs.vimPlugins; [ + rust-vim + dart-vim-plugin + plantuml-syntax + vim-markdown + vim-nix + vim-toml + kotlin-vim + haskell-vim + pgsql-vim + vim-terraform + vim-jsx-typescript + vim-caddyfile + + { + plugin = vimtex; + config = let + viewMethod = + if config.programs.zathura.enable + then "zathura" + else "general"; + in + /* + vim + */ + '' + let g:vimtex_view_method = '${viewMethod}' + "Don't open automatically + let g:vimtex_quickfix_mode = 0 + ''; + } + ]; + }; +} diff --git a/home/modules/terminal/wezterm/default.nix b/home/modules/terminal/wezterm/default.nix index 0984cbe7..651344c8 100644 --- a/home/modules/terminal/wezterm/default.nix +++ b/home/modules/terminal/wezterm/default.nix @@ -1,44 +1,51 @@ { pkgs, - inputs, + config, + lib, ... }: let enable_wayland = "true"; - # weztermPkg = pkgs.wezterm; - weztermFlake = inputs.wezterm.packages.${pkgs.system}.default; + weztermPkg = pkgs.wezterm; + inherit (lib) mkIf mkEnableOption; + cfg = config.modules.terminal.wezterm; in { - programs.wezterm = { - enable = true; - package = weztermFlake; - extraConfig = '' - local wezterm = require 'wezterm'; + options = { + modules.terminal.wezterm.enable = mkEnableOption "Enables wezterm terminal"; + }; + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = weztermPkg; + extraConfig = '' + local wezterm = require 'wezterm'; - local config = { - -- font = wezterm.font("Input Mono Compressed"), - font_size = 12, - check_for_updates = false, - color_scheme = 'Gruvbox Material (Gogh)', - default_cursor_style = 'SteadyBar', - enable_scroll_bar = true, - hide_tab_bar_if_only_one_tab = true, - scrollback_lines = 10000, - window_background_opacity = 0.9, - } - if wezterm.target_triple == "x86_64-pc-windows-msvc" then - config.default_prog = { "powershell.exe" } - else - config.enable_wayland = ${enable_wayland} - -- config.window_decorations = "TITLE" - config.window_close_confirmation = "NeverPrompt" - -- config.freetype_load_target = "Light" - -- config.freetype_render_target = "HorizontalLcd" - local f = wezterm.font_with_fallback({ - {family="Input Mono Compressed", weight="Light"}, - {family="Input Sans Narrow", weight="Light"}, - }) - config.font = f; - end - return config - ''; + local config = { + -- font = wezterm.font("Input Mono Compressed"), + font_size = 12, + check_for_updates = false, + color_scheme = 'Gruvbox Material (Gogh)', + default_cursor_style = 'SteadyBar', + enable_scroll_bar = true, + hide_tab_bar_if_only_one_tab = true, + scrollback_lines = 10000, + window_background_opacity = 0.9, + } + if wezterm.target_triple == "x86_64-pc-windows-msvc" then + config.default_prog = { "powershell.exe" } + else + config.enable_wayland = ${enable_wayland} + -- config.window_decorations = "TITLE" + config.window_close_confirmation = "NeverPrompt" + -- config.freetype_load_target = "Light" + -- config.freetype_render_target = "HorizontalLcd" + local f = wezterm.font_with_fallback({ + {family="Input Mono Compressed", weight="Light"}, + {family="Input Sans Narrow", weight="Light"}, + }) + config.font = f; + end + return config + ''; + }; }; } diff --git a/home/modules/utils/zathura/default.nix b/home/modules/utils/zathura/default.nix new file mode 100644 index 00000000..673e49d1 --- /dev/null +++ b/home/modules/utils/zathura/default.nix @@ -0,0 +1,61 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf mkEnableOption; + cfg = config.modules.utils.zathura; +in { + options = { + modules.utils.zathura.enable = mkEnableOption "Enables zathura"; + }; + config = mkIf cfg.enable { + programs.zathura = { + enable = true; + options = { + selection-clipboard = "clipboard"; + notification-error-bg = "rgba(40,40,40,1)"; + notification-error-fg = "rgba(251,73,52,1)"; + notification-warning-bg = "rgba(40,40,40,1)"; + notification-warning-fg = "rgba(250,189,47,1)"; + notification-bg = "rgba(40,40,40,1)"; + notification-fg = "rgba(184,187,38,1)"; + + completion-bg = "rgba(80,73,69,1)"; + completion-fg = "rgba(235,219,178,1)"; + completion-group-bg = "rgba(60,56,54,1)"; + completion-group-fg = "rgba(146,131,116,1)"; + completion-highlight-bg = "rgba(131,165,152,1)"; + completion-highlight-fg = "rgba(80,73,69,1)"; + + index-bg = "rgba(80,73,69,1)"; + index-fg = "rgba(235,219,178,1)"; + index-active-bg = "rgba(131,165,152,1)"; + index-active-fg = "rgba(80,73,69,1)"; + + inputbar-bg = "rgba(40,40,40,1)"; + inputbar-fg = "rgba(235,219,178,1)"; + + statusbar-bg = "rgba(80,73,69,1)"; + statusbar-fg = "rgba(235,219,178,1)"; + + highlight-color = "rgba(250,189,47,0.5)"; + highlight-active-color = "rgba(254,128,25,0.5)"; + + default-bg = "rgba(40,40,40,1)"; + default-fg = "rgba(235,219,178,1)"; + render-loading = true; + render-loading-bg = "rgba(40,40,40,1)"; + render-loading-fg = "rgba(235,219,178,1)"; + + recolor-lightcolor = "rgba(40,40,40,1)"; + recolor-darkcolor = "rgba(235,219,178,1)"; + recolor = true; + recolor-keephue = true; + }; + }; + xdg.mimeApps.defaultApplications = { + "application/pdf" = "org.pwmt.zathura.desktop"; + }; + }; +} diff --git a/home/modules/wm/utils/hypridle/default.nix b/home/modules/wm/utils/hypridle/default.nix index bdd11237..6922b9d7 100644 --- a/home/modules/wm/utils/hypridle/default.nix +++ b/home/modules/wm/utils/hypridle/default.nix @@ -1,10 +1,15 @@ { config, lib, + pkgs, + inputs, ... }: let inherit (lib) mkIf mkEnableOption; cfg = config.modules.wm.utils.hypridle; + + hypridleFlake = inputs.hypridle.packages.${pkgs.system}.hypridle; + # hypridlePkg = pkgs.hypridle; in { options = { modules.wm.utils.hypridle.enable = mkEnableOption "Enables hypridle"; @@ -12,6 +17,7 @@ in { config = mkIf cfg.enable { services.hypridle = { enable = true; + package = hypridleFlake; settings = { general = { lock_cmd = "hyprlock"; diff --git a/home/modules/wm/utils/hyprlock/default.nix b/home/modules/wm/utils/hyprlock/default.nix index dbead0b3..019e3cfe 100644 --- a/home/modules/wm/utils/hyprlock/default.nix +++ b/home/modules/wm/utils/hyprlock/default.nix @@ -7,6 +7,9 @@ }: let inherit (lib) mkIf mkEnableOption; cfg = config.modules.wm.utils.hyprlock; + + hyprlockFlake = inputs.hyprlock.packages.${pkgs.system}.hyprlock; + # hyprlockPkg = pkgs.hyprlock; in { options = { modules.wm.utils.hyprlock.enable = mkEnableOption "Enables hyprlock"; @@ -14,8 +17,8 @@ in { config = mkIf cfg.enable { programs.hyprlock = { enable = true; - package = inputs.hyprlock.packages.${pkgs.system}.hyprlock; - settings = { + package = hyprlockFlake; + settings = { general = { disable_loading_bar = true; hide_cursor = true; diff --git a/home/modules/wm/utils/hyprpaper/default.nix b/home/modules/wm/utils/hyprpaper/default.nix index c0a9a281..5984c9f7 100644 --- a/home/modules/wm/utils/hyprpaper/default.nix +++ b/home/modules/wm/utils/hyprpaper/default.nix @@ -1,10 +1,15 @@ { config, lib, + pkgs, + inputs, ... }: let inherit (lib) mkIf mkEnableOption; cfg = config.modules.wm.utils.hyprpaper; + + hyprpaperFlake = inputs.hyprpaper.packages.${pkgs.system}.default; + # hyprpaperPkg = pkgs.hyprpaper; in { options = { modules.wm.utils.hyprpaper.enable = mkEnableOption "Enables hyprpaper"; @@ -12,6 +17,7 @@ in { config = mkIf cfg.enable { services.hyprpaper = { enable = true; + package = hyprpaperFlake; settings = { ipc = "on"; splash = false; diff --git a/home/users/adam/modules.nix b/home/users/adam/modules.nix index ebba9178..5a0b6f18 100644 --- a/home/users/adam/modules.nix +++ b/home/users/adam/modules.nix @@ -14,73 +14,8 @@ }; }; devtools = { - nixvim = { + neovim = { enable = true; - plugins = { - barbar = { - enable = false; - }; - comment = { - enable = true; - }; - conform = { - enable = false; - }; - cmp = { - enable = true; - }; - copilot = { - enable = false; - }; - efm = { - enable = true; - }; - floaterm = { - enable = false; - }; - harpoon = { - enable = false; - }; - lsp = { - enable = true; - }; - lightline = { - enable = false; - }; - lualine = { - enable = true; - }; - markdown-preview = { - enable = true; - }; - neo-tree = { - enable = true; - }; - none-ls = { - enable = false; - }; - rustaceanvim = { - enable = true; - }; - startify = { - enable = true; - }; - tagbar = { - enable = false; - }; - telescope = { - enable = true; - }; - treesitter = { - enable = true; - }; - vimtex = { - enable = false; - }; - yanky = { - enable = false; - }; - }; }; vscode = { enable = false; diff --git a/home/users/cnst/modules.nix b/home/users/cnst/modules.nix index 06ea201e..73b0a712 100644 --- a/home/users/cnst/modules.nix +++ b/home/users/cnst/modules.nix @@ -14,73 +14,8 @@ }; }; devtools = { - nixvim = { + neovim = { enable = true; - plugins = { - barbar = { - enable = false; - }; - comment = { - enable = true; - }; - conform = { - enable = false; - }; - cmp = { - enable = true; - }; - copilot = { - enable = true; - }; - efm = { - enable = true; - }; - floaterm = { - enable = false; - }; - harpoon = { - enable = false; - }; - lsp = { - enable = true; - }; - lightline = { - enable = false; - }; - lualine = { - enable = true; - }; - markdown-preview = { - enable = true; - }; - neo-tree = { - enable = true; - }; - none-ls = { - enable = false; - }; - rustaceanvim = { - enable = true; - }; - startify = { - enable = true; - }; - tagbar = { - enable = false; - }; - telescope = { - enable = true; - }; - treesitter = { - enable = true; - }; - vimtex = { - enable = false; - }; - yanky = { - enable = false; - }; - }; }; vscode = { enable = false; @@ -104,6 +39,9 @@ kitty = { enable = true; }; + wezterm = { + enable = false; + }; zellij = { enable = false; }; @@ -135,6 +73,9 @@ yazi = { enable = true; }; + zathura = { + enable = true; + }; misc = { enable = true; }; diff --git a/home/users/toothpick/modules.nix b/home/users/toothpick/modules.nix index 4441d7c7..e2c0a150 100644 --- a/home/users/toothpick/modules.nix +++ b/home/users/toothpick/modules.nix @@ -14,73 +14,8 @@ }; }; devtools = { - nixvim = { + neovim = { enable = true; - plugins = { - barbar = { - enable = false; - }; - comment = { - enable = true; - }; - conform = { - enable = false; - }; - cmp = { - enable = true; - }; - copilot = { - enable = false; - }; - efm = { - enable = true; - }; - floaterm = { - enable = false; - }; - harpoon = { - enable = false; - }; - lsp = { - enable = true; - }; - lightline = { - enable = false; - }; - lualine = { - enable = true; - }; - markdown-preview = { - enable = true; - }; - neo-tree = { - enable = true; - }; - none-ls = { - enable = false; - }; - rustaceanvim = { - enable = true; - }; - startify = { - enable = true; - }; - tagbar = { - enable = false; - }; - telescope = { - enable = true; - }; - treesitter = { - enable = true; - }; - vimtex = { - enable = false; - }; - yanky = { - enable = false; - }; - }; }; vscode = { enable = true; diff --git a/hosts/default.nix b/hosts/default.nix index 9c48e2c6..65d8a0a7 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -55,6 +55,7 @@ ./toothpc "${mod}/boot/lanzaboote" "${mod}/nix/nh/toothpc" + "${mod}/dev" { home-manager = { users.toothpick.imports = homeImports."toothpick@toothpc"; @@ -63,7 +64,6 @@ } inputs.chaotic.nixosModules.default inputs.agenix.nixosModules.default - (import "${mod}/dev") ]; }; adampad = nixosSystem { @@ -74,6 +74,7 @@ ./adampad "${mod}/boot" "${mod}/nix/nh/adampad" + "${mod}/dev" { home-manager = { users.adam.imports = homeImports."adam@adampad"; diff --git a/system/dev/default.nix b/system/dev/default.nix index 8c27886f..c4b2209b 100644 --- a/system/dev/default.nix +++ b/system/dev/default.nix @@ -22,13 +22,23 @@ # Aquamarine: Hyprland's new compositor library aquamarine # Aquamarine compositor library for Wayland - # Other utilities and tools - openssl # Required for some crates that involve networking or encryption - alejandra + # Language servers, other utilities and tools + gcc + lua-language-server + nixd + openssl + php php84Packages.php-cs-fixer - # nixd - # pyright - # yaml-language-server - # lua-language-server + phpactor + python312Packages.python-lsp-server + + # Formatters + alejandra + stylua + nodePackages_latest.fixjson + nodePackages_latest.sql-formatter + prettierd + shfmt + black ]; } diff --git a/system/pkgs/wezterm/default.nix b/system/pkgs/wezterm/default.nix new file mode 100644 index 00000000..d27c3289 --- /dev/null +++ b/system/pkgs/wezterm/default.nix @@ -0,0 +1,94 @@ +{ + lib, + ncurses, + pkg-config, + fontconfig, + installShellFiles, + openssl, + libGL, + libX11, + libxkbcommon, + xcbutil, + xcbutilimage, + wayland, + nixosTests, + runCommand, + wezterm-flake, + naersk, +}: let + date = lib.substring 0 8 wezterm-flake.lastModifiedDate; # YYYYMMDD + time = lib.substring 8 14 wezterm-flake.lastModifiedDate; # HHMMSS + rev = lib.substring 0 8 wezterm-flake.rev; +in + naersk.buildPackage rec { + name = "wezterm"; + # git -c core.abbrev=8 show -s --format=%cd-%h --date=format:%Y%m%d-%H%M%S | wl-copy -n + version = "${date}-${time}-${rev}"; + + src = wezterm-flake; + gitSubmodules = true; + + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; + + buildInputs = [ + fontconfig + libX11 + libxkbcommon + openssl + wayland + xcbutil + xcbutilimage + ]; + + cargoBuildOptions = x: x ++ ["--features distro-defaults"]; + + overrideMain = {...}: { + postPatch = '' + echo ${version} > .tag + + # tests are failing with: Unable to exchange encryption keys + rm -r wezterm-ssh/tests + ''; + + postInstall = '' + mkdir -p $out/nix-support + echo "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages + + install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png + install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop + install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml + + install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d + installShellCompletion --cmd wezterm \ + --bash assets/shell-completion/bash \ + --fish assets/shell-completion/fish \ + --zsh assets/shell-completion/zsh + + install -Dm644 assets/wezterm-nautilus.py -t $out/share/nautilus-python/extensions + ''; + + preFixup = '' + patchelf --add-needed "${libGL}/lib/libEGL.so.1" $out/bin/wezterm-gui + ''; + }; + + passthru = { + tests = { + all-terminfo = nixosTests.allTerminfo; + terminal-emulators = nixosTests.terminal-emulators.wezterm; + }; + terminfo = + runCommand "wezterm-terminfo" + { + nativeBuildInputs = [ + ncurses + ]; + } '' + mkdir -p $out/share/terminfo $out/nix-support + tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo + ''; + }; + }