diff --git a/flake.lock b/flake.lock index 6f7948c..e699ef7 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "actions-preview-nvim": { "flake": false, "locked": { - "lastModified": 1704627848, - "narHash": "sha256-iXqs1+3z6ujm/6thDpbgoyWmUJ5Nd+D0zxAW4jc+T2c=", + "lastModified": 1707037812, + "narHash": "sha256-KUkWhXSSEXWi7NZ92F1nk/mhAgSNLrmdwAow9Odwe7k=", "owner": "aznhe21", "repo": "actions-preview.nvim", - "rev": "dd63df1a4ed0ffe1458945ee50ecb1dd02b605ab", + "rev": "9e86d014a72a4121ee27f3d8952e1ea868c3c8c4", "type": "github" }, "original": { @@ -26,11 +26,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1703433843, - "narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=", + "lastModified": 1707830867, + "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", "owner": "ryantm", "repo": "agenix", - "rev": "417caa847f9383e111d1397039c9d4337d024bf0", + "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", "type": "github" }, "original": { @@ -42,11 +42,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1700833105, - "narHash": "sha256-8mxKaA0yGx29X+E0ahCjsGXSc29I1+5timNP6cJHGM0=", + "lastModified": 1707077370, + "narHash": "sha256-624Giuo1TfeXQGzcGK9ETW86esNFhFZ5a46DCjT6K5I=", "owner": "arkenfox", "repo": "user.js", - "rev": "4a510a4b4ceda8a177831a77309f2faccf7e18d5", + "rev": "33a84b608c8a1f871c6ce9c4d2b932dc57078fae", "type": "github" }, "original": { @@ -118,11 +118,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1706261939, - "narHash": "sha256-KQ3Hb3XVSrxOLfiY2D63QD5+LsLwFeY81ZScD4GRp0o=", + "lastModified": 1708029101, + "narHash": "sha256-FPlAle/nl4sJRfd8eILe5M20aRJh/z2KY8ji2yBBwaI=", "owner": "nix-community", "repo": "disko", - "rev": "c12719812dde4dcbc4119a2b09766a51c9c498d5", + "rev": "810eccbad22cc50323b27161033399eb87658932", "type": "github" }, "original": { @@ -184,11 +184,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", "type": "github" }, "original": { @@ -205,11 +205,11 @@ ] }, "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", "type": "github" }, "original": { @@ -314,11 +314,11 @@ "gen-nvim": { "flake": false, "locked": { - "lastModified": 1703233104, - "narHash": "sha256-cNz/yPTTgt1ng4C2BqN4P62FBV7lmDIEmEsdDhfyKHk=", + "lastModified": 1707889639, + "narHash": "sha256-pM+7hkLHBapdj6yOx2FKG5jYNfcf29rorDacLJu0hFw=", "owner": "David-Kunz", "repo": "gen.nvim", - "rev": "41ad952c8269fa7aa3a4b8a5abb44541cb628313", + "rev": "98043162168dcc0eb5c3c31b97439ff686dc8559", "type": "github" }, "original": { @@ -455,11 +455,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1706271892, - "narHash": "sha256-ln+6hdNB1gW7+pz9d24zdCGpVKW0M1c/Xea/w+ZKqGk=", + "lastModified": 1708018354, + "narHash": "sha256-MlbqBzAjiz4Va2M/AvLN96Wq+jsCbEedhfMs5wW1yFM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "5cd7e4587e0ae642ce60415f8e271df2095a3ff2", + "rev": "fbf5ba87ce57752653f3bebf6e2be090c702836e", "type": "github" }, "original": { @@ -517,11 +517,11 @@ }, "impermanence": { "locked": { - "lastModified": 1703656108, - "narHash": "sha256-hCSUqdFJKHHbER8Cenf5JRzjMlBjIdwdftGQsO0xoJs=", + "lastModified": 1706639736, + "narHash": "sha256-CaG4j9+UwBDfinxxvJMo6yOonSmSo0ZgnbD7aj2Put0=", "owner": "nix-community", "repo": "impermanence", - "rev": "033643a45a4a920660ef91caa391fbffb14da466", + "rev": "cd13c2917eaa68e4c49fea0ff9cada45440d7045", "type": "github" }, "original": { @@ -564,11 +564,11 @@ }, "master": { "locked": { - "lastModified": 1706273017, - "narHash": "sha256-Jt5JdzUq8NysMrQL/OCXD7g+bJQbbZ9nK5hw0GZXQic=", + "lastModified": 1708077385, + "narHash": "sha256-AaltTBb76jj0jQNsoItBf4scf1oVPREZ8KwGUeDDUkI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e78f177a8a7a79d6c7e1fcfe509901e87658ec63", + "rev": "4bd735b4dcfd26665dfb77ecfd52789603f03737", "type": "github" }, "original": { @@ -626,11 +626,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1706140641, - "narHash": "sha256-H1qHhkf7sF7yrG2rb9Ks1Y4EtLY3cXGp16KCGveJWY4=", + "lastModified": 1708040042, + "narHash": "sha256-8iloeE/jALIKcOcYKgTlI9i7iDW7n52Epqps27jGklU=", "owner": "neovim", "repo": "neovim", - "rev": "4e59422e1d4950a3042bad41a7b81c8db4f8b648", + "rev": "04dfa2eea914086a9f42a5a00a33e9524f9fded4", "type": "github" }, "original": { @@ -649,11 +649,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1706141075, - "narHash": "sha256-o66/XFTXmcJSpEcO508V5r765HtgT8qtr+H4LRIB9BY=", + "lastModified": 1708041826, + "narHash": "sha256-zW7F31gW4HCBYcImcXxold4ntZdlEr/NTlMVhEMA5dw=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "1da2e054a16309d7d7f7669438c8b9a5ef1b4642", + "rev": "1afaeebc41dab1029b855b17d78f2348e8dd49e3", "type": "github" }, "original": { @@ -662,6 +662,21 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1687178632, + "narHash": "sha256-HS7YR5erss0JCaUijPeyg2XrisEb959FIct3n2TMGbE=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "d90c75e8319d0dd9be67d933d8eb9d0894ec9174", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -669,11 +684,11 @@ ] }, "locked": { - "lastModified": 1705806513, - "narHash": "sha256-FcOmNjhHFfPz2udZbRpZ1sfyhVMr+C2O8kOxPj+HDDk=", + "lastModified": 1707620986, + "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f8e04fbcebcc24cebc91989981bd45f69b963ed7", + "rev": "0cb4345704123492e6d1f1068629069413c80de0", "type": "github" }, "original": { @@ -697,6 +712,27 @@ "url": "https://git.moritzboeh.me/moritz/NixLazy.nvim" } }, + "nix-monitored": { + "inputs": { + "nix-filter": "nix-filter", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692605628, + "narHash": "sha256-jBasvDCk9V32JuwtPy1G4KyVAc2eaBSf2X5eRNQgIkY=", + "owner": "ners", + "repo": "nix-monitored", + "rev": "6be92b0c1eca7ef501b4f92735885e7cb4db414b", + "type": "github" + }, + "original": { + "owner": "ners", + "repo": "nix-monitored", + "type": "github" + } + }, "nix-super": { "inputs": { "flake-compat": "flake-compat_2", @@ -706,11 +742,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1701958654, - "narHash": "sha256-ZhXujNwvwTDLmCpYb7h2bTDdZG4h97hEYjzBmKP8p2U=", + "lastModified": 1708070219, + "narHash": "sha256-/2fidzoXrrNwr8te2cU3JdtrpockWIjU4DpLgNr4FTo=", "owner": "privatevoid-net", "repo": "nix-super", - "rev": "661b025c79eac08beda593ede47b41b2052e8ebf", + "rev": "924eb1127a21ebf4bd7f438d7c6aca133ce1de84", "type": "github" }, "original": { @@ -738,11 +774,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", "type": "github" }, "original": { @@ -787,11 +823,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1706173671, - "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=", + "lastModified": 1707268954, + "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4fddc9be4eaf195d631333908f2a454b03628ee5", + "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", "type": "github" }, "original": { @@ -819,11 +855,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1705133751, - "narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=", + "lastModified": 1707546158, + "narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d", + "rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0", "type": "github" }, "original": { @@ -835,11 +871,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1706006310, - "narHash": "sha256-nDPz0fj0IFcDhSTlXBU2aixcnGs2Jm4Zcuoj0QtmiXQ=", + "lastModified": 1707939175, + "narHash": "sha256-D1xan0lgxbmXDyzVqXTiSYHLmAMrMRdD+alKzEO/p3w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b43bb235efeab5324c5e486882ef46749188eee2", + "rev": "f7e8132daca31b1e3859ac0fb49741754375ac3d", "type": "github" }, "original": { @@ -867,11 +903,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1706173671, - "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=", + "lastModified": 1708001613, + "narHash": "sha256-woOmAXW05XnqlLn7dKzCkRAEOSOdA/Z2ndVvKcjid94=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4fddc9be4eaf195d631333908f2a454b03628ee5", + "rev": "085589047343aad800c4d305cf7b98e8a3d51ae2", "type": "github" }, "original": { @@ -916,11 +952,11 @@ "none-ls-nvim": { "flake": false, "locked": { - "lastModified": 1706069423, - "narHash": "sha256-s+Hp0Yzge7FKKDez4DO8uytsNORIqeNWYOLSO7kSZbo=", + "lastModified": 1707832208, + "narHash": "sha256-nQCxzlQZgso2rjHLVaASkStQhrC4XUpg3d8/yfrZfR0=", "owner": "nvimtools", "repo": "none-ls.nvim", - "rev": "a311c7cc8f17543143a7482cdbe3a384c371d56a", + "rev": "34b1311bd07bd3741e60e06b34d0709d6e5a9f0f", "type": "github" }, "original": { @@ -931,11 +967,11 @@ }, "nur": { "locked": { - "lastModified": 1706270864, - "narHash": "sha256-+OtaanZN6C4rS6bNujBban8fT4HsnozFZtXfPTLuaTI=", + "lastModified": 1708076655, + "narHash": "sha256-KNRfg2szpJ19/NgXXB4s9r2+CCM90nq0MVUuvdQI+Ws=", "owner": "nix-community", "repo": "NUR", - "rev": "0293fc1d7aefc2204a922ad41bb5141f085a13ec", + "rev": "1155ba6a69b8a69d7edda02321a21ff993d9300e", "type": "github" }, "original": { @@ -947,11 +983,11 @@ "nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1705757419, - "narHash": "sha256-StYsN9C2rV471JkncUR1PFeXs0S15ZGTF1DigSbwOHI=", + "lastModified": 1708063340, + "narHash": "sha256-1k3BRjNy853WjuTMUT8EjGZd9v4phuUMTZmJfZLDToM=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "8917d2c830e04bf944a699b8c41f097621283828", + "rev": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680", "type": "github" }, "original": { @@ -960,38 +996,6 @@ "type": "github" } }, - "nvim-puppeteer": { - "flake": false, - "locked": { - "lastModified": 1706210708, - "narHash": "sha256-tjL4qC1VAad4NXaZFDhTcmbrbdqNpVm7/MnyR/CE3rw=", - "owner": "chrisgrieser", - "repo": "nvim-puppeteer", - "rev": "048c819c8033e5febe0a04e63b98e74a5d0f8de6", - "type": "github" - }, - "original": { - "owner": "chrisgrieser", - "repo": "nvim-puppeteer", - "type": "github" - } - }, - "nvim-treesitter": { - "flake": false, - "locked": { - "lastModified": 1706272330, - "narHash": "sha256-R+oQGVcmncAd39D5AkGV1HAPgGDPMiucrC1GHMLh/Xk=", - "owner": "nvim-treesitter", - "repo": "nvim-treesitter", - "rev": "efda19a54a157da8635aa6cb84f56a10593b1a23", - "type": "github" - }, - "original": { - "owner": "nvim-treesitter", - "repo": "nvim-treesitter", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_3", @@ -1001,11 +1005,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1705757126, - "narHash": "sha256-Eksr+n4Q8EYZKAN0Scef5JK4H6FcHc+TKNHb95CWm+c=", + "lastModified": 1708018599, + "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "f56597d53fd174f796b5a7d3ee0b494f9e2285cc", + "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", "type": "github" }, "original": { @@ -1035,13 +1039,12 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", "nix-lazy-nvim": "nix-lazy-nvim", + "nix-monitored": "nix-monitored", "nix-super": "nix-super", "nixpkgs": "nixpkgs_7", "none-ls-nvim": "none-ls-nvim", "nur": "nur", "nvim-lspconfig": "nvim-lspconfig", - "nvim-puppeteer": "nvim-puppeteer", - "nvim-treesitter": "nvim-treesitter", "pre-commit-hooks": "pre-commit-hooks", "smartcolumn-nvim": "smartcolumn-nvim", "stable": "stable", @@ -1085,11 +1088,11 @@ "statuscol-nvim": { "flake": false, "locked": { - "lastModified": 1703372986, - "narHash": "sha256-uEKdzttNTQqwZb2oPgzTDuvJRkoTCmGg3piFzwKBITc=", + "lastModified": 1708023805, + "narHash": "sha256-I6Wefl83mcMURtJEq1yaR2thxVMfpJmjSplapeVyKYE=", "owner": "luukvbaal", "repo": "statuscol.nvim", - "rev": "0a782cc73f935e9f790ed029dc316b297545d845", + "rev": "e9e4c30b68abe456d80a0b144149ebf3f4527ed8", "type": "github" }, "original": { @@ -1262,18 +1265,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1703963193, - "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", + "lastModified": 1706359063, + "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" } }, @@ -1294,11 +1297,11 @@ ] }, "locked": { - "lastModified": 1704659450, - "narHash": "sha256-3lyoUVtUWz1LuxbltAtkJSK2IlVXmKhxCRU2/0PYCms=", + "lastModified": 1706521509, + "narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "6a5de92769d5b7038134044053f90e7458f6a197", + "rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0933a50..cd06bd0 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,8 @@ # Programs nix-super.url = "github:privatevoid-net/nix-super"; + nix-monitored.url = "github:ners/nix-monitored"; + nix-monitored.inputs.nixpkgs.follows = "nixpkgs"; timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git"; # Neovim @@ -31,10 +33,6 @@ nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim"; nvim-lspconfig.flake = false; nvim-lspconfig.url = "github:neovim/nvim-lspconfig"; - nvim-puppeteer.flake = false; - nvim-puppeteer.url = "github:chrisgrieser/nvim-puppeteer"; - nvim-treesitter.flake = false; - nvim-treesitter.url = "github:nvim-treesitter/nvim-treesitter"; smartcolumn-nvim.flake = false; smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; telekasten-nvim.flake = false; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index cce9eae..5d63b9b 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -90,6 +90,19 @@ in stable.texlive.combined.scheme-full # NOTE breaks often thunderbird vlc + (symlinkJoin { + name = "obsidian-wayland"; + paths = [ obsidian ]; + nativeBuildInputs = [ makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/obsidian \ + --add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland" + ''; + }) + ]; + + nixpkgs.config.permittedInsecurePackages = [ + "electron-25.9.0" # obsidian ]; programs.nix-ld.enable = true; diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 6216899..0dbd586 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: @@ -50,21 +49,23 @@ in userName = cfg.identity.name; userEmail = cfg.identity.email; extraConfig = { + commit.verbose = true; + diff.algorithm = "histogram"; + fetch.fsckobjects = true; init.defaultBranch = "main"; merge.conflictstyle = "zdiff3"; - diff.external = getExe pkgs.difftastic; push.autoSetupRemote = true; + receive.fsckObjects = true; + transfer.fsckobjects = true; }; signing = mkIf cfg.signing { key = "0x970C6E89EB0547A9"; signByDefault = true; }; lfs.enable = true; + delta.enable = true; }; }; - programs.git = { - enable = true; - config.safe.directory = "/home/moritz/.dotfiles"; - }; + programs.git.enable = true; }; } diff --git a/modules/programs/nix.nix b/modules/programs/nix.nix index 2ee8475..0e6fde9 100644 --- a/modules/programs/nix.nix +++ b/modules/programs/nix.nix @@ -9,6 +9,23 @@ with lib; let cfg = config.my.programs.nix; + + mkSuper = system: nix: + if cfg.useSuper + then inputs.nix-super.packages.${system}.default + else nix; + + mkNom = system: nix: + if cfg.useNom + then + inputs.nix-monitored.packages.${system}.default.override + { + withNotify = false; + nix = nix; + } + else nix; + + mkNix = system: nix: mkNom system (mkSuper system nix); in { options.my.programs.nix = { @@ -21,48 +38,65 @@ in }; }; optimise.enable = mkEnableOption "nix-optimise"; + useSuper = mkEnableOption "use nix super" // { default = true; }; + useNom = mkEnableOption "use nix output monitor by default" // { default = true; }; }; - config.nix = { - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + config = { + my.nixpkgs.overlays = [ + (final: prev: + { + nixos-rebuild = prev.nixos-rebuild.override { + nix = mkNom final.system final.nix; + }; + }) + ]; - package = inputs.nix-super.packages.${pkgs.system}.default; - - extraOptions = "experimental-features = nix-command flakes"; - - gc = { - automatic = cfg.gc.enable; - options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d"; - dates = "weekly"; + home-manager.users.moritz.programs.direnv.nix-direnv.package = pkgs.nix-direnv.override { + nix = config.nix.package; }; - optimise = { - automatic = cfg.optimise.enable; - dates = [ "weekly" ]; - }; + nix = { + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; - registry = { - master-upstream.to = { - type = "github"; - owner = "nixos"; - repo = "nixpkgs"; + package = mkNix pkgs.system pkgs.nix; + + extraOptions = "experimental-features = nix-command flakes"; + + gc = { + automatic = cfg.gc.enable; + options = "--max-freed ${cfg.gc.minimumFreedGB} --delete-older-than 14d"; + dates = "weekly"; }; - master.flake = inputs.master; - nixpkgs.flake = inputs.nixpkgs; - stable.flake = inputs.stable; - dotfiles.flake = self; - default.flake = self; - }; - settings = { - substituters = [ - "https://cache.nixos.org/" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - ]; + optimise = { + automatic = cfg.optimise.enable; + dates = [ "weekly" ]; + }; - trusted-users = [ "root" "@wheel" ]; + registry = { + master-upstream.to = { + type = "github"; + owner = "nixos"; + repo = "nixpkgs"; + }; + master.flake = inputs.master; + nixpkgs.flake = inputs.nixpkgs; + stable.flake = inputs.stable; + dotfiles.flake = self; + default.flake = self; + }; + + settings = { + substituters = [ + "https://cache.nixos.org/" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + + trusted-users = [ "root" "@wheel" ]; + }; }; }; } diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 3818afd..2879ae5 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -10,26 +10,6 @@ in options.my.programs.nvim.enable = mkEnableOption "nvim"; config = mkIf cfg.enable { - my.nixpkgs.overlays = [ - ( - _: prev: - with lib.my; - { - vimPlugins = prev.vimPlugins // { - nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (_: { - version = mkVersionInput inputs.nvim-treesitter; - src = inputs.nvim-treesitter; - }); - - # HACK: to fix error in nixpkgs version of nvim-lspconfig - nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: { - version = mkVersionInput inputs.nvim-lspconfig; - src = inputs.nvim-lspconfig; - }); - }; - } - ) - ]; home-manager.users.moritz = { xdg.configFile."nvim/snippets" = { recursive = true; diff --git a/modules/programs/nvim/plugins/coding.nix b/modules/programs/nvim/plugins/coding.nix index b267434..8f43ca2 100644 --- a/modules/programs/nvim/plugins/coding.nix +++ b/modules/programs/nvim/plugins/coding.nix @@ -98,7 +98,10 @@ with builtins; lazy = false; } { - plugin = nvim-lspconfig; + plugin = pkgs.vimPlugins.nvim-lspconfig.overrideAttrs (_: { + version = lib.my.mkVersionInput inputs.nvim-lspconfig; + src = inputs.nvim-lspconfig; + }); event = [ "BufRead" "BufNewFile" ]; conf = readFile ./lua/nvim-lspconfig.lua; dependencies = [ @@ -266,14 +269,6 @@ with builtins; } ]; } - { - plugin = pkgs.vimUtils.buildVimPlugin { - pname = "nvim-puppeteer"; - version = lib.my.mkVersionInput inputs.nvim-puppeteer; - src = inputs.nvim-puppeteer; - }; - lazy = false; # NOTE: plugin lazy-loads itself. - } { plugin = conform-nvim; keys = [ diff --git a/modules/programs/nvim/plugins/treesitter.nix b/modules/programs/nvim/plugins/treesitter.nix index 31196bd..8401f9f 100644 --- a/modules/programs/nvim/plugins/treesitter.nix +++ b/modules/programs/nvim/plugins/treesitter.nix @@ -56,9 +56,7 @@ with builtins; require('nvim-treesitter.configs').setup(final_opts) ''; init = '' - local runtimepath = vim.opt.runtimepath:get() - table.insert(runtimepath, 4, "${parserDir}") - vim.opt.runtimepath = runtimepath + vim.opt.runtimepath:prepend("${parserDir}") ''; priority = 100; dependencies = [