From 6c42a9a3c6ad34d05312f357a2e59dbc4fe3e5a4 Mon Sep 17 00:00:00 2001 From: richban Date: Fri, 8 Sep 2023 22:43:47 +0100 Subject: [PATCH 01/15] Update system --- dotfiles/config/nvim/lua/rb/projections.lua | 2 +- flake.lock | 8 +++---- flake.nix | 24 ++++++++++----------- system/home-manager/git.nix | 1 + system/hosts/modules/work_planetrics.nix | 3 --- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dotfiles/config/nvim/lua/rb/projections.lua b/dotfiles/config/nvim/lua/rb/projections.lua index 9b719a2..2357bba 100644 --- a/dotfiles/config/nvim/lua/rb/projections.lua +++ b/dotfiles/config/nvim/lua/rb/projections.lua @@ -1,6 +1,6 @@ require("projections").setup({ workspaces = { - { "~/Developer/mckinsey/planetrics", { ".git" } }, + { "~/Developer/mckinsey", { ".git" } }, { "~/Developer", { ".git" } }, }, patterns = { ".git", ".svn", ".hg" }, diff --git a/flake.lock b/flake.lock index 92a33d0..e8d122f 100644 --- a/flake.lock +++ b/flake.lock @@ -475,16 +475,16 @@ }, "nixos-stable": { "locked": { - "lastModified": 1659446231, - "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "lastModified": 1693953029, + "narHash": "sha256-1+28KQl4YC4IBzKo/epvEyK5KH4MlgoYueJ8YwLGbOc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", + "rev": "4077a0e4ac3356222bc1f0a070af7939c3098535", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-21.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 38c44a4..e99d703 100644 --- a/flake.nix +++ b/flake.nix @@ -2,17 +2,17 @@ description = "NixOS systems and tools by richban"; nixConfig = { - substituters = [ - "https://cache.nixos.org" - "https://nix-community.cachix.org" - "https://richban.cachix.org" - ]; - - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "richban.cachix.org-1:b22iBPRwWfvVe1ldyn3ca1JRw0OEzzf3jrurGJQN3LA=" - ]; + # substituters = [ + # "https://cache.nixos.org" + # "https://nix-community.cachix.org" + # "https://richban.cachix.org" + # ]; + # + # trusted-public-keys = [ + # "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + # "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + # "richban.cachix.org-1:b22iBPRwWfvVe1ldyn3ca1JRw0OEzzf3jrurGJQN3LA=" + # ]; }; inputs = { @@ -20,7 +20,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # TODO: configure NixOS - nixos-stable.url = "github:nixos/nixpkgs/nixos-21.11"; + nixos-stable.url = "github:nixos/nixpkgs/nixos-23.05"; nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Darwin system management diff --git a/system/home-manager/git.nix b/system/home-manager/git.nix index 08f1466..80f2f16 100644 --- a/system/home-manager/git.nix +++ b/system/home-manager/git.nix @@ -3,6 +3,7 @@ git git-crypt gitAndTools.delta + act ]; home.file.gitignore = { diff --git a/system/hosts/modules/work_planetrics.nix b/system/hosts/modules/work_planetrics.nix index 33308ed..99c943c 100644 --- a/system/hosts/modules/work_planetrics.nix +++ b/system/hosts/modules/work_planetrics.nix @@ -5,9 +5,6 @@ postgresql # kubernetes-helm ]; - home.sessionVariables = { - AWS_PROFILE = "analytics"; - }; programs.git = { signing = { key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH6/erFt5q36JNuiFG4FqiYE3flwgqyVL0FawLSSuPW8"; From 7effb34f99e55f9632a6f9be6d6e8ef30f8ce58f Mon Sep 17 00:00:00 2001 From: richban Date: Mon, 11 Sep 2023 10:13:54 +0100 Subject: [PATCH 02/15] Update flake.lock --- flake.lock | 316 +++++++++++++++++++---------------------------------- 1 file changed, 112 insertions(+), 204 deletions(-) diff --git a/flake.lock b/flake.lock index e8d122f..890d681 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1682773107, - "narHash": "sha256-+h94XeJnG3uk5imJlBi/1lVmcfCbxHpwZp5u7n3Krwg=", + "lastModified": 1692248770, + "narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8", + "rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b", "type": "github" }, "original": { @@ -29,11 +29,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1678113758, - "narHash": "sha256-mD3SkN43b1s5CJ8Rx3l2oK3Dqgs+6Ze0FfWrdMcrrYk=", + "lastModified": 1688058187, + "narHash": "sha256-ipDcc7qrucpJ0+0eYNlwnE+ISTcq4m03qW+CWUshRXI=", "owner": "cachix", "repo": "devenv", - "rev": "6455f319fc90e0be2071327093c5458f9afc61bf", + "rev": "c8778e3dc30eb9043e218aaa3861d42d4992de77", "type": "github" }, "original": { @@ -45,19 +45,17 @@ }, "devshell": { "inputs": { - "flake-utils": [ - "flake-utils" - ], "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1682700442, - "narHash": "sha256-qjaAAcCYgp1pBBG7mY9z95ODUBZMtUpf0Qp3Gt/Wha0=", + "lastModified": 1693833206, + "narHash": "sha256-wHOY0nnD6gWj8u9uI85/YlsganYyWRK1hLFZulZwfmY=", "owner": "numtide", "repo": "devshell", - "rev": "fb6673fe9fe4409e3f43ca86968261e970918a83", + "rev": "65114ea495a8d3cc1352368bf170d67ef005aa5a", "type": "github" }, "original": { @@ -98,22 +96,6 @@ "type": "github" } }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -122,11 +104,11 @@ ] }, "locked": { - "lastModified": 1680392223, - "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "lastModified": 1693611461, + "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", "type": "github" }, "original": { @@ -140,11 +122,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1678379998, - "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "type": "github" }, "original": { @@ -162,11 +144,11 @@ ] }, "locked": { - "lastModified": 1678379998, - "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "type": "github" }, "original": { @@ -192,14 +174,14 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { @@ -209,27 +191,15 @@ } }, "flake-utils_3": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" + "inputs": { + "systems": "systems_3" }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -260,42 +230,18 @@ "type": "github" } }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "neovim-nightly-overlay", - "hercules-ci-effects", - "hercules-ci-agent", - "pre-commit-hooks-nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "haskell-flake": { "locked": { - "lastModified": 1678138103, - "narHash": "sha256-D0lao82bV3t2gEFjHiU6RN233t+1MnkQV+bq8MEu2ic=", - "owner": "hercules-ci", + "lastModified": 1684780604, + "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", + "owner": "srid", "repo": "haskell-flake", - "rev": "1e1660e6dd00838ba73bc7952e6e73be67da18d1", + "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", "type": "github" }, "original": { - "owner": "hercules-ci", - "ref": "0.1-extraLibraries", + "owner": "srid", + "ref": "0.3.0", "repo": "haskell-flake", "type": "github" } @@ -304,16 +250,14 @@ "inputs": { "flake-parts": "flake-parts_3", "haskell-flake": "haskell-flake", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs_2", - "pre-commit-hooks-nix": "pre-commit-hooks-nix" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1678446614, - "narHash": "sha256-Z6Gsba5ahn/N0QlF0vJfIEfnZgCs4qr1IZtXAqjbE7s=", + "lastModified": 1688568579, + "narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=", "owner": "hercules-ci", "repo": "hercules-ci-agent", - "rev": "0b90d1a87c117a5861785cb85833dd1c9df0b6ef", + "rev": "367dd8cd649b57009a6502e878005a1e54ad78c5", "type": "github" }, "original": { @@ -331,11 +275,11 @@ ] }, "locked": { - "lastModified": 1681898675, - "narHash": "sha256-nIJ7CAdiHv4i1no/VgDoeTJLzbLYwu5+/Ycoyzn0S78=", + "lastModified": 1689397210, + "narHash": "sha256-fVxZnqxMbsDkB4GzGAs/B41K0wt/e+B/fLxmTFF/S20=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "15ff4f63e5f28070391a5b09a82f6d5c6cc5c9d0", + "rev": "0a63bfa3f00a3775ea3a6722b247880f1ffe91ce", "type": "github" }, "original": { @@ -351,11 +295,11 @@ ] }, "locked": { - "lastModified": 1682977601, - "narHash": "sha256-F1Va/Uiw2tVNn27FLqWyBkiqDyIm/eCamw9wA/GK8Fw=", + "lastModified": 1694375657, + "narHash": "sha256-32X8dcty4vPXx+D4yJPQZBo5hJ1NQikALhevGv6elO4=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e4c33d76006c9080d2f228ba1c2308e3e4d7be6", + "rev": "f7848d3e5f15ed02e3f286029697e41ee31662d7", "type": "github" }, "original": { @@ -382,7 +326,7 @@ }, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": [ "neovim-nightly-overlay", "nixpkgs" @@ -390,11 +334,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1682581904, - "narHash": "sha256-9P4T2erXXrPxXTTLgD29U/IdKCOYqP4xbwdYswtVBA8=", + "lastModified": 1694382785, + "narHash": "sha256-h1zjxMn9DdBybhLHjiqqsxqfiwkFJiu8mk9L2NUValY=", "owner": "neovim", "repo": "neovim", - "rev": "d321deb4a9b05e9d81b79ac166274f4a6e7981bf", + "rev": "af0684f0d578631dae7d857cd065d81288be3cf2", "type": "github" }, "original": { @@ -413,11 +357,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1682955971, - "narHash": "sha256-6Orm5CIh/Zz3X/RHbMbLnii5jSyEjLxV9KF7lrrI5pA=", + "lastModified": 1694390640, + "narHash": "sha256-CbAWf1H3Yc5TIJ5rqud2+cK9H5ATIZlXxe3aJelhNqI=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "a9719c5050b1abbb0adada7dd9f98e0cdbd3ed53", + "rev": "92b2c211731505d9d80b0d0419ad2abbe274103a", "type": "github" }, "original": { @@ -450,36 +394,13 @@ "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "neovim-nightly-overlay", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, "nixos-stable": { "locked": { - "lastModified": 1693953029, - "narHash": "sha256-1+28KQl4YC4IBzKo/epvEyK5KH4MlgoYueJ8YwLGbOc=", + "lastModified": 1694304580, + "narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4077a0e4ac3356222bc1f0a070af7939c3098535", + "rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760", "type": "github" }, "original": { @@ -491,11 +412,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1683014792, - "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=", + "lastModified": 1694183432, + "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42", + "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", "type": "github" }, "original": { @@ -524,11 +445,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1678375444, - "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "lastModified": 1688049487, + "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", + "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", "type": "github" }, "original": { @@ -557,27 +478,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", "type": "github" }, "original": { @@ -589,11 +494,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1678293141, - "narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=", + "lastModified": 1688322751, + "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d", + "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", "type": "github" }, "original": { @@ -605,11 +510,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1682929865, - "narHash": "sha256-jxVrgnf5QNjO+XoxDxUWtN2G5xyJSGZ5SWDQFxMuHxc=", + "lastModified": 1694343207, + "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f2e9a130461950270f87630b11132323706b4d91", + "rev": "78058d810644f5ed276804ce7ea9e82d92bee293", "type": "github" }, "original": { @@ -621,11 +526,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1683020768, - "narHash": "sha256-ZyZl6k9NWS5QPwD3NoAVz/eSgodQDvl+y+fu8MVbrHc=", + "lastModified": 1694343207, + "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "44f30edf5661d86fb3a95841c35127f3d0ea8b0f", + "rev": "78058d810644f5ed276804ce7ea9e82d92bee293", "type": "github" }, "original": { @@ -637,11 +542,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1680945546, - "narHash": "sha256-8FuaH5t/aVi/pR1XxnF0qi4WwMYC+YxlfdsA0V+TEuQ=", + "lastModified": 1691654369, + "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d9f759f2ea8d265d974a6e1259bd510ac5844c5d", + "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", "type": "github" }, "original": { @@ -666,38 +571,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", + "lastModified": 1686050334, + "narHash": "sha256-R0mczWjDzBpIvM3XXhO908X5e2CQqjyh/gFbwZk/7/Q=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks-nix": { - "inputs": { - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_3", - "gitignore": "gitignore_2", - "nixpkgs": [ - "neovim-nightly-overlay", - "hercules-ci-effects", - "hercules-ci-agent", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", + "rev": "6881eb2ae5d8a3516e34714e7a90d9d95914c4dc", "type": "github" }, "original": { @@ -735,16 +613,46 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1683035202, - "narHash": "sha256-WI2FYpeRcyqQZNqZ7Irlhk55YKlpRZGy63FEnkPjjO0=", + "lastModified": 1693817438, + "narHash": "sha256-fg3+n4Ky1gCzDtPm0MomMTFw0YkH05Y8ojy5t7bkfHg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "516e5cd8aef7070c905260978eb9bba71c3b0eb2", + "rev": "b8d3a059f5487d6767d07c3716386753e3132d9f", "type": "github" }, "original": { From f32d18aedb9017c424f39b192d96096c9f64e9b1 Mon Sep 17 00:00:00 2001 From: richban Date: Mon, 11 Sep 2023 10:15:27 +0100 Subject: [PATCH 03/15] Udpate files based on new lock --- flake.nix | 3 ++- system/home-manager/default.nix | 6 +++--- system/home-manager/nvim/default.nix | 18 +++++++++--------- system/home-manager/zsh.nix | 2 +- system/nixpkgs.nix | 1 - 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index e99d703..fd11224 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ # Overlays is the list of overlays we want to apply from flake inputs. overlays = [ - inputs.neovim-nightly-overlay.overlay + # inputs.neovim-nightly-overlay.overlay ]; # generate a darwin config @@ -259,6 +259,7 @@ inherit (self.packages.${prev.system}) pyEnv; inherit (self.packages.${prev.system}) gitmanager; inherit (self.packages.${prev.system}) obsidianbackup; + inherit (self.packages.${prev.system}) devenv; }; }; }; diff --git a/system/home-manager/default.nix b/system/home-manager/default.nix index 807ad96..690e828 100644 --- a/system/home-manager/default.nix +++ b/system/home-manager/default.nix @@ -37,7 +37,7 @@ in { changeDirWidgetOptions = [ # Preview the contents of the selected directory - ALT-C - "--preview 'exa -l --tree --level=2 --color=always {}'" + "--preview 'eza -l --tree --level=2 --color=always {}'" ]; historyWidgetOptions = [ @@ -175,7 +175,7 @@ in { unzip gnused starship - exa + eza (pkgs.ruby.withPackages (ps: with ps; [jekyll])) @@ -201,7 +201,7 @@ in { cookiecutter ruff - nodejs-slim-14_x + nodejs-slim nodePackages.npm yarn ]; diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index 4d22856..e66f6e6 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -8,8 +8,8 @@ src = pkgs.fetchFromGitHub { owner = "gnikdroy"; repo = "projections.nvim"; - rev = "008de87749e6baa402a2ce2f3ebc75e724b95da1"; - sha256 = "nJAZ0e9jWKErl1UASnPZltRdnaebt8E4hRvHI8xD48g="; + rev = "f18a8505f84f45a0fe024cafca5b969447f63cd5"; + sha256 = "vkxiM+65k4/iAV2Y+FkFJpnB8/hArGA061JPNENjkvo="; }; }; refactoring = pkgs.vimUtils.buildVimPlugin { @@ -351,7 +351,7 @@ in { # lsp nvim-lspconfig # lspsaga - lspsaga-nvim-original + lspsaga-nvim lsp-status-nvim lsp_signature-nvim { @@ -416,11 +416,11 @@ in { type = "lua"; config = ''require("codeium").setup({})''; } - { - plugin = chatgpt; - type = "lua"; - config = ''require("chatgpt").setup({ })''; - } + # { + # plugin = chatgpt; + # type = "lua"; + # config = ''require("chatgpt").setup({ })''; + # } ]; extraPackages = with pkgs; [ @@ -454,7 +454,7 @@ in { nodePackages.markdownlint-cli nodePackages.write-good - (python39.withPackages (ps: + (python310.withPackages (ps: with ps; [ python-lsp-server ruff-lsp diff --git a/system/home-manager/zsh.nix b/system/home-manager/zsh.nix index 7b48abc..6094150 100644 --- a/system/home-manager/zsh.nix +++ b/system/home-manager/zsh.nix @@ -12,7 +12,7 @@ programs.zsh = { enable = true; enableCompletion = true; - enableSyntaxHighlighting = true; + syntaxHighlighting.enable = true; enableAutosuggestions = true; shellAliases = import ./aliases.nix {pkgs = pkgs;}; sessionVariables = { diff --git a/system/nixpkgs.nix b/system/nixpkgs.nix index 6cb939b..47a66aa 100644 --- a/system/nixpkgs.nix +++ b/system/nixpkgs.nix @@ -36,7 +36,6 @@ "richban.cachix.org-1:b22iBPRwWfvVe1ldyn3ca1JRw0OEzzf3jrurGJQN3LA=" ]; }; - readOnlyStore = true; # Add inputs to registry & nix path nixPath = From 214c936f1ad1ad902516da55aa188228b41f45de Mon Sep 17 00:00:00 2001 From: richban Date: Thu, 14 Sep 2023 14:37:31 +0100 Subject: [PATCH 04/15] Update flake.lock --- flake.lock | 66 +++++++++++++++++----------------- system/home-manager/direnv.nix | 30 ++++++++++++++++ 2 files changed, 63 insertions(+), 33 deletions(-) create mode 100644 system/home-manager/direnv.nix diff --git a/flake.lock b/flake.lock index 890d681..8408076 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1692248770, - "narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=", + "lastModified": 1694497842, + "narHash": "sha256-z03v/m0OwcLBok97KcUgMl8ZFw5Xwsi2z+n6nL7JdXY=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b", + "rev": "4496ab26628c5f43d2a5c577a06683c753e32fe2", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1693833206, - "narHash": "sha256-wHOY0nnD6gWj8u9uI85/YlsganYyWRK1hLFZulZwfmY=", + "lastModified": 1694435990, + "narHash": "sha256-yLQPD2eZGepu3yvdwABXrR3GhAqWRWTj9rn3a4knYuk=", "owner": "numtide", "repo": "devshell", - "rev": "65114ea495a8d3cc1352368bf170d67ef005aa5a", + "rev": "f6aec2e8b1cdddcab10ce7fc2eac66886e3deaad", "type": "github" }, "original": { @@ -177,11 +177,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -295,11 +295,11 @@ ] }, "locked": { - "lastModified": 1694375657, - "narHash": "sha256-32X8dcty4vPXx+D4yJPQZBo5hJ1NQikALhevGv6elO4=", + "lastModified": 1694643239, + "narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=", "owner": "nix-community", "repo": "home-manager", - "rev": "f7848d3e5f15ed02e3f286029697e41ee31662d7", + "rev": "d9b88b43524db1591fb3d9410a21428198d75d49", "type": "github" }, "original": { @@ -334,11 +334,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1694382785, - "narHash": "sha256-h1zjxMn9DdBybhLHjiqqsxqfiwkFJiu8mk9L2NUValY=", + "lastModified": 1694648542, + "narHash": "sha256-ktzCb7bmhW7DWtBuqQaZN32mGtNiXsydd1TrVkmxS+g=", "owner": "neovim", "repo": "neovim", - "rev": "af0684f0d578631dae7d857cd065d81288be3cf2", + "rev": "f5953edbac14febce9d4f8a3c35bdec1eae26fbe", "type": "github" }, "original": { @@ -357,11 +357,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1694390640, - "narHash": "sha256-CbAWf1H3Yc5TIJ5rqud2+cK9H5ATIZlXxe3aJelhNqI=", + "lastModified": 1694649852, + "narHash": "sha256-MYlZt8ywoeV/lk4Az+ctLvQRhbc4hCkBwc+4MAr6DAc=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "92b2c211731505d9d80b0d0419ad2abbe274103a", + "rev": "a0f501276e820da3ff4599922df96154e86d8603", "type": "github" }, "original": { @@ -396,11 +396,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1694304580, - "narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=", + "lastModified": 1694499547, + "narHash": "sha256-R7xMz1Iia6JthWRHDn36s/E248WB1/je62ovC/dUVKI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760", + "rev": "e5f018cf150e29aac26c61dac0790ea023c46b24", "type": "github" }, "original": { @@ -412,11 +412,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1694183432, - "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", + "lastModified": 1694422566, + "narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", "type": "github" }, "original": { @@ -510,11 +510,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1694343207, - "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=", + "lastModified": 1694593561, + "narHash": "sha256-WSaIQZ5s9N9bDFkEMTw6P9eaZ9bv39ZhsiW12GtTNM0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "78058d810644f5ed276804ce7ea9e82d92bee293", + "rev": "1697b7d480449b01111e352021f46e5879e47643", "type": "github" }, "original": { @@ -526,11 +526,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1694343207, - "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=", + "lastModified": 1694593561, + "narHash": "sha256-WSaIQZ5s9N9bDFkEMTw6P9eaZ9bv39ZhsiW12GtTNM0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "78058d810644f5ed276804ce7ea9e82d92bee293", + "rev": "1697b7d480449b01111e352021f46e5879e47643", "type": "github" }, "original": { @@ -648,11 +648,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1693817438, - "narHash": "sha256-fg3+n4Ky1gCzDtPm0MomMTFw0YkH05Y8ojy5t7bkfHg=", + "lastModified": 1694528738, + "narHash": "sha256-aWMEjib5oTqEzF9f3WXffC1cwICo6v/4dYKjwNktV8k=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "b8d3a059f5487d6767d07c3716386753e3132d9f", + "rev": "7a49c388d7a6b63bb551b1ddedfa4efab8f400d8", "type": "github" }, "original": { diff --git a/system/home-manager/direnv.nix b/system/home-manager/direnv.nix new file mode 100644 index 0000000..f11a34d --- /dev/null +++ b/system/home-manager/direnv.nix @@ -0,0 +1,30 @@ +{config, ...}: { + programs.direnv = { + enable = true; + nix-direnv.enable = true; + stdlib = '' + # stolen from @i077; store .direnv in cache instead of project dir + declare -A direnv_layout_dirs + direnv_layout_dir() { + echo "''${direnv_layout_dirs[$PWD]:=$( + echo -n "${config.xdg.cacheHome}"/direnv/layouts/ + echo -n "$PWD" | shasum | cut -d ' ' -f 1 + )}" + } + + layout_poetry() { + if [[ ! -f pyproject.toml ]]; then + log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to create one first.' + exit 2 + fi + + # create venv if it doesn't exist + poetry run true + + export VIRTUAL_ENV=$(poetry env info --path) + export POETRY_ACTIVE=1 + PATH_add "$VIRTUAL_ENV/bin" + } + ''; + }; +} From 8853424c63a4bb407d9b0949fb6add4bea25d03b Mon Sep 17 00:00:00 2001 From: richban Date: Thu, 14 Sep 2023 14:38:01 +0100 Subject: [PATCH 05/15] Update neovim packages --- dotfiles/config/nvim/lua/rb/gitsigns.lua | 73 ++++++++++++++++++------ system/home-manager/default.nix | 2 +- system/home-manager/nvim/default.nix | 38 ++++++------ 3 files changed, 76 insertions(+), 37 deletions(-) diff --git a/dotfiles/config/nvim/lua/rb/gitsigns.lua b/dotfiles/config/nvim/lua/rb/gitsigns.lua index b67d22d..8176cb1 100644 --- a/dotfiles/config/nvim/lua/rb/gitsigns.lua +++ b/dotfiles/config/nvim/lua/rb/gitsigns.lua @@ -10,23 +10,6 @@ require("gitsigns").setup({ numhl = false, -- Toggle with `:Gitsigns toggle_numhl` linehl = false, -- Toggle with `:Gitsigns toggle_linehl` word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - - ["n ]h"] = { expr = true, "&diff ? ']c' : 'lua require\"gitsigns\".next_hunk()'" }, - ["n [h"] = { expr = true, "&diff ? '[c' : 'lua require\"gitsigns\".prev_hunk()'" }, - - ["n hs"] = 'lua require"gitsigns".stage_hunk()', - ["n hu"] = 'lua require"gitsigns".undo_stage_hunk()', - ["n hr"] = 'lua require"gitsigns".reset_hunk()', - ["n hp"] = 'lua require"gitsigns".preview_hunk()', - - ["n hb"] = 'lua require"gitsigns".blame_line()', - ["n hS"] = 'lua require"gitsigns".stage_buffer()', - }, - watch_gitdir = { interval = 1000, follow_files = true }, attach_to_untracked = true, @@ -52,4 +35,60 @@ require("gitsigns").setup({ col = 1, }, yadm = { enable = false }, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map("n", "]h", function() + if vim.wo.diff then + return "]h" + end + vim.schedule(function() + gs.next_hunk() + end) + return "" + end, { expr = true }) + + map("n", "[h", function() + if vim.wo.diff then + return "[h" + end + vim.schedule(function() + gs.prev_hunk() + end) + return "" + end, { expr = true }) + + -- Actions + map("n", "hs", gs.stage_hunk) + map("n", "hr", gs.reset_hunk) + map("v", "hs", function() + gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + map("v", "hr", function() + gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + map("n", "hS", gs.stage_buffer) + map("n", "hu", gs.undo_stage_hunk) + map("n", "hR", gs.reset_buffer) + map("n", "hp", gs.preview_hunk) + map("n", "hb", function() + gs.blame_line({ full = true }) + end) + map("n", "tb", gs.toggle_current_line_blame) + map("n", "hd", gs.diffthis) + map("n", "hD", function() + gs.diffthis("~") + end) + map("n", "td", gs.toggle_deleted) + + -- Text object + map({ "o", "x" }, "ih", ":Gitsigns select_hunk") + end, }) diff --git a/system/home-manager/default.nix b/system/home-manager/default.nix index 690e828..bce892f 100644 --- a/system/home-manager/default.nix +++ b/system/home-manager/default.nix @@ -8,7 +8,7 @@ relativeXDGDataPath = ".local/share"; relativeXDGCachePath = ".cache"; in { - imports = [./zsh.nix ./alacritty.nix ./git.nix ./nvim ./1password.nix]; + imports = [./zsh.nix ./alacritty.nix ./git.nix ./nvim ./1password.nix ./direnv.nix]; xdg = { enable = true; diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index e66f6e6..1d478f9 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -17,8 +17,8 @@ src = pkgs.fetchFromGitHub { owner = "ThePrimeagen"; repo = "refactoring.nvim"; - rev = "57c32c6b7a211e5a3a5e4ddc4ad2033daff5cf9a"; - sha256 = "m/WCIF4GWMXkys4oii4GZ9RCO4cfUD/X6rCRtBLgj3A="; + rev = "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554"; + sha256 = "k4nHB0VznnlDDOZayy1T36pydRO5cDVWV0OtJPtnDA0="; }; buildInputs = [pkgs.stylua]; }; @@ -27,8 +27,8 @@ src = pkgs.fetchFromGitHub { owner = "jcdickinson"; repo = "codeium.nvim"; - rev = "04dea474c2c90633a0e94560e6bfb4b6dea291c9"; - sha256 = "14rQf+ttkRsMkn7GbRosR6Jbdzal+yuF/F0vgFo/XpY="; + rev = "61b751e94cab0aaf5b1f46de40730196330b6d8f"; + sha256 = "qtOoUDkYj7LUXIlCKwLGsntDnGkM6Tq7Qa4sZebeemI="; }; }; nui = pkgs.vimUtils.buildVimPlugin { @@ -36,26 +36,26 @@ src = pkgs.fetchFromGitHub { owner = "MunifTanjim"; repo = "nui.nvim"; - rev = "698e75814cd7c56b0dd8af4936bcef2d13807f3c"; - sha256 = "wVGshQpYx7lz6gl/MDSGkSQJriUbZ0J0OnTFALrXsxk="; - }; - }; - chatgpt = pkgs.vimUtils.buildVimPlugin { - name = "ChatGPT.nvim"; - src = pkgs.fetchFromGitHub { - owner = "jackMort"; - repo = "ChatGPT.nvim"; - rev = "be6d89615216339e8bee47f52290ae204372c248"; - sha256 = "2of3YTLlFw7GyjQ4dPztpqX+nwMF2Bvohc0R8krdx2A="; + rev = "c8de23342caf8d50b15d6b28368d36a56a69d76f"; + sha256 = "Ao+xnowsZPR9x3Wm439l1QIlgt3Rt6n9DZIqkUKsR1k="; }; }; + # chatgpt = pkgs.vimUtils.buildVimPlugin { + # name = "ChatGPT.nvim"; + # src = pkgs.fetchFromGitHub { + # owner = "jackMort"; + # repo = "ChatGPT.nvim"; + # rev = "be6d89615216339e8bee47f52290ae204372c248"; + # sha256 = "2of3YTLlFw7GyjQ4dPztpqX+nwMF2Bvohc0R8krdx2A="; + # }; + # }; lsp-fidget = pkgs.vimUtils.buildVimPlugin { name = "fidget.nvim"; src = pkgs.fetchFromGitHub { owner = "j-hui"; repo = "fidget.nvim"; - rev = "0ba1e16d07627532b6cae915cc992ecac249fb97"; - sha256 = "rmJgfrEr/PYBq0S7j3tzRZvxi7PMMaAo0k528miXOQc="; + rev = "89b633f3bd0b7187f070236b348697de176860e2"; + sha256 = "gmpRk1b/fpNRPUPBA9UnYbmiGRoW5otzW9Nfcfvju74="; }; }; inc-rename = pkgs.vimUtils.buildVimPlugin { @@ -63,8 +63,8 @@ src = pkgs.fetchFromGitHub { owner = "smjonas"; repo = "inc-rename.nvim"; - rev = "fb1b7468f27d874feb209eac46be5205e20b7fd3"; - sha256 = "2D2jlDSeB2fy5/PK3M7aHk/X4Zv7esKPya3QOiH8GdI="; + rev = "ed0f6f2b917cac4eb3259f907da0a481b27a3b7e"; + sha256 = "i1VVtV86cpz7E3n9dOxVl6ZvxttqG3RqcxXrk2c/FCE="; }; }; # firenvim = pkgs.vimUtils.buildVimPlugin { From e66e1a9c5ebd57b6093864ec57f960ab99a78635 Mon Sep 17 00:00:00 2001 From: richban Date: Thu, 14 Sep 2023 14:38:15 +0100 Subject: [PATCH 06/15] Use --impure flag --- .envrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 3550a30..cffc922 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use flake +use flake . --impure From 0d38f912cbf0b40bec45fea14dd606314a630b34 Mon Sep 17 00:00:00 2001 From: richban Date: Thu, 21 Sep 2023 12:10:23 +0100 Subject: [PATCH 07/15] neovim-nightly stable --- flake.lock | 60 ++++++++++++++-------------- flake.nix | 2 +- system/home-manager/nvim/default.nix | 19 +++------ 3 files changed, 36 insertions(+), 45 deletions(-) diff --git a/flake.lock b/flake.lock index 8408076..523544f 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1694497842, - "narHash": "sha256-z03v/m0OwcLBok97KcUgMl8ZFw5Xwsi2z+n6nL7JdXY=", + "lastModified": 1695114819, + "narHash": "sha256-/aIfbZxP39QZ8m7qX2RzQTy5PWzz2e22cCcZ+AOO7lA=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4496ab26628c5f43d2a5c577a06683c753e32fe2", + "rev": "afeddc412b3a3b0e7c9ef7ea5fbdf2186781d102", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694435990, - "narHash": "sha256-yLQPD2eZGepu3yvdwABXrR3GhAqWRWTj9rn3a4knYuk=", + "lastModified": 1695195896, + "narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=", "owner": "numtide", "repo": "devshell", - "rev": "f6aec2e8b1cdddcab10ce7fc2eac66886e3deaad", + "rev": "05d40d17bf3459606316e3e9ec683b784ff28f16", "type": "github" }, "original": { @@ -295,11 +295,11 @@ ] }, "locked": { - "lastModified": 1694643239, - "narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=", + "lastModified": 1695224363, + "narHash": "sha256-+hfjJLUMck5G92RVFDZA7LWkR3kOxs5zQ7RPW9t3eM8=", "owner": "nix-community", "repo": "home-manager", - "rev": "d9b88b43524db1591fb3d9410a21428198d75d49", + "rev": "408ba13188ff9ce309fa2bdd2f81287d79773b00", "type": "github" }, "original": { @@ -334,11 +334,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1694648542, - "narHash": "sha256-ktzCb7bmhW7DWtBuqQaZN32mGtNiXsydd1TrVkmxS+g=", + "lastModified": 1682581904, + "narHash": "sha256-9P4T2erXXrPxXTTLgD29U/IdKCOYqP4xbwdYswtVBA8=", "owner": "neovim", "repo": "neovim", - "rev": "f5953edbac14febce9d4f8a3c35bdec1eae26fbe", + "rev": "d321deb4a9b05e9d81b79ac166274f4a6e7981bf", "type": "github" }, "original": { @@ -357,11 +357,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1694649852, - "narHash": "sha256-MYlZt8ywoeV/lk4Az+ctLvQRhbc4hCkBwc+4MAr6DAc=", + "lastModified": 1682955971, + "narHash": "sha256-6Orm5CIh/Zz3X/RHbMbLnii5jSyEjLxV9KF7lrrI5pA=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "a0f501276e820da3ff4599922df96154e86d8603", + "rev": "a9719c5050b1abbb0adada7dd9f98e0cdbd3ed53", "type": "github" }, "original": { @@ -396,11 +396,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1694499547, - "narHash": "sha256-R7xMz1Iia6JthWRHDn36s/E248WB1/je62ovC/dUVKI=", + "lastModified": 1694937365, + "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e5f018cf150e29aac26c61dac0790ea023c46b24", + "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02", "type": "github" }, "original": { @@ -412,11 +412,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1694422566, - "narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", + "lastModified": 1694959747, + "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev": "970a59bd19eff3752ce552935687100c46e820a5", "type": "github" }, "original": { @@ -510,11 +510,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1694593561, - "narHash": "sha256-WSaIQZ5s9N9bDFkEMTw6P9eaZ9bv39ZhsiW12GtTNM0=", + "lastModified": 1694760568, + "narHash": "sha256-3G07BiXrp2YQKxdcdms22MUx6spc6A++MSePtatCYuI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1697b7d480449b01111e352021f46e5879e47643", + "rev": "46688f8eb5cd6f1298d873d4d2b9cf245e09e88e", "type": "github" }, "original": { @@ -526,11 +526,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1694593561, - "narHash": "sha256-WSaIQZ5s9N9bDFkEMTw6P9eaZ9bv39ZhsiW12GtTNM0=", + "lastModified": 1695132891, + "narHash": "sha256-cJR9AFHmt816cW/C9necLJyOg/gsnkvEeFAfxgeM1hc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1697b7d480449b01111e352021f46e5879e47643", + "rev": "8b5ab8341e33322e5b66fb46ce23d724050f6606", "type": "github" }, "original": { @@ -648,11 +648,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1694528738, - "narHash": "sha256-aWMEjib5oTqEzF9f3WXffC1cwICo6v/4dYKjwNktV8k=", + "lastModified": 1695290086, + "narHash": "sha256-ol6licpIAzc9oMsEai/9YZhgSMcrnlnD/3ulMLGNKL0=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "7a49c388d7a6b63bb551b1ddedfa4efab8f400d8", + "rev": "e951529be2e7c669487de78f5aef8597bbae5fca", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fd11224..fd841c0 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ # Overlays is the list of overlays we want to apply from flake inputs. overlays = [ - # inputs.neovim-nightly-overlay.overlay + inputs.neovim-nightly-overlay.overlay ]; # generate a darwin config diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index 1d478f9..bddbfdd 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -22,15 +22,6 @@ }; buildInputs = [pkgs.stylua]; }; - codeium = pkgs.vimUtils.buildVimPlugin { - name = "codeium.nvim"; - src = pkgs.fetchFromGitHub { - owner = "jcdickinson"; - repo = "codeium.nvim"; - rev = "61b751e94cab0aaf5b1f46de40730196330b6d8f"; - sha256 = "qtOoUDkYj7LUXIlCKwLGsntDnGkM6Tq7Qa4sZebeemI="; - }; - }; nui = pkgs.vimUtils.buildVimPlugin { name = "nui.nvim"; src = pkgs.fetchFromGitHub { @@ -411,11 +402,11 @@ in { # AI nui - { - plugin = codeium; - type = "lua"; - config = ''require("codeium").setup({})''; - } + # { + # plugin = codeium; + # type = "lua"; + # config = ''require("codeium").setup({})''; + # } # { # plugin = chatgpt; # type = "lua"; From 562382d811b05ec8862a2cc55c68aa1cfc9a6251 Mon Sep 17 00:00:00 2001 From: richban Date: Tue, 26 Sep 2023 11:07:48 +0100 Subject: [PATCH 08/15] fix fidget.nvim --- system/home-manager/nvim/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index bddbfdd..e038bb8 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -45,7 +45,7 @@ src = pkgs.fetchFromGitHub { owner = "j-hui"; repo = "fidget.nvim"; - rev = "89b633f3bd0b7187f070236b348697de176860e2"; + rev = "0ba1e16d07627532b6cae915cc992ecac249fb97"; sha256 = "gmpRk1b/fpNRPUPBA9UnYbmiGRoW5otzW9Nfcfvju74="; }; }; From 0aae8d81754bef65cb32e1a95f785e1de6bb09f1 Mon Sep 17 00:00:00 2001 From: richban Date: Tue, 21 Nov 2023 09:31:00 +0000 Subject: [PATCH 09/15] Update flake --- flake.lock | 193 +++++++++++++++-------------------------------------- 1 file changed, 52 insertions(+), 141 deletions(-) diff --git a/flake.lock b/flake.lock index 523544f..96616b9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1695114819, - "narHash": "sha256-/aIfbZxP39QZ8m7qX2RzQTy5PWzz2e22cCcZ+AOO7lA=", + "lastModified": 1698429334, + "narHash": "sha256-Gq3+QabboczSu7RMpcy79RSLMSqnySO3wsnHQk4DfbE=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "afeddc412b3a3b0e7c9ef7ea5fbdf2186781d102", + "rev": "afe83cbc2e673b1f08d32dd0f70df599678ff1e7", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1695195896, - "narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=", + "lastModified": 1698410321, + "narHash": "sha256-MphuSlgpmKwtJncGMohryHiK55J1n6WzVQ/OAfmfoMc=", "owner": "numtide", "repo": "devshell", - "rev": "05d40d17bf3459606316e3e9ec683b784ff28f16", + "rev": "1aed986e3c81a4f6698e85a7452cbfcc4b31a36e", "type": "github" }, "original": { @@ -83,11 +83,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -104,11 +104,11 @@ ] }, "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", + "lastModified": 1698579227, + "narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", + "rev": "f76e870d64779109e41370848074ac4eaa1606ec", "type": "github" }, "original": { @@ -118,43 +118,24 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "neovim-nightly-overlay", "hercules-ci-effects", - "hercules-ci-agent", "nixpkgs" ] }, "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "id": "flake-parts", + "type": "indirect" } }, "flake-utils": { @@ -230,56 +211,20 @@ "type": "github" } }, - "haskell-flake": { - "locked": { - "lastModified": 1684780604, - "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "0.3.0", - "repo": "haskell-flake", - "type": "github" - } - }, - "hercules-ci-agent": { - "inputs": { - "flake-parts": "flake-parts_3", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1688568579, - "narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=", - "owner": "hercules-ci", - "repo": "hercules-ci-agent", - "rev": "367dd8cd649b57009a6502e878005a1e54ad78c5", - "type": "github" - }, - "original": { - "id": "hercules-ci-agent", - "type": "indirect" - } - }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_2", - "hercules-ci-agent": "hercules-ci-agent", "nixpkgs": [ "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { - "lastModified": 1689397210, - "narHash": "sha256-fVxZnqxMbsDkB4GzGAs/B41K0wt/e+B/fLxmTFF/S20=", + "lastModified": 1698165573, + "narHash": "sha256-cnMTgCDnZiQKsf+wVzigpexskqRCFTKgS58Wx2rNU1c=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "0a63bfa3f00a3775ea3a6722b247880f1ffe91ce", + "rev": "300e0af24a1bbe32d115beb182efb01785582c45", "type": "github" }, "original": { @@ -295,11 +240,11 @@ ] }, "locked": { - "lastModified": 1695224363, - "narHash": "sha256-+hfjJLUMck5G92RVFDZA7LWkR3kOxs5zQ7RPW9t3eM8=", + "lastModified": 1698860414, + "narHash": "sha256-ejtFTDbo7tT8j8AIQfN9g+4dlQmrUDoC3dEaw77jVcY=", "owner": "nix-community", "repo": "home-manager", - "rev": "408ba13188ff9ce309fa2bdd2f81287d79773b00", + "rev": "fc2a8842ea5106640eb89ec522dde9120df82d8a", "type": "github" }, "original": { @@ -334,11 +279,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1682581904, - "narHash": "sha256-9P4T2erXXrPxXTTLgD29U/IdKCOYqP4xbwdYswtVBA8=", + "lastModified": 1698833855, + "narHash": "sha256-J7Nvy+RmhBKx+d2XOzePVmVo6qXARoxe730J4UV1RV0=", "owner": "neovim", "repo": "neovim", - "rev": "d321deb4a9b05e9d81b79ac166274f4a6e7981bf", + "rev": "20dd9f3a26e45a1b4c95ba33d6c9f300184fc361", "type": "github" }, "original": { @@ -354,14 +299,14 @@ "flake-parts": "flake-parts", "hercules-ci-effects": "hercules-ci-effects", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1682955971, - "narHash": "sha256-6Orm5CIh/Zz3X/RHbMbLnii5jSyEjLxV9KF7lrrI5pA=", + "lastModified": 1698849803, + "narHash": "sha256-6bBKsRbMpQzC4dxzgov1XnwzNYaUAMYFaU153oTk1eo=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "a9719c5050b1abbb0adada7dd9f98e0cdbd3ed53", + "rev": "3e1be25cc29a7d2311d49d9b2cc116cc77c02a9e", "type": "github" }, "original": { @@ -396,11 +341,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1694937365, - "narHash": "sha256-iHZSGrb9gVpZRR4B2ishUN/1LRKWtSHZNO37C8z1SmA=", + "lastModified": 1698696950, + "narHash": "sha256-FHFL58t6lMumvWqwundC8fDDDLOIvc+JJBNIAlPjrDY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5d017a8822e0907fb96f7700a319f9fe2434de02", + "rev": "017ef2132a5bda50bd713aeabce8f918502d4ec1", "type": "github" }, "original": { @@ -412,11 +357,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1694959747, - "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "970a59bd19eff3752ce552935687100c46e820a5", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", "type": "github" }, "original": { @@ -442,24 +387,6 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -494,27 +421,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1688322751, - "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", + "lastModified": 1698553279, + "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1694760568, - "narHash": "sha256-3G07BiXrp2YQKxdcdms22MUx6spc6A++MSePtatCYuI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "46688f8eb5cd6f1298d873d4d2b9cf245e09e88e", + "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", "type": "github" }, "original": { @@ -524,13 +435,13 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1695132891, - "narHash": "sha256-cJR9AFHmt816cW/C9necLJyOg/gsnkvEeFAfxgeM1hc=", + "lastModified": 1698553279, + "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8b5ab8341e33322e5b66fb46ce23d724050f6606", + "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", "type": "github" }, "original": { @@ -540,13 +451,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1691654369, - "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", + "lastModified": 1695644571, + "narHash": "sha256-asS9dCCdlt1lPq0DLwkVBbVoEKuEuz+Zi3DG7pR/RxA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", + "rev": "6500b4580c2a1f3d0f980d32d285739d8e156d92", "type": "github" }, "original": { @@ -594,7 +505,7 @@ "neovim-nightly-overlay": "neovim-nightly-overlay", "nixos-stable": "nixos-stable", "nixos-unstable": "nixos-unstable", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "treefmt-nix": "treefmt-nix" } }, @@ -645,14 +556,14 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1695290086, - "narHash": "sha256-ol6licpIAzc9oMsEai/9YZhgSMcrnlnD/3ulMLGNKL0=", + "lastModified": 1698438538, + "narHash": "sha256-AWxaKTDL3MtxaVTVU5lYBvSnlspOS0Fjt8GxBgnU0Do=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "e951529be2e7c669487de78f5aef8597bbae5fca", + "rev": "5deb8dc125a9f83b65ca86cf0c8167c46593e0b1", "type": "github" }, "original": { From 56f665395320546b26eac4f1582ac905823944cf Mon Sep 17 00:00:00 2001 From: richban Date: Tue, 21 Nov 2023 09:32:06 +0000 Subject: [PATCH 10/15] Update nvim --- dotfiles/config/nvim/lua/rb/lsp/settings.lua | 4 +- system/home-manager/nvim/default.nix | 45 ++++++++++++-------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/dotfiles/config/nvim/lua/rb/lsp/settings.lua b/dotfiles/config/nvim/lua/rb/lsp/settings.lua index eec1325..b67656f 100644 --- a/dotfiles/config/nvim/lua/rb/lsp/settings.lua +++ b/dotfiles/config/nvim/lua/rb/lsp/settings.lua @@ -90,10 +90,10 @@ local function custom_attach(client, bufnr) -- to view the hiding contents max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width handler_opts = { - border = "single", -- double, single, shadow, none + border = "rounded", -- double, single, shadow, none }, extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","} - }) + }, bufnr) vim.bo.omnifunc = "v:lua.vim.lsp.omnifunc" diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index e038bb8..f08ef0a 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -40,15 +40,6 @@ # sha256 = "2of3YTLlFw7GyjQ4dPztpqX+nwMF2Bvohc0R8krdx2A="; # }; # }; - lsp-fidget = pkgs.vimUtils.buildVimPlugin { - name = "fidget.nvim"; - src = pkgs.fetchFromGitHub { - owner = "j-hui"; - repo = "fidget.nvim"; - rev = "0ba1e16d07627532b6cae915cc992ecac249fb97"; - sha256 = "gmpRk1b/fpNRPUPBA9UnYbmiGRoW5otzW9Nfcfvju74="; - }; - }; inc-rename = pkgs.vimUtils.buildVimPlugin { name = "inc-rename.nvim"; src = pkgs.fetchFromGitHub { @@ -76,6 +67,15 @@ sha256 = "6RDVUVLFqSws7ouZ1bRWsGfBpyVOHO+9yEiMFVWUbC0="; }; }; + oxacarbon-colors = pkgs.vimUtils.buildVimPlugin { + name = "nyoom-engineering"; + src = pkgs.fetchFromGitHub { + owner = "nyoom-engineering"; + repo = "oxocarbon.nvim"; + rev = "b47c0ecab3a4270815afb3b05e03423b04cca8f2"; + sha256 = "sha256-HhHtEeQF0q4Sn13KfWesVbm2Kn5+pLjLrxepWvphcsI="; + }; + }; in { home.file = { settings = { @@ -220,6 +220,14 @@ in { vim.cmd('colorscheme rose-pine') ''; } + { + plugin = oxacarbon-colors; + type = "lua"; + config = '' + vim.opt.background = "dark" -- set this to dark or light + vim.cmd.colorscheme "oxocarbon" + ''; + } nvim-autopairs # adds vscode-like pictogram lspkind-nvim @@ -272,7 +280,10 @@ in { ]]) ''; } - indent-blankline-nvim + { + plugin = indent-blankline-nvim; + config = ''lua require("ibl").setup()''; + } lualine-nvim { plugin = nvim-colorizer-lua; @@ -316,7 +327,8 @@ in { vim-nix null-ls-nvim # https://nixos.wiki/wiki/Tree_sitters - (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) + # (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) + nvim-treesitter.withAllGrammars # markdown-preview-nvim # goyo-vim { @@ -345,11 +357,11 @@ in { lspsaga-nvim lsp-status-nvim lsp_signature-nvim - { - plugin = lsp-fidget; - type = "lua"; - config = ''require("fidget").setup()''; - } + # { + # plugin = lsp-fidget; + # type = "lua"; + # config = ''require("fidget").setup()''; + # } # telescope telescope-nvim @@ -475,7 +487,6 @@ in { lua require("rb.globals") lua require("rb.autocmd") lua require("rb.nvim-cmp") - lua require("rb.indent-blankline") lua require("rb.statusline") lua require("rb.gitsigns") lua require("rb.nvim-tree") From cffa717b09aa521bf398537b58726389573285b5 Mon Sep 17 00:00:00 2001 From: richban Date: Tue, 21 Nov 2023 09:36:53 +0000 Subject: [PATCH 11/15] Obsidian and Postaman are breaking --- system/darwin/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/darwin/configuration.nix b/system/darwin/configuration.nix index 100582a..e4bca0f 100644 --- a/system/darwin/configuration.nix +++ b/system/darwin/configuration.nix @@ -21,8 +21,8 @@ in { _1password-gui hammerspoon spacebar - obsidian - postman + # obsidian + # postman karabiner-elements goku ]; From 5248d6941526305021c4297963a53d60008479cd Mon Sep 17 00:00:00 2001 From: richban Date: Sun, 24 Dec 2023 11:05:14 +0100 Subject: [PATCH 12/15] Fix git --- system/home-manager/git.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/home-manager/git.nix b/system/home-manager/git.nix index 80f2f16..5202262 100644 --- a/system/home-manager/git.nix +++ b/system/home-manager/git.nix @@ -26,6 +26,7 @@ color.ui = true; pull.ff = "only"; url."ssh://git@github.com/".insteadOf = "https://github.com/"; + gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; core = { pager = "delta"; @@ -42,6 +43,10 @@ algorithm = "histogram"; }; + push = { + autoSetupRemote = true; + }; + "difftool \"vimdiff\"" = { path = "nvim"; }; From a3d332f7cedb9cc8f2a1441fb17f8b058fefd80a Mon Sep 17 00:00:00 2001 From: richban Date: Sun, 24 Dec 2023 11:36:17 +0100 Subject: [PATCH 13/15] Upgrad nix to 23.11 --- flake.lock | 8 ++++---- flake.nix | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 96616b9..bb83059 100644 --- a/flake.lock +++ b/flake.lock @@ -341,16 +341,16 @@ }, "nixos-stable": { "locked": { - "lastModified": 1698696950, - "narHash": "sha256-FHFL58t6lMumvWqwundC8fDDDLOIvc+JJBNIAlPjrDY=", + "lastModified": 1703068421, + "narHash": "sha256-WSw5Faqlw75McIflnl5v7qVD/B3S2sLh+968bpOGrWA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "017ef2132a5bda50bd713aeabce8f918502d4ec1", + "rev": "d65bceaee0fb1e64363f7871bc43dc1c6ecad99f", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index fd841c0..37ac6b8 100644 --- a/flake.nix +++ b/flake.nix @@ -18,9 +18,7 @@ inputs = { # We use the unstable nixpkgs repo for some packages. nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - - # TODO: configure NixOS - nixos-stable.url = "github:nixos/nixpkgs/nixos-23.05"; + nixos-stable.url = "github:nixos/nixpkgs/nixos-23.11"; nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Darwin system management From 97168569caded5a06479295148f87d2eede9f73d Mon Sep 17 00:00:00 2001 From: richban Date: Sun, 24 Dec 2023 14:42:17 +0100 Subject: [PATCH 14/15] Adde copilot --- dotfiles/config/nvim/lua/rb/autocmd.lua | 17 +++++++++++++++++ system/home-manager/nvim/default.nix | 12 +++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/dotfiles/config/nvim/lua/rb/autocmd.lua b/dotfiles/config/nvim/lua/rb/autocmd.lua index 6f48296..e04832c 100644 --- a/dotfiles/config/nvim/lua/rb/autocmd.lua +++ b/dotfiles/config/nvim/lua/rb/autocmd.lua @@ -82,3 +82,20 @@ vim.api.nvim_create_autocmd("FileType", { vim.keymap.set("n", "q", "close", { buffer = event.buf, silent = true }) end, }) + +local group = vim.api.nvim_create_augroup("MyCustomNeogitEvents", { clear = true }) +vim.api.nvim_create_autocmd("User", { + pattern = "NeogitPushComplete", + group = group, + callback = function() + require("neogit").close() + end, +}) + +vim.api.nvim_create_autocmd("User", { + pattern = "BufWritePost,BufEnter,FocusGained,ShellCmdPost,VimResume", + group = augroup("DefaultRefreshEvents"), + callback = function() + require("neogit").refresh_manually() + end, +}) diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index f08ef0a..308f1d2 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -17,7 +17,7 @@ src = pkgs.fetchFromGitHub { owner = "ThePrimeagen"; repo = "refactoring.nvim"; - rev = "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554"; + rev = "pre_release"; sha256 = "k4nHB0VznnlDDOZayy1T36pydRO5cDVWV0OtJPtnDA0="; }; buildInputs = [pkgs.stylua]; @@ -76,6 +76,15 @@ sha256 = "sha256-HhHtEeQF0q4Sn13KfWesVbm2Kn5+pLjLrxepWvphcsI="; }; }; + copilot = pkgs.vimUtils.buildVimPlugin { + name = "copilot.vim"; + src = pkgs.fetchFromGitHub { + owner = "github"; + repo = "copilot.vim"; + rev = "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f"; + sha256 = "sha256-mHwK8vw3vbcMKuTb1aMRSL5GS0+4g3tw3G4uZGMA2lQ="; + }; + }; in { home.file = { settings = { @@ -414,6 +423,7 @@ in { # AI nui + copilot # { # plugin = codeium; # type = "lua"; From 39143c017f7e28e3e2075e9231ed6b30516d73aa Mon Sep 17 00:00:00 2001 From: richban Date: Sun, 24 Dec 2023 15:15:50 +0100 Subject: [PATCH 15/15] Use copilot.lua --- dotfiles/config/nvim/lua/rb/nvim-cmp.lua | 5 +++- system/home-manager/nvim/default.nix | 38 ++++++++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/dotfiles/config/nvim/lua/rb/nvim-cmp.lua b/dotfiles/config/nvim/lua/rb/nvim-cmp.lua index 8fb43b6..7610259 100644 --- a/dotfiles/config/nvim/lua/rb/nvim-cmp.lua +++ b/dotfiles/config/nvim/lua/rb/nvim-cmp.lua @@ -27,6 +27,7 @@ lspkind.init({ EnumMember = "", Constant = "", Struct = "", + Copilot = "", }, }) @@ -96,11 +97,13 @@ cmp.setup({ }), }, sources = { + -- Copilot Source + { name = "copilot", group_index = 2 }, -- order of the sources sets priority in the completion menu { name = "nvim_lsp_signature_help" }, { name = "nvim_lsp" }, { name = "vsnip" }, - { name = "codeium", group_index = 1 }, + -- { name = "codeium", group_index = 1 }, { name = "treesitter" }, { name = "path" }, { name = "buffer" }, diff --git a/system/home-manager/nvim/default.nix b/system/home-manager/nvim/default.nix index 308f1d2..d887037 100644 --- a/system/home-manager/nvim/default.nix +++ b/system/home-manager/nvim/default.nix @@ -77,12 +77,21 @@ }; }; copilot = pkgs.vimUtils.buildVimPlugin { - name = "copilot.vim"; + name = "copilot.lua"; src = pkgs.fetchFromGitHub { - owner = "github"; - repo = "copilot.vim"; - rev = "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f"; - sha256 = "sha256-mHwK8vw3vbcMKuTb1aMRSL5GS0+4g3tw3G4uZGMA2lQ="; + owner = "zbirenbaum"; + repo = "copilot.lua"; + rev = "858bbfa6fa81c88fb1f64107d7981f1658619e0a"; + hash = "sha256-x6ylgVR7nrMhvSvtwbh7CufOJO/q+30G+Tvrj3/wgZY="; + }; + }; + copilot-cmp = pkgs.vimUtils.buildVimPlugin { + name = "copilot-cmpp"; + src = pkgs.fetchFromGitHub { + owner = "zbirenbaum"; + repo = "copilot-cmp"; + rev = "72fbaa03695779f8349be3ac54fa8bd77eed3ee3"; + sha256 = "sha256-srgNohm/aJpswNJ5+T7p+zi9Jinp9e5FA8/wdk6VRiY="; }; }; in { @@ -249,6 +258,12 @@ in { cmp-nvim-lua cmp-spell cmp-vsnip + { + plugin = copilot-cmp; + type = "lua"; + config = '' + require("copilot").setup({})''; + } # snippets vim-vsnip @@ -423,7 +438,18 @@ in { # AI nui - copilot + # copilot + { + plugin = copilot; + type = "lua"; + config = '' + require("copilot").setup({ + suggestion = { enabled = false }, + panel = { enabled = false }, + }) + ''; + } + # { # plugin = codeium; # type = "lua";