diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..5eef6fe --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,35 @@ +# Comment Style Guide + +For `.nix` files only. Not for prose docs, copied upstream option descriptions, or commit messages. + +## Rules + +- Keep comments short, local, ASCII, and indented to the code they describe. +- Write sentence fragments in present tense and start with `#`. +- Prefer standalone comments above code, not trailing comments. +- Comment intent, rationale, constraints, non-obvious transformations, generated structure, or meaningful grouping. +- Skip comments for self-explanatory assignments, simple `inherit` blocks unless a subgroup needs a label, obvious enable flags, boilerplate module structure, and syntax boundaries like `let`, `in`, `{}`, `with`, or lambda heads. + +## Placement + +- Put comments directly above the smallest useful binding, attrset, list, or expression. +- Group comments directly above the grouped block. +- Comments inside lists or attrsets are fine when labeling a subsection. +- Do not put comments after `{ ... }:` or `_:` before `let`, or anywhere between a module or lambda head and `let`. +- Do not use comments as spacers above `let`. +- If a whole-block comment would otherwise go there, put it as the first meaningful line inside `in {`. + +## Allowed Exceptions + +- Preserve `keep-sorted` and similar tool-control comments. +- Rare TODOs may use `# TODO(): ...`. +- Existing emphatic or humorous comments are fine if they still help readability. +- Upstream-style package headings or labels are fine when preserving imported structure helps. + +## Review Standard + +- Delete comments that only restate code. +- Move misplaced file or block comments below `in {` in `let`-using files. +- Keep comments attached to the exact code they explain. +- Preserve required control comments. +- Prefer deleting a weak comment over keeping noise. diff --git a/flake.lock b/flake.lock index e1232be..ba38894 100644 --- a/flake.lock +++ b/flake.lock @@ -1,36 +1,103 @@ { "nodes": { - "abseil-src": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778620495, + "narHash": "sha256-Gu7UhWjwKCgSiVC3Qz/Rc7cYi9DNuDTBxYzg3kfLvfM=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "be35f75ac305f430f5f9d89b5f5a4af59ca7567e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + } + }, + "base16-helix": { "flake": false, "locked": { - "lastModified": 1722535511, - "narHash": "sha256-51jpDhdZ0n+KLmxh8KVaTz53pZAB0dHjmILFX+OLud4=", - "owner": "abseil", - "repo": "abseil-cpp", - "rev": "4447c7562e3bc702ade25105912dce503f0c4010", + "lastModified": 1776754714, + "narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581", "type": "github" }, "original": { - "owner": "abseil", - "ref": "20240722.0", - "repo": "abseil-cpp", + "owner": "tinted-theming", + "repo": "base16-helix", "type": "github" } }, - "asio-src": { + "base16-vim": { "flake": false, "locked": { - "lastModified": 1702548444, - "narHash": "sha256-8Xo6J6+dTvDtsthjbLMMTInHMDnMMM0rQwzbZu70J/s=", - "owner": "chriskohlhoff", - "repo": "asio", - "rev": "22ccfc94fc77356f7820601f9f33b9129a337d2d", + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", "type": "github" }, "original": { - "owner": "chriskohlhoff", - "ref": "asio-1-30-0", - "repo": "asio", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", "type": "github" } }, @@ -49,23 +116,6 @@ "type": "github" } }, - "curl-src": { - "flake": false, - "locked": { - "lastModified": 1743572790, - "narHash": "sha256-huAGWNm2rYBmgzUuYQ21IYp2skyQECelEkXPMBJY3cE=", - "owner": "curl", - "repo": "curl", - "rev": "1c3149881769e7bd79b072e48374e4c2b3678b2f", - "type": "github" - }, - "original": { - "owner": "curl", - "ref": "curl-8_13_0", - "repo": "curl", - "type": "github" - } - }, "determinate": { "inputs": { "determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin", @@ -123,6 +173,42 @@ "url": "https://install.determinate.systems/determinate-nixd/tag/v3.20.0/x86_64-linux" } }, + "eh": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778749419, + "narHash": "sha256-SayfylyfDvjOwMj4hfkvM8lY6CAdWju741FAhq/nYus=", + "owner": "NotAShelf", + "repo": "eh", + "rev": "3475917b4276cbc8b668f2ddf3b4f4214d91ca8f", + "type": "github" + }, + "original": { + "owner": "NotAShelf", + "repo": "eh", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1776136500, + "narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "0f8ba203d475587f477e7ae12661bd8459e225b7", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -140,6 +226,22 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -153,7 +255,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_3": { + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1751685974, @@ -212,11 +314,11 @@ ] }, "locked": { - "lastModified": 1777988971, - "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "type": "github" }, "original": { @@ -225,6 +327,38 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "ghostty-cursor-shaders": { + "flake": false, + "locked": { + "lastModified": 1778252515, + "narHash": "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=", + "owner": "sahaj-b", + "repo": "ghostty-cursor-shaders", + "rev": "06d4e90fb5410e9c4d0b3131584060adddf89406", + "type": "github" + }, + "original": { + "owner": "sahaj-b", + "repo": "ghostty-cursor-shaders", + "type": "github" + } + }, "git-hooks-nix": { "inputs": { "flake-compat": "flake-compat", @@ -251,6 +385,45 @@ "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" } }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-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" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1767737596, + "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "github" + }, + "original": { + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -258,11 +431,11 @@ ] }, "locked": { - "lastModified": 1778248595, - "narHash": "sha256-dhFgEjoeJMYN/7OY6xfxS799YB4IjbbYXTjyGIJyLpc=", + "lastModified": 1778921576, + "narHash": "sha256-jgIbBcGgKTtkp+lBas29hNFUU1t5O/2+GFvUjbiG0vM=", "owner": "nix-community", "repo": "home-manager", - "rev": "fdb2ccba9d5e1238d32e0c4a3ec1a277efa80c1d", + "rev": "32b42d71b4b22c4465963285bb6e462d7c93d45e", "type": "github" }, "original": { @@ -271,35 +444,369 @@ "type": "github" } }, - "import-tree": { + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, "locked": { - "lastModified": 1773693634, - "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=", - "owner": "vic", - "repo": "import-tree", - "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1", + "lastModified": 1776511930, + "narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "39435900785d0c560c6ae8777d29f28617d031ef", "type": "github" }, "original": { - "owner": "vic", - "repo": "import-tree", + "owner": "hyprwm", + "repo": "hyprcursor", "type": "github" } }, - "json-src": { - "flake": false, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776426399, + "narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1778712946, + "narHash": "sha256-Dn4NCfBRCZ6PW/8C7grx9HyVb8WC8YNRCkRMMa5xRhQ=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "a47147bc095e5b3be3eb8bd04f0ac242b968cd4d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.55.1", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776426575, + "narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "a968d211048e3ed538e47b84cb3649299578f19d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-plugins": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "hyprland-plugins", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland-plugins", + "hyprland", + "systems" + ] + }, "locked": { - "lastModified": 1744360948, - "narHash": "sha256-cECvDOLxgX7Q9R3IE86Hj9JJUxraDQvhoyPDF03B2CY=", - "owner": "nlohmann", - "repo": "json", - "rev": "55f93686c01528224f448c19128836e7df245f72", + "lastModified": 1778669258, + "narHash": "sha256-WMUJ7tyw/9QbKUyRzLndEQSqX05fQLmFlRdMAmPD7tI=", + "owner": "hyprwm", + "repo": "hyprland-plugins", + "rev": "90e66baf99c9025b1d5e9c9e58dd3c80d0911ea2", "type": "github" }, "original": { - "owner": "nlohmann", - "ref": "v3.12.0", - "repo": "json", + "owner": "hyprwm", + "ref": "v0.55.0", + "repo": "hyprland-plugins", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772460177, + "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777320127, + "narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "090117506ddc3d7f26e650ff344d378c2ec329cc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1772462885, + "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778234770, + "narHash": "sha256-jAcsogZwWMfXT9MfXxZzkwliAqIuZUV0p71h6Ba9ReE=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "a2dbd8a4cc51f7cbe4224732668392bb1aa79df2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777159683, + "narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778410714, + "narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, + "import-tree": { + "locked": { + "lastModified": 1778781969, + "narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=", + "owner": "vic", + "repo": "import-tree", + "rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", "type": "github" } }, @@ -322,27 +829,19 @@ }, "millennium": { "inputs": { - "abseil-src": "abseil-src", - "asio-src": "asio-src", - "curl-src": "curl-src", - "json-src": "json-src", "luajit-src": "luajit-src", "millennium-src": "millennium-src", - "minizip-src": "minizip-src", "nixpkgs": [ "nixpkgs" - ], - "re2-src": "re2-src", - "websocketpp-src": "websocketpp-src", - "zlib-src": "zlib-src" + ] }, "locked": { "dir": "packages/nix", - "lastModified": 1778350203, - "narHash": "sha256-WxvERW1lbN2hnb/EuM4aoGh0fJUUiTYT/j8WbFPNa5w=", + "lastModified": 1778870989, + "narHash": "sha256-0GHc0BjLwPIqJxlD8SrG2baM1nXdIt/yc8UbQvyh/Go=", "owner": "SteamClientHomebrew", "repo": "Millennium", - "rev": "fa9d1ac5bd11fb22f5a5f696f15eff82a08049ee", + "rev": "b59659da33ee5094cdbff6adb0b71c25bbb335ed", "type": "github" }, "original": { @@ -355,34 +854,17 @@ "millennium-src": { "flake": false, "locked": { - "lastModified": 1770463863, - "narHash": "sha256-MceGTpXobCAh5Ll/1iTWcEf6/nHY3Ll1t06JxbYc+Co=", + "lastModified": 1778867291, + "narHash": "sha256-NAnUiDGX+dHSj6OgmJgTEnNHyL8WkOGxxt3T3NDoI/Q=", "owner": "SteamClientHomebrew", "repo": "Millennium", - "rev": "1bc62c94a06f25f7e8d7e269f11cd968cf576bff", + "rev": "233f417dd99b3ece34d15b75e7cf5fd9d4487f15", "type": "github" }, "original": { "owner": "SteamClientHomebrew", - "repo": "Millennium", - "rev": "1bc62c94a06f25f7e8d7e269f11cd968cf576bff", - "type": "github" - } - }, - "minizip-src": { - "flake": false, - "locked": { - "lastModified": 1746408966, - "narHash": "sha256-I3CZwtfJMsZYQOMdGhooUN8vssnQj6rCzv8F+rne3vg=", - "owner": "zlib-ng", - "repo": "minizip-ng", - "rev": "f3ed731e27a97e30dffe076ed5e0537daae5c1bd", - "type": "github" - }, - "original": { - "owner": "zlib-ng", - "ref": "4.0.10", - "repo": "minizip-ng", + "repo": "Millennium", + "rev": "233f417dd99b3ece34d15b75e7cf5fd9d4487f15", "type": "github" } }, @@ -466,11 +948,11 @@ ] }, "locked": { - "lastModified": 1778240325, - "narHash": "sha256-d2HIS7LpfI0lgxiXCXLjxrHl3eIdNvAVexOu0xiM488=", + "lastModified": 1778393439, + "narHash": "sha256-mOtQxUjtKaPHLeoLOY/YEDctmud1X9KwJr4kE1MJ3Wc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "dd2d0e3f6ba00af01b9498f5697173bdc2524bee", + "rev": "01466c414c7357ae2ce32be4a272a7c69e94ab5f", "type": "github" }, "original": { @@ -481,21 +963,19 @@ }, "nixcord": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": [ "flake-parts" ], - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_4", "nixpkgs-nixcord": "nixpkgs-nixcord" }, "locked": { - "lastModified": 1778346777, - "narHash": "sha256-7gpzB8MDCMcRE0wDr7jjxK7/obfeiyAulsfQEsK9pi4=", + "lastModified": 1778921362, + "narHash": "sha256-Pcx1oofZA6tdqLsdq3Ytid+L8c8McX/vEMKRRvhQfwU=", "owner": "kaylorben", "repo": "nixcord", - "rev": "43930a83206bcdcf3ba4fc10aa4fb9c5f7a677e6", + "rev": "834075983d701685a70e73c7dddf5da1e7876c98", "type": "github" }, "original": { @@ -504,6 +984,32 @@ "type": "github" } }, + "nixhypr": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1778139329, + "narHash": "sha256-Se3RyYawVa5c98wKYBiDOX7+2vQJaTSxCnWjk6sKb9o=", + "owner": "karol-broda", + "repo": "nixhypr", + "rev": "983159d34bb7a46c0bfaf9491ea00290b102210e", + "type": "github" + }, + "original": { + "owner": "karol-broda", + "repo": "nixhypr", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1773222311, @@ -536,11 +1042,11 @@ }, "nixpkgs-nixcord": { "locked": { - "lastModified": 1777428379, - "narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=", + "lastModified": 1778003029, + "narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "755f5aa91337890c432639c60b6064bb7fe67769", + "rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5", "type": "github" }, "original": { @@ -582,17 +1088,95 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1778274207, - "narHash": "sha256-lMg7Dj7kyGN5cj9RGag5Is100HnQPKM9zEsuAOL2TLA=", - "rev": "b3da656039dc7a6240f27b2ef8cc6a3ef3bccae7", + "lastModified": 1778443072, + "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1778003029, + "narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1778794387, + "narHash": "sha256-9yR9UAI7ZI5a98+eTkNFl8XogSQxU8bF3+pAU5zvuYI=", + "rev": "8a1b0127302ea51e05bf4ea5a291743fac442406", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre994919.b3da656039dc/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre998133.8a1b0127302e/nixexprs.tar.xz" }, "original": { "type": "tarball", "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "noctalia-qs": [ + "noctalia-qs" + ] + }, + "locked": { + "lastModified": 1778694557, + "narHash": "sha256-QszLpoDPD7JEv8B/w1U2u1ksBw/CYBDmwUTLhJrekF0=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "3abfa1fc09b62dc4cdeeb7b787886f075696f0b7", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "ref": "v4.7.7", + "repo": "noctalia-shell", + "type": "github" + } + }, + "noctalia-qs": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1778377995, + "narHash": "sha256-uUzHDHqQF1rdVNiTa05L0mML3/d7fpbAShjCRWxbrBQ=", + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "rev": "d8327a723eed6dd9aebe8e0b162126f390e827df", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -603,11 +1187,11 @@ ] }, "locked": { - "lastModified": 1778362002, - "narHash": "sha256-X0nD1mJ23HKKCkvJ6DRGYIh7IqmwxOIj+Z/6XWQb5gM=", + "lastModified": 1778922546, + "narHash": "sha256-OR7V4uG8WfAoZh4HE0fGBWGPDzgqKfyJkFgL7QdHCd0=", "owner": "nix-community", "repo": "NUR", - "rev": "b4040f8b7b12b8f9c58abbb5c0aafc9cee9f6cf7", + "rev": "65936b3620f4b3ad7f39a6c29029e3c9366fd796", "type": "github" }, "original": { @@ -618,7 +1202,7 @@ }, "nvf": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-parts": [ "flake-parts" ], @@ -627,14 +1211,14 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems" + "systems": "systems_3" }, "locked": { - "lastModified": 1778347034, - "narHash": "sha256-iS2+fFwP5QL3KlFxmv07RypfOUa6tOpXX4vt9BSiZO8=", + "lastModified": 1778921573, + "narHash": "sha256-q1NHRnAJ/JIopHXV+jGXpU8K07za1YXKuiOo40euouo=", "owner": "adam01110", "repo": "nvf", - "rev": "78a1e46f6d651e4d5f5fac6bd72e57602114d915", + "rev": "accc4dd7e0fca0a7d02b9556377296fe85627f1f", "type": "github" }, "original": { @@ -644,39 +1228,85 @@ "type": "github" } }, - "re2-src": { - "flake": false, + "overzicht": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "import-tree": [ + "import-tree" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_4", + "treefmt-nix": [ + "treefmt-nix" + ] + }, "locked": { - "lastModified": 1762353507, - "narHash": "sha256-0J1HVk+eR7VN0ymucW9dNlT36j16XIfCzcs1EVyEIEU=", - "owner": "google", - "repo": "re2", - "rev": "927f5d53caf8111721e734cf24724686bb745f55", + "lastModified": 1778887376, + "narHash": "sha256-WB6H6PdSyWzTCawq8onNlM/anWNccRNik4YqsYAu02k=", + "owner": "adam01110", + "repo": "overzicht", + "rev": "ebac9aed698496a167b67e453071e2c071e7e5e3", + "type": "github" + }, + "original": { + "owner": "adam01110", + "repo": "overzicht", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "type": "github" }, "original": { - "owner": "google", - "ref": "2025-11-05", - "repo": "re2", + "owner": "cachix", + "repo": "git-hooks.nix", "type": "github" } }, "root": { "inputs": { "determinate": "determinate", + "eh": "eh", "flake-file": "flake-file", "flake-parts": "flake-parts_2", + "ghostty-cursor-shaders": "ghostty-cursor-shaders", "home-manager": "home-manager", + "hyprland": "hyprland", + "hyprland-plugins": "hyprland-plugins", "import-tree": "import-tree", "millennium": "millennium", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", "nixcord": "nixcord", - "nixpkgs": "nixpkgs_3", + "nixhypr": "nixhypr", + "nixpkgs": "nixpkgs_5", + "noctalia": "noctalia", + "noctalia-qs": "noctalia-qs", "nur": "nur", "nvf": "nvf", + "overzicht": "overzicht", "sops-nix": "sops-nix", - "treefmt-nix": "treefmt-nix", + "spicetify-nix": "spicetify-nix", + "stylix": "stylix", + "treefmt-nix": "treefmt-nix_2", "tuigreet": "tuigreet", "zen-browser": "zen-browser" } @@ -689,11 +1319,11 @@ ] }, "locked": { - "lastModified": 1777346187, - "narHash": "sha256-oVxyGjpiIsrXhWTJVUOs38fZQkLjd0nZGOY9K7Kfot8=", + "lastModified": 1778555852, + "narHash": "sha256-55EmwooVAS4UpA0oWd5wilKPRqCiHD5BAej9QiNwheY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "146e7bf7569b8288f24d41d806b9f584f7cfd5b5", + "rev": "f29b0f7a9f367e0056b716f8aa137cb41e784444", "type": "github" }, "original": { @@ -722,7 +1352,140 @@ "type": "github" } }, + "spicetify-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_5" + }, + "locked": { + "lastModified": 1778793632, + "narHash": "sha256-HYHD6J64bAWB2iT00lyyTn0wWcb0POtV+nPshYvq6Uc=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "e175a8b634e06a1b0635ec3d4db2c72cdc41fd15", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "spicetify-nix", + "type": "github" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": [ + "flake-parts" + ], + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": [ + "nur" + ], + "systems": "systems_6", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1778776709, + "narHash": "sha256-YhnEcpiY6+l3RFA+cPmdTaeODGvNRuqE8B7VBjPVIxo=", + "owner": "danth", + "repo": "stylix", + "rev": "e8ea85b4f7dddda9603e0f1ac86cd92cee3b2819", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -737,7 +1500,92 @@ "type": "github" } }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1777041405, + "narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "5f868b3a338b6904c47f3833b9c411be641983a8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1777169200, + "narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1777463218, + "narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "5768d08ed2e7944a26a958868cdb073cb8856dae", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "noctalia-qs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775636079, + "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -766,11 +1614,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1777962859, - "narHash": "sha256-uQ3n+OHXOIasEireYS+zTSHzxKYZL+CRF4VSz/mA99M=", + "lastModified": 1778842706, + "narHash": "sha256-clofLNZWBununCewLVQr86TpVgI/oeAWuIZpE28R1RY=", "owner": "notashelf", "repo": "tuigreet", - "rev": "83b2b88d72ad067be1eb8556168321c4afc45898", + "rev": "8e77e88b3d08298e3a369e4a8ebf574ea5d49679", "type": "github" }, "original": { @@ -779,20 +1627,44 @@ "type": "github" } }, - "websocketpp-src": { - "flake": false, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, "locked": { - "lastModified": 1587320717, - "narHash": "sha256-9fIwouthv2GcmBe/UPvV7Xn9P2o0Kmn2hCI4jCh0hPM=", - "owner": "zaphoyd", - "repo": "websocketpp", - "rev": "56123c87598f8b1dd471be83ca841ceae07f95ba", + "lastModified": 1778265244, + "narHash": "sha256-8jlPtGSsv/CQY6tVVyLF4Jjd0gnS+Zbn9yk/V13A9nM=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "813ea5ca9a1702a9a2d1f5836bc00172ef698968", "type": "github" }, "original": { - "owner": "zaphoyd", - "ref": "0.8.2", - "repo": "websocketpp", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", "type": "github" } }, @@ -806,11 +1678,11 @@ ] }, "locked": { - "lastModified": 1778364338, - "narHash": "sha256-M5pNb49KwPNuUy19ZRDNaN4q83i0vn0m+cZpScDASYs=", + "lastModified": 1778799443, + "narHash": "sha256-lNFVDKuh5xJn+VrF8gI+EmFmUgRlmQZWxQHJGNLqcp0=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "786e44a74fbec15ea1fb72b949548812391be8c4", + "rev": "2a400947d9b911ab6b3073de7d6bb43f04cc0479", "type": "github" }, "original": { @@ -819,23 +1691,6 @@ "repo": "zen-browser-flake", "type": "github" } - }, - "zlib-src": { - "flake": false, - "locked": { - "lastModified": 1754565515, - "narHash": "sha256-c2RYqHi3hj/ViBzJcYWoNib27GAbq/B1SJUfvG7CPG4=", - "owner": "zlib-ng", - "repo": "zlib-ng", - "rev": "425439062b114a0f6cf625022c41d929c7e879f9", - "type": "github" - }, - "original": { - "owner": "zlib-ng", - "ref": "2.2.5", - "repo": "zlib-ng", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 92a75c7..a1ef959 100644 --- a/flake.nix +++ b/flake.nix @@ -5,15 +5,28 @@ inputs = { determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; + eh = { + url = "github:NotAShelf/eh"; + inputs.nixpkgs.follows = "nixpkgs"; + }; flake-file.url = "github:vic/flake-file"; flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; + ghostty-cursor-shaders = { + url = "github:sahaj-b/ghostty-cursor-shaders"; + flake = false; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "github:hyprwm/Hyprland?ref=v0.55.1"; + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins?ref=v0.55.0"; + inputs.hyprland.follows = "hyprland"; + }; import-tree.url = "github:vic/import-tree"; millennium = { url = "github:SteamClientHomebrew/Millennium?dir=packages/nix"; @@ -26,12 +39,28 @@ }; nixcord = { url = "github:kaylorben/nixcord"; + inputs.flake-parts.follows = "flake-parts"; + }; + nixhypr = { + url = "github:karol-broda/nixhypr"; inputs = { - flake-parts.follows = "flake-parts"; + hyprland.follows = "hyprland"; nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; }; }; nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; + noctalia = { + url = "github:noctalia-dev/noctalia-shell?ref=v4.7.7"; + inputs = { + nixpkgs.follows = "nixpkgs"; + noctalia-qs.follows = "noctalia-qs"; + }; + }; + noctalia-qs = { + url = "github:noctalia-dev/noctalia-qs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nur = { url = "github:nix-community/NUR"; inputs = { @@ -46,10 +75,31 @@ nixpkgs.follows = "nixpkgs"; }; }; + overzicht = { + url = "github:adam01110/overzicht"; + inputs = { + flake-parts.follows = "flake-parts"; + import-tree.follows = "import-tree"; + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + }; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { + url = "github:danth/stylix"; + inputs = { + flake-parts.follows = "flake-parts"; + nixpkgs.follows = "nixpkgs"; + nur.follows = "nur"; + }; + }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/lib/stylix.nix b/lib/stylix.nix index 5e0695d..709132c 100644 --- a/lib/stylix.nix +++ b/lib/stylix.nix @@ -54,7 +54,7 @@ mixChannel = alpha: bg: fg: div (bg * (100 - alpha) + fg * alpha) 100; in { # Select the base0* palette used by nix-userstyles and similar consumers. - stylixPalette = osConfig: filterAttrs (name: _: hasPrefix "base0" name) osConfig.lib.stylix.colors; + stylixPalette = config: filterAttrs (name: _: hasPrefix "base0" name) config.lib.stylix.colors; # Blend a hex foreground color toward a hex background color. blendHex = alpha: bg: fg: let diff --git a/lib/yazi.nix b/lib/yazi.nix index f76aa62..37a88e2 100644 --- a/lib/yazi.nix +++ b/lib/yazi.nix @@ -1,19 +1,6 @@ -{lib}: let - inherit (builtins) attrNames; - inherit (lib) concatMapStringsSep; - inherit (lib.generators) toLua; -in { +_: { mkYaziUrlEntries = run: map (url: { inherit url run; }); - - mkYaziPluginSetup = name: setupOpts: '' - require("${name}"):setup(${toLua {} setupOpts}) - ''; - - mkYaziPluginSetups = pluginSetupOpts: - concatMapStringsSep "\n" (name: '' - require("${name}"):setup(${toLua {} pluginSetupOpts.${name}}) - '') (attrNames pluginSetupOpts); } diff --git a/modules/capabilities.nix b/modules/capabilities.nix new file mode 100644 index 0000000..52bea6b --- /dev/null +++ b/modules/capabilities.nix @@ -0,0 +1,12 @@ +{lib, ...}: let + inherit (lib) mkEnableOption; +in { + flake.modules.nixos.capabilities = { + options.capabilities = { + # keep-sorted start + bluetooth = mkEnableOption "bluetooth support"; + wifi = mkEnableOption "wifi support"; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/cliphist.nix b/modules/desktop/cliphist.nix new file mode 100644 index 0000000..51e52d7 --- /dev/null +++ b/modules/desktop/cliphist.nix @@ -0,0 +1,5 @@ +{ + flake.modules.homeManager.cliphist = _: { + services.cliphist.enable = true; + }; +} diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix new file mode 100644 index 0000000..930f38b --- /dev/null +++ b/modules/desktop/hyprland/default.nix @@ -0,0 +1,110 @@ +{self, ...}: { + flake-file.inputs = { + hyprland.url = "github:hyprwm/Hyprland?ref=v0.55.1"; + + nixhypr = { + url = "github:karol-broda/nixhypr"; + inputs = { + # keep-sorted start + hyprland.follows = "hyprland"; + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + # keep-sorted end + }; + }; + }; + + flake.modules.nixos.hyprland = { + # keep-sorted start + inputs, + pkgs, + # keep-sorted end + ... + }: let + inherit (pkgs.stdenv.hostPlatform) system; + + pkgs-unstable = inputs.hyprland.inputs.nixpkgs.legacyPackages.${system}; + in { + imports = [self.modules.nixos.uwsm]; + + nixpkgs.overlays = [self.overlays.hyprland]; + + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + }; + + hardware.graphics = { + enable32Bit = true; + + package = pkgs-unstable.mesa; + package32 = pkgs-unstable.pkgsi686Linux.mesa; + }; + }; + + flake.modules.homeManager.hyprland = { + # keep-sorted start + + config, + inputs, + lib, + pkgs, ... + # keep-sorted end + }: let + inherit + (lib) + # keep-sorted start + concatStringsSep + mkOption + types + # keep-sorted end + ; + + cfg = config.programs.nixhypr; + in { + imports = [ + # keep-sorted start + inputs.nixhypr.homeManagerModules.default + self.modules.homeManager.uwsm + # keep-sorted end + ]; + + options.programs.nixhypr = { + extraLuaSnippets = mkOption { + type = types.listOf types.lines; + default = []; + description = "Lua snippets concatenated into nixhypr's extraLua."; + }; + }; + + config = { + wayland.windowManager.hyprland = { + enable = true; + + # Packages are null because its installed sytem wide. + package = null; + portalPackage = null; + }; + + # keep-sorted start block=yes newline_separated=yes + # Install hyprpicker for the color-pick keybind. + home.packages = [pkgs.hyprpicker]; + + # Enable hyprcursor theme support. + home.pointerCursor.hyprcursor.enable = true; + + # Enable hyprshot for screenshotting with hyprland. + programs = { + hyprshot.enable = true; + + nixhypr = { + enable = true; + extraLua = concatStringsSep "\n" cfg.extraLuaSnippets; + }; + }; + + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/hyprland/overlay.nix b/modules/desktop/hyprland/overlay.nix new file mode 100644 index 0000000..ff2fdfd --- /dev/null +++ b/modules/desktop/hyprland/overlay.nix @@ -0,0 +1,14 @@ +{inputs, ...}: { + flake.overlays.hyprland = final: _prev: let + inherit (final.stdenv.hostPlatform) system; + packages = inputs.hyprland.packages.${system}; + in { + inherit + (packages) + # keep-sorted start + hyprland + xdg-desktop-portal-hyprland + # keep-sorted end + ; + }; +} diff --git a/modules/desktop/hyprland/plugins.nix b/modules/desktop/hyprland/plugins.nix new file mode 100644 index 0000000..ffe39da --- /dev/null +++ b/modules/desktop/hyprland/plugins.nix @@ -0,0 +1,47 @@ +{ + # keep-sorted start + inputs, + self, + ... + # keep-sorted end +}: { + flake-file.inputs = { + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins?ref=v0.55.0"; + inputs.hyprland.follows = "hyprland"; + }; + }; + + flake.modules.homeManager.hyprland = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + + nixpkgs.overlays = [self.overlays.hyprland-plugins]; + + wayland.windowManager.hyprland.plugins = [pkgs.hyprlandPlugins.hyprfocus]; + + programs.nixhypr = { + extraLuaSnippets = [ + '' + -- add hyprsplit and configure it. + local hs = dofile("${pkgs.nur.repos.adam0.hyprsplit}/init.lua") + hs.config({ num_workspaces = 8 }) + '' + ]; + + settings.plugin.hyprfocus = { + # keep-sorted start + bounce_strength = 0.995; + mode = "bounce"; + # keep-sorted end + }; + }; + }; + + flake.overlays.hyprland-plugins = final: prev: let + inherit (final.stdenv.hostPlatform) system; + in { + hyprlandPlugins = + prev.hyprlandPlugins + // {inherit (inputs.hyprland-plugins.packages.${system}) hyprfocus;}; + }; +} diff --git a/modules/desktop/hyprland/rules.nix b/modules/desktop/hyprland/rules.nix new file mode 100644 index 0000000..fcf0e90 --- /dev/null +++ b/modules/desktop/hyprland/rules.nix @@ -0,0 +1,334 @@ +{ + flake.modules.homeManager.hyprland = { + # keep-sorted start + config, + inputs, + lib, + osConfig, + pkgs, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + escapeRegex + getExe + getExe' + # keep-sorted end + ; + + # keep-sorted start + equibop = getExe config.programs.nixcord.equibop.package; + grim = getExe pkgs.grim; + hyprctl = getExe' osConfig.programs.hyprland.package "hyprctl"; + hyprpicker = getExe pkgs.hyprpicker; + quickshell = getExe' inputs.noctalia-qs.packages.${pkgs.stdenv.hostPlatform.system}.quickshell ".quickshell-wrapped"; + xdg-desktop-portal-hyprland = getExe' osConfig.programs.hyprland.portalPackage ".xdg-desktop-portal-hyprland-wrapped"; + # keep-sorted end + in { + programs.nixhypr = { + permissions = [ + { + allow = "allow"; + binary = escapeRegex hyprctl; + type = "plugin"; + } + + # keep-sorted start block=yes newline_separated=yes + { + type = "screencopy"; + allow = "allow"; + binary = escapeRegex equibop; + } + + { + type = "screencopy"; + allow = "allow"; + binary = escapeRegex grim; + } + + { + type = "screencopy"; + allow = "allow"; + binary = escapeRegex hyprpicker; + } + + { + type = "screencopy"; + allow = "allow"; + binary = escapeRegex quickshell; + } + + { + type = "screencopy"; + allow = "allow"; + binary = escapeRegex xdg-desktop-portal-hyprland; + } + # keep-sorted end + ]; + + rules = { + layer = [ + # keep-sorted start block=yes newline_separated=yes + { + match.namespace = "hyprpicker"; + + no_anim = true; + } + + { + match.namespace = "noctalia-background-.*$"; + + # keep-sorted start + blur = true; + blur_popups = true; + ignore_alpha = 0.94; + # keep-sorted end + } + + { + match.namespace = "noctalia.+"; + + no_anim = true; + } + + { + match.namespace = "overzicht"; + + # keep-sorted start + blur = true; + blur_popups = true; + ignore_alpha = 0.94; + # keep-sorted end + } + + { + match.namespace = "selection"; + + no_anim = true; + } + # keep-sorted end + ]; + + window = [ + # keep-sorted start block=yes newline_separated=yes + { + match = { + # keep-sorted start + class = ".protonvpn-app-wrapped"; + title = "Proton VPN"; + # keep-sorted end + }; + + size = [400 600]; + } + + { + match = { + # keep-sorted start + class = "com.mitchellh.ghostty"; + title = "Wiremix"; + # keep-sorted end + }; + + # keep-sorted start + pseudo = true; + size = [1000 630]; + # keep-sorted end + } + + { + match = { + # keep-sorted start + class = "file-.+"; + title = "Export Image as .+"; + # keep-sorted end + }; + + size = [670 513]; + } + + { + match = { + # keep-sorted start + class = "org.gnome.seahorse.Application"; + title = ".+ — Private key"; + # keep-sorted end + }; + + size = [568 720]; + } + + { + match = { + # keep-sorted start + class = "org.gnome.seahorse.Application"; + title = "Item Properties"; + # keep-sorted end + }; + + size = [400 520]; + } + + { + match = { + # keep-sorted start + class = "steam"; + title = "Friends List"; + # keep-sorted end + }; + + # keep-sorted start + float = true; + size = [380 540]; + # keep-sorted end + } + + { + match = { + # keep-sorted start + class = "steam"; + title = "Steam Settings"; + # keep-sorted end + }; + + float = true; + } + + { + match = { + # keep-sorted start + class = "zen(-beta)?"; + title = "Bitwarden"; + # keep-sorted end + }; + + # keep-sorted start + float = true; + size = [450 800]; + # keep-sorted end + } + + { + match = { + class = "BeeperTexts"; + title = "Settings"; + }; + + # keep-sorted start + float = true; + size = [900 900]; + # keep-sorted end + } + + { + match.class = "Aseprite"; + + tile = true; + } + + { + match.class = "BeeperTexts"; + + no_initial_focus = true; + } + + { + match.class = "com.mitchellh.ghostty"; + + opacity = "1 override 1 override"; + } + + { + match.class = "equibop"; + + # keep-sorted start + no_blur = true; + opacity = "1 override 1 override"; + # keep-sorted end + } + + { + match.class = "file-.+"; + + float = true; + } + + { + match.class = "io.mrarm.mcpelauncher-ui-qt"; + + tile = true; + } + + { + match.class = "me.iepure.devtoolbox"; + + # keep-sorted start + center = true; + float = true; + size = [1130 750]; + # keep-sorted end + } + + { + match.class = "org.gnome.Calculator"; + + # keep-sorted start + center = true; + float = true; + size = [695 800]; + # keep-sorted end + } + + { + match.class = "org.gnome.Decibels"; + + # keep-sorted start + center = true; + float = true; + size = [720 500]; + # keep-sorted end + } + + { + match.class = "org.pwmt.zathura"; + + opacity = "1 override 1 override"; + } + + { + match.class = "steam_app_.*"; + + opacity = "1 override 1 override"; + } + + { + match.class = "steam_app_.+"; + + no_blur = true; + } + + { + match.title = "Task Manager - .+"; + + # keep-sorted start + float = true; + size = [800 600]; + # keep-sorted end + } + + { + match.title = "[Pp]icture[ -]in[ -][Pp]icture"; + + # keep-sorted start + float = true; + pin = true; + # keep-sorted end + } + # keep-sorted end + ]; + }; + }; + }; +} diff --git a/modules/desktop/mangohud.nix b/modules/desktop/mangohud.nix new file mode 100644 index 0000000..858f6d3 --- /dev/null +++ b/modules/desktop/mangohud.nix @@ -0,0 +1,18 @@ +{ + flake.modules.homeManager.mangohud = _: { + programs.mangohud = { + enable = true; + + settings = { + # keep-sorted start + fps = true; + frame_timing = true; + horizontal = true; + horizontal_stretch = 0; + legacy_layout = false; + position = "top-left"; + # keep-sorted end + }; + }; + }; +} diff --git a/modules/desktop/noctalia/audio.nix b/modules/desktop/noctalia/audio.nix new file mode 100644 index 0000000..167590e --- /dev/null +++ b/modules/desktop/noctalia/audio.nix @@ -0,0 +1,11 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.audio = { + # keep-sorted start + cavaFrameRate = 60; + visualizerType = "mirrored"; + volumeOverdrive = true; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/bar.nix b/modules/desktop/noctalia/bar.nix new file mode 100644 index 0000000..e3bfe94 --- /dev/null +++ b/modules/desktop/noctalia/bar.nix @@ -0,0 +1,163 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + osConfig, + # keep-sorted end + ... + }: let + inherit (lib) optional; + + cfgBluetooth = osConfig.capabilities.bluetooth; + cfgGpu = config.programs.noctalia-shell.systemMonitor.enableGpu; + cfgBattery = config.programs.noctalia-shell.battery.enable; + in { + programs.noctalia-shell.settings.bar = { + # keep-sorted start + backgroundOpacity = 1; + density = "compact"; + floating = false; + outerCorners = false; + position = "top"; + showCapsule = true; + useSeparateOpacity = true; + # keep-sorted end + + widgets = { + left = [ + { + id = "SystemMonitor"; + showCpuFreq = true; + showCpuTemp = true; + showCpuUsage = true; + showGpuTemp = cfgGpu; + showMemoryAsPercent = false; + showMemoryUsage = true; + showNetworkStats = false; + showSwapUsage = true; + } + + {id = "plugin:privacy-indicator";} + + { + id = "LockKeys"; + capsLockIcon = "circle-dashed-letter-c"; + numLockIcon = "circle-dashed-letter-n"; + scrollLockIcon = "circle-dashed-letter-s"; + showCapsLock = true; + showNumLock = false; + showScrollLock = false; + } + + { + id = "ActiveWindow"; + colorizeIcons = false; + hideMode = "hidden"; + maxWidth = 145; + scrollingMode = "hover"; + showIcon = true; + useFixedWidth = false; + } + + { + id = "MediaMini"; + hideMode = "hidden"; + hideWhenIdle = false; + maxWidth = 145; + scrollingMode = "hover"; + showAlbumArt = true; + showVisualizer = false; + useFixedWidth = false; + visualizerType = "linear"; + } + ]; + + center = [ + { + id = "Workspace"; + hideUnoccupied = true; + labelMode = "none"; + followFocusedScreen = true; + } + ]; + + right = let + wiremix = config.xdg.desktopEntries.wiremix.exec; + in + [ + { + id = "Tray"; + colorizeIcons = false; + drawerEnabled = true; + pinned = [ + "Equibop" + "Beeper" + "spotify-client" + "steam" + ]; + } + + { + id = "VPN"; + displayMode = "onhover"; + } + + {id = "NoctaliaPerformance";} + + { + id = "Volume"; + displayMode = "onhover"; + middleClickCommand = wiremix; + } + + { + id = "Microphone"; + displayMode = "onhover"; + middleClickCommand = wiremix; + } + ] + ++ (optional cfgBluetooth {id = "Bluetooth";}) + ++ [ + {id = "Network";} + + { + id = "Brightness"; + displayMode = "onhover"; + } + ] + ++ [{id = "KeepAwake";}] + # Show the battery widget when enabled. + ++ (optional cfgBattery { + id = "Battery"; + showPowerProfiles = true; + DisplayMode = "icon-hover"; + }) + ++ [ + {id = "plugin:github-feed";} + + { + id = "NotificationHistory"; + showUnreadBadge = true; + } + + { + id = "Clock"; + formatHorizontal = "yyyy-MM-dd HH:mm"; + formatVertical = "HH mm - dd MM"; + tooltipFormat = "ddd, MMM dd HH:mm"; + useCustomFont = false; + clockColor = "primary"; + } + + { + id = "ControlCenter"; + colorizeSystemIcon = "tertiary"; + enableColorization = true; + useDistroLogo = true; + } + ]; + }; + }; + }; +} diff --git a/modules/desktop/noctalia/brightness.nix b/modules/desktop/noctalia/brightness.nix new file mode 100644 index 0000000..814dfd7 --- /dev/null +++ b/modules/desktop/noctalia/brightness.nix @@ -0,0 +1,10 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.brightness = { + # keep-sorted start + enableDdcSupport = true; + enforceMinimum = false; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/calendar.nix b/modules/desktop/noctalia/calendar.nix new file mode 100644 index 0000000..7a8c689 --- /dev/null +++ b/modules/desktop/noctalia/calendar.nix @@ -0,0 +1,25 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell = { + # Enable calendar support in the flake-provided Noctalia build. + packageOverrides.calendarSupport = true; + + settings.calendar.cards = [ + { + id = "calendar-header-card"; + enabled = true; + } + + { + id = "weather-card"; + enabled = false; + } + + { + id = "calendar-month-card"; + enabled = true; + } + ]; + }; + }; +} diff --git a/modules/desktop/noctalia/controlcenter.nix b/modules/desktop/noctalia/controlcenter.nix new file mode 100644 index 0000000..32f63e3 --- /dev/null +++ b/modules/desktop/noctalia/controlcenter.nix @@ -0,0 +1,65 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + lib, + osConfig, + # keep-sorted end + ... + }: let + inherit (lib) optional; + + cfgBluetooth = osConfig.capabilities.bluetooth; + cfgWifi = osConfig.capabilities.wifi; + in { + # Control center tiles and shortcuts surfaced from the bar. + programs.noctalia-shell.settings.controlCenter = { + # keep-sorted start block=yes newline_separated=yes + cards = [ + { + id = "profile-card"; + enabled = true; + } + { + id = "shortcuts-card"; + enabled = true; + } + { + id = "audio-card"; + enabled = false; + } + { + id = "brightness-card"; + enabled = false; + } + { + id = "weather-card"; + enabled = true; + } + { + id = "media-sysmon-card"; + enabled = true; + } + ]; + + position = "close_to_bar_button"; + + shortcuts = { + left = + [{id = "Network";}] + ++ (optional cfgBluetooth {id = "Bluetooth";}) + ++ [ + {id = "plugin:screen-recorder";} + {id = "WallpaperSelector";} + ]; + right = + [ + {id = "Notifications";} + {id = "PowerProfile";} + {id = "KeepAwake";} + ] + ++ (optional cfgWifi {id = "AirplaneMode";}); + }; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/default.nix b/modules/desktop/noctalia/default.nix new file mode 100644 index 0000000..930da55 --- /dev/null +++ b/modules/desktop/noctalia/default.nix @@ -0,0 +1,37 @@ +{inputs, ...}: { + flake-file.inputs = { + noctalia = { + url = "github:noctalia-dev/noctalia-shell?ref=v4.7.7"; + inputs = { + # keep-sorted start + nixpkgs.follows = "nixpkgs"; + noctalia-qs.follows = "noctalia-qs"; + # keep-sorted end + }; + }; + + noctalia-qs = { + url = "github:noctalia-dev/noctalia-qs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + flake.modules.homeManager.noctalia = {lib, ...}: let + inherit (lib) mkEnableOption; + in { + imports = [inputs.noctalia.homeModules.default]; + + # Expose an enable toggle for battery widgets. + options.programs.noctalia-shell.battery.enable = mkEnableOption "Enable the battery service & widgets."; + + # Enable the Noctalia shell and wire up its package. + config.programs.noctalia-shell = { + enable = true; + systemd.enable = true; + + # keep-sorted start + settings.templates.enableUserTheming = false; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/delobotomize.nix b/modules/desktop/noctalia/delobotomize.nix new file mode 100644 index 0000000..fe4117f --- /dev/null +++ b/modules/desktop/noctalia/delobotomize.nix @@ -0,0 +1,120 @@ +{inputs, ...}: { + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + mkAfter + mkForce + mkOption + optionals + types + # keep-sorted end + ; + + inherit (pkgs.stdenv.hostPlatform) system; + + cfg = config.programs.noctalia-shell; + basePackage = + if cfg.packageOverrides.package != null + then cfg.packageOverrides.package + else inputs.noctalia.packages.${system}.default; + overrideArgs = removeAttrs cfg.packageOverrides ["package"]; + locationFileEnv = optionals (cfg.systemd.locationFile != null) ["NOCTALIA_LOCATION_FILE=${cfg.systemd.locationFile}"]; + in { + options = { + programs.noctalia-shell = { + # keep-sorted start block=yes newline_separated=yes + # Keep app2unit available for launcher systemd integration. + app2unit.package = mkOption { + type = types.package; + default = pkgs.app2unit; + description = "The app2unit package to use when appLauncher. useApp2Unit is enabled."; + }; + + # Keep a base package and overrides for local patches. + packageOverrides = mkOption { + type = types.submodule { + # keep-sorted start block=yes newline_separated=yes + freeformType = types.attrs; + + # Add runtime tools directly to the wrapped shell package path. + options.extraPackages = mkOption { + type = types.listOf types.package; + default = []; + description = "Additional runtime packages prepended to the shell wrapper PATH."; + }; + + options.package = mkOption { + type = types.nullOr types.package; + default = null; + description = "Optional base package used before applying local patches."; + }; + # keep-sorted end + }; + default = {}; + description = "Override arguments applied to the base package."; + }; + + # Keep gui settings writes outside the nix store. + systemd = { + # keep-sorted start block=yes newline_separated=yes + locationFile = mkOption { + type = types.nullOr types.path; + default = null; + description = "Optional file whose trimmed contents override `settings.location.name` before the shell starts. Point this at a sops secret path to keep the location out of the nix store."; + }; + + mutableRuntimeSettings = mkOption { + type = types.bool; + default = true; + description = "Whether noctalia-shell creates a gui-settings.json to store setting changes made within the GUI at runtime."; + }; + # keep-sorted end + }; + # keep-sorted end + }; + }; + + config = { + programs.noctalia-shell = { + # keep-sorted start block=yes newline_separated=yes + # Restore gui-settings fallback behavior and add a location file override. + package = mkForce ((basePackage.override overrideArgs).overrideAttrs (old: { + patches = + (old.patches or []) + ++ [ + # keep-sorted start + ./patches/noctalia-launcher-ipc.patch + ./patches/noctalia-location-override.patch + ./patches/noctalia-settings-fallback.patch + # keep-sorted end + ]; + })); + + # Keep app2unit in the shell wrapper path when the launcher expects it. + packageOverrides.extraPackages = mkAfter (let + # keep-sorted start + app2UnitPackage = config.programs.noctalia-shell.app2unit.package; + useApp2Unit = config.programs.noctalia-shell.settings.appLauncher.useApp2Unit or false; + # keep-sorted end + in + optionals useApp2Unit [app2UnitPackage]); + # keep-sorted end + }; + + # Pass through runtime settings paths and optional location override file. + systemd.user.services.noctalia-shell.Service.Environment = let + cfgEnv = config.programs.noctalia-shell.systemd; + in + optionals (cfgEnv.enable && cfgEnv.mutableRuntimeSettings) ["NOCTALIA_SETTINGS_FALLBACK=%h/.config/noctalia/gui-settings.json"] + ++ optionals cfgEnv.enable locationFileEnv; + }; + }; +} diff --git a/modules/desktop/noctalia/dock.nix b/modules/desktop/noctalia/dock.nix new file mode 100644 index 0000000..9dda616 --- /dev/null +++ b/modules/desktop/noctalia/dock.nix @@ -0,0 +1,15 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.dock = { + # keep-sorted start + backgroundOpacity = 0.95; + colorizeIcons = false; + displayMode = "auto_hide"; + enabled = false; + floatingRatio = 0.5; + onlySameOutput = true; + size = 0.3; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/general.nix b/modules/desktop/noctalia/general.nix new file mode 100644 index 0000000..589e92a --- /dev/null +++ b/modules/desktop/noctalia/general.nix @@ -0,0 +1,64 @@ +{ + flake.modules.homeManager.noctalia = {config, ...}: { + programs.noctalia-shell.settings.general = let + # Use sharp corners (no rounding) for consistent design. + radius = 0; + + # TODO: Replace with actual option. + cfgTouch = config.hyprland.touch.enable; + in { + # keep-sorted start + animationSpeed = 2; + dimmerOpacity = 0; + iRadiusRatio = radius; + lockOnSuspend = true; + radiusRatio = radius; + reverseScroll = cfgTouch; + scaleRatio = 0.8; + shadowDirection = "center"; + shadowOffsetX = 0; + shadowOffsetY = 0; + showChangelogOnStartup = false; + telemetryEnabled = false; + # keep-sorted end + + # keep-sorted start + clockStyle = "analog"; + lockScreenAnimations = true; + lockScreenBlur = 0.2; + # keep-sorted end + + keybinds = { + # keep-sorted start block=yes newline_separated=yes + keyDown = [ + # keep-sorted start + "Ctrl+J" + "Down" + # keep-sorted end + ]; + + keyLeft = [ + # keep-sorted start + "Ctrl+H" + "Left" + # keep-sorted end + ]; + + keyRight = [ + # keep-sorted start + "Ctrl+L" + "Right" + # keep-sorted end + ]; + + keyUp = [ + # keep-sorted start + "Ctrl+K" + "Up" + # keep-sorted end + ]; + # keep-sorted end + }; + }; + }; +} diff --git a/modules/desktop/noctalia/hooks.nix b/modules/desktop/noctalia/hooks.nix new file mode 100644 index 0000000..564bce9 --- /dev/null +++ b/modules/desktop/noctalia/hooks.nix @@ -0,0 +1,22 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + in { + programs.noctalia-shell.settings.hooks = let + performantMode = getExe pkgs.performant-mode; + in { + enabled = true; + + # keep-sorted start + performanceModeDisabled = performantMode; + performanceModeEnabled = performantMode; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/idle.nix b/modules/desktop/noctalia/idle.nix new file mode 100644 index 0000000..681530f --- /dev/null +++ b/modules/desktop/noctalia/idle.nix @@ -0,0 +1,62 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (builtins) toJSON; + inherit + (lib) + # keep-sorted start + getExe + mkEnableOption + mkIf + optionalAttrs + # keep-sorted end + ; + + cfg = config.programs.noctalia-shell.idle; + brightnessctl = getExe pkgs.brightnessctl; + in { + options.programs.noctalia-shell.idle = { + # keep-sorted start + brightness.enable = mkEnableOption "Enable noctalia idle brightness dimming actions."; + suspend.enable = mkEnableOption "Enable noctalia idle suspend timeout."; + # keep-sorted end + }; + + config.programs.noctalia-shell.settings.idle = + { + enabled = true; + + # keep-sorted start + lockTimeout = 300; + screenOffTimeout = 330; + # keep-sorted end + + customCommands = mkIf cfg.brightness.enable (toJSON [ + # keep-sorted start block=yes newline_separated=yes + { + name = "Dim screen brightness"; + timeout = 150; + command = "${brightnessctl} -s set 10"; + resumeCommand = "${brightnessctl} -r"; + } + + { + name = "Turn off keyboard backlight brightness"; + timeout = 150; + command = "${brightnessctl} -sd rgb:kbd:backlight set 0"; + resumeCommand = "${brightnessctl} -rd rgb:kbd:backlight"; + } + # keep-sorted end + ]); + } + // optionalAttrs cfg.suspend.enable { + suspendTimeout = 480; + }; + }; +} diff --git a/modules/desktop/noctalia/launcher.nix b/modules/desktop/noctalia/launcher.nix new file mode 100644 index 0000000..d5ebb78 --- /dev/null +++ b/modules/desktop/noctalia/launcher.nix @@ -0,0 +1,40 @@ +{self, ...}: { + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + in { + imports = [ + # keep-sorted start + self.modules.homeManager.uwsm + self.modules.homeManager.xdgTerminal + # keep-sorted end + ]; + + programs.noctalia-shell = { + # keep-sorted start block=yes newline_separated=yes + # Keep launcher runtime tools in the wrapped shell package path. + packageOverrides.extraPackages = [pkgs.wtype]; + + settings.appLauncher = { + # keep-sorted start + autoPasteClipboard = true; + density = "comfortable"; + enableClipboardHistory = true; + enableSettingsSearch = false; + overviewLayer = true; + position = "center"; + showIconBackground = true; + terminalCommand = getExe config.xdg.terminal-exec.package; + useApp2Unit = true; + # keep-sorted end + }; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/location.nix b/modules/desktop/noctalia/location.nix new file mode 100644 index 0000000..0fb31fe --- /dev/null +++ b/modules/desktop/noctalia/location.nix @@ -0,0 +1,76 @@ +{self, ...}: { + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + osConfig, + vars, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + mkForce + mkIf + mkMerge + mkOption + types + # keep-sorted end + ; + inherit (vars) noctaliaFirstDayOfWeek; + + cfgLocation = config.programs.noctalia-shell.location.source; + in { + imports = [ + # keep-sorted start + self.modules.generic.vars + self.modules.homeManager.sops + # keep-sorted end + ]; + + # Control whether Noctalia reads weather data from autolocation or sops. + options.programs.noctalia-shell.location.source = mkOption { + type = types.nullOr (types.enum [ + # keep-sorted start + "autolocate" + "sops" + # keep-sorted end + ]); + default = "autolocate"; + description = '' + Configure the Noctalia location source. + Set to "autolocate" to use automatic location detection, or to "sops" + to read the location from the `noctalia/location` secret. + ''; + }; + + config = mkMerge [ + { + programs.noctalia-shell.settings.location = { + # keep-sorted start + analogClockInCalendar = true; + autoLocate = true; + firstDayOfWeek = noctaliaFirstDayOfWeek; + showCalendarWeather = false; + showWeekNumberInCalendar = true; + # keep-sorted end + }; + } + + # Read the desktop weather location from sops at runtime. + (let + hostname = osConfig.networking.hostName; + in + mkIf (cfgLocation == "sops") { + sops.secrets."noctalia/location/${hostname}" = {}; + programs.noctalia-shell = { + # keep-sorted start + settings.location.autoLocate = mkForce false; + systemd.locationFile = config.sops.secrets."noctalia/location/${hostname}".path; + # keep-sorted end + }; + }) + ]; + }; +} diff --git a/modules/desktop/noctalia/network.nix b/modules/desktop/noctalia/network.nix new file mode 100644 index 0000000..79907b1 --- /dev/null +++ b/modules/desktop/noctalia/network.nix @@ -0,0 +1,15 @@ +{ + flake.modules.homeManager.noctalia = {osConfig, ...}: let + cfgWifi = osConfig.capabilities.wifi; + in { + # Propagate host wifi/bluetooth availability into noctalia menus. + programs.noctalia-shell.settings.network = { + # keep-sorted start + bluetoothAutoConnect = false; + bluetoothHideUnnamedDevices = true; + bluetoothRssiPollingEnabled = true; + wifiEnabled = cfgWifi; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/notifications.nix b/modules/desktop/noctalia/notifications.nix new file mode 100644 index 0000000..7994a78 --- /dev/null +++ b/modules/desktop/noctalia/notifications.nix @@ -0,0 +1,13 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.notifications = { + # keep-sorted start + criticalUrgencyDuration = 8; + enableKeyboardLayoutToast = false; + lowUrgencyDuration = 2; + normalUrgencyDuration = 4; + respectExpireTimeout = false; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/patches/noctalia-launcher-ipc.patch b/modules/desktop/noctalia/patches/noctalia-launcher-ipc.patch new file mode 100644 index 0000000..d28c6e9 --- /dev/null +++ b/modules/desktop/noctalia/patches/noctalia-launcher-ipc.patch @@ -0,0 +1,26 @@ +diff --git a/Services/Control/IPCService.qml b/Services/Control/IPCService.qml +--- a/Services/Control/IPCService.qml ++++ b/Services/Control/IPCService.qml +@@ -332,6 +332,22 @@ + } + }, Settings.data.appLauncher.overviewLayer); + } ++ function open() { ++ root.screenDetector.withCurrentScreen(screen => { ++ if (!PanelService.isLauncherOpen(screen)) { ++ PanelService.openLauncherWithSearch(screen, ""); ++ } else { ++ PanelService.setLauncherSearchText(screen, ""); ++ } ++ }, Settings.data.appLauncher.overviewLayer); ++ } ++ function close() { ++ root.screenDetector.withCurrentScreen(screen => { ++ if (PanelService.isLauncherOpen(screen)) { ++ PanelService.closeLauncher(screen); ++ } ++ }, Settings.data.appLauncher.overviewLayer); ++ } + function clipboard() { + root.screenDetector.withCurrentScreen(screen => { + var searchText = PanelService.getLauncherSearchText(screen); diff --git a/modules/desktop/noctalia/patches/noctalia-location-override.patch b/modules/desktop/noctalia/patches/noctalia-location-override.patch new file mode 100644 index 0000000..c634478 --- /dev/null +++ b/modules/desktop/noctalia/patches/noctalia-location-override.patch @@ -0,0 +1,66 @@ +diff --git a/Commons/Settings.qml b/Commons/Settings.qml +--- a/Commons/Settings.qml ++++ b/Commons/Settings.qml +@@ -32,9 +32,12 @@ + readonly property string cacheDir: ensureTrailingSlash(Quickshell.env("NOCTALIA_CACHE_DIR") || (Quickshell.env("XDG_CACHE_HOME") || Quickshell.env("HOME") + "/.cache") + "/" + shellName + "/") + + readonly property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (configDir + "settings.json") ++ readonly property string envLocation: (Quickshell.env("NOCTALIA_LOCATION") || "").trim() ++ readonly property string envLocationFile: Quickshell.env("NOCTALIA_LOCATION_FILE") || "" + readonly property string defaultAvatar: Quickshell.env("HOME") + "/.face" + readonly property string defaultVideosDirectory: Quickshell.env("HOME") + "/Videos" + readonly property string defaultWallpapersDirectory: Quickshell.env("HOME") + "/Pictures/Wallpapers" ++ property string fileLocationOverride: "" + + signal settingsLoaded + signal settingsSaved +@@ -92,6 +95,18 @@ + settingsFileView.adapter = adapter; + } + ++ function applyLocationOverride() { ++ const locationOverride = (fileLocationOverride || envLocation).trim(); ++ ++ if (locationOverride === "") { ++ return; ++ } ++ ++ if (adapter.location.name !== locationOverride) { ++ adapter.location.name = locationOverride; ++ } ++ } ++ + // Don't write settings to disk immediately + // This avoid excessive IO when a variable changes rapidly (ex: sliders) + Timer { +@@ -135,6 +150,8 @@ + // Finally, update our local settings version + adapter.settingsVersion = settingsVersion; + ++ applyLocationOverride(); ++ + // Emit the signal + root.isLoaded = true; + root.settingsLoaded(); +@@ -172,6 +189,21 @@ + onFileChanged: scheduleExternalReload() + } + ++ FileView { ++ id: locationOverrideFileView ++ path: envLocationFile !== "" ? envLocationFile : undefined ++ printErrors: false ++ watchChanges: true ++ onLoaded: { ++ root.fileLocationOverride = text().trim(); ++ root.applyLocationOverride(); ++ } ++ onLoadFailed: { ++ root.fileLocationOverride = ""; ++ root.applyLocationOverride(); ++ } ++ } ++ + // FileView to load default settings for comparison + FileView { + id: defaultSettingsFileView diff --git a/modules/desktop/noctalia/patches/noctalia-settings-fallback.patch b/modules/desktop/noctalia/patches/noctalia-settings-fallback.patch new file mode 100644 index 0000000..8d8e721 --- /dev/null +++ b/modules/desktop/noctalia/patches/noctalia-settings-fallback.patch @@ -0,0 +1,55 @@ +diff --git a/Commons/Settings.qml b/Commons/Settings.qml +--- a/Commons/Settings.qml ++++ b/Commons/Settings.qml +@@ -34,6 +34,7 @@ + readonly property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (configDir + "settings.json") + readonly property string envLocation: (Quickshell.env("NOCTALIA_LOCATION") || "").trim() + readonly property string envLocationFile: Quickshell.env("NOCTALIA_LOCATION_FILE") || "" ++ readonly property string settingsFallbackFile: Quickshell.env("NOCTALIA_SETTINGS_FALLBACK") || "" + readonly property string defaultAvatar: Quickshell.env("HOME") + "/.face" + readonly property string defaultVideosDirectory: Quickshell.env("HOME") + "/Videos" + readonly property string defaultWallpapersDirectory: Quickshell.env("HOME") + "/Pictures/Wallpapers" +@@ -170,7 +171,9 @@ + if (error.toString().includes("No such file") || error === 2) { + // File doesn't exist, create it with default values + root.isFreshInstall = true; +- writeAdapter(); ++ if (!writeSettingsFallbackAdapter()) { ++ writeAdapter(); ++ } + + // We started without settings, we should open the setupWizard + root.shouldOpenSetupWizard = true; +@@ -212,0 +216,8 @@ ++ ++ // Write-only fallback for mutable GUI settings when settings.json is declarative. ++ FileView { ++ id: settingsFallbackFileView ++ path: settingsFallbackFile !== "" ? settingsFallbackFile : undefined ++ printErrors: false ++ watchChanges: false ++ } +@@ -1111,9 +1122,22 @@ + data.bar.screenOverrides = overrides; + } + ++ function writeSettingsFallbackAdapter() { ++ if (settingsFallbackFile === "") { ++ return false; ++ } ++ ++ settingsFallbackFileView.adapter = adapter; ++ settingsFallbackFileView.writeAdapter(); ++ settingsFallbackFileView.adapter = null; ++ return true; ++ } ++ + // ----------------------------------------------------- + // Public function to trigger immediate settings saving + function saveImmediate() { +- settingsFileView.writeAdapter(); ++ if (!writeSettingsFallbackAdapter()) { ++ settingsFileView.writeAdapter(); ++ } + root.settingsSaved(); // Emit signal after saving + } diff --git a/modules/desktop/noctalia/plugins.nix b/modules/desktop/noctalia/plugins.nix new file mode 100644 index 0000000..7dc8c97 --- /dev/null +++ b/modules/desktop/noctalia/plugins.nix @@ -0,0 +1,118 @@ +{self, ...}: { + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + pkgs, + vars, + # keep-sorted end + ... + }: let + inherit (builtins) toJSON; + inherit (lib) genAttrs; + inherit (config.lib.file) mkOutOfStoreSymlink; + inherit (vars) gitUsername; + + inherit + (config.xdg) + # keep-sorted start + stateHome + # keep-sorted end + ; + videosDir = config.xdg.userDirs.videos; + in { + imports = [ + # keep-sorted start + self.modules.generic.vars + self.modules.homeManager.sops + # keep-sorted end + ]; + + # keep-sorted start block=yes newline_separated=yes + programs.noctalia-shell = { + plugins = let + noctaliaPluginsUrl = "https://github.com/noctalia-dev/noctalia-plugins"; + in { + version = 2; + + sources = [ + { + enabled = true; + name = "Noctalia Plugins"; + url = noctaliaPluginsUrl; + } + ]; + + states = let + mkPlugin = _name: { + enabled = true; + sourceUrl = noctaliaPluginsUrl; + }; + in + genAttrs [ + # keep-sorted start + "github-feed" + "kaomoji-provider" + "nvim-session-provider" + "privacy-indicator" + "screen-recorder" + "unicode-picker" + "web-search" + # keep-sorted end + ] + mkPlugin; + }; + + # keep-sorted start block=yes newline_separated=yes + # Provide runtime tools used by bundled plugins. + packageOverrides.extraPackages = [pkgs.gpu-screen-recorder]; + + pluginSettings = { + # keep-sorted start block=yes newline_separated=yes + github-feed = mkOutOfStoreSymlink config.sops.templates."noctalia-github-config".path; + + nvim-session-provider.sessionDir = "${stateHome}/nvf/sessions"; + + screen-recorder = { + # keep-sorted start + copyToClipboard = true; + directory = "${videosDir}/Recordings"; + videoCodec = "hevc"; + # keep-sorted end + }; + + web-search = { + # keep-sorted start + max_results = 5; + search_engine = "Brave"; + show_suggestions = false; + # keep-sorted end + }; + # keep-sorted end + }; + + settings.plugins.autoUpdate = true; + # keep-sorted end + }; + + # Render github-feed settings from sops. + sops = { + secrets."noctalia/github_token" = {}; + + templates."noctalia-github-config".content = let + sopsVal = config.sops.placeholder; + in + toJSON { + # keep-sorted start + defaultTab = 1; + enableSystemNotifications = true; + maxEvents = 64; + refreshInterval = 2000; + token = sopsVal."noctalia/github_token"; + username = gitUsername; + # keep-sorted end + }; + }; + # keep-sorted end + }; +} diff --git a/modules/desktop/noctalia/sessionmenu.nix b/modules/desktop/noctalia/sessionmenu.nix new file mode 100644 index 0000000..0a9cd57 --- /dev/null +++ b/modules/desktop/noctalia/sessionmenu.nix @@ -0,0 +1,64 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.sessionMenu = { + # keep-sorted start + countdownDuration = 8000; + largeButtonsStyle = false; + # keep-sorted end + + powerOptions = [ + { + action = "lock"; + enabled = true; + countdownEnabled = false; + keybind = "1"; + } + + { + action = "suspend"; + enabled = true; + countdownEnabled = true; + command = "systemctl suspend"; + keybind = "2"; + } + + { + action = "reboot"; + enabled = true; + countdownEnabled = true; + command = "systemctl reboot"; + keybind = "3"; + } + + { + action = "logout"; + enabled = true; + countdownEnabled = true; + keybind = "4"; + } + + { + action = "shutdown"; + enabled = true; + countdownEnabled = true; + command = "systemctl poweroff"; + keybind = "5"; + } + + { + action = "hibernate"; + enabled = false; + countdownEnabled = true; + } + + { + action = "rebootToUefi"; + enabled = true; + countdownEnabled = true; + command = "systemctl reboot --firmware-setup"; + keybind = "6"; + } + ]; + }; + }; +} diff --git a/modules/desktop/noctalia/systemmonitor.nix b/modules/desktop/noctalia/systemmonitor.nix new file mode 100644 index 0000000..3655c28 --- /dev/null +++ b/modules/desktop/noctalia/systemmonitor.nix @@ -0,0 +1,39 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + config, + lib, + # keep-sorted end + ... + }: let + inherit (lib) mkEnableOption getExe; + + cfgGpu = config.programs.noctalia-shell.systemMonitor.enableGpu; + in { + # Expose a GPU toggle for Noctalia system monitor widgets. + options.programs.noctalia-shell.systemMonitor.enableGpu = mkEnableOption "Enable dGPU monitoring and GPU temperature widgets."; + + # Set polling for the system monitor. + config.programs.noctalia-shell.settings.systemMonitor = let + # Reuse a shared 4s interval for slower sensors. + generalInterval = 4000; + in { + # keep-sorted start + cpuPollingInterval = 1000; + diskPollingInterval = generalInterval; + memPollingInterval = generalInterval; + networkPollingInterval = generalInterval; + # keep-sorted end + + # keep-sorted start block=yes + enableDgpuMonitoring = cfgGpu; + externalMonitor = let + # keep-sorted start + btop = getExe config.programs.btop.package; + terminalCommand = getExe config.xdg.terminal-exec.package; + # keep-sorted end + in "${terminalCommand} --title=Btop ${btop}"; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/theme.nix b/modules/desktop/noctalia/theme.nix new file mode 100644 index 0000000..272a6b0 --- /dev/null +++ b/modules/desktop/noctalia/theme.nix @@ -0,0 +1,54 @@ +{ + flake.modules.homeManager.noctalia = { + # keep-sorted start + lib, + osConfig, + # keep-sorted end + ... + }: let + inherit (lib) mkForce; + colors = osConfig.lib.stylix.colors.withHashtag; + in { + programs.noctalia-shell = { + # keep-sorted start block=yes newline_separated=yes + # Write the noctalia color palette to a json file. + colors = with colors; { + # keep-sorted start + mHover = mkForce base0D; + mOnSurface = mkForce base06; + mPrimary = mkForce base0B; + mSecondary = mkForce base0A; + mTertiary = mkForce base0D; + # keep-sorted end + }; + + # System monitor colors from stylix. + settings = { + # keep-sorted start block=yes newline_separated=yes + bar = { + # keep-sorted start + backgroundOpacity = mkForce 1.0; + capsuleOpacity = mkForce 1.0; + # keep-sorted end + }; + + systemMonitor = with colors; { + # keep-sorted start + criticalColor = base08; + useCustomColors = true; + warningColor = base0A; + # keep-sorted end + }; + # keep-sorted end + + # keep-sorted start + dock.backgroundOpacity = mkForce 1.0; + notifications.backgroundOpacity = mkForce 1.0; + osd.backgroundOpacity = mkForce 1.0; + ui.panelBackgroundOpacity = mkForce 1.0; + # keep-sorted end + }; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/ui.nix b/modules/desktop/noctalia/ui.nix new file mode 100644 index 0000000..14ffabe --- /dev/null +++ b/modules/desktop/noctalia/ui.nix @@ -0,0 +1,14 @@ +{ + flake.modules.homeManager.noctalia = _: { + programs.noctalia-shell.settings.ui = { + # keep-sorted start + boxBorderEnabled = true; + fontDefaultScale = 0.8; + fontFixedScale = 0.8; + panelBackgroundOpacity = 0.95; + panelsAttachedToBar = false; + settingsPanelMode = "centered"; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/noctalia/wallpaper.nix b/modules/desktop/noctalia/wallpaper.nix new file mode 100644 index 0000000..28ad520 --- /dev/null +++ b/modules/desktop/noctalia/wallpaper.nix @@ -0,0 +1,29 @@ +{ + flake.modules.homeManager.noctalia = {config, ...}: let + picturesDir = config.xdg.userDirs.pictures; + in { + # Wallpaper directory and rotation settings. + programs.noctalia-shell.settings.wallpaper = { + # keep-sorted start block=yes + automationEnabled = true; + directory = "${picturesDir}/Wallpapers"; + hideWallpaperFilenames = true; + overviewEnabled = true; + panelPosition = "center"; + randomIntervalSec = 7200; + setWallpaperOnAllMonitors = true; + showHiddenFiles = true; + skipStartupTransition = true; + transitionType = [ + # keep-sorted start + "disc" + "fade" + "honeycomb" + "stripes" + "wipe" + # keep-sorted end + ]; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/overzicht/default.nix b/modules/desktop/overzicht/default.nix new file mode 100644 index 0000000..8f38bad --- /dev/null +++ b/modules/desktop/overzicht/default.nix @@ -0,0 +1,35 @@ +{inputs, ...}: { + flake-file.inputs.overzicht = { + url = "github:adam01110/overzicht"; + inputs = { + # keep-sorted start + flake-parts.follows = "flake-parts"; + import-tree.follows = "import-tree"; + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + # keep-sorted end + }; + }; + + flake.modules.homeManager.overzicht = { + imports = [inputs.overzicht.homeModules.default]; + + programs.overzicht = { + enable = true; + systemd.enable = true; + + # Blend Overzicht's built-in panel shadow with a light fullscreen dim backdrop. + settings.effects = { + enableBackdrop = true; + + # keep-sorted start + backdropOpacity = 0.18; + emptyWorkspaceWallpaperOverlayOpacity = 0.12; + panelOpacity = 0.93; + windowOverlayOpacity = 0.06; + workspaceOpacity = 1; + # keep-sorted end + }; + }; + }; +} diff --git a/modules/desktop/overzicht/theme.nix b/modules/desktop/overzicht/theme.nix new file mode 100644 index 0000000..3e200c1 --- /dev/null +++ b/modules/desktop/overzicht/theme.nix @@ -0,0 +1,51 @@ +{self, ...}: { + flake.modules.homeManager.overzicht = {config, ...}: let + # keep-sorted start + colors = config.lib.stylix.colors.withHashtag; + sansSerifFont = config.stylix.fonts.sansSerif.name; + # keep-sorted end + in { + imports = [self.modules.homeManager.stylixPersonal]; + + # Feed the Stylix palette through Overzicht's module options. + programs.overzicht = { + # keep-sorted start block=yes newline_separated=yes + colors = with colors; { + # keep-sorted start + background = base01; + inverseOnSurface = base06; + inverseSurface = base02; + onBackground = base05; + onPrimary = base00; + onPrimaryContainer = base06; + onSecondary = base00; + onSecondaryContainer = base06; + onSurface = base00; + onSurfaceVariant = base02; + outline = base06; + outlineVariant = base03; + primary = base08; + primaryContainer = base01; + secondary = base0B; + secondaryContainer = base01; + shadow = base00; + surface = base00; + surfaceContainer = base0B; + surfaceContainerHigh = base01; + surfaceContainerHighest = base02; + surfaceContainerLow = base00; + surfaceVariant = base02; + # keep-sorted end + }; + + settings.appearance.font.family = { + # keep-sorted start + expressive = sansSerifFont; + main = sansSerifFont; + title = sansSerifFont; + # keep-sorted end + }; + # keep-sorted end + }; + }; +} diff --git a/modules/desktop/tuigreet.nix b/modules/desktop/tuigreet.nix index f6dfb29..b6fe27a 100644 --- a/modules/desktop/tuigreet.nix +++ b/modules/desktop/tuigreet.nix @@ -28,7 +28,12 @@ inherit (vars) username; tomlFormat = pkgs.formats.toml {}; in { - imports = [self.modules.generic.vars]; + imports = [ + # keep-sorted start + self.modules.generic.vars + self.modules.nixos.uwsm + # keep-sorted end + ]; # keep-sorted start block=yes newline_separated=yes environment = { diff --git a/modules/desktop/uwsm.nix b/modules/desktop/uwsm.nix new file mode 100644 index 0000000..9c6bc8a --- /dev/null +++ b/modules/desktop/uwsm.nix @@ -0,0 +1,14 @@ +_: { + flake.modules.nixos.uwsm = {pkgs, ...}: { + programs.uwsm.package = pkgs.uwsm.override {uuctlSupport = false;}; + }; + + flake.modules.homeManager.uwsm = {config, ...}: { + home.sessionVariables = { + APP2UNIT_SLICES = "a=app-graphical.slice b=background-graphical.slice s=session-graphical.slice"; + APP2UNIT_TYPE = "service"; + }; + + xdg.configFile."uwsm/env".source = "${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh"; + }; +} diff --git a/modules/nix/nur.nix b/modules/nix/nur.nix index d940f89..de2ef2d 100644 --- a/modules/nix/nur.nix +++ b/modules/nix/nur.nix @@ -1,8 +1,4 @@ -{ - inputs, - self, - ... -}: { +{inputs, ...}: { flake-file.inputs.nur = { url = "github:nix-community/NUR"; inputs = { @@ -10,14 +6,11 @@ nixpkgs.follows = "nixpkgs"; }; }; - - flake.overlays.nur = inputs.nur.overlays.default; - flake.modules.nixos.nur = { imports = [inputs.nur.modules.nixos.default]; }; flake.modules.homeManager.nur = { - nixpkgs.overlays = [self.overlays.nur]; + imports = [inputs.nur.modules.homeManager.default]; }; } diff --git a/modules/pkgs/default.nix b/modules/pkgs/default.nix index e7f3cc3..da46583 100644 --- a/modules/pkgs/default.nix +++ b/modules/pkgs/default.nix @@ -8,11 +8,14 @@ # keep-sorted start djvutorga-adapter lutris + man-preview nocheatsheet-nvim os-age + performant-mode pptx2md-adapter systemd-status-preview telescope-all-recent-nvim + text-preview zaread # keep-sorted end ; diff --git a/modules/pkgs/performant-mode.nix b/modules/pkgs/performant-mode.nix new file mode 100644 index 0000000..ea8bbee --- /dev/null +++ b/modules/pkgs/performant-mode.nix @@ -0,0 +1,71 @@ +{ + perSystem = {pkgs, ...}: let + inherit (builtins) attrValues; + inherit (pkgs.lib) escapeShellArg; + inherit (pkgs) writeShellApplication; + + luaScript = '' + hl.config({ + animations = {enabled = false}, + + decoration = { + active_opacity = 1, + inactive_opacity = 1, + blur = {enabled = false}, + shadow = {enabled = false}, + }, + + general = { + border_size = 1, + gaps_in = 0, + gaps_out = 0, + }, + }) + + hl.window_rule({ + name = "performant-mode-opacity", + match = {class = ".*"}, + opacity = "1 override 1 override 1 override", + }) + ''; + in { + packages.performant-mode = writeShellApplication { + name = "performant-mode"; + runtimeInputs = attrValues { + inherit + (pkgs) + # keep-sorted start + gawk + hyprland + # keep-sorted end + ; + }; + excludeShellChecks = ["SC2276"]; + text = '' + get_option_value() { + hyprctl getoption "$1" 2>/dev/null \ + | gawk 'NR == 1 && ($1 == "int:" || $1 == "bool:") { print $2 }' \ + || true + } + + performant_mode_enabled() { + [ "$1" = 1 ] || [ "$1" = true ] + } + + enable_lua_performant_mode() { + [ "$(hyprctl eval ${escapeShellArg luaScript} 2>/dev/null)" = ok ] + } + + HYPRPERFORMANTMODE=$(get_option_value animations.enabled) + + if performant_mode_enabled "$HYPRPERFORMANTMODE"; then + enable_lua_performant_mode + exit + fi + + # Restore normal settings by reloading hyprland. + hyprctl reload + ''; + }; + }; +} diff --git a/modules/pkgs/preview/man.nix b/modules/pkgs/preview/man.nix new file mode 100644 index 0000000..9e3a2f7 --- /dev/null +++ b/modules/pkgs/preview/man.nix @@ -0,0 +1,25 @@ +_: { + perSystem = {pkgs, ...}: let + inherit (builtins) attrValues; + in { + packages.man-preview = pkgs.writeShellApplication { + name = "man-preview"; + runtimeInputs = + [pkgs.bat] + ++ attrValues { + inherit + (pkgs) + # keep-sorted start + gnused + man-db + # keep-sorted end + ; + }; + text = '' + MANPAGER=cat MANROFFOPT=-c man "$1" \ + | sed -e 's/\x1B\[[0-9;]*m//g; s/.\x08//g' \ + | bat --language=man --plain --color=always + ''; + }; + }; +} diff --git a/modules/pkgs/systemd-status-preview.nix b/modules/pkgs/preview/systemd-status.nix similarity index 100% rename from modules/pkgs/systemd-status-preview.nix rename to modules/pkgs/preview/systemd-status.nix diff --git a/modules/pkgs/preview/text.nix b/modules/pkgs/preview/text.nix new file mode 100644 index 0000000..235b99c --- /dev/null +++ b/modules/pkgs/preview/text.nix @@ -0,0 +1,37 @@ +_: { + perSystem = {pkgs, ...}: let + inherit (builtins) attrValues; + in { + packages.text-preview = pkgs.writeShellApplication { + # SPDX-License-Identifier: AGPL-3.0-or-later + name = "text-preview"; + runtimeInputs = + [ + pkgs.bat + ] + ++ attrValues { + inherit + (pkgs) + # keep-sorted start + file + # keep-sorted end + ; + }; + text = '' + path="''${1-}" + + if [ -z "$path" ]; then + exit 0 + fi + + mime_info=$(file --brief --mime --dereference -- "$path") + + if [ "''${mime_info##*charset=}" != "binary" ]; then + bat -n --color=always -- "$path" || file --brief --dereference -- "$path" + else + file --brief --dereference -- "$path" + fi + ''; + }; + }; +} diff --git a/modules/profiles/gtk.nix b/modules/profiles/gtk.nix new file mode 100644 index 0000000..7b8e762 --- /dev/null +++ b/modules/profiles/gtk.nix @@ -0,0 +1,21 @@ +{self, ...}: { + flake.modules.homeManager.gtk = {config, ...}: { + imports = [self.modules.homeManager.stylixPersonal]; + + gtk.gtk4.theme = config.gtk.theme; + + dconf.settings = { + # keep-sorted start + "org/gnome/desktop/interface".color-scheme = "prefer-dark"; + "org/gnome/desktop/interface".gtk-enable-primary-paste = false; + "org/gnome/desktop/wm/preferences".button-layout = ""; + # keep-sorted end + }; + + stylix.targets.gtk.extraCss = '' + * { border-radius: 0px; } + *::before { border-radius: 0px; } + *::after { border-radius: 0px; } + ''; + }; +} diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix index b78cf97..9018a05 100644 --- a/modules/profiles/personal.nix +++ b/modules/profiles/personal.nix @@ -1,10 +1,13 @@ {self, ...}: { flake.modules.nixos.personal = { imports = with self.modules.nixos; [ + capabilities + # Profile common. # keep-sorted start locale slim + stylixPersonal timezone tweaks # keep-sorted end @@ -14,6 +17,11 @@ }; flake.modules.homeManager.personal = { - imports = []; + imports = with self.modules.homeManager; [ + # Profile common. + # keep-sorted start + gtk + # keep-sorted end + ]; }; } diff --git a/modules/profiles/stylix/base.nix b/modules/profiles/stylix/base.nix new file mode 100644 index 0000000..e23490e --- /dev/null +++ b/modules/profiles/stylix/base.nix @@ -0,0 +1,59 @@ +{inputs, ...}: let + stylixConfig = { + enable = true; + autoEnable = false; + + polarity = "dark"; + + # Tweaked default tinted gruvbox-dark colorscheme to use the lighter colors. + base16Scheme = { + # keep-sorted start + author = "Adam0"; + scheme = "Gruvbox Dark"; + slug = "gruvbox-dark"; + system = "base16"; + variant = "dark"; + # keep-sorted end + + base00 = "#282828"; + base01 = "#3c3836"; + base02 = "#504945"; + base03 = "#665c54"; + base04 = "#928374"; + base05 = "#ebdbb2"; + base06 = "#fbf1c7"; + base07 = "#f9f5d7"; + base08 = "#fb4934"; + base09 = "#fe8019"; + base0A = "#fabd2f"; + base0B = "#b8bb26"; + base0C = "#8ec07c"; + base0D = "#83a598"; + base0E = "#d3869b"; + base0F = "#9d0006"; + }; + }; +in { + flake-file.inputs.stylix = { + url = "github:danth/stylix"; + inputs = { + #keep-sorted start + flake-parts.follows = "flake-parts"; + nixpkgs.follows = "nixpkgs"; + nur.follows = "nur"; + # keep-sorted end + }; + }; + + flake.modules.nixos.stylixBase = { + imports = [inputs.stylix.nixosModules.stylix]; + + stylix = stylixConfig; + }; + + flake.modules.homeManager.stylixBase = { + imports = [inputs.stylix.homeModules.stylix]; + + stylix = stylixConfig; + }; +} diff --git a/modules/profiles/stylix/personal.nix b/modules/profiles/stylix/personal.nix new file mode 100644 index 0000000..fe2ed87 --- /dev/null +++ b/modules/profiles/stylix/personal.nix @@ -0,0 +1,95 @@ +{ + lib, + self, + ... +}: let + inherit (lib.self) stylixDisabledTargets; + + disabledHomeTargets = stylixDisabledTargets [ + # keep-sorted start + "blender" + "gnome" + "kde" + "nixcord" + "obsidian" + "vencord" + "vesktop" + # keep-sorted end + ]; +in { + flake.modules.nixos.stylixPersonal = {pkgs, ...}: { + imports = [ + self.modules.nixos.nur + self.modules.nixos.stylixBase + ]; + + stylix = { + cursor = { + name = "Bibata-Modern-Gruvbox-Dark"; + package = pkgs.nur.repos.adam0.bibata-modern-cursors-gruvbox-dark; + size = 24; + }; + + icons = let + name = "Gruvbox-Plus-Dark"; + in { + enable = true; + dark = name; + light = name; + package = pkgs.nur.repos.adam0.gruvbox-plus-icons; + }; + + # Use JetBrainsMono without ligatures. + fonts = let + inherit (pkgs.nerd-fonts) jetbrains-mono; + in { + # keep-sorted start block=yes newline_separated=yes + monospace = { + package = jetbrains-mono; + name = "JetBrainsMonoNL Nerd Font Mono"; + }; + + sansSerif = { + package = jetbrains-mono; + name = "JetBrainsMonoNL Nerd Font Propo"; + }; + + serif = { + package = jetbrains-mono; + name = "JetBrainsMonoNL Nerd Font Propo"; + }; + # keep-sorted end + }; + }; + + fonts.packages = [pkgs.noto-fonts-cjk-sans]; + }; + + flake.modules.homeManager.stylixPersonal = { + imports = [self.modules.homeManager.stylixBase]; + + stylix = { + # keep-sorted start block=yes newline_separated=yes + fonts.sizes = { + # keep-sorted start + applications = 10; + desktop = 10; + popups = 10; + terminal = 10; + # keep-sorted end + }; + + opacity = { + # keep-sorted start + applications = 0.95; + desktop = 0.95; + popups = 0.95; + terminal = 0.95; + # keep-sorted end + }; + + targets = disabledHomeTargets; + # keep-sorted end + }; + }; +} diff --git a/modules/profiles/stylix/server.nix b/modules/profiles/stylix/server.nix new file mode 100644 index 0000000..c25fc6e --- /dev/null +++ b/modules/profiles/stylix/server.nix @@ -0,0 +1,32 @@ +{self, ...}: { + flake.modules.nixos.stylixServer = { + imports = [self.modules.nixos.stylixBase]; + + stylix = { + fonts = { + sansSerif = { + name = null; + package = null; + }; + serif = { + name = null; + package = null; + }; + monospace = { + name = null; + package = null; + }; + emoji = { + name = null; + package = null; + }; + }; + + targets.console.enable = true; + }; + }; + + flake.modules.homeManager.stylixServer = { + imports = [self.modules.homeManager.stylixBase]; + }; +} diff --git a/modules/programs/cli/bat.nix b/modules/programs/cli/bat.nix index c22e09f..0c9b2e0 100644 --- a/modules/programs/cli/bat.nix +++ b/modules/programs/cli/bat.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.bat = { # keep-sorted start config, @@ -10,6 +10,13 @@ inherit (lib) getExe; bat = getExe config.programs.bat.package; in { + imports = [ + # keep-sorted start + self.modules.homeManager.fish + self.modules.homeManager.nur + # keep-sorted end + ]; + programs.bat = { enable = true; @@ -23,6 +30,11 @@ home.shellAliases.cat = bat; - # TODO: Fish init batman export. + programs.fish.interactiveShellInitSnippets = [ + # Reuse bat's pager environment inside fish sessions. + '' + batman --export-env | source + '' + ]; }; } diff --git a/modules/programs/cli/bonsai.nix b/modules/programs/cli/bonsai.nix index f0d3df5..f4c62c3 100644 --- a/modules/programs/cli/bonsai.nix +++ b/modules/programs/cli/bonsai.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.bonsai = { # keep-sorted start lib, @@ -9,6 +9,8 @@ inherit (lib) getExe; bonsai = pkgs.nur.repos.Dev380.rbonsai; in { + imports = [self.modules.homeManager.nur]; + home = { packages = [bonsai]; shellAliases.bonsai = "${getExe bonsai} -S"; diff --git a/modules/programs/cli/cpond.nix b/modules/programs/cli/cpond.nix index ddb4688..9c2e1a8 100644 --- a/modules/programs/cli/cpond.nix +++ b/modules/programs/cli/cpond.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.cpond = { # keep-sorted start lib, @@ -9,6 +9,8 @@ inherit (lib) getExe; inherit (pkgs.nur.repos.adam0) cpond; in { + imports = [self.modules.homeManager.nur]; + home = { packages = [cpond]; shellAliases.cpond = "${getExe cpond} -b -c 16"; diff --git a/modules/programs/cli/eh.nix b/modules/programs/cli/eh.nix new file mode 100644 index 0000000..ab90bb2 --- /dev/null +++ b/modules/programs/cli/eh.nix @@ -0,0 +1,59 @@ +{ + # keep-sorted start + inputs, + self, + # keep-sorted end + ... +}: { + flake-file.inputs = { + eh = { + url = "github:NotAShelf/eh"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + flake.modules.homeManager.eh = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + inherit (pkgs) writeShellApplication; + + # keep-sorted start + eh = getExe pkgs.eh; + nix = getExe pkgs.nix; + # keep-sorted end + + nixWrapper = writeShellApplication { + name = "nix"; + text = '' + case "''${1-}" in + build|develop|run|shell) + exec ${eh} "$@" + ;; + flake) + if [[ $# -ge 2 && "''${2-}" == update ]]; then + shift 2 + exec ${eh} update "$@" + fi + ;; + esac + + exec ${nix} "$@" + ''; + }; + in { + nixpkgs.overlays = [self.overlays.eh]; + + home.packages = [pkgs.eh nixWrapper]; + }; + + flake.overlays.eh = final: _prev: let + inherit (final.stdenv.hostPlatform) system; + in { + inherit (inputs.eh.packages.${system}) eh; + }; +} diff --git a/modules/programs/cli/eza.nix b/modules/programs/cli/eza/default.nix similarity index 100% rename from modules/programs/cli/eza.nix rename to modules/programs/cli/eza/default.nix diff --git a/modules/programs/cli/eza/theme.nix b/modules/programs/cli/eza/theme.nix new file mode 100644 index 0000000..da985d7 --- /dev/null +++ b/modules/programs/cli/eza/theme.nix @@ -0,0 +1,156 @@ +{self, ...}: { + flake.modules.homeManager.eza = {config, ...}: let + colors = config.lib.stylix.colors.withHashtag; + in { + imports = [self.modules.homeManager.stylixBase]; + + programs.eza.theme = with colors; { + # keep-sorted start block=yes newline_separated=yes + colourful = true; + + # Colors by file extension category. + file_type = { + # keep-sorted start + build = base04; + compiled = base0D; + compressed = base0E; + crypto = base04; + document = base05; + image = base0A; + lossless = base0C; + music = base0B; + source = base0D; + temp = base08; + video = base08; + # keep-sorted end + }; + + # File kind colors. + filekinds = { + # keep-sorted start + block_device = base08; + char_device = base08; + directory = base0D; + executable = base0B; + mount_point = base09; + normal = base05; + pipe = base04; + socket = base03; + special = base0E; + symlink = base0C; + # keep-sorted end + }; + + # Git status colors. + git = { + # keep-sorted start + conflicted = base08; + deleted = base08; + ignored = base04; + modified = base0A; + new = base0B; + renamed = base0C; + typechange = base0E; + # keep-sorted end + }; + + # Git repo metadata colors. + git_repo = { + # keep-sorted start + branch_main = base05; + branch_other = base0E; + git_clean = base0B; + git_dirty = base08; + # keep-sorted end + }; + + # Link count and hardlink colors. + links = { + # keep-sorted start + multi_link_file = base09; + normal = base0C; + # keep-sorted end + }; + + # Permission bit colors. + perms = { + # keep-sorted start + attribute = base04; + group_execute = base0B; + group_read = base05; + group_write = base0A; + other_execute = base0B; + other_read = base04; + other_write = base0A; + special_other = base04; + special_user_file = base0E; + user_execute_file = base0B; + user_execute_other = base0B; + user_read = base05; + user_write = base0A; + # keep-sorted end + }; + + # Selinux security context colors. + security_context = { + # keep-sorted start + colon = base04; + range = base0E; + role = base0E; + typ = base03; + user = base05; + # keep-sorted end + }; + + # Size column colors by unit and magnitude. + size = { + # keep-sorted start + major = base04; + minor = base0C; + number_byte = base05; + number_giga = base0E; + number_huge = base0E; + number_kilo = base05; + number_mega = base0D; + unit_byte = base04; + unit_giga = base0E; + unit_huge = base09; + unit_kilo = base0D; + unit_mega = base0E; + # keep-sorted end + }; + + # User and group colors. + users = { + # keep-sorted start + group_other = base04; + group_root = base08; + group_yours = base05; + user_other = base0E; + user_root = base08; + user_you = base05; + # keep-sorted end + }; + # keep-sorted end + + # Misc token colors. + # keep-sorted start + blocks = base03; + date = base0A; + flags = base0E; + header = base05; + inode = base04; + octal = base0C; + punctuation = base04; + # keep-sorted end + + # Symlink visuals. + # keep-sorted start + broken_path_overlay = base04; + broken_symlink = base08; + control_char = base0D; + symlink_path = base0C; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/cli/fastfetch.nix b/modules/programs/cli/fastfetch.nix index 267cf75..5d7eef5 100644 --- a/modules/programs/cli/fastfetch.nix +++ b/modules/programs/cli/fastfetch.nix @@ -13,6 +13,8 @@ # Escape code for fastfetch color formatting. esc = fromJSON "\"\\u001b\""; in { + imports = [self.modules.homeManager.shellAbbreviations]; + nixpkgs.overlays = [self.overlays.pkgs]; programs.fastfetch = { @@ -197,6 +199,6 @@ }; }; - programs.fish.shellAbbrs.ff = "fastfetch"; + home.shellAbbreviations.ff = "fastfetch"; }; } diff --git a/modules/programs/cli/fish/aliases.nix b/modules/programs/cli/fish/aliases.nix new file mode 100644 index 0000000..7054c4b --- /dev/null +++ b/modules/programs/cli/fish/aliases.nix @@ -0,0 +1,22 @@ +{ + flake.modules.homeManager.fish = { + # keep-sorted start + + lib, + pkgs, ... + # keep-sorted end + }: let + inherit (lib) getExe'; + in { + programs.fish.shellAliases = { + wget = getExe' pkgs.curl "wcurl"; + + ".." = "cd .."; + "..." = "cd ../.."; + "...." = "cd ../../.."; + "....." = "cd ../../../.."; + "......" = "cd ../../../../.."; + "......." = "cd ../../../../../.."; + }; + }; +} diff --git a/modules/programs/cli/fish/default.nix b/modules/programs/cli/fish/default.nix new file mode 100644 index 0000000..b20fa22 --- /dev/null +++ b/modules/programs/cli/fish/default.nix @@ -0,0 +1,45 @@ +{ + flake.modules.homeManager.fish = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + # keep-sorted start + concatStringsSep + mkOption + types + # keep-sorted end + ; + + cfg = config.programs.fish; + in { + options.programs.fish.interactiveShellInitSnippets = mkOption { + type = types.listOf types.lines; + default = []; + description = "Fish snippets concatenated into interactiveShellInit."; + }; + + config = { + programs.fish = { + enable = true; + + interactiveShellInit = concatStringsSep "\n" cfg.interactiveShellInitSnippets; + + binds = { + # Remove conflicting default bindings. + # keep-sorted start + "alt-d".erase = true; + "alt-e".erase = true; + "alt-l".erase = true; + # keep-sorted end + }; + }; + + # Tools used by many things. + home.packages = [pkgs.file]; + }; + }; +} diff --git a/modules/programs/cli/fish/greeting.nix b/modules/programs/cli/fish/greeting.nix new file mode 100644 index 0000000..86e1475 --- /dev/null +++ b/modules/programs/cli/fish/greeting.nix @@ -0,0 +1,23 @@ +{ + flake.modules.homeManager.fish = { + # keep-sorted start + + lib, + pkgs, ... + # keep-sorted end + }: let + inherit (lib) getExe; + + # keep-sorted start + boxes = getExe pkgs.boxes; + fortune = getExe pkgs.fortune; + # keep-sorted end + in { + programs.fish.functions.fish_greeting = { + description = "Greeting to show when starting a fish shell."; + body = '' + ${fortune} -s | ${boxes} -d ansi + ''; + }; + }; +} diff --git a/modules/programs/cli/fish/plugins.nix b/modules/programs/cli/fish/plugins.nix new file mode 100644 index 0000000..f79cda3 --- /dev/null +++ b/modules/programs/cli/fish/plugins.nix @@ -0,0 +1,18 @@ +{ + flake.modules.homeManager.fish = {pkgs, ...}: { + programs.fish.plugins = let + mkPlugin = source: pkg: { + name = pkg; + inherit (source.${pkg}) src; + }; + in + map (mkPlugin pkgs.fishPlugins) [ + # keep-sorted start + "autopair" + "done" + "fish-you-should-use" + "fishbang" + # keep-sorted end + ]; + }; +} diff --git a/modules/programs/cli/gitfetch.nix b/modules/programs/cli/gitfetch.nix index 9289b47..928dfe6 100644 --- a/modules/programs/cli/gitfetch.nix +++ b/modules/programs/cli/gitfetch.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.gitfetch = { # keep-sorted start pkgs, @@ -7,7 +7,9 @@ }: let inherit (pkgs) gitfetch; in { + imports = [self.modules.homeManager.shellAbbreviations]; + home.packages = [gitfetch]; - programs.fish.shellAbbrs.gf = "gitfetch"; + home.shellAbbreviations.gf = "gitfetch"; }; } diff --git a/modules/programs/cli/onefetch.nix b/modules/programs/cli/onefetch.nix index 04a2949..e94ce8e 100644 --- a/modules/programs/cli/onefetch.nix +++ b/modules/programs/cli/onefetch.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.onefetch = { # keep-sorted start pkgs, @@ -7,7 +7,9 @@ }: let inherit (pkgs) onefetch; in { + imports = [self.modules.homeManager.shellAbbreviations]; + home.packages = [onefetch]; - programs.fish.shellAbbrs.of = "onefetch"; + home.shellAbbreviations.of = "onefetch"; }; } diff --git a/modules/programs/cli/ouch.nix b/modules/programs/cli/ouch.nix new file mode 100644 index 0000000..3c20c4b --- /dev/null +++ b/modules/programs/cli/ouch.nix @@ -0,0 +1,34 @@ +_: { + flake.modules.homeManager.ouch = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + inherit (pkgs) writeShellApplication; + + # keep-sorted start + ouch = getExe pkgs.ouch-rar; + rar = getExe pkgs.rar; + # keep-sorted end + + ouchWrapper = writeShellApplication { + name = "ouch"; + text = '' + if [[ $# -ge 3 && "''${1-}" == compress ]]; then + archive="''${!#}" + + if [[ "$archive" == *.rar ]]; then + exec ${rar} a "$archive" "''${@:2:$(($# - 2))}" + fi + fi + + exec ${ouch} "$@" + ''; + }; + in { + home.packages = [ouchWrapper]; + }; +} diff --git a/modules/programs/cli/ripgrep-all/adapters.nix b/modules/programs/cli/ripgrep-all/adapters.nix index 54cfea5..272d3a3 100644 --- a/modules/programs/cli/ripgrep-all/adapters.nix +++ b/modules/programs/cli/ripgrep-all/adapters.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.ripgrep-all = { # keep-sorted start lib, @@ -10,6 +10,8 @@ inherit (lib) makeBinPath; inherit (pkgs) symlinkJoin; in { + imports = [self.modules.homeManager.nur]; + programs.ripgrep-all = { # Wrap rga so adapters can find their runtime tools. package = symlinkJoin { diff --git a/modules/programs/cli/ripgrep-all/adapters/gron.nix b/modules/programs/cli/ripgrep-all/adapters/gron.nix index 6d9b8dd..5e03328 100644 --- a/modules/programs/cli/ripgrep-all/adapters/gron.nix +++ b/modules/programs/cli/ripgrep-all/adapters/gron.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.ripgrep-all = { # keep-sorted start lib, @@ -13,6 +13,8 @@ qq = getExe pkgs.nur.repos.adam0.qq-jfryy; # keep-sorted end in { + imports = [self.modules.homeManager.nur]; + programs.ripgrep-all.custom_adapters = [ # keep-sorted start block=yes newline_separated=yes # Convert JSON into line-oriented assignments for grep. diff --git a/modules/programs/cli/systeroid.nix b/modules/programs/cli/systeroid.nix deleted file mode 100644 index 99412a0..0000000 --- a/modules/programs/cli/systeroid.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - flake.modules.homeManager.systeroid = {pkgs, ...}: let - iniFormat = pkgs.formats.ini {}; - in { - # keep-sorted start block=yes newline_separated=yes - home.packages = [pkgs.systeroid]; - - # Generate systeroid settings. - xdg.configFile."systeroid/systeroid.conf".source = iniFormat.generate "systeroid.conf" { - general.display_deprecated = true; - cli.output_type = "tree"; - }; - # keep-sorted end - }; -} diff --git a/modules/programs/gpg.nix b/modules/programs/gpg.nix new file mode 100644 index 0000000..18ef6c2 --- /dev/null +++ b/modules/programs/gpg.nix @@ -0,0 +1,32 @@ +{ + flake.modules.homeManager.gpg = { + # keep-sorted start + config, + pkgs, + # keep-sorted end + ... + }: { + # keep-sorted start block=yes newline_separated=yes + # Supply gcr for the gnome pinentry integration. + home.packages = [pkgs.gcr]; + + programs.gpg = { + enable = true; + + # Store the keyring under xdg data home instead of ~/.gnupg. + homedir = "${config.xdg.dataHome}/gnupg"; + }; + + services.gpg-agent = { + enable = true; + + # Expose an ssh agent socket from gpg-agent so ssh can use + # Keys stored on smartcards or in the gpg keyring. + enableSshSupport = true; + + # Use the gnome pinentry for passphrase prompts. + pinentry.package = pkgs.pinentry-gnome3; + }; + # keep-sorted end + }; +} diff --git a/modules/programs/gui/beeper.nix b/modules/programs/gui/beeper.nix index a2f9326..be9c899 100644 --- a/modules/programs/gui/beeper.nix +++ b/modules/programs/gui/beeper.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.beeper = { # keep-sorted start lib, @@ -43,6 +43,8 @@ ]; }; in { + imports = [self.modules.homeManager.nur]; + home.packages = [pkg]; xdg.autostart = { diff --git a/modules/programs/gui/discord/default.nix b/modules/programs/gui/discord/default.nix index 004b150..ab9621a 100644 --- a/modules/programs/gui/discord/default.nix +++ b/modules/programs/gui/discord/default.nix @@ -5,10 +5,7 @@ }: { flake-file.inputs.nixcord = { url = "github:kaylorben/nixcord"; - inputs = { - flake-parts.follows = "flake-parts"; - nixpkgs.follows = "nixpkgs"; - }; + inputs.flake-parts.follows = "flake-parts"; }; flake.modules.homeManager.discord = {config, ...}: { diff --git a/modules/programs/gui/discord/plugins/communication.nix b/modules/programs/gui/discord/plugins/communication.nix index f75fbed..776e702 100644 --- a/modules/programs/gui/discord/plugins/communication.nix +++ b/modules/programs/gui/discord/plugins/communication.nix @@ -1,11 +1,13 @@ -{ +{self, ...}: { flake.modules.homeManager.discord = { # keep-sorted start - equibopStylix, + config, vars, # keep-sorted end ... }: { + imports = [self.modules.homeManager.stylixPersonal]; + programs.nixcord.config.plugins = { # keep-sorted start block=yes newline_separated=yes ClearURLs.enable = true; @@ -63,7 +65,7 @@ messageFetchTimer = { enable = true; - iconColor = equibopStylix.messageFetchTimerIcon; + iconColor = config.lib.stylix.colors.base0B; }; messageLatency = { diff --git a/modules/programs/gui/discord/plugins/interface.nix b/modules/programs/gui/discord/plugins/interface.nix index 2dc288c..cdb48f5 100644 --- a/modules/programs/gui/discord/plugins/interface.nix +++ b/modules/programs/gui/discord/plugins/interface.nix @@ -1,15 +1,17 @@ -{ +{self, ...}: { flake.modules.homeManager.discord = { # keep-sorted start - equibopStylix, + config, lib, # keep-sorted end ... }: let - inherit (lib) mkEnableOption; + inherit (lib) fromHexString mkEnableOption; in # Interface and layout related plugins. { + imports = [self.modules.homeManager.stylixPersonal]; + # User option to toggle camera features in plugins. options.programs.nixcord.equibop.camera.enable = mkEnableOption "Enable camera functionality for Equibop plugins."; @@ -115,10 +117,10 @@ questButtonUnclaimed = "none"; # keep-sorted end # keep-sorted start - restyleQuestsClaimed = equibopStylix.questify.claimed; - restyleQuestsExpired = equibopStylix.questify.expired; - restyleQuestsIgnored = equibopStylix.questify.ignored; - restyleQuestsUnclaimed = equibopStylix.questify.unclaimed; + restyleQuestsClaimed = fromHexString config.lib.stylix.colors.base0E; + restyleQuestsExpired = fromHexString config.lib.stylix.colors.base00; + restyleQuestsIgnored = fromHexString config.lib.stylix.colors.base08; + restyleQuestsUnclaimed = fromHexString config.lib.stylix.colors.base0D; # keep-sorted end }; diff --git a/modules/programs/gui/discord/themes/default.nix b/modules/programs/gui/discord/themes/default.nix index 3692daa..512d0ed 100644 --- a/modules/programs/gui/discord/themes/default.nix +++ b/modules/programs/gui/discord/themes/default.nix @@ -1,8 +1,7 @@ -{ +{self, ...}: { flake.modules.homeManager.discord = { # keep-sorted start config, - lib, pkgs, # keep-sorted end ... @@ -15,30 +14,8 @@ replaceStrings # keep-sorted end ; - inherit (lib) fromHexString; inherit (config.lib.stylix) colors; - - equibopStylix = { - # keep-sorted start block=yes newline_separated=yes - # Icon color for message fetch timer. - messageFetchTimerIcon = colors.base0B; - - # Reuse the full Stylix palette in local Equibop theming. - palette = colors.withHashtag; - - # Questify color assignments. - questify = { - # keep-sorted start - claimed = fromHexString colors.base0E; - expired = fromHexString colors.base00; - ignored = fromHexString colors.base08; - unclaimed = fromHexString colors.base0D; - # keep-sorted end - }; - # keep-sorted end - }; - - themeVars = equibopStylix.palette // {monospaceFont = config.stylix.fonts.monospace.name;}; + themeVars = colors.withHashtag // {monospaceFont = config.stylix.fonts.monospace.name;}; system24Theme = pkgs.writeText "system24.css" ( replaceStrings @@ -47,8 +24,7 @@ (readFile ./system24.css) ); in { - # Pass themed values to Equibop plugins through module arguments. - _module.args.equibopStylix = equibopStylix; + imports = [self.modules.homeManager.stylixPersonal]; programs.nixcord.config = { # Enable custom css themes. diff --git a/modules/programs/gui/ghostty/default.nix b/modules/programs/gui/ghostty/default.nix index 0b36b55..f6fd8cf 100644 --- a/modules/programs/gui/ghostty/default.nix +++ b/modules/programs/gui/ghostty/default.nix @@ -1,4 +1,9 @@ -{ +{inputs, ...}: { + flake-file.inputs.ghostty-cursor-shaders = { + url = "github:sahaj-b/ghostty-cursor-shaders"; + flake = false; + }; + flake.modules.homeManager.ghostty = { config, lib, @@ -6,16 +11,19 @@ ... }: let inherit (lib) getExe; - cursorShader = pkgs.nur.repos.adam0.ghosttyCursorShaders.cursor-tail.overrideAttrs (old: { - patches = (old.patches or []) ++ [./patches/cursor-tail-local-settings.patch]; - }); + + cursorShaders = pkgs.applyPatches { + name = "ghostty-cursor-shaders-patched"; + src = inputs.ghostty-cursor-shaders; + patches = [./patches/cursor-tail-local-settings.patch]; + }; in { # keep-sorted start block=yes newline_separated=yes programs.ghostty = { enable = true; - # Add the cursor shader to to ghostty config. - settings.custom-shader = "${config.xdg.configHome}/ghostty/cursor.glsl"; + # Add the cursor shader to ghostty config. + settings.custom-shader = "${cursorShaders}/cursor_tail.glsl"; }; # Start Ghostty with a systemd service. @@ -29,8 +37,6 @@ Install.WantedBy = ["graphical-session.target"]; }; - # Put the shader file into the ghostty config dir. - xdg.configFile."ghostty/cursor.glsl".source = "${cursorShader}/cursor_tail.glsl"; # keep-sorted end }; } diff --git a/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch b/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch index adf581a..db67291 100644 --- a/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch +++ b/modules/programs/gui/ghostty/patches/cursor-tail-local-settings.patch @@ -1,19 +1,17 @@ diff --git a/cursor_tail.glsl b/cursor_tail.glsl -index 5a648cc..6a5379d 100644 +index 5a648cc..53a7a58 100644 --- a/cursor_tail.glsl +++ b/cursor_tail.glsl -@@ -4,10 +4,10 @@ vec3 sRGBToLinear(vec3 c) { - } +@@ -5,9 +5,9 @@ vec3 sRGBToLinear(vec3 c) { // --- CONFIGURATION --- --vec4 TRAIL_COLOR = vec4(sRGBToLinear(iCurrentCursorColor.rgb), iCurrentCursorColor.a); // for custom color: vec4(0.2, 0.6, 1.0, 0.5); (wrap in sRGBToLinear for correct brightness) + vec4 TRAIL_COLOR = vec4(sRGBToLinear(iCurrentCursorColor.rgb), iCurrentCursorColor.a); // for custom color: vec4(0.2, 0.6, 1.0, 0.5); (wrap in sRGBToLinear for correct brightness) -const float DURATION = 0.09; // in seconds -const float MAX_TRAIL_LENGTH = 0.2; -const float THRESHOLD_MIN_DISTANCE = 1.5; // min distance to show trail (units of cursor width) -+vec4 TRAIL_COLOR = iCurrentCursorColor; // for custom color: vec4(0.2, 0.6, 1.0, 0.5); (wrap in sRGBToLinear for correct brightness) +const float DURATION = 0.2; // in seconds +const float MAX_TRAIL_LENGTH = 0.5; -+const float THRESHOLD_MIN_DISTANCE = 0.0; // min distance to show trail (units of cursor width) ++const float THRESHOLD_MIN_DISTANCE = 0.2; // min distance to show trail (units of cursor width) const float BLUR = 2.0; // blur size in pixels (for antialiasing) // --- CONSTANTS for easing functions --- diff --git a/modules/programs/gui/krita.nix b/modules/programs/gui/krita.nix deleted file mode 100644 index c51d646..0000000 --- a/modules/programs/gui/krita.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - flake.modules.homeManager.krita = {pkgs, ...}: { - home.packages = [pkgs.krita]; - }; -} diff --git a/modules/programs/gui/obsidian.nix b/modules/programs/gui/obsidian.nix deleted file mode 100644 index ad32aed..0000000 --- a/modules/programs/gui/obsidian.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - flake.modules.homeManager.obsidian = {pkgs, ...}: { - home.packages = [pkgs.obsidian]; - }; -} diff --git a/modules/programs/gui/prism.nix b/modules/programs/gui/prism.nix index 7d98687..c8e2aaf 100644 --- a/modules/programs/gui/prism.nix +++ b/modules/programs/gui/prism.nix @@ -1,10 +1,10 @@ -{ +{self, ...}: { flake.modules.homeManager.prism = { # keep-sorted start config, lib, - osConfig, pkgs, + vars, # keep-sorted end ... }: let @@ -16,10 +16,19 @@ removeSuffix # keep-sorted end ; + inherit (vars) defaultLocale; # Reuse the XDG downloads path for launcher-managed downloads. downloadsDir = config.xdg.userDirs.download; + monospaceFont = config.stylix.fonts.monospace.name; in { + imports = [ + # keep-sorted start + self.modules.generic.vars + self.modules.homeManager.stylixPersonal + # keep-sorted end + ]; + programs.prismlauncher = { enable = true; @@ -46,10 +55,9 @@ }; settings = { - # Derive identity and language from host-level configuration. + # Derive language from shared regional defaults. # keep-sorted start - Language = removeSuffix ".UTF-8" osConfig.i18n.defaultLocale; - LastHostname = osConfig.networking.hostName; + Language = removeSuffix ".UTF-8" defaultLocale; UseSystemLocale = true; # keep-sorted end @@ -70,6 +78,7 @@ ConsoleFontSize = 11; ConsoleMaxLines = 100000; ConsoleOverflowStop = true; + Consolefont = monospaceFont; # keep-sorted end # Keep console hidden during normal launches and failures. diff --git a/modules/programs/gui/spotify/default.nix b/modules/programs/gui/spotify/default.nix new file mode 100644 index 0000000..6eb9884 --- /dev/null +++ b/modules/programs/gui/spotify/default.nix @@ -0,0 +1,85 @@ +{ + inputs, + self, + ... +}: { + flake-file.inputs.spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + flake.modules.homeManager.spotify = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) attrValues; + inherit (pkgs.stdenv.hostPlatform) system; + + # Access spicetify-nix packages. + spicePkgs = inputs.spicetify-nix.legacyPackages.${system}; + in { + imports = [ + inputs.spicetify-nix.homeManagerModules.spicetify + self.modules.homeManager.nur + ]; + + programs.spicetify = { + enable = true; + + # Turn on experimental features, use wayland, and apply wm patch. + # keep-sorted start + experimentalFeatures = true; + wayland = true; + windowManagerPatch = true; + # keep-sorted end + + # keep-sorted start block=yes newline_separated=yes + # Enable extensions. + enabledExtensions = attrValues { + # Extensions from spicetify-nix. + inherit + (spicePkgs.extensions) + # keep-sorted start + aiBandBlocker + betterGenres + copyLyrics + fullAlbumDate + goToSong + keyboardShortcut + listPlaylistsWithSong + playingSource + queueTime + sectionMarker + seekSong + wikify + # keep-sorted end + ; + + # Extensions from adam0's nur. + inherit + (pkgs.nur.repos.adam0.spicetifyExtensions) + # keep-sorted start + moreLyrics + playlistIcons + volumePercentage + # keep-sorted end + ; + }; + + # Enable CSS snippets. + enabledSnippets = attrValues { + inherit + (spicePkgs.snippets) + # keep-sorted start + pointer + removeTheArtistsAndCreditsSectionsFromTheSidebar + # keep-sorted end + ; + }; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/gui/spotify/theme.nix b/modules/programs/gui/spotify/theme.nix new file mode 100644 index 0000000..86daee7 --- /dev/null +++ b/modules/programs/gui/spotify/theme.nix @@ -0,0 +1,118 @@ +{ + inputs, + self, + ... +}: { + flake.modules.homeManager.spotify = { + config, + pkgs, + ... + }: let + inherit (config.lib.stylix) colors; + inherit (pkgs.stdenv.hostPlatform) system; + + font = config.stylix.fonts.monospace.name; + spicePkgs = inputs.spicetify-nix.legacyPackages.${system}; + in { + imports = [self.modules.homeManager.stylixPersonal]; + + # keep-sorted start block=yes newline_separated=yes + # Apply local Spicetify overrides on top of the Stylix palette. + programs.spicetify = { + theme = { + name = "stylix"; + inherit (spicePkgs.themes.text) src; + sidebarConfig = false; + + # Set font to stylix font. + # Force the text theme to show all images. + # Disable border highlight animations and fades. + # Remove rounded corners from all elements for consistent styling. + # Remove the ugly spotify-tui header. + additionalCss = '' + :root { + --font-family: '${font}', monospace; + + --display-card-image: block; + --display-coverart-image: block; + --display-header-image: block; + --display-sidebar-image: block; + --display-tracklist-image: block; + --border-transition: 0s; + } + + .Root__globalNav, + .main-yourLibraryX-entryPoints, + .Root__main-view, + .main-nowPlayingBar-container, + .Root__right-sidebar:has(aside:not(:empty)) { + transition: none !important; + } + + .Root__globalNav::before, + .Root__nav-bar .main-yourLibraryX-entryPoints::before, + .Root__main-view::before, + .main-nowPlayingBar-container::before, + .Root__right-sidebar:has(aside:not(:empty))::before { + transition: none !important; + } + + .player-controls__buttons, + .main-nowPlayingBar-extraControls, + .main-connectBar-connectBar { + opacity: 1 !important; + transition: none !important; + } + + *, + *::before, + *::after { + border-radius: 0px !important; + } + + .view-homeShortcutsGrid-shortcuts::before { + content: "" !important; + } + ''; + }; + + colorScheme = "custom"; + customColorScheme = with colors; { + # keep-sorted start + button = base04; + button-active = base04; + button-disabled = base03; + card = base03; + equalizer = base0B; + highlight = base02; + highlight-elevated = base03; + main = base00; + main-elevated = base02; + misc = base02; + notification = base02; + notification-error = base08; + player = base04; + selected-row = base04; + shadow = base00; + sidebar = base01; + subtext = base05; + tab-active = base02; + text = base05; + # keep-sorted end + + # keep-sorted start + accent = base0B; + accent-active = base0B; + accent-inactive = base00; + banner = base0B; + border-active = base0D; + border-inactive = base01; + header = base03; + # keep-sorted end + }; + }; + + stylix.targets.spicetify.enable = false; + # keep-sorted end + }; +} diff --git a/modules/programs/gui/warehouse.nix b/modules/programs/gui/warehouse.nix index 48210b9..f02996c 100644 --- a/modules/programs/gui/warehouse.nix +++ b/modules/programs/gui/warehouse.nix @@ -1,5 +1,7 @@ -{ +{self, ...}: { flake.modules.homeManager.warehouse = {pkgs, ...}: { + imports = [self.modules.homeManager.flatpak]; + home.packages = [pkgs.warehouse]; }; } diff --git a/modules/programs/gui/zathura.nix b/modules/programs/gui/zathura.nix index 10ff45b..f093851 100644 --- a/modules/programs/gui/zathura.nix +++ b/modules/programs/gui/zathura.nix @@ -1,5 +1,9 @@ -{ - flake.modules.homeManager.zathura = _: { +{self, ...}: { + flake.modules.homeManager.zathura = {config, ...}: let + sansSerifFont = config.stylix.fonts.sansSerif.name; + in { + imports = [self.modules.homeManager.stylixPersonal]; + programs.zathura = { enable = true; @@ -11,6 +15,9 @@ # keep-sorted end # keep-sorted start block=yes newline_separated=yes + # Keep zathura fonts consistent. + font = sansSerifFont; + # Use the system clipboard for text selection. selection-clipboard = "clipboard"; diff --git a/modules/programs/gui/zen/chrome.nix b/modules/programs/gui/zen/chrome.nix index 501df58..ab49f80 100644 --- a/modules/programs/gui/zen/chrome.nix +++ b/modules/programs/gui/zen/chrome.nix @@ -1,9 +1,9 @@ -{ +{self, ...}: { flake.modules.homeManager.zen = { # keep-sorted start + config, inputs, lib, - osConfig, pkgs, # keep-sorted end ... @@ -15,8 +15,10 @@ inherit (pkgs.stdenv.hostPlatform) system; # Convert the stylix base16 scheme into a format accepted by nix-userstyles. - palette = stylixPalette osConfig; + palette = stylixPalette config; in { + imports = [self.modules.homeManager.stylixPersonal]; + # Remove rounded corners in zen browser interface. programs.zen-browser.profiles.default = { userChrome = '' diff --git a/modules/programs/gui/zen/default.nix b/modules/programs/gui/zen/default.nix index 7abe4f7..087c469 100644 --- a/modules/programs/gui/zen/default.nix +++ b/modules/programs/gui/zen/default.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + self, + ... +}: { flake-file.inputs = { zen-browser = { url = "github:0xc000022070/zen-browser-flake?ref=beta"; @@ -14,8 +18,11 @@ flake.modules.homeManager.zen = { imports = [ inputs.zen-browser.homeModules.beta + self.modules.homeManager.stylixBase ]; programs.zen-browser.enable = true; + + stylix.targets.zen-browser.profileNames = ["default"]; }; } diff --git a/modules/programs/gui/zen/extensions.nix b/modules/programs/gui/zen/extensions.nix index 00bb82a..c63976d 100644 --- a/modules/programs/gui/zen/extensions.nix +++ b/modules/programs/gui/zen/extensions.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.zen = {pkgs, ...}: let inherit (builtins) @@ -8,6 +8,8 @@ # keep-sorted end ; in { + imports = [self.modules.homeManager.nur]; + # Add extensions in nur. programs.zen-browser.profiles.default.extensions = { # Force extensions to be enabled. diff --git a/modules/programs/tui/atuin.nix b/modules/programs/tui/atuin.nix new file mode 100644 index 0000000..8ecedb0 --- /dev/null +++ b/modules/programs/tui/atuin.nix @@ -0,0 +1,64 @@ +{self, ...}: { + flake.modules.homeManager.atuin = {config, ...}: let + inherit (config.xdg) cacheHome; + in { + imports = [self.modules.homeManager.fish]; + + programs.atuin = let + logLevel = "error"; + in { + enable = true; + forceOverwriteSettings = true; + + # keep-sorted start block=yes newline_separated=yes + daemon = { + enable = true; + inherit logLevel; + }; + + settings = { + # keep-sorted start + search-mode = "daemon-fuzzy"; + update_check = false; + # keep-sorted end + + # keep-sorted start + inline_height = 24; + invert = true; + show_help = false; + show_tabs = false; + style = "full"; + # keep-sorted end + + # keep-sorted start block=yes newline_separated=yes + history_filter = [ + # keep-sorted start + ''(^|[[:space:]])(export[[:space:]]+)?[A-Z_][A-Z0-9_]*(_TOKEN|_SECRET|_PASSWORD|_PASSWD|_API_KEY|_ACCESS_KEY|_SECRET_ACCESS_KEY)(="[^"]+"|=[^[:space:]]+)'' + ''(^|[[:space:]])--?(token|secret|password|passwd|api[-_]?key|access[-_]?key|client[-_]?secret)(=|[[:space:]]+)'' + ''(sk-[A-Za-z0-9_-]{20,}|ghp_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,}|glpat-[A-Za-z0-9_-]{20,}|AKIA[0-9A-Z]{16})'' + # keep-sorted end + ]; + + keymap_mode = "vim-normal"; + + logs = { + level = logLevel; + dir = "${cacheHome}/atuin/logs"; + }; + # keep-sorted end + + # TODO(adam0): set sync address when ready. + # sync_address = ""; + sync_frequency = 600; + }; + # keep-sorted end + }; + + programs.fish.interactiveShellInitSnippets = [ + # Disable fish history in favor of atuin. + '' + set -gx fish_history "" + '' + ]; + }; +} diff --git a/modules/programs/tui/bluetui.nix b/modules/programs/tui/bluetui.nix new file mode 100644 index 0000000..e33607e --- /dev/null +++ b/modules/programs/tui/bluetui.nix @@ -0,0 +1,55 @@ +{self, ...}: { + flake.modules.homeManager.bluetui = { + # keep-sorted start + config, + lib, + osConfig, + pkgs, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + getExe + getExe' + mkIf + # keep-sorted end + ; + + cfgBluetooth = osConfig.capabilities.bluetooth; + pkg = pkgs.bluetui; + in { + imports = [self.modules.homeManager.xdgTerminal]; + + config = + # Only install when bluetooth is enabled. + mkIf cfgBluetooth { + # keep-sorted start block=yes newline_separated=yes + home.packages = [pkg]; + + # Create desktop entry to allow launching via launcher. + xdg.desktopEntries.bluetui = { + name = "Bluetui"; + genericName = "Terminal Bluetooth Manager"; + icon = "bluetooth"; + + exec = let + # keep-sorted start + bluetui = getExe' pkg "bluetui"; + terminalCommand = getExe config.xdg.terminal-exec.package; + # keep-sorted end + in "${terminalCommand} --title=Bluetui ${bluetui}"; + + categories = [ + # keep-sorted start + "ConsoleOnly" + "HardwareSettings" + "Settings" + # keep-sorted end + ]; + }; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/btop.nix b/modules/programs/tui/btop.nix new file mode 100644 index 0000000..5ac3039 --- /dev/null +++ b/modules/programs/tui/btop.nix @@ -0,0 +1,77 @@ +{ + flake.modules.homeManager.btop = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) mkOption types; + + inherit (config.btop) gpuBackends; + hasCuda = lib.elem "cuda" gpuBackends; + hasRocm = lib.elem "rocm" gpuBackends; + + # Pick gpu-aware version of btop. + btopPackage = + if hasCuda && hasRocm + then + pkgs.btop.override { + cudaSupport = true; + rocmSupport = true; + } + else if hasCuda + then pkgs.btop-cuda + else if hasRocm + then pkgs.btop-rocm + else pkgs.btop; + in { + options.btop.gpuBackends = mkOption { + type = types.listOf ( + types.enum [ + # keep-sorted start + "cuda" + "rocm" + # keep-sorted end + ] + ); + default = []; + description = "Select GPU backends to enable in btop."; + }; + + config.programs.btop = { + enable = true; + package = btopPackage; + + settings = { + # keep-sorted start newline_separated=yes + # Disable logging. + log_level = "DISABLED"; + + # Disable rounded corners for consistent flat design. + rounded_corners = false; + + # Update frequency of 1000ms balances responsiveness and performance. + update_ms = 1000; + + # Match vim-style navigation. + vim_keys = true; + # keep-sorted end + + # Process display settings. + # keep-sorted start + proc_aggregate = true; + proc_gradient = false; + proc_tree = true; + # keep-sorted end + + # Memory display settings. + # keep-sorted start + mem_graphs = true; + swap_disk = false; + # keep-sorted end + }; + }; + }; +} diff --git a/modules/programs/tui/cava.nix b/modules/programs/tui/cava.nix new file mode 100644 index 0000000..5e43f59 --- /dev/null +++ b/modules/programs/tui/cava.nix @@ -0,0 +1,32 @@ +{self, ...}: { + flake.modules.homeManager.cava = _: { + imports = [self.modules.homeManager.stylixBase]; + + programs.cava = { + enable = true; + + settings = { + # keep-sorted start block=yes newline_separated=yes + general = { + # keep-sorted start + bar_spacing = 2; + bar_width = 1; + # keep-sorted end + }; + + # Use pulseaudio as input as pipewire doesnt work on pc? + input.method = "pulse"; + + smoothing = { + # keep-sorted start + monstercat = 1; + noise_reduction = 33; + # keep-sorted end + }; + # keep-sorted end + }; + }; + + stylix.targets.cava.rainbow.enable = true; + }; +} diff --git a/modules/programs/tui/fzf.nix b/modules/programs/tui/fzf.nix new file mode 100644 index 0000000..89c7ee9 --- /dev/null +++ b/modules/programs/tui/fzf.nix @@ -0,0 +1,32 @@ +{ + flake.modules.homeManager.fzf = {lib, ...}: let + inherit (lib) mkForce; + in { + programs.fzf = let + enableShellIntegration = false; + in { + enable = true; + + colors.gutter = mkForce "-1"; + + # keep-sorted start + enableBashIntegration = enableShellIntegration; + enableFishIntegration = enableShellIntegration; + enableZshIntegration = enableShellIntegration; + # keep-sorted end + + # Change prompt default to look better. + defaultOptions = [ + # keep-sorted start + "--border sharp" + "--prompt '➜ '" + # keep-sorted end + ]; + }; + + stylix.targets.fzf.colors.override.withHashtag = { + base00 = "-1"; + base01 = "-1"; + }; + }; +} diff --git a/modules/programs/tui/impala.nix b/modules/programs/tui/impala.nix new file mode 100644 index 0000000..7882752 --- /dev/null +++ b/modules/programs/tui/impala.nix @@ -0,0 +1,54 @@ +{self, ...}: { + flake.modules.homeManager.impala = { + # keep-sorted start + config, + lib, + osConfig, + pkgs, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + getExe + getExe' + mkIf + # keep-sorted end + ; + + cfgWifi = osConfig.capabilities.wifi; + pkg = pkgs.impala; + in { + imports = [self.modules.homeManager.xdgTerminal]; + + config = + # Only install when wifi is enabled. + mkIf cfgWifi { + # keep-sorted start block=yes newline_separated=yes + home.packages = [pkg]; + + # Create desktop entry to allow launching via launcher. + xdg.desktopEntries.impala = { + name = "Impala"; + genericName = "Terminal WiFi Manager"; + icon = "network-wireless"; + + exec = let + # keep-sorted start + impala = getExe' pkg "impala"; + terminalCommand = getExe config.xdg.terminal-exec.package; + # keep-sorted end + in "${terminalCommand} --title=Impala ${impala}"; + + categories = [ + # keep-sorted start + "ConsoleOnly" + "Network" + # keep-sorted end + ]; + }; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/neovim/components/bufferline.nix b/modules/programs/tui/neovim/components/bufferline.nix index 370fa38..a08a171 100644 --- a/modules/programs/tui/neovim/components/bufferline.nix +++ b/modules/programs/tui/neovim/components/bufferline.nix @@ -1,14 +1,16 @@ -{ +{self, ...}: { flake.modules.homeManager.neovim = { # keep-sorted start + config, lib, - osConfig, # keep-sorted end ... }: let - colors = osConfig.lib.stylix.colors.withHashtag; + colors = config.lib.stylix.colors.withHashtag; inherit (lib.generators) mkLuaInline; in { + imports = [self.modules.homeManager.stylixBase]; + # keep-sorted start block=yes newline_separated=yes nvf.luaConfigPreSnippets = [ '' diff --git a/modules/programs/tui/neovim/components/dashboard.nix b/modules/programs/tui/neovim/components/dashboard.nix index 7904804..c1c1b61 100644 --- a/modules/programs/tui/neovim/components/dashboard.nix +++ b/modules/programs/tui/neovim/components/dashboard.nix @@ -1,8 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.neovim = { # keep-sorted start + config, lib, - osConfig, pkgs, # keep-sorted end ... @@ -11,8 +11,10 @@ inherit (lib) getExe; inherit (lib.generators) mkLuaInline; - colors = osConfig.lib.stylix.colors.withHashtag; + colors = config.lib.stylix.colors.withHashtag; in { + imports = [self.modules.homeManager.stylixBase]; + # keep-sorted start block=yes newline_separated=yes # Capture dashboard metrics once so the footer can read cached values. nvf.luaConfigPreSnippets = [ diff --git a/modules/programs/tui/neovim/components/telescope.nix b/modules/programs/tui/neovim/components/telescope.nix index 0188478..cfd83f5 100644 --- a/modules/programs/tui/neovim/components/telescope.nix +++ b/modules/programs/tui/neovim/components/telescope.nix @@ -1,13 +1,15 @@ -{ +{self, ...}: { flake.modules.homeManager.neovim = { # keep-sorted start - osConfig, + config, pkgs, # keep-sorted end ... }: let - colors = osConfig.lib.stylix.colors.withHashtag; + colors = config.lib.stylix.colors.withHashtag; in { + imports = [self.modules.homeManager.stylixBase]; + nvf.luaConfigPreSnippets = [ # Install Telescope as the global vim.ui.select provider after UI startup. '' diff --git a/modules/programs/tui/neovim/default.nix b/modules/programs/tui/neovim/default.nix index 0e875c0..baaf55d 100644 --- a/modules/programs/tui/neovim/default.nix +++ b/modules/programs/tui/neovim/default.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + self, + ... +}: { flake-file.inputs = { nvf = { url = "github:adam01110/nvf?ref=personal"; @@ -25,7 +29,10 @@ cfg = config.nvf; in { - imports = [inputs.nvf.homeManagerModules.default]; + imports = [ + inputs.nvf.homeManagerModules.default + self.modules.homeManager.stylixBase + ]; options.nvf = { # keep-sorted start block=yes newline_separated=yes @@ -68,6 +75,8 @@ VISUAL = editor; # keep-sorted end }; + + stylix.targets.nvf.transparentBackground = true; }; }; } diff --git a/modules/programs/tui/neovim/languages/docker.nix b/modules/programs/tui/neovim/languages/docker.nix new file mode 100644 index 0000000..afb33c3 --- /dev/null +++ b/modules/programs/tui/neovim/languages/docker.nix @@ -0,0 +1,8 @@ +{ + flake.modules.homeManager.neovim = _: { + programs.nvf.settings.vim.languages.docker = { + enable = true; + extraDiagnostics.enable = true; + }; + }; +} diff --git a/modules/programs/tui/neovim/languages/other.nix b/modules/programs/tui/neovim/languages/other.nix index be5260f..b6b82e9 100644 --- a/modules/programs/tui/neovim/languages/other.nix +++ b/modules/programs/tui/neovim/languages/other.nix @@ -4,6 +4,7 @@ # keep-sorted start bash.enable = true; csharp.enable = true; + fish.enable = true; html.enable = true; java.enable = true; json.enable = true; diff --git a/modules/programs/tui/neovim/settings.nix b/modules/programs/tui/neovim/settings.nix index c369270..e9d791c 100644 --- a/modules/programs/tui/neovim/settings.nix +++ b/modules/programs/tui/neovim/settings.nix @@ -1,7 +1,9 @@ -{ - flake.modules.homeManager.neovim = {osConfig, ...}: let - colors = osConfig.lib.stylix.colors.withHashtag; +{self, ...}: { + flake.modules.homeManager.neovim = {config, ...}: let + colors = config.lib.stylix.colors.withHashtag; in { + imports = [self.modules.homeManager.stylixBase]; + programs.nvf.settings.vim = { searchCase = "smart"; diff --git a/modules/programs/tui/nvtop.nix b/modules/programs/tui/nvtop.nix new file mode 100644 index 0000000..f5cbd94 --- /dev/null +++ b/modules/programs/tui/nvtop.nix @@ -0,0 +1,59 @@ +{ + flake.modules.homeManager.nvtop = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit + (lib) + # keep-sorted start + genAttrs + head + mkOption + tail + types + # keep-sorted end + ; + + gpuTypes = [ + # keep-sorted start + "amd" + "apple" + "intel" + "msm" + "nvidia" + "panfrost" + "panthor" + "v3d" + # keep-sorted end + ]; + in { + options.nvtop.types = mkOption { + type = types.listOf (types.enum gpuTypes); + default = []; + description = "Choose which GPU types to monitor with nvtop."; + }; + + # Override enables multiple gpu backends in single nvtop instance. + config.home.packages = let + selectedTypes = config.nvtop.types; + in + if selectedTypes == [] + then [] + else let + primaryType = head selectedTypes; + extraTypes = tail selectedTypes; + basePackage = pkgs.nvtopPackages.${primaryType}; + backends = genAttrs selectedTypes (_: true); + in [ + ( + if extraTypes == [] + then basePackage + else basePackage.override backends + ) + ]; + }; +} diff --git a/modules/programs/tui/opencode/default.nix b/modules/programs/tui/opencode/default.nix index bc9897c..30659c4 100644 --- a/modules/programs/tui/opencode/default.nix +++ b/modules/programs/tui/opencode/default.nix @@ -23,8 +23,8 @@ inherit (pkgs) # keep-sorted start - symlinkJoin makeWrapper + symlinkJoin # keep-sorted end ; @@ -43,9 +43,17 @@ env ); in { - imports = [self.modules.homeManager.xdgTerminal]; + imports = [ + # keep-sorted start + self.modules.homeManager.nur + self.modules.homeManager.shellAbbreviations + self.modules.homeManager.xdgTerminal + # keep-sorted end + ]; # keep-sorted start block=yes newline_separated=yes + home.shellAbbreviations.oc = "opencode"; + programs.opencode = { enable = true; diff --git a/modules/programs/tui/opencode/instructions.md b/modules/programs/tui/opencode/instructions.md index 7a1b51f..03ed4c4 100644 --- a/modules/programs/tui/opencode/instructions.md +++ b/modules/programs/tui/opencode/instructions.md @@ -65,3 +65,11 @@ TODO tool for that interaction. If a required tool is unavailable, use shell helpers such as `nix run nixpkgs#` or `comma ` to access the missing command. + +### Prefer shell for file and git operations + +- Use bash for simple filesystem operations such as renaming, moving, copying, + creating, or deleting files and directories. +- Use git commands through bash for repository workflows such as porting changes + to forks, cherry-picking, applying patches, merging, rebasing, and inspecting + branches, remotes, history, or diffs. diff --git a/modules/programs/tui/opencode/plugins.nix b/modules/programs/tui/opencode/plugins.nix index fd6ad1b..3822fa5 100644 --- a/modules/programs/tui/opencode/plugins.nix +++ b/modules/programs/tui/opencode/plugins.nix @@ -1,6 +1,9 @@ -{ +{self, ...}: { flake.modules.homeManager.opencode = {pkgs, ...}: { - imports = [pkgs.nur.repos.adam0.hmModules.opencode-plugins]; + imports = [ + pkgs.nur.repos.adam0.hmModules.opencode-plugins + self.modules.homeManager.nur + ]; programs.opencode.plugins = { # keep-sorted start diff --git a/modules/programs/tui/opencode/settings.nix b/modules/programs/tui/opencode/settings.nix index 1b275fe..bbd2443 100644 --- a/modules/programs/tui/opencode/settings.nix +++ b/modules/programs/tui/opencode/settings.nix @@ -32,12 +32,7 @@ # keep-sorted end }; - tui = { - # keep-sorted start - diff_style = "stacked"; - scroll_acceleration.enabled = true; - # keep-sorted end - }; + tui.scroll_acceleration.enabled = true; }; }; } diff --git a/modules/programs/tui/opencode/theme.nix b/modules/programs/tui/opencode/theme.nix new file mode 100644 index 0000000..1a4cdac --- /dev/null +++ b/modules/programs/tui/opencode/theme.nix @@ -0,0 +1,15 @@ +{self, ...}: { + flake.modules.homeManager.opencode = _: { + imports = [self.modules.homeManager.stylixBase]; + + # Keep the opencode background transparent to match stylix. + stylix.targets.opencode = { + enable = true; + + colors.override.withHashtag = { + base00 = "none"; + base06 = "none"; + }; + }; + }; +} diff --git a/modules/programs/tui/opencubicplayer.nix b/modules/programs/tui/opencubicplayer.nix new file mode 100644 index 0000000..58da9ca --- /dev/null +++ b/modules/programs/tui/opencubicplayer.nix @@ -0,0 +1,7 @@ +{self, ...}: { + flake.modules.homeManager.opencubicplayer = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + + home.packages = [pkgs.nur.repos.adam0.opencubicplayer]; + }; +} diff --git a/modules/programs/tui/television/channels.nix b/modules/programs/tui/television/channels.nix new file mode 100644 index 0000000..eb44efc --- /dev/null +++ b/modules/programs/tui/television/channels.nix @@ -0,0 +1,35 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + config, + pkgs, + # keep-sorted end + ... + }: let + inherit (builtins) attrValues; + in { + programs.television.package = pkgs.television.withPackages ( + _: + # Bundle tools that channel commands shell out to. + attrValues { + inherit + (pkgs) + # keep-sorted start + gnused + tlrc + trash-cli + # keep-sorted end + ; + } + # Reuse packages from home-manager modules to avoid duplicate package selections. + ++ (map (program: config.programs.${program}.package) [ + # keep-sorted start + "bat" + "eza" + "man" + "zoxide" + # keep-sorted end + ]) + ); + }; +} diff --git a/modules/programs/tui/television/channels/channels.nix b/modules/programs/tui/television/channels/channels.nix new file mode 100644 index 0000000..94fc6a0 --- /dev/null +++ b/modules/programs/tui/television/channels/channels.nix @@ -0,0 +1,46 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + + inherit (config.xdg) configHome; + + # keep-sorted start + bat = getExe pkgs.bat; + tv = getExe pkgs.television; + # keep-sorted end + in { + programs.television.channels.channels = { + # keep-sorted start block=yes newline_separated=yes + actions.channel-enter = { + description = "Enter a television channel"; + command = "${tv} {}"; + mode = "execute"; + }; + + keybindings.enter = "actions:channel-enter"; + + metadata = { + name = "channels"; + description = "Select a television channel"; + requirements = [ + # keep-sorted start + "bat" + "tv" + # keep-sorted end + ]; + }; + + preview.command = "${bat} -pn --color always ${configHome}/television/cable/**/{}.toml"; + + source.command = "${tv} list-channels"; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/files.nix b/modules/programs/tui/television/channels/files.nix new file mode 100644 index 0000000..c038af9 --- /dev/null +++ b/modules/programs/tui/television/channels/files.nix @@ -0,0 +1,46 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + + fd = getExe config.programs.fd.package; + in { + programs.television.channels.files = { + # keep-sorted start block=yes newline_separated=yes + actions.edit = { + description = "Open file in editor"; + command = "$EDITOR '{0}'"; + mode = "execute"; + }; + + metadata = { + name = "files"; + description = "Browse files with type-aware previews"; + requirements = [ + # keep-sorted start + "bat" + "fd" + "file" + # keep-sorted end + ]; + }; + + preview = { + command = "${getExe pkgs.text-preview} '{strip_ansi|split:\\::0}'"; + env.BAT_THEME = "ansi"; + }; + + source.command = [ + "${fd} --type file --strip-cwd-prefix" + "${fd} --type file --hidden --strip-cwd-prefix" + ]; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/man.nix b/modules/programs/tui/television/channels/man.nix new file mode 100644 index 0000000..95662d8 --- /dev/null +++ b/modules/programs/tui/television/channels/man.nix @@ -0,0 +1,47 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + config, + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + + man = getExe config.programs.man.package; + in { + programs.television.channels.man = { + # keep-sorted start block=yes newline_separated=yes + actions.open = { + description = "Open the selected man page in the system pager"; + command = "${man} '{0}'"; + mode = "execute"; + }; + + keybindings.enter = "actions:open"; + + metadata = { + name = "man"; + description = "Browse and preview system manual pages"; + requirements = [ + # keep-sorted start + "bat" + "man" + "sed" + # keep-sorted end + ]; + }; + + preview = { + command = "${getExe pkgs.man-preview} '{0}'"; + env.MANWIDTH = "80"; + }; + + source.command = "${man} -k ."; + + ui.preview_panel.header = "{0}"; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/text.nix b/modules/programs/tui/television/channels/text.nix new file mode 100644 index 0000000..bb67f52 --- /dev/null +++ b/modules/programs/tui/television/channels/text.nix @@ -0,0 +1,52 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + in { + programs.television.channels.text = { + # keep-sorted start block=yes newline_separated=yes + actions.edit = { + description = "Open file in editor at line"; + command = "$EDITOR '+{strip_ansi|split:\\::1}' '{strip_ansi|split:\\::0}'"; + mode = "execute"; + }; + + metadata = { + name = "text"; + description = "A channel to find and select text from files"; + requirements = [ + # keep-sorted start + "bat" + "file" + "rg" + # keep-sorted end + ]; + }; + + preview = { + command = "${getExe pkgs.text-preview} '{strip_ansi|split:\\::0}'"; + offset = "{strip_ansi|split:\\::1}"; + env.BAT_THEME = "ansi"; + }; + + source = { + # keep-sorted start block=yes + ansi = true; + command = [ + "rg . --no-heading --line-number --colors 'match:fg:white' --colors 'path:fg:blue' --color=always" + "rg . --no-heading --line-number --hidden --colors 'match:fg:white' --colors 'path:fg:blue' --color=always" + ]; + output = "{strip_ansi|split:\\::..2}"; + # keep-sorted end + }; + + ui.preview_panel.header = "{strip_ansi|split:\\::..2}"; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/tldr.nix b/modules/programs/tui/television/channels/tldr.nix new file mode 100644 index 0000000..47b33ec --- /dev/null +++ b/modules/programs/tui/television/channels/tldr.nix @@ -0,0 +1,35 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe; + + tldr = getExe pkgs.tlrc; + in { + programs.television.channels.tldr = { + # keep-sorted start block=yes newline_separated=yes + actions.open = { + description = "Open the selected TLDR page"; + command = "${tldr} '{0}'"; + mode = "execute"; + }; + + keybindings.ctrl-e = "actions:open"; + + metadata = { + name = "tldr"; + description = "Browse and preview TLDR help pages for command-line tools"; + requirements = ["tldr"]; + }; + + preview.command = "${tldr} '{0}' --color always"; + + source.command = "${tldr} --list"; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/trash.nix b/modules/programs/tui/television/channels/trash.nix new file mode 100644 index 0000000..da27771 --- /dev/null +++ b/modules/programs/tui/television/channels/trash.nix @@ -0,0 +1,62 @@ +{ + flake.modules.homeManager.television = { + # keep-sorted start + lib, + pkgs, + # keep-sorted end + ... + }: let + inherit (lib) getExe'; + + # keep-sorted start + echo = getExe' pkgs.coreutils "echo"; + trash-empty = getExe' pkgs.trash-cli "trash-empty"; + trash-list = getExe' pkgs.trash-cli "trash-list"; + trash-restore = getExe' pkgs.trash-cli "trash-restore"; + # keep-sorted end + in { + programs.television.channels.trash = { + # keep-sorted start block=yes newline_separated=yes + actions = { + # keep-sorted start block=yes newline_separated=yes + empty = { + description = "Empty the entire trash"; + command = trash-empty; + mode = "execute"; + }; + + restore = { + description = "Restore the selected trashed file"; + command = "${echo} '{split: :1..}' | ${trash-restore}"; + mode = "execute"; + }; + # keep-sorted end + }; + + metadata = { + name = "trash"; + description = "Browse and restore trashed files"; + requirements = [ + # keep-sorted start + "trash-empty" + "trash-list" + "trash-restore" + # keep-sorted end + ]; + }; + + preview.command = "${echo} '{}'"; + + source = { + # keep-sorted start + command = "${trash-list} 2>/dev/null"; + frecency = false; + no_sort = true; + # keep-sorted end + }; + + ui.preview_panel.size = 30; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/channels/zoxide.nix b/modules/programs/tui/television/channels/zoxide.nix new file mode 100644 index 0000000..33b47b8 --- /dev/null +++ b/modules/programs/tui/television/channels/zoxide.nix @@ -0,0 +1,82 @@ +{ + flake.modules.homeManager.television = { + config, + lib, + ... + }: let + inherit + (lib) + # keep-sorted start + escapeShellArgs + getExe + # keep-sorted end + ; + + inherit + (config.programs.eza) + # keep-sorted start + colors + extraOptions + icons + package + # keep-sorted end + ; + in { + programs.television.channels.zoxide = let + zoxide = getExe config.programs.zoxide.package; + in { + # keep-sorted start block=yes newline_separated=yes + actions = { + # keep-sorted start block=yes newline_separated=yes + cd = { + description = "Change to the selected directory"; + command = "cd '{}' && $SHELL"; + mode = "execute"; + }; + + remove = { + description = "Remove the selected directory from zoxide"; + command = "${zoxide} remove '{}'"; + mode = "fork"; + }; + # keep-sorted end + }; + + keybindings = { + # keep-sorted start + ctrl-d = "actions:remove"; + enter = "actions:cd"; + # keep-sorted end + }; + + metadata = { + name = "zoxide"; + description = "Browse zoxide directory history"; + requirements = [ + # keep-sorted start + "eza" + "zoxide" + # keep-sorted end + ]; + }; + + preview.command = "${escapeShellArgs ( + ["${getExe package}"] + ++ extraOptions + ++ [ + "--color=${colors}" + "--icons=${icons}" + ] + )} '{}'"; + + source = { + # keep-sorted start + command = "${zoxide} query -l"; + frecency = false; + no_sort = true; + # keep-sorted end + }; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/default.nix b/modules/programs/tui/television/default.nix new file mode 100644 index 0000000..7810f18 --- /dev/null +++ b/modules/programs/tui/television/default.nix @@ -0,0 +1,16 @@ +{ + flake.modules.homeManager.television = _: { + programs.television = let + # Disable shell hooks and use explicit invocation only. + enableShellIntegration = false; + in { + enable = true; + + # keep-sorted start + enableBashIntegration = enableShellIntegration; + enableFishIntegration = enableShellIntegration; + enableZshIntegration = enableShellIntegration; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/nix-search.nix b/modules/programs/tui/television/nix-search.nix new file mode 100644 index 0000000..9ef3391 --- /dev/null +++ b/modules/programs/tui/television/nix-search.nix @@ -0,0 +1,223 @@ +{ + # keep-sorted start + inputs, + lib, + # keep-sorted end + ... +}: { + flake.modules.homeManager.television = { + osConfig, + pkgs, + ... + }: let + inherit (builtins) toJSON; + inherit (lib) mapAttrs; + hmLib = import "${inputs.home-manager}/modules/lib/stdlib-extended.nix" lib; + allowDocUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "vscode-extension-ms-dotnettools-csharp" + ]; + + hmBaseModules = import "${inputs.home-manager}/modules/modules.nix" { + lib = hmLib; + inherit pkgs; + check = false; + }; + + hmDocModule = { + home = { + homeDirectory = "/home/nix-search-tv"; + inherit (osConfig.system) stateVersion; + username = "nix-search-tv"; + }; + + nixpkgs.config.allowUnfreePredicate = allowDocUnfreePredicate; + }; + + mkHomeManagerDoc = module: let + # Evaluate third-party Home Manager modules against Home Manager's full module set. + homeManagerOptions = + (hmLib.evalModules { + modules = hmBaseModules ++ [hmDocModule module]; + class = "homeManager"; + }).options; + in + ( + pkgs.nixosOptionsDoc { + options = removeAttrs homeManagerOptions ["_module"]; + warningsAreErrors = false; + } + ).optionsJSON; + + mkNixosDoc = module: + ( + pkgs.nixosOptionsDoc { + inherit + (( + lib.nixosSystem { + inherit (pkgs.stdenv.hostPlatform) system; + modules = [ + { + system.stateVersion = osConfig.system.stateVersion; + nixpkgs.config.allowUnfreePredicate = allowDocUnfreePredicate; + } + module + ]; + + specialArgs = { + inherit inputs; + modulesPath = "${inputs.nixpkgs}/nixos/modules"; + }; + } + )) + options + ; + + warningsAreErrors = false; + } + ).optionsJSON; + + mkFilteredOptionsFile = name: rawDoc: prefixes: + toString ( + pkgs.runCommandLocal "nix-search-tv-${name}-options" { + nativeBuildInputs = [pkgs.jq]; + inherit rawDoc; + prefixesJson = toJSON prefixes; + } '' + mkdir -p "$out" + + jq -S \ + --argjson prefixes "$prefixesJson" \ + 'with_entries( + . as $entry + | select(any( + $prefixes[]; + . as $prefix + | ($entry.key == $prefix) or ($entry.key | startswith($prefix + ".")) + )) + )' \ + "$rawDoc/share/doc/nixos/options.json" > "$out/options.json" + '' + ) + + "/options.json"; + + # Keep only sources with stable namespaces. + # TODO: This entire list. + sources = { + # Home Manager-backed sources. + # keep-sorted start block=yes newline_separated=yes + nix-flatpak = { + rawDoc = mkHomeManagerDoc inputs.nix-flatpak.homeManagerModules.nix-flatpak; + prefixes = ["services.flatpak"]; + }; + + nix-index-database = { + rawDoc = mkHomeManagerDoc inputs.nix-index-database.homeModules.nix-index; + prefixes = [ + "programs.nix-index-database" + "programs.nix-index" + ]; + }; + + nixcord = { + rawDoc = mkHomeManagerDoc inputs.nixcord.homeModules.nixcord; + prefixes = ["programs.nixcord"]; + }; + + # TODO: Enable after migrating the noctalia flake input. + noctalia = { + rawDoc = mkHomeManagerDoc inputs.noctalia.homeModules.default; + prefixes = ["programs.noctalia-shell"]; + }; + + nvf = { + rawDoc = mkHomeManagerDoc inputs.nvf.homeManagerModules.default; + prefixes = ["programs.nvf"]; + }; + + overzicht = { + rawDoc = mkHomeManagerDoc inputs.overzicht.homeModules.default; + prefixes = ["programs.overzicht"]; + }; + + sops-nix-home-manager = { + rawDoc = mkHomeManagerDoc inputs.sops-nix.homeManagerModules.sops; + prefixes = ["sops"]; + }; + + spicetify-nix = { + rawDoc = mkHomeManagerDoc inputs.spicetify-nix.homeManagerModules.spicetify; + prefixes = ["programs.spicetify"]; + }; + + stylix-home-manager = { + rawDoc = mkHomeManagerDoc inputs.stylix.homeModules.stylix; + prefixes = ["stylix"]; + }; + + zen-browser = { + rawDoc = mkHomeManagerDoc inputs.zen-browser.homeModules.beta; + prefixes = ["programs.zen-browser"]; + }; + # keep-sorted end + + # NixOS-backed sources. + # keep-sorted start block=yes newline_separated=yes + # TODO: Enable after migrating the disko flake input. + disko = { + rawDoc = mkNixosDoc inputs.disko.nixosModules.disko; + prefixes = ["disko"]; + }; + + home-manager-nixos = { + rawDoc = mkNixosDoc inputs.home-manager.nixosModules.home-manager; + prefixes = ["home-manager"]; + }; + + # TODO: Enable after migrating the lanzaboote flake input. + lanzaboote = { + rawDoc = mkNixosDoc inputs.lanzaboote.nixosModules.lanzaboote; + prefixes = ["boot.lanzaboote"]; + }; + + sops-nix = { + rawDoc = mkNixosDoc inputs.sops-nix.nixosModules.sops; + prefixes = ["sops"]; + }; + + stylix = { + rawDoc = mkNixosDoc inputs.stylix.nixosModules.stylix; + prefixes = ["stylix"]; + }; + # keep-sorted end + }; + + optionsFile = mapAttrs (name: value: mkFilteredOptionsFile name value.rawDoc value.prefixes) sources; + in { + programs.nix-search-tv = { + enable = true; + enableTelevisionIntegration = true; + + settings = { + # Keep builtin upstream indexes under `indexes`. + indexes = [ + # keep-sorted start + "home-manager" + "nixos" + "nixpkgs" + "noogle" + "nur" + # keep-sorted end + ]; + + # keep-sorted start + + # Disable the waiting message that never goes away. + enable_waiting_message = false; + # Add custom docs sources through `options_file`; they are not valid `indexes` entries. + experimental.options_file = optionsFile; + # keep-sorted end + }; + }; + }; +} diff --git a/modules/programs/tui/television/settings.nix b/modules/programs/tui/television/settings.nix new file mode 100644 index 0000000..112c93a --- /dev/null +++ b/modules/programs/tui/television/settings.nix @@ -0,0 +1,29 @@ +{ + flake.modules.homeManager.television = _: { + programs.television.settings = let + # Use minimal box borders to match the rest of the terminal theme. + borderType = "plain"; + in { + # keep-sorted start block=yes newline_separated=yes + default_channel = "channels"; + + ui = { + input_bar = { + # keep-sorted start + border_type = borderType; + prompt = "➜"; + # keep-sorted end + }; + + # Remove the ugly status bar. + status_bar.hidden = true; + + # keep-sorted start + preview_panel.border_type = borderType; + results_panel.border_type = borderType; + # keep-sorted end + }; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/television/theme.nix b/modules/programs/tui/television/theme.nix new file mode 100644 index 0000000..c3c5bf6 --- /dev/null +++ b/modules/programs/tui/television/theme.nix @@ -0,0 +1,55 @@ +{self, ...}: { + flake.modules.homeManager.television = { + # keep-sorted start + config, + pkgs, + # keep-sorted end + ... + }: let + tomlFormat = pkgs.formats.toml {}; + + colors = config.lib.stylix.colors.withHashtag; + in { + imports = [self.modules.homeManager.stylixBase]; + + xdg.configFile."television/themes/".source = with colors; + tomlFormat.generate "television-stylix.toml" { + # general + # keep-sorted start + background = base00; + border_fg = base04; + dimmed_text_fg = base04; + text_fg = base05; + # keep-sorted end + + # input + # keep-sorted start + input_text_fg = base08; + result_count_fg = base08; + # keep-sorted end + + # results + # keep-sorted start + match_fg = base08; + result_line_number_fg = base0A; + result_name_fg = base0D; + result_value_fg = base05; + selection_bg = base01; + selection_fg = base0B; + # keep-sorted end + + # preview + preview_title_fg = base0B; + + # modes + # keep-sorted start + action_picker_mode_bg = base0D; + action_picker_mode_fg = base00; + channel_mode_bg = base0E; + channel_mode_fg = base00; + remote_control_mode_bg = base0C; + remote_control_mode_fg = base00; + # keep-sorted end + }; + }; +} diff --git a/modules/programs/tui/yazi/default.nix b/modules/programs/tui/yazi/default.nix index 4bbfbe4..0903f25 100644 --- a/modules/programs/tui/yazi/default.nix +++ b/modules/programs/tui/yazi/default.nix @@ -1,38 +1,10 @@ { - flake.modules.homeManager.yazi = { - # keep-sorted start - config, - lib, - pkgs, - # keep-sorted end - ... - }: let - inherit (builtins) readFile; - inherit - (lib) - # keep-sorted start - mkOption - types - # keep-sorted end - ; - inherit (lib.self) mkYaziPluginSetups; - - cfg = config.programs.yazi; - in { - options.programs.yazi.pluginSetupOpts = mkOption { - type = types.attrsOf types.anything; - default = {}; - description = "Yazi plugin setup options rendered into init.lua."; - }; - + flake.modules.homeManager.yazi = _: { # Yazi tui file manager. programs.yazi = { enable = true; - initLua = pkgs.writeText "yazi-init.lua" '' - ${readFile ./init.lua} - ${mkYaziPluginSetups cfg.pluginSetupOpts} - ''; + initLua = ./init.lua; shellWrapperName = "y"; }; }; diff --git a/modules/programs/tui/yazi/plugins.nix b/modules/programs/tui/yazi/plugins.nix index 4a2568c..24a6883 100644 --- a/modules/programs/tui/yazi/plugins.nix +++ b/modules/programs/tui/yazi/plugins.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = { # keep-sorted start config, @@ -7,16 +7,11 @@ # keep-sorted end ... }: let - inherit - (builtins) - # keep-sorted start - attrValues - listToAttrs - # keep-sorted end - ; - inherit (pkgs.lib.attrsets) nameValuePair; + inherit (builtins) attrValues; inherit (pkgs.lib.generators) mkLuaInline; in { + imports = [self.modules.homeManager.nur]; + programs.yazi = { package = pkgs.yazi.override { optionalDeps = @@ -93,35 +88,26 @@ # Pull packaged tools from the system config when home-manager does not own them. ++ [osConfig.services.udisks2.package]; - plugins = let - mkPlugin = source: name: nameValuePair name source.${name}; - - # Keep plugins without dedicated modules together here. - # Plugins from nixpkgs. - nixpkgsPlugins = [ - # keep-sorted start - "full-border" - "git" - "starship" - # keep-sorted end - ]; - - # Plugins from adam0's nur. - adam0Plugins = ["spot"]; - in - listToAttrs ( - (map (mkPlugin pkgs.yaziPlugins) nixpkgsPlugins) - ++ (map (mkPlugin pkgs.nur.repos.adam0.yaziPlugins) adam0Plugins) - ); + # Keep plugins without dedicated modules together here. + plugins = { + full-border = { + package = pkgs.yaziPlugins.full-border; + setup = true; + settings.type = mkLuaInline "ui.Border.PLAIN"; + }; - pluginSetupOpts = { - # keep-sorted start newline_separated=yes - full-border.type = mkLuaInline "ui.Border.PLAIN"; + git = pkgs.yaziPlugins.git; - spot.metadata_section.relative_time = false; + spot = { + package = pkgs.nur.repos.adam0.yaziPlugins.spot; + setup = true; + settings.metadata_section.relative_time = false; + }; - starship = {}; - # keep-sorted end + starship = { + package = pkgs.yaziPlugins.starship; + setup = true; + }; }; }; }; diff --git a/modules/programs/tui/yazi/plugins/faster-piper.nix b/modules/programs/tui/yazi/plugins/faster-piper.nix index 06b2963..e65d81c 100644 --- a/modules/programs/tui/yazi/plugins/faster-piper.nix +++ b/modules/programs/tui/yazi/plugins/faster-piper.nix @@ -1,4 +1,4 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = { # keep-sorted start lib, @@ -13,8 +13,9 @@ systemdStatusPreview = getExe pkgs.systemd-status-preview; usePreloader = "faster-piper --rely-on-preloader"; in { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.faster-piper = pkgs.nur.repos.adam0.yaziPlugins.faster-piper; # Use faster-piper for markdown, archives, compressed text, sqlite, and systemd previews. @@ -24,12 +25,6 @@ prepend_preloaders = mkYaziUrlEntries "${piper} CLICOLOR_FORCE=1 glow -w=$w -s=dark -- \"$1\"" ["*.md"] ++ - # Archive files. - mkYaziUrlEntries "${piper} tar tf \"$1\"" ["*.tar*"] - ++ - # Compressed text files. - mkYaziUrlEntries "${piper} gzip -dc \"$1\"" ["*.txt.gz"] - ++ # SQLite database files. mkYaziUrlEntries ''${piper} sqlite3 -readonly "$1" ".schema --indent"'' ["*.db" "*.sqlite" "*.sqlite3"] ++ @@ -40,12 +35,6 @@ prepend_previewers = mkYaziUrlEntries usePreloader ["*.md"] ++ - # Archive files. - mkYaziUrlEntries "${usePreloader} --format=url" ["*.tar*"] - ++ - # Compressed text files. - mkYaziUrlEntries usePreloader ["*.txt.gz"] - ++ # SQLite database files. mkYaziUrlEntries usePreloader ["*.db" "*.sqlite" "*.sqlite3"] ++ @@ -54,7 +43,6 @@ # keep-sorted end }; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/mediainfo.nix b/modules/programs/tui/yazi/plugins/mediainfo.nix index b86a6d3..d5aaf57 100644 --- a/modules/programs/tui/yazi/plugins/mediainfo.nix +++ b/modules/programs/tui/yazi/plugins/mediainfo.nix @@ -1,7 +1,6 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.mediainfo = pkgs.yaziPlugins.mediainfo; # Use mediainfo for media and related mime types. @@ -50,7 +49,6 @@ ]; # keep-sorted end }; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/mount.nix b/modules/programs/tui/yazi/plugins/mount.nix index 880ae46..75ca68f 100644 --- a/modules/programs/tui/yazi/plugins/mount.nix +++ b/modules/programs/tui/yazi/plugins/mount.nix @@ -1,7 +1,8 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.mount = pkgs.yaziPlugins.mount; + # Bind the mount manager in manager mode. keymap.mgr.prepend_keymap = [ { @@ -10,9 +11,6 @@ desc = "Manage mount, unmount, and eject actions"; } ]; - - plugins.mount = pkgs.yaziPlugins.mount; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/ouch.nix b/modules/programs/tui/yazi/plugins/ouch.nix new file mode 100644 index 0000000..78685b2 --- /dev/null +++ b/modules/programs/tui/yazi/plugins/ouch.nix @@ -0,0 +1,41 @@ +{ + flake.modules.homeManager.yazi = {pkgs, ...}: { + programs.yazi = { + plugins.ouch = pkgs.yaziPlugins.ouch; + + settings = { + # Previewers that render content for ouch. + plugin.prepend_previewers = [ + { + mime = "application/{*zip,tar,bzip2,7z*,rar,xz,zstd,java-archive}"; + run = "ouch --show-file-icons"; + } + ]; + + # Compress selected files via the ouch plugin. + mgr.prepend_keymap = { + on = ["C"]; + run = "plugin ouch"; + desc = "Compress with ouch"; + }; + + # Extract archives via ouch. + opener.extract = [ + # keep-sorted start block=yes newline_separated=yes + { + run = "ouch d -y %*"; + desc = "Extract here with ouch"; + for = "windows"; + } + + { + run = "ouch d -y '$@'"; + desc = "Extract here with ouch"; + for = "unix"; + } + # keep-sorted end + ]; + }; + }; + }; +} diff --git a/modules/programs/tui/yazi/plugins/preview-cbz.nix b/modules/programs/tui/yazi/plugins/preview-cbz.nix index d071f53..72706a6 100644 --- a/modules/programs/tui/yazi/plugins/preview-cbz.nix +++ b/modules/programs/tui/yazi/plugins/preview-cbz.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.preview-cbz = pkgs.nur.repos.adam0.yaziPlugins.preview-cbz; settings.plugin = { @@ -23,7 +24,6 @@ ]; # keep-sorted end }; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/preview-epub.nix b/modules/programs/tui/yazi/plugins/preview-epub.nix index 1374597..80ec6a5 100644 --- a/modules/programs/tui/yazi/plugins/preview-epub.nix +++ b/modules/programs/tui/yazi/plugins/preview-epub.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.preview-epub = pkgs.nur.repos.adam0.yaziPlugins.preview-epub; settings.plugin = { @@ -23,7 +24,6 @@ ]; # keep-sorted end }; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/preview-git.nix b/modules/programs/tui/yazi/plugins/preview-git.nix index 2446143..e955e13 100644 --- a/modules/programs/tui/yazi/plugins/preview-git.nix +++ b/modules/programs/tui/yazi/plugins/preview-git.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.preview-git = pkgs.nur.repos.adam0.yaziPlugins.preview-git; # Previewers that render content for preview-git. @@ -11,7 +12,6 @@ run = "preview-git"; } ]; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/recycle-bin.nix b/modules/programs/tui/yazi/plugins/recycle-bin.nix index a93ad90..5687a43 100644 --- a/modules/programs/tui/yazi/plugins/recycle-bin.nix +++ b/modules/programs/tui/yazi/plugins/recycle-bin.nix @@ -1,7 +1,11 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.recycle-bin = { + package = pkgs.yaziPlugins.recycle-bin; + setup = true; + }; + # Bind key to open the recycle-bin plugin menu. keymap.mgr.prepend_keymap = [ { @@ -10,11 +14,6 @@ desc = "Open Recycle Bin menu"; } ]; - - pluginSetupOpts.recycle-bin = {}; - - plugins.recycle-bin = pkgs.yaziPlugins.recycle-bin; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/relative-motions.nix b/modules/programs/tui/yazi/plugins/relative-motions.nix index 077c13c..b02ffe8 100644 --- a/modules/programs/tui/yazi/plugins/relative-motions.nix +++ b/modules/programs/tui/yazi/plugins/relative-motions.nix @@ -1,7 +1,12 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.relative-motions = { + package = pkgs.yaziPlugins.relative-motions; + setup = true; + settings.show_numbers = "relative"; + }; + # Bind number keys to relative-motions steps. keymap.mgr.prepend_keymap = [ # keep-sorted start block=yes numeric=yes newline_separated=yes @@ -60,11 +65,6 @@ } # keep-sorted end ]; - - pluginSetupOpts.relative-motions.show_numbers = "relative"; - - plugins.relative-motions = pkgs.yaziPlugins.relative-motions; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/restore.nix b/modules/programs/tui/yazi/plugins/restore.nix index abd918c..979d1b6 100644 --- a/modules/programs/tui/yazi/plugins/restore.nix +++ b/modules/programs/tui/yazi/plugins/restore.nix @@ -1,7 +1,8 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.restore = pkgs.yaziPlugins.restore; + # Bind restore actions. keymap.mgr.prepend_keymap = [ { @@ -10,9 +11,6 @@ desc = "Restore last deleted files/folders"; } ]; - - plugins.restore = pkgs.yaziPlugins.restore; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/smart-enter.nix b/modules/programs/tui/yazi/plugins/smart-enter.nix index 7951db2..7d5717c 100644 --- a/modules/programs/tui/yazi/plugins/smart-enter.nix +++ b/modules/programs/tui/yazi/plugins/smart-enter.nix @@ -1,7 +1,8 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.smart-enter = pkgs.yaziPlugins.smart-enter; + # Use smart-enter bindings in manager mode. keymap.mgr.prepend_keymap = [ # keep-sorted start block=yes newline_separated=yes @@ -30,9 +31,6 @@ } # keep-sorted end ]; - - plugins.smart-enter = pkgs.yaziPlugins.smart-enter; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/smart-paste.nix b/modules/programs/tui/yazi/plugins/smart-paste.nix index ec8c087..32fbf43 100644 --- a/modules/programs/tui/yazi/plugins/smart-paste.nix +++ b/modules/programs/tui/yazi/plugins/smart-paste.nix @@ -1,7 +1,8 @@ { flake.modules.homeManager.yazi = {pkgs, ...}: { programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.smart-paste = pkgs.yaziPlugins.smart-paste; + # Use smart-paste bindings in manager mode. keymap.mgr.prepend_keymap = [ { @@ -10,9 +11,6 @@ desc = "Paste into the hovered directory or CWD"; } ]; - - plugins.smart-paste = pkgs.yaziPlugins.smart-paste; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/spot-audio.nix b/modules/programs/tui/yazi/plugins/spot-audio.nix index 4e74e89..d0d2de6 100644 --- a/modules/programs/tui/yazi/plugins/spot-audio.nix +++ b/modules/programs/tui/yazi/plugins/spot-audio.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.spot-audio = pkgs.nur.repos.adam0.yaziPlugins.spot-audio; # Spotters that render content for spot-audio. @@ -18,7 +19,6 @@ } # keep-sorted end ]; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/spot-cbz.nix b/modules/programs/tui/yazi/plugins/spot-cbz.nix index 59eb60a..b5dd382 100644 --- a/modules/programs/tui/yazi/plugins/spot-cbz.nix +++ b/modules/programs/tui/yazi/plugins/spot-cbz.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.spot-cbz = pkgs.nur.repos.adam0.yaziPlugins.spot-cbz; # Spotters that render content for spot-cbz. @@ -11,7 +12,6 @@ run = "spot-cbz"; } ]; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/spot-image.nix b/modules/programs/tui/yazi/plugins/spot-image.nix index aef4490..d44d34f 100644 --- a/modules/programs/tui/yazi/plugins/spot-image.nix +++ b/modules/programs/tui/yazi/plugins/spot-image.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.spot-image = pkgs.nur.repos.adam0.yaziPlugins.spot-image; # Spotters that render content for spot-image. @@ -11,7 +12,6 @@ run = "spot-image"; } ]; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/spot-video.nix b/modules/programs/tui/yazi/plugins/spot-video.nix index 14b9ba4..977126b 100644 --- a/modules/programs/tui/yazi/plugins/spot-video.nix +++ b/modules/programs/tui/yazi/plugins/spot-video.nix @@ -1,7 +1,8 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes plugins.spot-v = pkgs.nur.repos.adam0.yaziPlugins.spot-video; # Spotters that render content for spot-video. @@ -11,7 +12,6 @@ run = "spot-video"; } ]; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/tv.nix b/modules/programs/tui/yazi/plugins/tv.nix index 6da6746..b3dc5dc 100644 --- a/modules/programs/tui/yazi/plugins/tv.nix +++ b/modules/programs/tui/yazi/plugins/tv.nix @@ -1,7 +1,10 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.tv = pkgs.nur.repos.adam0.yaziPlugins.tv; + # Replace Yazi's builtin jump pickers with television. keymap.mgr.prepend_keymap = [ # keep-sorted start block=yes newline_separated=yes @@ -18,9 +21,6 @@ } # keep-sorted end ]; - - plugins.tv = pkgs.nur.repos.adam0.yaziPlugins.tv; - # keep-sorted end }; }; } diff --git a/modules/programs/tui/yazi/plugins/ucp.nix b/modules/programs/tui/yazi/plugins/ucp.nix index 878a6bc..48c7623 100644 --- a/modules/programs/tui/yazi/plugins/ucp.nix +++ b/modules/programs/tui/yazi/plugins/ucp.nix @@ -1,7 +1,10 @@ -{ +{self, ...}: { flake.modules.homeManager.yazi = {pkgs, ...}: { + imports = [self.modules.homeManager.nur]; + programs.yazi = { - # keep-sorted start block=yes newline_separated=yes + plugins.ucp = pkgs.nur.repos.adam0.yaziPlugins.ucp; + # Add ucp clipboard bindings with notifications. keymap.mgr.prepend_keymap = [ # keep-sorted start block=yes newline_separated=yes @@ -30,9 +33,6 @@ } # keep-sorted end ]; - - plugins.ucp = pkgs.nur.repos.adam0.yaziPlugins.ucp; - # keep-sorted end }; }; } diff --git a/modules/services/bluetooth.nix b/modules/services/bluetooth.nix index cc0ec42..90a48de 100644 --- a/modules/services/bluetooth.nix +++ b/modules/services/bluetooth.nix @@ -1,8 +1,6 @@ -{lib, ...}: let - inherit (lib) mkEnableOption; -in { +{self, ...}: { flake.modules.nixos.bluetooth = { - options.capabilities.bluetooth = mkEnableOption "bluetooth support"; + imports = [self.modules.nixos.capabilities]; config = { capabilities.bluetooth = true; diff --git a/modules/services/wifi.nix b/modules/services/wifi.nix index d1fbabe..9a4b9e3 100644 --- a/modules/services/wifi.nix +++ b/modules/services/wifi.nix @@ -1,8 +1,6 @@ -{lib, ...}: let - inherit (lib) mkEnableOption; -in { +{self, ...}: { flake.modules.nixos.wifi = { - options.capabilities.wifi = mkEnableOption "wifi support"; + imports = [self.modules.nixos.capabilities]; config = { capabilities.wifi = true; diff --git a/modules/shell-abbreviations.nix b/modules/shell-abbreviations.nix new file mode 100644 index 0000000..0a5e268 --- /dev/null +++ b/modules/shell-abbreviations.nix @@ -0,0 +1,28 @@ +{ + flake.modules.homeManager.shellAbbreviations = { + # keep-sorted start + config, + lib, + # keep-sorted end + ... + }: let + inherit (lib) mkOption types; + cfg = config.home.shellAbbreviations; + in { + options.home.shellAbbreviations = mkOption { + default = {}; + description = '' + Shell abbreviations that expand as fish abbreviations and fall back to + aliases in shells without native abbreviation support. + ''; + type = types.attrsOf types.str; + }; + + config = { + programs.bash.shellAliases = cfg; + programs.fish.shellAbbrs = cfg; + programs.nushell.shellAliases = cfg; + programs.zsh.shellAliases = cfg; + }; + }; +} diff --git a/todo-stats.sh b/todo-stats.sh index 46eeb24..19786d1 100755 --- a/todo-stats.sh +++ b/todo-stats.sh @@ -14,19 +14,55 @@ awk ' return whole == 0 ? 0 : part * 100 / whole } - function bar(part, whole, width, filled, i, out) { + function bar(done_count, removed_count, todo_count, width, total_count, done_cells, removed_cells, todo_cells, i, out) { + total_count = done_count + removed_count + todo_count + + if (total_count == 0) { + return sprintf("%*s", width, "") + } + + done_cells = int((done_count * width / total_count) + 0.5) + removed_cells = int((removed_count * width / total_count) + 0.5) + + if (removed_count > 0 && removed_cells == 0) { + removed_cells = 1 + } + + if (done_cells + removed_cells > width) { + done_cells = width - removed_cells + } + + todo_cells = width - done_cells - removed_cells + out = "" + + for (i = 1; i <= done_cells; i++) { + out = out "█" + } + + for (i = 1; i <= removed_cells; i++) { + out = out "░" + } + + for (i = 1; i <= todo_cells; i++) { + out = out "." + } + + return out + } + + function simple_bar(part, whole, width, fill, filled, i, out) { filled = whole == 0 ? 0 : int((part * width / whole) + 0.5) out = "" for (i = 1; i <= width; i++) { - out = out (i <= filled ? "#" : "-") + out = out (i <= filled ? fill : " ") } return out } - function print_stat(label, count, whole) { - printf "%-11s %4d %6.1f%% [%s]\n", label ":", count, pct(count, whole), bar(count, whole, 28) + function print_stat(label, count, whole, fill) { + printf "%-11s %4d %6.1f%% [%s]\n", label ":", count, pct(count, whole), simple_bar(count, whole, 28, fill) } function section_total(i) { @@ -42,8 +78,18 @@ awk ' return length(text) <= width ? text : substr(text, 1, width - 3) "..." } + function in_new_files() { + return subsection == "New files" + } + + /^###[[:space:]]+/ { + subsection = trim_heading($0) + next + } + /^##[[:space:]]+/ { section = trim_heading($0) + subsection = "" if (!(section in seen)) { seen[section] = 1 sections[++section_count] = section @@ -52,16 +98,31 @@ awk ' } /^- \[ \]/ { + if (in_new_files()) { + new_todo++ + next + } + todo++ section_todo[section]++ } /^- \[[xX]\]/ { + if (in_new_files()) { + new_done++ + next + } + done++ section_done[section]++ } /^- \[-\]/ { + if (in_new_files()) { + new_removed++ + next + } + removed++ section_removed[section]++ } @@ -69,8 +130,10 @@ awk ' END { total = todo + done + removed active = todo + done + new_total = new_todo + new_done + new_removed + new_active = new_todo + new_done - if (total == 0) { + if (total + new_total == 0) { print "No todo entries found." exit } @@ -78,16 +141,22 @@ awk ' print "==============================================" printf "Todo summary: %s\n", FILENAME print "==============================================" - printf "Progress %6.1f%% [%s]\n", pct(done, active), bar(done, active, 28) - printf "Remaining %6.1f%% [%s]\n", pct(todo, active), bar(todo, active, 28) + printf "Progress %6.1f%% [%s]\n", pct(done, active), bar(done, removed, todo, 28) + printf "Remaining %6.1f%% [%s]\n", pct(todo, active), simple_bar(todo, active, 28, ".") + print "Legend: █ done, ░ removed, . to do" print "----------------------------------------------" - print_stat("To do", todo, total) - print_stat("Done", done, total) - print_stat("Removed", removed, total) + print_stat("To do", todo, total, ".") + print_stat("Done", done, total, "█") + print_stat("Removed", removed, total, "░") print "----------------------------------------------" printf "Active: %4d\n", active printf "Total: %4d\n", total + if (new_total > 0) { + print "" + printf "New files: %4d (excluded from progress)\n", new_total + } + if (section_count > 0) { print "" print "Section progress" @@ -102,7 +171,7 @@ awk ' } section_active = section_todo[name] + section_done[name] - printf "%-28s %6.1f%% [%s] %3d/%-3d\n", fit(name, 28), pct(section_done[name], section_active), bar(section_done[name], section_active, 12), section_done[name], section_active + printf "%-28s %6.1f%% [%s] %3d/%-3d\n", fit(name, 28), pct(section_done[name], section_active), bar(section_done[name], section_removed[name], section_todo[name], 12), section_done[name], section_active } } } diff --git a/todo.md b/todo.md index ea685e6..825322a 100644 --- a/todo.md +++ b/todo.md @@ -4,9 +4,9 @@ - [x] .envrc - [x] .gitignore -- [ ] .luarc.json +- [-] .luarc.json - [x] .sops.yaml -- [ ] AGENTS.md +- [x] AGENTS.md - [x] LICENSE - [ ] README.md - [-] THIRD_PARTY_NOTICES.md @@ -40,7 +40,7 @@ - [-] attr-paths.nix - [x] default.nix - [x] env.nix -- [x] files.nix +- [-] files.nix - [x] mime.nix - [x] starship.nix - [x] stylix.nix @@ -48,7 +48,7 @@ ## modules/home/ - [ ] git.nix -- [ ] gpg.nix +- [x] gpg.nix - [ ] home.nix - [x] sops.nix (moved to modules/nix/sops.nix) - [ ] ssh.nix @@ -57,11 +57,11 @@ (moved to modules/programs/cli) -- [ ] bat.nix (todo, fish shell pager export) +- [x] bat.nix - [x] bonsai.nix - [x] cpond.nix - [x] direnv.nix -- [x] eza.nix +- [x] eza.nix (moved to eza/default.nix) - [x] fd.nix - [x] gh.nix - [x] npm.nix @@ -69,7 +69,7 @@ - [x] other.nix - [x] pipes.nix - [x] rumdl.nix -- [x] systeroid.nix +- [-] systeroid.nix - [x] tlrc.nix - [x] zoxide.nix @@ -78,6 +78,13 @@ - [x] ripgrep.nix - [x] bun.nix - [x] speedtest.nix +- [x] eza/theme.nix +- [x] eh.nix +- [x] gitfetch.nix +- [x] nix-index.nix +- [x] onefetch.nix +- [x] ouch.nix +- [x] sshfs.nix ## modules/home/cli/fastfetch/ @@ -88,25 +95,29 @@ ## modules/home/cli/fish/ -- [ ] abbreviations.nix -- [ ] aliases.nix -- [ ] default.nix -- [ ] plugins.nix +(moved to modules/programs/cli/fish) + +- [-] abbreviations.nix +- [x] aliases.nix +- [x] default.nix (removed fzfish) +- [x] plugins.nix (removed fzfish) ## modules/home/cli/fish/functions/ -- [ ] fish_greeting.nix +(moved to modules/programs/cli/fish) + +- [x] fish_greeting.nix ## modules/home/cli/fish/functions/archive/ -- [ ] 7z.nix -- [ ] rar.nix -- [ ] tar.nix -- [ ] un7z.nix -- [ ] unrar.nix -- [ ] untar.nix -- [ ] unzip.nix -- [ ] zip.nix +- [-] 7z.nix +- [-] rar.nix +- [-] tar.nix +- [-] un7z.nix +- [-] unrar.nix +- [-] untar.nix +- [-] unzip.nix +- [-] zip.nix ## modules/home/cli/ripgrep-all/ @@ -132,65 +143,74 @@ ## modules/home/desktop/ -- [ ] default.nix -- [ ] mangohud.nix -- [ ] overzicht.nix +- [x] default.nix (moved into cliphist module) +- [x] mangohud.nix +- [x] overzicht.nix + +### New files + +- [x] cliphist.nix +- [x] uwsm.nix ## modules/home/desktop/hyprland/ - [ ] appearance.nix -- [ ] default.nix +- [x] default.nix - [ ] general.nix - [ ] gestures.nix - [ ] keybinds.nix -- [ ] monitors.nix -- [ ] plugins.nix -- [ ] rules.nix +- [-] monitors.nix +- [x] plugins.nix +- [x] rules.nix ## modules/home/desktop/noctalia/ -- [ ] audio.nix -- [ ] bar.nix -- [ ] brightness.nix -- [ ] calendar.nix -- [ ] controlcenter.nix -- [ ] default.nix -- [ ] delobotomize.nix -- [ ] dock.nix -- [ ] general.nix -- [ ] hooks.nix -- [ ] idle.nix -- [ ] launcher.nix -- [ ] location.nix -- [ ] network.nix -- [ ] notifications.nix -- [ ] plugins.nix -- [ ] sessionmenu.nix -- [ ] systemmonitor.nix -- [ ] ui.nix -x [ ] wallpaper.nix +- [x] audio.nix +- [x] bar.nix +- [x] brightness.nix +- [x] calendar.nix +- [x] controlcenter.nix +- [x] default.nix +- [x] delobotomize.nix +- [x] dock.nix +- [x] general.nix +- [x] hooks.nix +- [x] idle.nix +- [x] launcher.nix +- [x] location.nix +- [x] network.nix +- [x] notifications.nix +- [x] plugins.nix +- [x] sessionmenu.nix +- [x] systemmonitor.nix +- [x] ui.nix +- [x] wallpaper.nix + +### New files + +- [x] theme.nix ## modules/home/desktop/noctalia/patches/ -- [ ] noctalia-launcher-ipc.patch -- [ ] noctalia-location-override.patch -- [ ] noctalia-settings-fallback.patch +- [x] noctalia-launcher-ipc.patch +- [x] noctalia-location-override.patch +- [x] noctalia-settings-fallback.patch ## modules/home/desktop/stylix/ -- [ ] default.nix +- [x] default.nix - [ ] delta.nix -- [ ] disabled.nix -- [ ] discord.nix -- [ ] eza.nix -- [ ] gtk.nix +- [x] disabled.nix +- [x] discord.nix +- [x] eza.nix +- [x] gtk.nix - [ ] hyprcursor.nix - [ ] noctalia.nix -- [ ] opencode.nix -- [ ] other.nix -- [ ] overzicht.nix -- [ ] spotify.nix -- [ ] television.nix +- [x] opencode.nix +- [x] other.nix +- [x] overzicht.nix +- [x] spotify.nix +- [x] television.nix ## modules/home/desktop/xdg/ @@ -201,6 +221,11 @@ x [ ] wallpaper.nix - [x] portal.nix - [x] terminal.nix +### New files + +- [x] dirs.nix +- [x] polkit.nix + ## modules/home/desktop/xdg/applications/ - [x] audio.nix @@ -216,16 +241,36 @@ x [ ] wallpaper.nix - [x] lutris.nix - [x] onlyoffice.nix -- [x] other.nix (split into multiple files and modules for each application, and removed helium) +- [x] other.nix (split into multiple files and modules for each application, and removed helium, obsidian, krita) - [x] prism.nix - [x] sober.nix -- [ ] spotify.nix (first need to figure out stylix) +- [x] spotify.nix - [x] zaread.nix - [x] zathura.nix +### New files + +- [x] aseprite.nix +- [x] beeper.nix +- [x] bitwarden.nix +- [x] bleachbit.nix +- [x] crosspipe.nix +- [x] decibels.nix +- [x] flatseal.nix +- [x] gimp.nix +- [x] heroic.nix +- [x] loupe.nix +- [x] mcpelauncher.nix +- [x] proton.nix +- [x] showtime.nix +- [x] upscayl.nix +- [x] warehouse.nix + ## modules/home/gui/discord/ - [x] default.nix +- [x] autostart.nix +- [x] settings.nix ## modules/home/gui/discord/plugins/ @@ -241,13 +286,21 @@ x [ ] wallpaper.nix - [x] snippets.css - [x] system24.css +### New files + +- [x] default.nix + ## modules/home/gui/ghostty/ -- [-] cursor.glsl (now a patch file with packages for the shaders in nur) +- [-] cursor.glsl - [x] default.nix - [x] keybinds.nix - [x] settings.nix +### patches/ + +- [x] cursor-tail-local-settings.patch + ## modules/home/gui/zen/ (moved to modules/programs/gui/zen) @@ -269,17 +322,17 @@ x [ ] wallpaper.nix (moved to modules/programs/tui) -- [ ] atuin.nix -- [ ] bluetui.nix -- [ ] btop.nix -- [ ] cava.nix -- [ ] fzf.nix -- [ ] impala.nix -- [ ] kmon.nix -- [ ] nvtop.nix -- [ ] other.nix -- [ ] oxicord.nix -- [ ] spotify-player.nix +- [x] atuin.nix +- [x] bluetui.nix +- [x] btop.nix +- [x] cava.nix +- [x] fzf.nix +- [x] impala.nix +- [-] kmon.nix +- [x] nvtop.nix +- [x] other.nix (renamed to opencubicplayer.nix) +- [-] oxicord.nix +- [-] spotify-player.nix - [x] wiremix.nix ## modules/home/tui/neovim/ @@ -325,6 +378,10 @@ x [ ] wallpaper.nix - [x] toml.nix - [x] typescript.nix +### New files + +- [x] docker.nix + ## modules/home/tui/opencode/ - [x] default.nix @@ -336,6 +393,10 @@ x [ ] wallpaper.nix - [x] plugins.nix - [x] settings.nix +### New files + +- [x] theme.nix + ## modules/home/tui/opencode/skills/ - [x] create-readme.md @@ -358,20 +419,24 @@ x [ ] wallpaper.nix ## modules/home/tui/television/ -- [ ] channels.nix -- [ ] default.nix -- [ ] nix-search.nix -- [ ] settings.nix +- [x] channels.nix +- [x] default.nix +- [x] nix-search.nix +- [x] settings.nix + +### New files + +- [x] theme.nix ## modules/home/tui/television/channels/ -- [ ] channels.nix -- [ ] files.nix -- [ ] man.nix -- [ ] text.nix -- [ ] tldr.nix -- [ ] trash.nix -- [ ] zoxide.nix +- [x] channels.nix +- [x] files.nix +- [x] man.nix +- [x] text.nix +- [x] tldr.nix +- [x] trash.nix +- [x] zoxide.nix ## modules/home/tui/yazi/ @@ -444,8 +509,8 @@ x [ ] wallpaper.nix (moved to modules/desktop) -- [ ] hyprland.nix -- [ ] stylix.nix +- [x] hyprland.nix (merged into hyprland/default.nix) +- [x] stylix.nix - [ ] tablet.nix - [x] tuigreet.nix - [x] xdg-portal.nix @@ -459,6 +524,10 @@ x [ ] wallpaper.nix - [x] steam.nix - [x] virt-manager.nix +### New files + +- [x] seahorse.nix + ## modules/system/services/ (moved to modules/services) @@ -483,6 +552,16 @@ x [ ] wallpaper.nix - [x] tlp.nix - [x] zram.nix +### New files + +- [x] bpftune.nix +- [x] evolution-data-server.nix +- [x] libinput.nix +- [x] power-profiles-daemon.nix +- [x] udisks2.nix +- [x] upower.nix +- [x] wifi.nix + ## overlays/ - [x] _inputs.nix @@ -491,7 +570,7 @@ x [ ] wallpaper.nix - [x] external-pkgs.nix - [ ] hyprland-plugins.nix - [-] pkgs.nix -- [ ] superhtml.nix +- [-] superhtml.nix - [-] zaread.nix ## pkgs/ @@ -504,9 +583,9 @@ x [ ] wallpaper.nix ## pkgs/scripts/ -- [ ] performant-mode.nix +- [x] performant-mode.nix - [x] systemd-status-preview.nix -- [ ] text-preview.nix +- [x] text-preview.nix ## pkgs/scripts/ripgrep-all-adapters/ @@ -515,6 +594,34 @@ x [ ] wallpaper.nix - [x] djvutorga-adapter.nix - [x] pptx2md-adapter.nix +## modules/ + +- [x] capabilities.nix +- [x] shell-abbreviations.nix + +## modules/nix/ + +- [x] dendritic.nix +- [x] determinate.nix +- [x] home-manager.nix +- [x] lib.nix +- [x] nur.nix +- [x] vars.nix + +## modules/profiles/ + +- [x] personal.nix + +## modules/pkgs/ + +- [x] os-age.nix + +### preview/ + +- [x] man.nix +- [x] systemd-status.nix (moved from pkgs/scripts/systemd-status-preview.nix) +- [x] text.nix (moved from pkgs/scripts/text-preview.nix) + ## secrets/ - [x] secrets.yaml