diff --git a/flake.lock b/flake.lock index 1bdbf8d..6099bbc 100644 --- a/flake.lock +++ b/flake.lock @@ -15,11 +15,11 @@ "sf-pro": "sf-pro" }, "locked": { - "lastModified": 1740961576, - "narHash": "sha256-9L6d3owtajM72YvUOpK1zYle2nM0BpsuopbF9lm9lJs=", + "lastModified": 1748299691, + "narHash": "sha256-HMlx5HzeOOhpewq3y9UaSMP9AkhEo+AFJHZIWLQvJGw=", "owner": "Lyndeno", "repo": "apple-fonts.nix", - "rev": "4df58996ed654f6ce9b71b41c1826484c6870739", + "rev": "ec51ae2e8ba89adbb5188c40aa262a7418c48b00", "type": "github" }, "original": { @@ -28,73 +28,6 @@ "type": "github" } }, - "base16": { - "inputs": { - "fromYaml": "fromYaml" - }, - "locked": { - "lastModified": 1746562888, - "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "base16-fish": { - "flake": false, - "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", - "owner": "tomyun", - "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", - "type": "github" - }, - "original": { - "owner": "tomyun", - "repo": "base16-fish", - "type": "github" - } - }, - "base16-helix": { - "flake": false, - "locked": { - "lastModified": 1736852337, - "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", - "owner": "tinted-theming", - "repo": "base16-helix", - "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-helix", - "type": "github" - } - }, - "base16-vim": { - "flake": false, - "locked": { - "lastModified": 1732806396, - "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -102,11 +35,11 @@ ] }, "locked": { - "lastModified": 1747820204, - "narHash": "sha256-oY/mH8K1LOd+YbO58sw9ORtOdTxy3rR9lvTzOJKVUtA=", + "lastModified": 1751313918, + "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "e2676937faf868111dcea6a4a9cf4b6549907c9d", + "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", "type": "github" }, "original": { @@ -116,54 +49,7 @@ "type": "github" } }, - "firefox-gnome-theme": { - "flake": false, - "locked": { - "lastModified": 1744642301, - "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", - "type": "github" - }, - "original": { - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "type": "github" - } - }, "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1746162366, - "narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=", - "owner": "nix-community", - "repo": "flake-compat", - "rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1696426674, @@ -179,7 +65,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1696426674, @@ -200,32 +86,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -239,11 +104,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -257,11 +122,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -289,6 +154,24 @@ } }, "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { "inputs": { "systems": "systems_6" }, @@ -306,7 +189,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "inputs": { "systems": "systems_7" }, @@ -324,7 +207,7 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_7": { "inputs": { "systems": "systems_8" }, @@ -342,45 +225,18 @@ "type": "github" } }, - "fromYaml": { - "flake": false, + "flakey-profile": { "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", "type": "github" }, "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_2", - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", + "owner": "lf-", + "repo": "flakey-profile", "type": "github" } }, @@ -401,28 +257,6 @@ } }, "gitignore_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_3": { "inputs": { "nixpkgs": [ "zls", @@ -443,23 +277,6 @@ "type": "github" } }, - "gnome-shell": { - "flake": false, - "locked": { - "lastModified": 1744584021, - "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", - "owner": "GNOME", - "repo": "gnome-shell", - "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", - "type": "github" - }, - "original": { - "owner": "GNOME", - "ref": "48.1", - "repo": "gnome-shell", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -467,11 +284,11 @@ ] }, "locked": { - "lastModified": 1747834438, - "narHash": "sha256-AHJt79W8wADzur2htCx1U8FtEk4XjvrHb9/3iDfNedI=", + "lastModified": 1751489990, + "narHash": "sha256-ENTd/sd4Vz/VJYn14SVqW1OH2m7WIAvsm9A9SrmDZRY=", "owner": "nix-community", "repo": "home-manager", - "rev": "6c2eb1e24cd0e76d88bdd633ef4c50d6286586e0", + "rev": "89af52d9a893af013f5f4c1d2d56912106827153", "type": "github" }, "original": { @@ -481,27 +298,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747763032, - "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "langref": { "flake": false, "locked": { @@ -514,13 +310,48 @@ "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in" } }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1746827285, + "narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=", + "rev": "47aad376c87e2e65967f17099277428e4b3f8e5a", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz?rev=47aad376c87e2e65967f17099277428e4b3f8e5a" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/2.93.0.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils", + "flakey-profile": "flakey-profile", + "lix": "lix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746838955, + "narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=", + "rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz?rev=cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz" + } + }, "mnw": { "locked": { - "lastModified": 1747499976, - "narHash": "sha256-YTiSI4WLbk0CleXeBheYmKZV6iqKyBpyoh1e+vcQzu4=", + "lastModified": 1748710831, + "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=", "owner": "Gerg-L", "repo": "mnw", - "rev": "72433a144c4ac16931e9148f78db4a0e4c147441", + "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d", "type": "github" }, "original": { @@ -531,17 +362,17 @@ }, "moonlight": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1747413594, - "narHash": "sha256-cFsVYlIkSNEpGw4qT9Eea6sa1+dZyaCRZNrgQTc8wu4=", + "lastModified": 1750621684, + "narHash": "sha256-E8iHTYK9iUtIjYgBNj54Xeulj9WaxSGDbzOLLFhCSqA=", "owner": "moonlight-mod", "repo": "moonlight", - "rev": "fc7c0119e923d50ce8873ea654fa7542f60be27f", + "rev": "9398874e59f5e2b8485c489ce6c0f6c9c7d210a0", "type": "github" }, "original": { @@ -557,11 +388,11 @@ ] }, "locked": { - "lastModified": 1747847914, - "narHash": "sha256-Ut9RZVAaKUD4A3RrXP5RhNVZ+LVy5mL4mMmiTDWaQE8=", + "lastModified": 1751375534, + "narHash": "sha256-9z1W64dDVtVxqgPzUbjIQqRfygg1hdivUOZ6d/H+yFg=", "owner": "viperML", "repo": "nh", - "rev": "45048d3e9f183f3f09fddf667841b7327c04ad8f", + "rev": "d0abb8eebe32f79ce4659e68dd777cf497a5d3d2", "type": "github" }, "original": { @@ -572,22 +403,17 @@ }, "nil": { "inputs": { - "flake-utils": [ - "nvf", - "flake-utils" - ], "nixpkgs": [ "nvf", "nixpkgs" - ], - "rust-overlay": "rust-overlay_2" + ] }, "locked": { - "lastModified": 1741118843, - "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=", + "lastModified": 1750047244, + "narHash": "sha256-vluLARrk4485npdyHOj8XKr0yk6H22pNf+KVRNL+i/Y=", "owner": "oxalica", "repo": "nil", - "rev": "577d160da311cc7f5042038456a0713e9863d09e", + "rev": "870a4b1b5f12004832206703ac15aa85c42c247b", "type": "github" }, "original": { @@ -603,11 +429,11 @@ ] }, "locked": { - "lastModified": 1747540584, - "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", + "lastModified": 1751170039, + "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", + "rev": "9c932ae632d6b5150515e5749b198c175d8565db", "type": "github" }, "original": { @@ -618,7 +444,7 @@ }, "nix-options-search": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "gitignore": "gitignore", "nixpkgs": "nixpkgs" }, @@ -636,29 +462,6 @@ "type": "github" } }, - "nixos-cosmic": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1747826251, - "narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=", - "owner": "lilyinstarlight", - "repo": "nixos-cosmic", - "rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a", - "type": "github" - }, - "original": { - "owner": "lilyinstarlight", - "repo": "nixos-cosmic", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1736012469, @@ -677,11 +480,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", "type": "github" }, "original": { @@ -690,44 +493,13 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1747676747, - "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1720535198, - "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1751271578, + "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", "type": "github" }, "original": { @@ -768,49 +540,23 @@ "type": "github" } }, - "nur": { - "inputs": { - "flake-parts": [ - "stylix", - "flake-parts" - ], - "nixpkgs": [ - "stylix", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1746056780, - "narHash": "sha256-/emueQGaoT4vu0QjU9LDOG5roxRSfdY0K2KkxuzazcM=", - "owner": "nix-community", - "repo": "NUR", - "rev": "d476cd0972dd6242d76374fcc277e6735715c167", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "nvf": { "inputs": { "flake-parts": "flake-parts", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "mnw": "mnw", "nil": "nil", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": "systems_5" }, "locked": { - "lastModified": 1747525582, - "narHash": "sha256-oEZ6DV4bPcNZIuwW5Kcd+/zT3PMkXse2kX/3jHoomGk=", + "lastModified": 1751186226, + "narHash": "sha256-Bt7jtmCW72JUPxOIrV73qBTAUOy4qvJXsls2ERDUcGo=", "owner": "notashelf", "repo": "nvf", - "rev": "d3a0e7029ac57eef1120225973247851c5b967b5", + "rev": "5bad5dd94ce5ea3b40b08d9e6802e69d02198d21", "type": "github" }, "original": { @@ -836,16 +582,15 @@ "apple-fonts": "apple-fonts", "darwin": "darwin", "home-manager": "home-manager", + "lix-module": "lix-module", "moonlight": "moonlight", "nh": "nh", "nix-index-database": "nix-index-database", "nix-options-search": "nix-options-search", - "nixos-cosmic": "nixos-cosmic", "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable_2", "nvf": "nvf", - "rust-overlay": "rust-overlay_3", - "stylix": "stylix", + "rust-overlay": "rust-overlay", + "zen-browser": "zen-browser", "zig": "zig", "zls": "zls" } @@ -853,58 +598,15 @@ "rust-overlay": { "inputs": { "nixpkgs": [ - "nixos-cosmic", "nixpkgs" ] }, "locked": { - "lastModified": 1747795013, - "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=", + "lastModified": 1751423951, + "narHash": "sha256-AowKhJGplXRkAngSvb+32598DTiI6LOzhAnzgvbCtYM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6b1cf12374361859242a562e1933a7930649131a", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ - "nvf", - "nil", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741055476, - "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "aefb7017d710f150970299685e8d8b549d653649", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_3": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747795013, - "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "6b1cf12374361859242a562e1933a7930649131a", + "rev": "1684ed5b15859b655caf41b467d046e29a994d04", "type": "github" }, "original": { @@ -997,43 +699,6 @@ "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" } }, - "stylix": { - "inputs": { - "base16": "base16", - "base16-fish": "base16-fish", - "base16-helix": "base16-helix", - "base16-vim": "base16-vim", - "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "gnome-shell": "gnome-shell", - "home-manager": "home-manager_2", - "nixpkgs": [ - "nixpkgs" - ], - "nur": "nur", - "systems": "systems_5", - "tinted-foot": "tinted-foot", - "tinted-kitty": "tinted-kitty", - "tinted-schemes": "tinted-schemes", - "tinted-tmux": "tinted-tmux", - "tinted-zed": "tinted-zed" - }, - "locked": { - "lastModified": 1747847674, - "narHash": "sha256-XYVaUKQrda7WOSonewDtpvm8tENIcwWrErobUYMTMoc=", - "owner": "danth", - "repo": "stylix", - "rev": "4ce349da56e075f7e3456b48731cbbf5ae8b1eb8", - "type": "github" - }, - "original": { - "owner": "danth", - "repo": "stylix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -1154,121 +819,38 @@ "type": "github" } }, - "tinted-foot": { - "flake": false, - "locked": { - "lastModified": 1726913040, - "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "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": 1744974599, - "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", - "owner": "tinted-theming", - "repo": "schemes", - "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "schemes", - "type": "github" - } - }, - "tinted-tmux": { - "flake": false, - "locked": { - "lastModified": 1745111349, - "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", - "owner": "tinted-theming", - "repo": "tinted-tmux", - "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-tmux", - "type": "github" - } - }, - "tinted-zed": { - "flake": false, - "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", - "owner": "tinted-theming", - "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-zed", - "type": "github" - } - }, - "treefmt-nix": { + "zen-browser": { "inputs": { "nixpkgs": [ - "stylix", - "nur", "nixpkgs" ] }, "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "lastModified": 1751256876, + "narHash": "sha256-4A8LmE0Hd9RvQwSEPYdITJebpLt7J99VY76IphzqZKc=", + "owner": "youwen5", + "repo": "zen-browser-flake", + "rev": "615b9244dc7ac777b8f0bc3a9cb7290936e4fcf9", "type": "github" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", + "owner": "youwen5", + "repo": "zen-browser-flake", "type": "github" } }, "zig": { "inputs": { - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_5", "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1747829603, - "narHash": "sha256-H8Vj7GSOyHgAUTDM/EkkdiTyEZg2C1UUlsp/fDSbxNQ=", + "lastModified": 1751458413, + "narHash": "sha256-eyKdTzRaY4blNs/GVJODh4E+16wpEKmlnQUpGf9e9gc=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "53899a028ece2f77939c08c59d547416a59086c0", + "rev": "4f33e11d99060c5cb2bdc380a11a9b23858dcfde", "type": "github" }, "original": { @@ -1279,8 +861,8 @@ }, "zig-overlay": { "inputs": { - "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils_6", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_7", "nixpkgs": [ "zls", "nixpkgs" @@ -1302,8 +884,8 @@ }, "zls": { "inputs": { - "flake-utils": "flake-utils_5", - "gitignore": "gitignore_3", + "flake-utils": "flake-utils_6", + "gitignore": "gitignore_2", "langref": "langref", "nixpkgs": "nixpkgs_4", "zig-overlay": "zig-overlay" diff --git a/flake.nix b/flake.nix index 8877e2f..c0754a5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,11 @@ description = "multi device configuration flake"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "nixpkgs/nixos-23.11"; + + lix-module = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -22,15 +26,13 @@ zig.url = "github:mitchellh/zig-overlay"; zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b"; - stylix.url = "github:danth/stylix"; - stylix.inputs.nixpkgs.follows = "nixpkgs"; - moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly. moonlight.inputs.nixpkgs.follows = "nixpkgs"; - nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; - nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs"; - + zen-browser = { + url = "github:youwen5/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nh.url = "github:viperML/nh"; nh.inputs.nixpkgs.follows = "nixpkgs"; @@ -43,7 +45,7 @@ { self, nixpkgs, - nixos-cosmic, + lix-module, darwin, ... }@inputs: @@ -92,6 +94,7 @@ inherit overlays nixpkgs + lix-module inputs mkNeovim ; @@ -127,7 +130,6 @@ host = "desktop"; system = "x86_64-linux"; extraModules = [ - nixos-cosmic.nixosModules.default ]; }; # natalie's laptop diff --git a/lib/mkSystem.nix b/lib/mkSystem.nix index 40387ac..2ca2a4f 100644 --- a/lib/mkSystem.nix +++ b/lib/mkSystem.nix @@ -2,32 +2,24 @@ # particular architecture. { nixpkgs, + lix-module, overlays, inputs, mkNeovim, -}: name: { +}: +name: +{ user, # ./users/{name} host, # ./users/{name}/{host} system, # arch-os - extraModules ? [], -}: let + extraModules ? [ ], +}: +let darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; - getInputModule = a: b: - inputs.${ - a - }.${ - if darwin - then "darwinModules" - else "nixosModules" - }.${ - b - }; + getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b}; # NixOS vs nix-darwin functions - systemFunc = - if darwin - then inputs.darwin.lib.darwinSystem - else nixpkgs.lib.nixosSystem; + systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; userDir = ../users + "/${user}"; userConfig = import (userDir + "/user.nix"); @@ -38,10 +30,7 @@ hostHomePath = hostDir + "/home.nix"; userHomePath = userDir + "/home.nix"; - pathOrNull = a: - if builtins.pathExists a - then a - else null; + pathOrNull = a: if builtins.pathExists a then a else null; # Arguments passed to all module files args = { @@ -68,18 +57,14 @@ term, # preferred $TERM editor, # preferred $EDITOR browser ? null, # preferred $BROWSER - } @ user: - user + }@user: + user ) - userConfig; + userConfig; }; systemSettings = rec { inherit darwin; - homeDir = "/${ - if darwin - then "Users" - else "home" - }/${userConfig.username}"; + homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}"; }; mainHomeImports = builtins.filter (f: f != null) [ @@ -92,60 +77,56 @@ } ]; in - systemFunc { - inherit system; +systemFunc { + inherit system; - modules = - builtins.filter (f: f != null) [ - # Apply our overlays. Overlays are keyed by system type so we have - # to go through and apply our system type. We do this first so - # the overlays are available globally. - {nixpkgs.overlays = overlays;} + modules = + builtins.filter (f: f != null) [ + # Apply our overlays. Overlays are keyed by system type so we have + # to go through and apply our system type. We do this first so + # the overlays are available globally. + { nixpkgs.overlays = overlays; } - # Modules shared between nix-darwin and NixOS - ../modules/shared - # Modules for the specific OS - ( - if darwin - then ../modules/macos - else ../modules/nixos - ) + # Use lix (alternative nix implementation) + # https://lix.systems/add-to-config/#flake-based-configurations + lix-module.nixosModules.default + # (getInputModule "lix-module" "default") - # The user-wide configuration.nix - (pathOrNull userConfigPath) - # The host-wide configuration.nix - (pathOrNull hostConfigPath) + # Modules shared between nix-darwin and NixOS + ../modules/shared + # Modules for the specific OS + (if darwin then ../modules/macos else ../modules/nixos) - # Set up nix-index and enable comma for easy one-shot command use - # https://github.com/nix-community/comma - (getInputModule "nix-index-database" "nix-index") - {programs.nix-index-database.comma.enable = true;} + # The user-wide configuration.nix + (pathOrNull userConfigPath) + # The host-wide configuration.nix + (pathOrNull hostConfigPath) - # Themes for all programs - (getInputModule "stylix" "stylix") + # Set up nix-index and enable comma for easy one-shot command use + # https://github.com/nix-community/comma + (getInputModule "nix-index-database" "nix-index") + { programs.nix-index-database.comma.enable = true; } - # Home manager - (getInputModule "home-manager" "home-manager") - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "hm-backup"; - # Arguments passed to all module files - extraSpecialArgs = - args - // { - inherit mainHomeImports; - }; - # can't find how to make this an array without the param - users.${userConfig.username} = ../modules/home; + # Home manager + (getInputModule "home-manager" "home-manager") + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "hm-backup"; + # Arguments passed to all module files + extraSpecialArgs = args // { + inherit mainHomeImports; }; - users.users.${userConfig.username}.home = systemSettings.homeDir; - } + # can't find how to make this an array without the param + users.${userConfig.username} = ../modules/home; + }; + users.users.${userConfig.username}.home = systemSettings.homeDir; + } - # Arguments passed to all module files - {config._module.args = args;} - ] - # Add extra modules specified from config - ++ extraModules; - } + # Arguments passed to all module files + { config._module.args = args; } + ] + # Add extra modules specified from config + ++ extraModules; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index 98635b4..773ddfe 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -86,8 +86,8 @@ in }; shellInit = '' batman --export-env | source + test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true ''; - ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true }; }; } diff --git a/modules/home/macos/sketchybar.nix b/modules/home/macos/sketchybar.nix index e80cbab..f42a1f0 100644 --- a/modules/home/macos/sketchybar.nix +++ b/modules/home/macos/sketchybar.nix @@ -2,428 +2,339 @@ pkgs, lib, config, + host, ... -}: { +}: +{ home.file = - lib.attrsets.mapAttrs (file: value: ( - lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;} - )) { - sketchybarrc = { - executable = true; - target = ".config/sketchybar/sketchybarrc"; - text = '' - #!/usr/bin/env sh + { } + // lib.optionalAttrs host.darwin ( + lib.attrsets.mapAttrs + ( + file: value: (lib.attrsets.overrideExisting value { enable = config.shared.darwin.tiling.enable; }) + ) + { + sketchybarrc = { + executable = true; + target = ".config/sketchybar/sketchybarrc"; + text = '' + #!/usr/bin/env sh - source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors + source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors - ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured - PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored + ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured + PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored - FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants - PADDINGS=3 # All paddings use this value (icon, label, background) + FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants + PADDINGS=3 # All paddings use this value (icon, label, background) - # Setting up the general bar appearance and default values - ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \ - blur_radius=30 \ - position=top \ - sticky=on \ - padding_left=10 \ - padding_right=10 + # Setting up the general bar appearance and default values + ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \ + blur_radius=30 \ + position=top \ + sticky=on \ + padding_left=10 \ + padding_right=10 - ${pkgs.sketchybar}/bin/sketchybar --default icon.font="SF Pro:Semibold:12.0" \ - icon.color=$ITEM_COLOR \ - label.font="SF Pro:Semibold:12.0" \ - label.color=$ITEM_COLOR \ - background.color=$ACCENT_COLOR \ - background.corner_radius=10 \ - background.height=20 \ - padding_left=4 \ - padding_right=4 \ - icon.padding_left=6 \ - icon.padding_right=3 \ - label.padding_left=3 \ - label.padding_right=6 + ${pkgs.sketchybar}/bin/sketchybar --default icon.font="SF Pro:Semibold:12.0" \ + icon.color=$ITEM_COLOR \ + label.font="SF Pro:Semibold:12.0" \ + label.color=$ITEM_COLOR \ + background.color=$ACCENT_COLOR \ + background.corner_radius=10 \ + background.height=20 \ + padding_left=4 \ + padding_right=4 \ + icon.padding_left=6 \ + icon.padding_right=3 \ + label.padding_left=3 \ + label.padding_right=6 - # Left - # source "$ITEM_DIR/apple.sh" - source "$ITEM_DIR/spaces.sh" - source "$ITEM_DIR/front_app.sh" + # Left + # source "$ITEM_DIR/apple.sh" + source "$ITEM_DIR/spaces.sh" + source "$ITEM_DIR/front_app.sh" - # Center - # source "$ITEM_DIR/spotify.sh" - source "$ITEM_DIR/calendar.sh" + # Center + # source "$ITEM_DIR/spotify.sh" + source "$ITEM_DIR/calendar.sh" - # Right - source $ITEM_DIR/calendar.sh - source $ITEM_DIR/wifi.sh - source $ITEM_DIR/battery.sh - source $ITEM_DIR/volume.sh + # Right + source $ITEM_DIR/calendar.sh + source $ITEM_DIR/wifi.sh + source $ITEM_DIR/battery.sh + source $ITEM_DIR/volume.sh - # Forcing all item scripts to run (never do this outside of sketchybarrc) - ${pkgs.sketchybar}/bin/sketchybar --update + # Forcing all item scripts to run (never do this outside of sketchybarrc) + ${pkgs.sketchybar}/bin/sketchybar --update - echo "sketchybar configuation loaded.." - ''; - }; - icons = { - executable = true; - target = ".config/sketchybar/plugins/icons.sh"; - text = '' - #!/usr/bin/env sh + echo "sketchybar configuation loaded.." + ''; + }; + icons = { + executable = true; + target = ".config/sketchybar/plugins/icons.sh"; + text = '' + #!/usr/bin/env sh - # Source the icon map with all the application icons - source ${pkgs.sketchybar-app-font}/bin/icon_map.sh + # Source the icon map with all the application icons + source ${pkgs.sketchybar-app-font}/bin/icon_map.sh - # Create a cache directory if it doesn't exist - CACHE_DIR="$HOME/.cache/sketchybar" - mkdir -p "$CACHE_DIR" + # Create a cache directory if it doesn't exist + CACHE_DIR="$HOME/.cache/sketchybar" + mkdir -p "$CACHE_DIR" - # Cache file for icon mappings - ICON_CACHE="$CACHE_DIR/icon_cache.txt" + # Cache file for icon mappings + ICON_CACHE="$CACHE_DIR/icon_cache.txt" - # Create the cache file if it doesn't exist - if [ ! -f "$ICON_CACHE" ]; then - touch "$ICON_CACHE" - fi - - # Check if the app is already in cache - APP_NAME=$(if [ "$1" = "Zen" ]; then echo "Zen Browser"; else echo "$1"; fi) - - CACHED_ICON=$(grep "^$APP_NAME|" "$ICON_CACHE" | cut -d '|' -f2) - - if [ -n "$CACHED_ICON" ]; then - # Cache hit, return the icon - echo "$CACHED_ICON" - exit 0 - fi - - # Get icon from the mapping function - __icon_map "$APP_NAME" - - if [ -n "$icon_result" ]; then - echo "$APP_NAME|$icon_result" >>"$ICON_CACHE" - fi - - echo "$icon_result" - ''; - }; - colors = { - executable = true; - target = ".config/sketchybar/colors.sh"; - text = '' - - export TRANSPARENT=0x00ffffff - - # -- Gray Scheme -- - export ITEM_COLOR=0xff000000 - export ACCENT_COLOR=0xffc3c6cb - - # -- White Scheme -- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xffffffff - - # -- Teal Scheme -- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xff2cf9ed - - # -- Purple Scheme -- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xffeb46f9 - - # -- Red Scheme --- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xffff2453 - - # -- Blue Scheme --- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xff15bdf9 - - # -- Green Scheme -- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xff1dfca1 - - # -- Orange Scheme -- - # export ITEM_COLOR=0xffffffff - # export ACCENT_COLOR=0xfff97716 - - # -- Yellow Scheme -- - # export ITEM_COLOR=0xff000000 - # export ACCENT_COLOR=0xfff7fc17 - ''; - }; - items_wifi = { - executable = true; - target = ".config/sketchybar/items/wifi.sh"; - text = '' - #!/usr/bin/env/ sh - - sketchybar --add item wifi right \ - --set wifi \ - icon="􀙥" \ - label="Updating..." \ - script="$PLUGIN_DIR/wifi.sh" \ - --subscribe wifi wifi_change - ''; - }; - items_battery = { - executable = true; - target = ".config/sketchybar/items/battery.sh"; - text = '' - #!/usr/bin/env/ sh - sketchybar --add item battery right \ - --set battery update_freq=180 \ - script="$PLUGIN_DIR/battery.sh" \ - --subscribe battery system_woke power_source_change - ''; - }; - items_calendar = { - executable = true; - target = ".config/sketchybar/items/calendar.sh"; - text = '' - #!/usr/bin/env sh - sketchybar --add item calendar right \ - --set calendar icon=􀧞 \ - update_freq=15 \ - script="$PLUGIN_DIR/calendar.sh" - ''; - }; - items_front_app = { - executable = true; - target = ".config/sketchybar/items/front_app.sh"; - text = '' - #!/usr/bin/env sh - - sketchybar --add item front_app left \ - --set front_app background.color=$ACCENT_COLOR \ - icon.color=$ITEM_COLOR \ - label.color=$ITEM_COLOR \ - icon.font="sketchybar-app-font:Regular:12.0" \ - label.font="SF Pro:Semibold:12.0" \ - script="$PLUGIN_DIR/front_app.sh" \ - --subscribe front_app front_app_switched - ''; - }; - items_spaces = { - executable = true; - target = ".config/sketchybar/items/spaces.sh"; - text = '' - sketchybar --add event aerospace_workspace_change - - sketchybar --add item aerospace_dummy left \ - --set aerospace_dummy display=0 \ - script="$PLUGIN_DIR/spaces.sh" \ - --subscribe aerospace_dummy aerospace_workspace_change - - for m in $(aerospace list-monitors | awk '{print $1}'); do - for sid in $(aerospace list-workspaces --monitor $m); do - sketchybar --add space space.$sid left \ - --set space.$sid space=$sid \ - icon=$sid \ - background.color=$TRANSPARENT \ - label.color=$ACCENT_COLOR \ - icon.color=$ACCENT_COLOR \ - display=$m \ - label.font="sketchybar-app-font:Regular:12.0" \ - icon.font="SF Pro:Semibold:12.0" \ - label.padding_right=10 \ - label.y_offset=-1 \ - click_script="$PLUGIN_DIR/space_click.sh $sid" - - apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | - awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}') - - icon_strip="" - if [ "''${apps}" != "" ]; then - while read -r app; do - icon_strip+=" $($PLUGIN_DIR/icons.sh "$app")" - done <<<"''${apps}" - else - icon_strip=" —" + # Create the cache file if it doesn't exist + if [ ! -f "$ICON_CACHE" ]; then + touch "$ICON_CACHE" fi - sketchybar --set space.$sid label="$icon_strip" + # Check if the app is already in cache + APP_NAME=$(if [ "$1" = "Zen" ]; then echo "Zen Browser"; else echo "$1"; fi) - done + CACHED_ICON=$(grep "^$APP_NAME|" "$ICON_CACHE" | cut -d '|' -f2) - for empty_space in $(aerospace list-workspaces --monitor $m --empty); do - sketchybar --set space.$empty_space display=0 - done - for focus in $(aerospace list-workspaces --focused); do - sketchybar --set space.$focus background.drawing=on \ - background.color=$ACCENT_COLOR \ - label.color=$ITEM_COLOR \ - icon.color=$ITEM_COLOR - done - done - ''; - }; - - items_volume = { - executable = true; - target = ".config/sketchybar/items/volume.sh"; - text = '' - #/usr/bin/env sh - - sketchybar --add item volume right \ - --set volume script="$PLUGIN_DIR/volume.sh" \ - --subscribe volume volume_change - ''; - }; - plugins_wifi = { - executable = true; - target = ".config/sketchybar/plugins/wifi.sh"; - text = '' - #/usr/bin/env sh - - SSID=$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }') - - if [ "$SSID" = "" ]; then - sketchybar --set $NAME icon="􀙈" label="Disconnected" - else - sketchybar --set $NAME icon="􀙇" label="$SSID" - fi - - ''; - }; - plugins_calendar = { - executable = true; - target = ".config/sketchybar/plugins/calendar.sh"; - - text = '' - #/usr/bin/env sh - - sketchybar --set $NAME label="$(date +'%a %d %b %I:%M %p')" - ''; - }; - plugins_spaces = { - executable = true; - target = ".config/sketchybar/plugins/spaces.sh"; - text = '' - #!/usr/bin/env sh - - source "$CONFIG_DIR/colors.sh" - - update_workspace_appearance() { - local sid=$1 - local is_focused=$2 - - if [ "$is_focused" = "true" ]; then - sketchybar --set space.$sid background.drawing=on \ - background.color=$ACCENT_COLOR \ - label.color=$ITEM_COLOR \ - icon.color=$ITEM_COLOR - else - sketchybar --set space.$sid background.drawing=off \ - label.color=$ACCENT_COLOR \ - icon.color=$ACCENT_COLOR - fi - } - - update_icons() { - m=$1 - sid=$2 - - apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" \ - | awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}' \ - | sort) - - icon_strip="" - if [ "''${apps}" != "" ]; then - while read -r app; do - icon_strip+=" $($CONFIG_DIR/plugins/icons.sh "$app")" - done <<<"''${apps}" - else - icon_strip=" —" - fi - - sketchybar --animate sin 10 --set space.$sid label="$icon_strip" - } - - update_workspace_appearance "$PREV_WORKSPACE" "false" - update_workspace_appearance "$FOCUSED_WORKSPACE" "true" - - for m in $(aerospace list-monitors | awk '{print $1}'); do - for sid in $(aerospace list-workspaces --monitor $m --visible); do - sketchybar --set space.$sid display=$m - - update_icons "$m" "$sid" - - update_icons "$m" "$PREV_WORKSPACE" - - apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | wc -l) - if [ "''${apps}" -eq 0 ]; then - sketchybar --set space.$sid display=0 + if [ -n "$CACHED_ICON" ]; then + # Cache hit, return the icon + echo "$CACHED_ICON" + exit 0 fi - done - done - ''; - }; - plugins_space_click = { - executable = true; - target = ".config/sketchybar/plugins/space_click.sh"; - text = '' - #/usr/bin/env/ sh + # Get icon from the mapping function + __icon_map "$APP_NAME" - apps=$(aerospace list-windows --workspace $1 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') - focused=$(aerospace list-workspaces --focused) + if [ -n "$icon_result" ]; then + echo "$APP_NAME|$icon_result" >>"$ICON_CACHE" + fi - if [ "''${apps}" = "" ] && [ "''${focused}" != "$1" ]; then - sketchybar --set space.$1 display=0 - else - aerospace workspace $1 - fi - ''; - }; - plugins_volume = { - executable = true; - target = ".config/sketchybar/plugins/volume.sh"; - text = '' - #!/usr/bin/env sh + echo "$icon_result" + ''; + }; + colors = { + executable = true; + target = ".config/sketchybar/colors.sh"; + text = '' - # The volume_change event supplies a $INFO variable in which the current volume - # percentage is passed to the script. + export TRANSPARENT=0x00ffffff - if [ "$SENDER" = "volume_change" ]; then + # -- Gray Scheme -- + export ITEM_COLOR=0xff000000 + export ACCENT_COLOR=0xffc3c6cb - VOLUME=$INFO + # -- White Scheme -- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xffffffff - case $VOLUME in - [6-9][0-9] | 100) - ICON="􀊩" - ;; - [3-5][0-9]) - ICON="􀊥" - ;; - [1-9] | [1-2][0-9]) - ICON="􀊡" - ;; - *) ICON="􀊣" ;; - esac + # -- Teal Scheme -- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xff2cf9ed - sketchybar --set $NAME icon="$ICON" label="$VOLUME%" - fi - ''; - }; - plugins_front_app = { - executable = true; - target = ".config/sketchybar/plugins/front_app.sh"; - text = '' - # Some events send additional information specific to the event in the $INFO - # variable. E.g. the front_app_switched event sends the name of the newly - # focused application in the $INFO variable: - # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting + # -- Purple Scheme -- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xffeb46f9 - app_switched() { - for m in $(aerospace list-monitors | awk '{print $1}'); do - for sid in $(aerospace list-workspaces --monitor $m --visible); do + # -- Red Scheme --- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xffff2453 - apps=$( (echo "$INFO"; aerospace list-windows --monitor "$m" --workspace "$sid" \ - | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') \ - | awk '!seen[$0]++' | sort) + # -- Blue Scheme --- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xff15bdf9 + + # -- Green Scheme -- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xff1dfca1 + + # -- Orange Scheme -- + # export ITEM_COLOR=0xffffffff + # export ACCENT_COLOR=0xfff97716 + + # -- Yellow Scheme -- + # export ITEM_COLOR=0xff000000 + # export ACCENT_COLOR=0xfff7fc17 + ''; + }; + items_wifi = { + executable = true; + target = ".config/sketchybar/items/wifi.sh"; + text = '' + #!/usr/bin/env/ sh + + sketchybar --add item wifi right \ + --set wifi \ + icon="􀙥" \ + label="Updating..." \ + script="$PLUGIN_DIR/wifi.sh" \ + --subscribe wifi wifi_change + ''; + }; + items_battery = { + executable = true; + target = ".config/sketchybar/items/battery.sh"; + text = '' + #!/usr/bin/env/ sh + sketchybar --add item battery right \ + --set battery update_freq=180 \ + script="$PLUGIN_DIR/battery.sh" \ + --subscribe battery system_woke power_source_change + ''; + }; + items_calendar = { + executable = true; + target = ".config/sketchybar/items/calendar.sh"; + text = '' + #!/usr/bin/env sh + sketchybar --add item calendar right \ + --set calendar icon=􀧞 \ + update_freq=15 \ + script="$PLUGIN_DIR/calendar.sh" + ''; + }; + items_front_app = { + executable = true; + target = ".config/sketchybar/items/front_app.sh"; + text = '' + #!/usr/bin/env sh + + sketchybar --add item front_app left \ + --set front_app background.color=$ACCENT_COLOR \ + icon.color=$ITEM_COLOR \ + label.color=$ITEM_COLOR \ + icon.font="sketchybar-app-font:Regular:12.0" \ + label.font="SF Pro:Semibold:12.0" \ + script="$PLUGIN_DIR/front_app.sh" \ + --subscribe front_app front_app_switched + ''; + }; + items_spaces = { + executable = true; + target = ".config/sketchybar/items/spaces.sh"; + text = '' + sketchybar --add event aerospace_workspace_change + + sketchybar --add item aerospace_dummy left \ + --set aerospace_dummy display=0 \ + script="$PLUGIN_DIR/spaces.sh" \ + --subscribe aerospace_dummy aerospace_workspace_change + + for m in $(aerospace list-monitors | awk '{print $1}'); do + for sid in $(aerospace list-workspaces --monitor $m); do + sketchybar --add space space.$sid left \ + --set space.$sid space=$sid \ + icon=$sid \ + background.color=$TRANSPARENT \ + label.color=$ACCENT_COLOR \ + icon.color=$ACCENT_COLOR \ + display=$m \ + label.font="sketchybar-app-font:Regular:12.0" \ + icon.font="SF Pro:Semibold:12.0" \ + label.padding_right=10 \ + label.y_offset=-1 \ + click_script="$PLUGIN_DIR/space_click.sh $sid" + + apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | + awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}') + + icon_strip="" + if [ "''${apps}" != "" ]; then + while read -r app; do + icon_strip+=" $($PLUGIN_DIR/icons.sh "$app")" + done <<<"''${apps}" + else + icon_strip=" —" + fi + + sketchybar --set space.$sid label="$icon_strip" + + done + + for empty_space in $(aerospace list-workspaces --monitor $m --empty); do + sketchybar --set space.$empty_space display=0 + done + for focus in $(aerospace list-workspaces --focused); do + sketchybar --set space.$focus background.drawing=on \ + background.color=$ACCENT_COLOR \ + label.color=$ITEM_COLOR \ + icon.color=$ITEM_COLOR + done + done + ''; + }; + + items_volume = { + executable = true; + target = ".config/sketchybar/items/volume.sh"; + text = '' + #/usr/bin/env sh + + sketchybar --add item volume right \ + --set volume script="$PLUGIN_DIR/volume.sh" \ + --subscribe volume volume_change + ''; + }; + plugins_wifi = { + executable = true; + target = ".config/sketchybar/plugins/wifi.sh"; + text = '' + #/usr/bin/env sh + + SSID=$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }') + + if [ "$SSID" = "" ]; then + sketchybar --set $NAME icon="􀙈" label="Disconnected" + else + sketchybar --set $NAME icon="􀙇" label="$SSID" + fi + + ''; + }; + plugins_calendar = { + executable = true; + target = ".config/sketchybar/plugins/calendar.sh"; + + text = '' + #/usr/bin/env sh + + sketchybar --set $NAME label="$(date +'%a %d %b %I:%M %p')" + ''; + }; + plugins_spaces = { + executable = true; + target = ".config/sketchybar/plugins/spaces.sh"; + text = '' + #!/usr/bin/env sh + + source "$CONFIG_DIR/colors.sh" + + update_workspace_appearance() { + local sid=$1 + local is_focused=$2 + + if [ "$is_focused" = "true" ]; then + sketchybar --set space.$sid background.drawing=on \ + background.color=$ACCENT_COLOR \ + label.color=$ITEM_COLOR \ + icon.color=$ITEM_COLOR + else + sketchybar --set space.$sid background.drawing=off \ + label.color=$ACCENT_COLOR \ + icon.color=$ACCENT_COLOR + fi + } + + update_icons() { + m=$1 + sid=$2 + + apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" \ + | awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}' \ + | sort) icon_strip="" if [ "''${apps}" != "" ]; then @@ -435,101 +346,197 @@ fi sketchybar --animate sin 10 --set space.$sid label="$icon_strip" + } + + update_workspace_appearance "$PREV_WORKSPACE" "false" + update_workspace_appearance "$FOCUSED_WORKSPACE" "true" + + for m in $(aerospace list-monitors | awk '{print $1}'); do + for sid in $(aerospace list-workspaces --monitor $m --visible); do + sketchybar --set space.$sid display=$m + + update_icons "$m" "$sid" + + update_icons "$m" "$PREV_WORKSPACE" + + apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | wc -l) + if [ "''${apps}" -eq 0 ]; then + sketchybar --set space.$sid display=0 + fi + done done - done - } + ''; + }; - if [ "$SENDER" = "front_app_switched" ]; then + plugins_space_click = { + executable = true; + target = ".config/sketchybar/plugins/space_click.sh"; + text = '' + #/usr/bin/env/ sh - sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icons.sh "$INFO")" + apps=$(aerospace list-windows --workspace $1 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') + focused=$(aerospace list-workspaces --focused) - app_switched - fi - ''; - }; - plugins_battery = { - executable = true; - target = ".config/sketchybar/plugins/battery.sh"; - text = '' - #!/usr/bin/env sh - source "$CONFIG_DIR/colors.sh" + if [ "''${apps}" = "" ] && [ "''${focused}" != "$1" ]; then + sketchybar --set space.$1 display=0 + else + aerospace workspace $1 + fi + ''; + }; + plugins_volume = { + executable = true; + target = ".config/sketchybar/plugins/volume.sh"; + text = '' + #!/usr/bin/env sh - PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1) - CHARGING=$(pmset -g batt | grep 'AC Power') + # The volume_change event supplies a $INFO variable in which the current volume + # percentage is passed to the script. - if [ $PERCENTAGE = "" ]; then - exit 0 - fi + if [ "$SENDER" = "volume_change" ]; then - case ''${PERCENTAGE} in - 9[0-9] | 100) - ICON="􀛨" - COLOR=$ITEM_COLOR - ;; - [6-8][0-9]) - ICON="􀺸" - COLOR=$ITEM_COLOR - ;; - [3-5][0-9]) - ICON="􀺶" - COLOR="0xFFd97706" - ;; - [1-2][0-9]) - ICON="􀛩" - COLOR="0xFFf97316" - ;; - *) - ICON="􀛪" - COLOR="0xFFef4444" - ;; - esac + VOLUME=$INFO - if [[ $CHARGING != "" ]]; then - ICON="􀢋" - COLOR=$ITEM_COLOR - fi + case $VOLUME in + [6-9][0-9] | 100) + ICON="􀊩" + ;; + [3-5][0-9]) + ICON="􀊥" + ;; + [1-9] | [1-2][0-9]) + ICON="􀊡" + ;; + *) ICON="􀊣" ;; + esac - # The item invoking this script (name $NAME) will get its icon and label - # updated with the current battery status - sketchybar --set $NAME icon="$ICON" label="''${PERCENTAGE}%" icon.color="$COLOR" - ''; - }; - plugins_aerospace = { - executable = true; - target = ".config/sketchybar/plugins/aerospace.sh"; - text = '' - #!/usr/bin/env bash - source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors + sketchybar --set $NAME icon="$ICON" label="$VOLUME%" + fi + ''; + }; + plugins_front_app = { + executable = true; + target = ".config/sketchybar/plugins/front_app.sh"; + text = '' + # Some events send additional information specific to the event in the $INFO + # variable. E.g. the front_app_switched event sends the name of the newly + # focused application in the $INFO variable: + # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting - highlight_focused_workspace() { - if [[ "$1" = "$FOCUSED_WORKSPACE" ]] - then - ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0 - else - ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic - fi - } + app_switched() { + for m in $(aerospace list-monitors | awk '{print $1}'); do + for sid in $(aerospace list-workspaces --monitor $m --visible); do - illuminate_mode() { - if [[ "$mode" = "service" ]] - then - ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE - elif [[ "$mode" = "resize" ]] - then - ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN - else - ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1 - fi - } - case "$SENDER" in - "aerospace_workspace_change") - highlight_focused_workspace $1 - ;; - "aerospace_mode_change") - illuminate_mode - ;; - esac - ''; - }; - }; + apps=$( (echo "$INFO"; aerospace list-windows --monitor "$m" --workspace "$sid" \ + | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') \ + | awk '!seen[$0]++' | sort) + + icon_strip="" + if [ "''${apps}" != "" ]; then + while read -r app; do + icon_strip+=" $($CONFIG_DIR/plugins/icons.sh "$app")" + done <<<"''${apps}" + else + icon_strip=" —" + fi + + sketchybar --animate sin 10 --set space.$sid label="$icon_strip" + done + done + } + + if [ "$SENDER" = "front_app_switched" ]; then + + sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icons.sh "$INFO")" + + app_switched + fi + ''; + }; + plugins_battery = { + executable = true; + target = ".config/sketchybar/plugins/battery.sh"; + text = '' + #!/usr/bin/env sh + source "$CONFIG_DIR/colors.sh" + + PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1) + CHARGING=$(pmset -g batt | grep 'AC Power') + + if [ $PERCENTAGE = "" ]; then + exit 0 + fi + + case ''${PERCENTAGE} in + 9[0-9] | 100) + ICON="􀛨" + COLOR=$ITEM_COLOR + ;; + [6-8][0-9]) + ICON="􀺸" + COLOR=$ITEM_COLOR + ;; + [3-5][0-9]) + ICON="􀺶" + COLOR="0xFFd97706" + ;; + [1-2][0-9]) + ICON="􀛩" + COLOR="0xFFf97316" + ;; + *) + ICON="􀛪" + COLOR="0xFFef4444" + ;; + esac + + if [[ $CHARGING != "" ]]; then + ICON="􀢋" + COLOR=$ITEM_COLOR + fi + + # The item invoking this script (name $NAME) will get its icon and label + # updated with the current battery status + sketchybar --set $NAME icon="$ICON" label="''${PERCENTAGE}%" icon.color="$COLOR" + ''; + }; + plugins_aerospace = { + executable = true; + target = ".config/sketchybar/plugins/aerospace.sh"; + text = '' + #!/usr/bin/env bash + source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors + + highlight_focused_workspace() { + if [[ "$1" = "$FOCUSED_WORKSPACE" ]] + then + ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0 + else + ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic + fi + } + + illuminate_mode() { + if [[ "$mode" = "service" ]] + then + ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE + elif [[ "$mode" = "resize" ]] + then + ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN + else + ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1 + fi + } + case "$SENDER" in + "aerospace_workspace_change") + highlight_focused_workspace $1 + ;; + "aerospace_mode_change") + illuminate_mode + ;; + esac + ''; + }; + } + ); } diff --git a/modules/macos/system.nix b/modules/macos/system.nix index 4dca169..7bea701 100644 --- a/modules/macos/system.nix +++ b/modules/macos/system.nix @@ -4,9 +4,11 @@ pkgs, lib, ... -}: let +}: +let tiling = config.shared.darwin.tiling.enable; -in { +in +{ # Use touchid or watch to activate sudo security.pam.services.sudo_local = { enable = true; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 56566f8..a9e226a 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -170,7 +170,10 @@ } ]; }; - image.enable = true; + image = { + enable = true; + math.enabled = false; + }; notifier.timeout = 3000; picker = { enable = true; diff --git a/modules/nixos/services.nix b/modules/nixos/services.nix index a5c6f0f..c48ebc1 100644 --- a/modules/nixos/services.nix +++ b/modules/nixos/services.nix @@ -24,6 +24,7 @@ desktopManager.cosmic.enable = true; displayManager.cosmic-greeter.enable = true; + desktopManager.cosmic.xwayland.enable = true; # Auto mount devices udisks2 = { diff --git a/modules/shared/nix.nix b/modules/shared/nix.nix index b8bff36..1300a0f 100644 --- a/modules/shared/nix.nix +++ b/modules/shared/nix.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ nixpkgs.config = { allowUnfree = true; }; @@ -24,13 +25,11 @@ "https://cache.nixos.org/?priority=10" "https://nix-community.cachix.org" - "https://cosmic.cachix.org/" # For haskell "https://cache.iog.io" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" # For haskell "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; diff --git a/modules/shared/user-system-settings.nix b/modules/shared/user-system-settings.nix index 842f046..bbd03c9 100644 --- a/modules/shared/user-system-settings.nix +++ b/modules/shared/user-system-settings.nix @@ -19,27 +19,4 @@ BROWSER = user.browser; }; - stylix = lib.mkIf (user ? "theme" && user.theme != null) { - enable = false; - base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml"; - - fonts = lib.optionalAttrs (user ? "font") { - serif = { - package = pkgs.nerd-fonts.${user.font}; - name = "${user.font} Nerd Font"; - }; - sansSerif = { - package = pkgs.nerd-fonts.${user.font}; - name = "${user.font} Nerd Font"; - }; - monospace = { - package = pkgs.nerd-fonts.${user.font}; - name = "${user.font} Nerd Font"; - }; - emoji = { - package = pkgs.twemoji-color-font; - name = "Twemoji Color"; - }; - }; - }; } diff --git a/users/natalie/desktop/configuration.nix b/users/natalie/desktop/configuration.nix index abc5094..f4f95c2 100644 --- a/users/natalie/desktop/configuration.nix +++ b/users/natalie/desktop/configuration.nix @@ -84,8 +84,6 @@ hybrid-sleep.enable = false; }; - packages = [ pkgs.observatory ]; - services.monitord.wantedBy = [ "multi-user.target" ]; }; @@ -148,7 +146,10 @@ ]; }; environment = { - sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; + sessionVariables = { + COSMIC_DATA_CONTROL_ENABLED = 1; + NIXOS_OZONE_WL = "1"; + }; variables.EDITOR = "nvim"; systemPackages = with pkgs; [ diff --git a/users/natalie/desktop/home.nix b/users/natalie/desktop/home.nix index d3aa825..10d4da9 100644 --- a/users/natalie/desktop/home.nix +++ b/users/natalie/desktop/home.nix @@ -8,6 +8,7 @@ ... }: { + programs.mangohud.enable = true; home = { stateVersion = "23.05"; # Please read the comment before changing. @@ -29,6 +30,7 @@ wineWowPackages.stable winetricks (prismlauncher.override { gamemodeSupport = true; }) + umu-launcher #window manager stuff wofi @@ -50,8 +52,8 @@ signal-desktop inputs.zls.packages.x86_64-linux.zls rust-bin.stable.latest.default + inputs.zen-browser.packages.x86_64-linux.default ]; - # programs.mangohud.enable = true; }; # xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop"; diff --git a/users/natalie/home.nix b/users/natalie/home.nix index 230fe96..526e94c 100644 --- a/users/natalie/home.nix +++ b/users/natalie/home.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -} @ args: { +}@args: +{ programs = { # sort-lines:start atuin.enable = true; diff --git a/users/natalie/laptop/configuration.nix b/users/natalie/laptop/configuration.nix index b4c7312..73243ce 100644 --- a/users/natalie/laptop/configuration.nix +++ b/users/natalie/laptop/configuration.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = with pkgs; [ pinentry_mac ]; @@ -6,9 +7,11 @@ # Custom configuration modules in "modules" are shared between users, # and can be configured in this "shared" namespace shared.darwin = { - macAppStoreApps = ["wireguard"]; + macAppStoreApps = [ "wireguard" ]; }; + system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 1.0; + # Create /etc/zshrc that loads the nix-darwin environment. programs = { gnupg.agent.enable = true; diff --git a/users/natalie/laptop/home.nix b/users/natalie/laptop/home.nix index 4c981e9..698a10d 100644 --- a/users/natalie/laptop/home.nix +++ b/users/natalie/laptop/home.nix @@ -15,5 +15,10 @@ sessionPath = [ "$HOME/.emacs.d/bin" ]; + + packages = with pkgs; [ + #PDF viewer for VimTeX + skimpdf + ]; }; } diff --git a/users/natalie/packages.nix b/users/natalie/packages.nix index 7195aa8..8fde40e 100644 --- a/users/natalie/packages.nix +++ b/users/natalie/packages.nix @@ -1,6 +1,7 @@ # Packages installed with home-manager -{pkgs, ...}: -with pkgs; [ +{ pkgs, ... }: +with pkgs; +[ #general development just pkg-config @@ -23,6 +24,7 @@ with pkgs; [ qemu podman docker + devenv #productivity glance @@ -33,9 +35,10 @@ with pkgs; [ #nix tools direnv nh + (lix.override { aws-sdk-cpp = null; }) #terminal stuff - (btop.override {cudaSupport = true;}) + (btop.override { cudaSupport = true; }) tmux zellij lazygit @@ -62,15 +65,9 @@ with pkgs; [ #media spotify - zathura #language servers typst-live - lua-language-server - nil - nixd - texlab - texlivePackages.chktex #formatters/linters stylua @@ -79,14 +76,10 @@ with pkgs; [ #neovim deps # TODO: from clo, maybe u can remove all of these? i don't wanna break tho - lua51Packages.lua - lua51Packages.luarocks-nix - codespell tree-sitter - + zathura #python pyright - basedpyright ruff python312Packages.python python312Packages.pynvim @@ -107,7 +100,6 @@ with pkgs; [ #math texlive.combined.scheme-full - zathura #fun things cowsay diff --git a/users/natalie/user.nix b/users/natalie/user.nix index 9c90a82..318a692 100644 --- a/users/natalie/user.nix +++ b/users/natalie/user.nix @@ -3,11 +3,11 @@ rec { name = "Natalie"; # name/identifier email = "nmarks413@gmail.com"; # email (used for certain configurations) dotfilesDir = "~/.dotfiles"; # absolute path of the local repo - theme = "catppuccin-mocha"; # name of theme that stylix will use + theme = null; # name of theme that stylix will use browser = "firefox"; # Default browser; must select one from ./user/app/browser/ term = "ghostty"; # Default terminal command; font = "iosevka"; # Selected font - editor = "neovim"; # Default editor; + editor = "nvim"; # Default editor; timeZone = "America/Los_Angeles"; sexuality = "bisexual"; } diff --git a/users/natalie/vim.nix b/users/natalie/vim.nix index a1bad7b..c58abf2 100644 --- a/users/natalie/vim.nix +++ b/users/natalie/vim.nix @@ -1,8 +1,14 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./vim/default.nix ]; + vim = { + #enable python provider + withPython3 = true; + python3Packages = [ "pynvim" ]; + options = { tabstop = 2; softtabstop = 2; @@ -14,10 +20,52 @@ foldcolumn = "1"; foldlevelstart = 99; foldenable = true; + foldmethod = "expr"; + #Default to treesitter folding + foldexpr = "v:lua.vim.treesitter.foldexpr()"; }; autocmds = [ + #Autocommand to fall back to treesitter folding if LSP doesnt support it + { + event = [ "LspAttach" ]; + callback = pkgs.lib.generators.mkLuaInline '' + function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client:supports_method('textDocument/foldingRange') then + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()' + end + end + ''; + } ]; + + tabline = { + nvimBufferline.enable = true; + }; + # nvf versions is VERY outdated + # pluginOverrides = { + # hardtime-nvim = pkgs.fetchFromGitHub { + # owner = "m4xshen"; + # repo = "hardtime.nvim"; + # rev = "v1.0.1"; + # hash = "sha256-5tqiSuGvBJcr8l6anEBojXEaaxFS1P5T1ROr46ylVhk="; + # }; + # }; + startPlugins = [ + "nui-nvim" + ]; + binds = { + hardtime-nvim = { + enable = false; + setupOpts = { + disable_mouse = false; + restriction_mode = "warn"; + }; + }; + }; + theme = { name = "catppuccin"; style = "mocha"; diff --git a/users/natalie/vim/coq.nix b/users/natalie/vim/coq.nix new file mode 100644 index 0000000..a0ddbba --- /dev/null +++ b/users/natalie/vim/coq.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + + vim = { + # extraPackages = with pkgs; [ + # coq_8_20 + # coqPackages_8_20.stdlib + # ]; + extraPlugins.Coqtail = { + # enabled = true; + package = pkgs.vimPlugins.Coqtail; + # lazy = true; + # ft = "coq"; + }; + }; +} diff --git a/users/natalie/vim/default.nix b/users/natalie/vim/default.nix index a4f01cf..8c7f50b 100644 --- a/users/natalie/vim/default.nix +++ b/users/natalie/vim/default.nix @@ -1,8 +1,12 @@ -{...}: { +{ ... }: +{ imports = [ ./keybinds.nix ./languages.nix ./latex.nix + ./lean.nix + ./coq.nix + ./visuals.nix + ./mini.nix ]; - } diff --git a/users/natalie/vim/keybinds.nix b/users/natalie/vim/keybinds.nix index 619dec4..7ea6545 100644 --- a/users/natalie/vim/keybinds.nix +++ b/users/natalie/vim/keybinds.nix @@ -19,7 +19,6 @@ in (mkKeymap "n" "ff" ":lua require('snacks').picker.files()" "Find File") (mkKeymap "n" "fg" ":lua require('snacks').picker.grep()" "Grep Files") # Lsp - (mkKeymap "n" "K" ":Lspsaga hover_doc" "Hover docs") (mkKeymap "n" "lr" ":lua vim.lsp.buf.rename()" "Rename") # (mkKeymap "n" "th" ":lua function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end" "Toggle Inlay Hints") ]; diff --git a/users/natalie/vim/languages.nix b/users/natalie/vim/languages.nix index b15b78d..630dacd 100644 --- a/users/natalie/vim/languages.nix +++ b/users/natalie/vim/languages.nix @@ -4,58 +4,59 @@ host, pkgs, ... -}: let - darwin = - if host.darwin - then "darwin" - else "nixos"; - flakePath = "/${ - if host.darwin - then "Users" - else "home" - }/${user.username}/.dotfiles"; - - # BIG HACK DO NOT DO PLS - - hostname = - if host.darwin - then "Natalies-MacBook-Air" - else "nixos"; -in { +}: +{ vim = { extraPackages = with pkgs; [ python312Packages.pylatexenc + nixd ]; lsp = { + formatOnSave = true; lightbulb.enable = false; - lspsaga = { - enable = true; - setupOpts = { - lightbulb = { - virtual_text = false; + # lspsaga = { + # enable = true; + # setupOpts = { + # lightbulb = { + # virtual_text = false; + # }; + # }; + # }; + inlayHints.enable = true; + servers = { + nil = { + settings.nil.nix.flake = { + + autoArchive = true; + autoEvalInputs = true; + }; }; - }; - nvim-docs-view.enable = true; - inlayHints.enable = true; - servers.nixd.settings.nixd = { - nixpkgs.expr = ''import "" { }''; - options = - { - home-manager = { - expr = ''(builtins.getFlake "${flakePath}").${darwin}Configurations.${hostname}.options.home-manager.users.type.getSubOptions [ ]''; - }; - } - // pkgs.lib.optionalAttrs host.darwin { - nix-darwin = { - expr = ''(builtins.getFlake "${flakePath}").darwinConfigurations.${hostname}.options''; - }; - } - // pkgs.lib.optionalAttrs host.linux { - nixos = { - expr = ''(builtins.getFlake "${flakePath}").nixosConfigurations.${hostname}.options''; - }; + nixd = { + settings.nixd = { + nixpkgs.expr = ''import "${flake.inputs.nixpkgs}" { }''; + + options = + { + home-manager = { + expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; lib = import "${flake.inputs.home-manager}/modules/lib/stdlib-extended.nix" pkgs.lib; in (lib.evalModules { modules = (import "${flake.inputs.home-manager}/modules/modules.nix") { inherit lib pkgs;check = false;}; })).options''; + # (builtins.getFlake "${flakePath}").${darwin}Configurations.${hostname}.options.home-manager.users.type.getSubOptions [ ]''; + }; + } + // pkgs.lib.optionalAttrs host.darwin { + nix-darwin = { + expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; in (pkgs.lib.evalModules { modules = (import "${flake.inputs.darwin}/modules/module-list.nix"); check = false;})).options''; + # (builtins.getFlake "${flakePath}").darwinConfigurations.${hostname}.options''; + }; + } + // pkgs.lib.optionalAttrs host.linux { + nixos = { + expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; in (pkgs.lib.evalModules { modules = (import "${flake.inputs.nixpkgs}/nixos/modules/module-list.nix"); check = false;})).options''; + # (builtins.getFlake "${flakePath}").nixosConfigurations.${hostname}.options''; + }; + }; }; + }; }; mappings = { codeAction = "ca"; @@ -63,7 +64,7 @@ in { goToDefinition = "gd"; listReferences = "gr"; goToType = "gy"; - hover = null; + hover = "K"; nextDiagnostic = "d"; openDiagnosticFloat = "df"; renameSymbol = "rn"; @@ -88,24 +89,42 @@ in { enable = true; }; }; + nix.format.enable = true; }; formatter.conform-nvim = { enable = true; setupOpts = { formatters_by_ft = { - fish = ["fish_indent"]; - tex = ["latexindent"]; + fish = [ "fish_indent" ]; + tex = [ "latexindent" ]; }; }; }; - - diagnostics.nvim-lint = { + diagnostics = { enable = true; - linters_by_ft = { - nix = ["statix"]; - tex = ["chktex"]; - haskell = ["hlint"]; + config = { + virtual_text = { + format = pkgs.lib.generators.mkLuaInline '' + function(diagnostic) + return string.format("%s (%s)", diagnostic.message, diagnostic.source) + end + ''; + }; + }; + nvim-lint = { + enable = true; + linters_by_ft = { + nix = [ "statix" ]; + tex = [ "chktex" ]; + haskell = [ "hlint" ]; + }; + + linters = { + chktex = { + ignore_exitcode = true; + }; + }; }; }; treesitter = { @@ -167,5 +186,32 @@ in { }; }; }; + + lazy.plugins."blink.pairs" = { + enabled = true; + package = pkgs.vimPlugins.blink-pairs; + setupModule = "blink.pairs"; + setupOpts = { + mappings = { + # -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime + enabled = true; + # -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10 + pairs = [ ]; + }; + highlights = { + enabled = true; + groups = [ + "BlinkPairsOrange" + "BlinkPairsPurple" + "BlinkPairsBlue" + ]; + matchparen = { + enabled = true; + group = "MatchParen"; + }; + }; + debug = false; + }; + }; }; } diff --git a/users/natalie/vim/latex.nix b/users/natalie/vim/latex.nix index b38cace..b58c340 100644 --- a/users/natalie/vim/latex.nix +++ b/users/natalie/vim/latex.nix @@ -1,22 +1,29 @@ -{pkgs, ...}: { +{ pkgs, host, ... }: +{ vim = { + lazy.plugins.cmp-vimtex = { + enabled = true; + package = pkgs.vimPlugins.cmp-vimtex; + lazy = false; + + }; lazy.plugins.vimtex = { enabled = true; package = pkgs.vimPlugins.vimtex; - lazy = true; - ft = "tex"; + lazy = false; }; globals = { tex_flavor = "latex"; maplocalleader = "\\"; vimtex_compiler_method = "latexmk"; - vimtex_view_method = "zathura"; + vimtex_view_method = if host.darwin then "skim" else "zathura"; + vimtex_view_automatic = 1; vimtex_compiler_latexmk = { callback = 1; continuous = 1; executable = "latexmk"; - hooks = []; + hooks = [ ]; options = [ "-verbose" "-file-line-error" @@ -37,12 +44,65 @@ ]; }; + autocomplete.blink-cmp = { + sourcePlugins = { + "blink.compat" = { + enable = true; + package = "blink-compat"; + module = "blink.compat.source"; + }; + }; + setupOpts = { + sources = { + default = [ "vimtex" ]; + providers = { + vimtex = { + name = "vimtex"; + module = "blink.compat.source"; + score_offset = 100; + }; + }; + }; + }; + }; + + augroups = [ + { + name = "VimTeX Events"; + } + ]; + autocmds = [ + { + pattern = [ "VimtexEventViewReverse" ]; + event = [ "User" ]; + desc = "Return to nvim after reverse search"; + command = "call b:vimtex.viewer.xdo_focus_vim()"; + group = "VimTeX Events"; + } + { + pattern = [ "VimtexEventQuit" ]; + event = [ "User" ]; + desc = "Close pdf after exiting nvim"; + command = "VimtexClean"; + group = "VimTeX Events"; + } + + { + pattern = [ "VimtexEventInitPost" ]; + event = [ "User" ]; + desc = "Start compiling when opening nvim to a tex file"; + command = "VimtexCompile"; + group = "VimTeX Events"; + } + + ]; + lsp = { servers = { texlab = { enable = true; - cmd = ["${pkgs.texlab}/bin/texlab"]; - filetypes = ["tex"]; + cmd = [ "${pkgs.texlab}/bin/texlab" ]; + filetypes = [ "tex" ]; }; }; }; diff --git a/users/natalie/vim/lean.nix b/users/natalie/vim/lean.nix new file mode 100644 index 0000000..45fb293 --- /dev/null +++ b/users/natalie/vim/lean.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: +{ + vim = { + lazy.plugins."lean.nvim" = { + enabled = true; + package = pkgs.vimPlugins.lean-nvim; + lazy = true; + ft = "lean"; + }; + }; +} diff --git a/users/natalie/vim/mini.nix b/users/natalie/vim/mini.nix new file mode 100644 index 0000000..269036b --- /dev/null +++ b/users/natalie/vim/mini.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + vim = { + mini = { + icons.enable = true; + ai.enable = true; + }; + }; +} diff --git a/users/natalie/vim/visuals.nix b/users/natalie/vim/visuals.nix new file mode 100644 index 0000000..357fb36 --- /dev/null +++ b/users/natalie/vim/visuals.nix @@ -0,0 +1,38 @@ +{ pkgs, ... }: +{ + vim = { + visuals = { + indent-blankline = { + enable = true; + }; + }; + ui = { + noice = { + enable = true; + setupOpts = { + lsp = { + progress.enabled = false; + signature.enabled = true; + }; + presets = { + lsp_doc_border = true; + long_message_to_split = true; + inc_rename = false; + command_palette = false; + bottom_search = true; + }; + }; + }; + borders = { + enable = true; + }; + }; + + # Better help docs + lazy.plugins."helpview.nvim" = { + enabled = true; + package = pkgs.vimPlugins.helpview-nvim; + lazy = false; + }; + }; +}