From d855614811f41fd6e579bcc2cf9c653cb6fa802c Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Wed, 29 May 2024 23:48:14 -0400 Subject: [PATCH 01/23] chore: update lockfile --- flake.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 6bf3bb0..5a318dc 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1715101957, - "narHash": "sha256-fs5uVQFTfgb4L9pnhldeyTHNcYwn1U4nKYoCBJ6W3W4=", + "lastModified": 1716561646, + "narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=", "owner": "ryantm", "repo": "agenix", - "rev": "07479c2e7396acaaaac5925483498154034ea80a", + "rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9", "type": "github" }, "original": { @@ -52,11 +52,11 @@ ] }, "locked": { - "lastModified": 1713946171, - "narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=", + "lastModified": 1716993688, + "narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7", + "rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4", "type": "github" }, "original": { @@ -198,11 +198,11 @@ ] }, "locked": { - "lastModified": 1714043624, - "narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=", + "lastModified": 1716729592, + "narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=", "owner": "rycee", "repo": "home-manager", - "rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411", + "rev": "2c78a57c544dd19b07442350727ced097e1aa6e6", "type": "github" }, "original": { @@ -219,11 +219,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1715130616, - "narHash": "sha256-pWwzSphfGbeg/2lmfFo15b2Ykv/JtTXAWydy8dfHv9I=", + "lastModified": 1717032429, + "narHash": "sha256-1+87CE8xOUsJChiq9aNQqWPKoWMuyurW+aXrGbMWH7I=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "f0219364cbf407c76993996a9242b8eda0406b9a", + "rev": "0309d806a5431a46fb7fd81e20d7133ac8b1de55", "type": "github" }, "original": { @@ -241,11 +241,11 @@ ] }, "locked": { - "lastModified": 1715114695, - "narHash": "sha256-Pw81Wkm8RhCZr17ltsDabFpat1lRltRAszkppBmmdaI=", + "lastModified": 1716640344, + "narHash": "sha256-AZKQs+KrL70le0RZH8XqZJMc2SahU4LpfEJ2Vd5SWzM=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "19c7ae9034389f5a7bbc6b17a7b72289c1c52272", + "rev": "020cd466170204e448b24b246045599fce69ad91", "type": "github" }, "original": { @@ -272,11 +272,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714971268, - "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", + "lastModified": 1716633019, + "narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", + "rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e", "type": "github" }, "original": { @@ -303,11 +303,11 @@ }, "nur": { "locked": { - "lastModified": 1715211950, - "narHash": "sha256-//YbMDEYB9O8ugYN1nsUQUhbBDFizhdnfHzkRIoc2MM=", + "lastModified": 1717040447, + "narHash": "sha256-A1vpWk46+zB+j7ZzNYleA0PuYFktxBkBs/3qsL6yX6k=", "owner": "nix-community", "repo": "NUR", - "rev": "6580e34800c76147aa5d61cf598123f0de72971c", + "rev": "f5637ea4eaddf95edc3844466c16c56bd44a7f30", "type": "github" }, "original": { @@ -337,11 +337,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1715134005, - "narHash": "sha256-oujsCgNiQnZoQntNkkNkA7BhCmUvf9FLWj+2oGT2Jvc=", + "lastModified": 1717035469, + "narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a8bfc2569a1965c0da8711d289d973f0011b441a", + "rev": "095702e63a40e86f339d11864da9dc965b70a01e", "type": "github" }, "original": { @@ -442,11 +442,11 @@ }, "unstable": { "locked": { - "lastModified": 1715087517, - "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", + "lastModified": 1716769173, + "narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", + "rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632", "type": "github" }, "original": { From 898f440a692392806966adffe8e4adf48aa0313b Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 6 Jun 2024 20:26:56 +0000 Subject: [PATCH 02/23] feat: add neptune as a wireguard client --- machines/oracle/configuration.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/machines/oracle/configuration.nix b/machines/oracle/configuration.nix index 48ebe9f..b5b4188 100644 --- a/machines/oracle/configuration.nix +++ b/machines/oracle/configuration.nix @@ -38,6 +38,10 @@ publicKey = "iKJO9Q8LsdCdApapTX9CJmrtAKn1TYhg4YUiBUBPzmo="; allowedIPs = ["10.0.10.2/32"]; } + { + publicKey = "IM7i+2BFsa+XyA4V4jd8iM+jpW307rDEkPOGdSddfzI="; + allowedIPs = ["10.0.10.3/32"]; + } ]; }; }; From 52922f8efabaa30b0d6ab32b11ce26aab030cd89 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 6 Jun 2024 20:27:11 +0000 Subject: [PATCH 03/23] fix(forgejo): use correct caddyfile syntax --- modules/services/forgejo/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/services/forgejo/default.nix b/modules/services/forgejo/default.nix index 67241b0..9a0a4d8 100644 --- a/modules/services/forgejo/default.nix +++ b/modules/services/forgejo/default.nix @@ -90,8 +90,7 @@ in { (mkIf cfg.proxy { services.caddy.virtualHosts."${forgejoDomain}".extraConfig = '' handle_errors { - status 502 - respond "This server is currently unavailable." + respond "This server is currently unavailable." 502 } redir /user/login /user/oauth2/Keycloak?{query} From ff29e743d9727a701a62899e3d80728190bf17e0 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 6 Jun 2024 20:27:27 +0000 Subject: [PATCH 04/23] wip(homer): add gruvbox theme colors --- modules/services/homer/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/services/homer/default.nix b/modules/services/homer/default.nix index ff5527d..e3a454f 100644 --- a/modules/services/homer/default.nix +++ b/modules/services/homer/default.nix @@ -11,6 +11,22 @@ with lib; let title = "Dashboard"; header = false; footer = false; + colors = { + dark = { + highlight-primary = "#cc241d"; + highlight-secondary = "#8ec07c"; + highlight-hover = "#d79921"; + background = "rgb(40,36,34)"; + card-background = "#3c3836"; + text = "#eaeaea"; + text-header = "#ffffff"; + text-title = "#fafafa"; + text-subtitle = "#f5f5f5"; + card-shadow = "rgba(0, 0, 0, 0.4)"; + link = "#3273dc"; + link-hover = "#ffdd57"; + }; + }; connectivityCheck = true; columns = "auto"; services = config.lib.webapps.homerServices; From 26abc8c1f3e251110488378c1660087defbb1312 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 7 Jun 2024 05:20:16 +0000 Subject: [PATCH 05/23] fix(oracle): use correct home module --- flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 6906103..dc12d21 100644 --- a/flake.nix +++ b/flake.nix @@ -85,10 +85,12 @@ }; nixosConfigurations = let - homeModule = { + baseHomeModule = { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = {inherit inputs;}; + }; + homeModule = baseHomeModule // { home-manager.users.michael = import ./user/environments/nixos/home.nix; }; in { @@ -155,7 +157,10 @@ defaultModules ++ [ ./modules/nix.nix - homeModule + baseHomeModule + { + home-manager.users.michael = import ./user/environments/nixos-server/home.nix; + } agenix.nixosModules.default { environment.systemPackages = [ @@ -191,9 +196,8 @@ modules = [ self.overlaysModule home-manager.darwinModules.home-manager + baseHomeModule { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; home-manager.users.michael = import ./user/environments/mac/home.nix; } From e0bf71ef635ad2cf0c9585afc24a870a2688c3e4 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 8 Jun 2024 01:48:58 -0400 Subject: [PATCH 06/23] fix(forgejo): add labels for regularly used container images --- modules/services/forgejo/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/services/forgejo/default.nix b/modules/services/forgejo/default.nix index aa785b6..e303008 100644 --- a/modules/services/forgejo/default.nix +++ b/modules/services/forgejo/default.nix @@ -80,9 +80,13 @@ in { privileged = true; valid_volumes = ["*"]; force_pull = false; + network = "bridge"; }; }; - labels = []; + labels = [ + "debian-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest" + "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest" + ]; tokenFile = config.age.secrets.forgejoActions.path; }; }; From b6f165fd3dc064d99eb63982c336c62182e895a3 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 8 Jun 2024 01:49:40 -0400 Subject: [PATCH 07/23] chore(nvim): update lockfile --- user/modules/nvim/lazy-lock.json | 88 ++++++++++++++------------------ 1 file changed, 37 insertions(+), 51 deletions(-) diff --git a/user/modules/nvim/lazy-lock.json b/user/modules/nvim/lazy-lock.json index 2242f05..91b8616 100644 --- a/user/modules/nvim/lazy-lock.json +++ b/user/modules/nvim/lazy-lock.json @@ -1,58 +1,44 @@ { - "LazyVim": { "branch": "main", "commit": "9b4675ddde38fdae09978bd7dbdba83ec91f4d80" }, - "LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" }, - "bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, - "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, + "LazyVim": { "branch": "main", "commit": "a5f8af912de4b334cb900a9f383b6e317568f27f" }, + "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, + "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" }, - "crates.nvim": { "branch": "main", "commit": "f00e11e8282b94f2a2e938d32712c99f0e0bdeb4" }, - "dashboard-nvim": { "branch": "master", "commit": "1c8b82c5b02bb890862538be2061e37ef801a99b" }, - "dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" }, - "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "d5f74ce4dfdd82848f3f4eac65fe6e29ac5df4c2" }, - "gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" }, - "gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, + "conform.nvim": { "branch": "master", "commit": "069e971295a34a810484b7b2ef54b3c735214181" }, + "dashboard-nvim": { "branch": "master", "commit": "5346d023afc4bfc7ff63d05c70bcdb0784bb657a" }, + "dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" }, + "flash.nvim": { "branch": "main", "commit": "43f67935d388fbb540f8b40e8cbfd80de54f978a" }, + "friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" }, + "gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" }, + "gruvbox.nvim": { "branch": "main", "commit": "d4cde3853a172485961b515c36d51d757728d6e6" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, + "lazy.nvim": { "branch": "main", "commit": "fafe1f7c640aed75e70a10e6649612cd96f39149" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" }, - "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "mini.ai": { "branch": "main", "commit": "55e9b7217f29e62f734e239bfeed5731a065d801" }, - "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, - "mini.comment": { "branch": "main", "commit": "f9f1a646fd3d9df7397aa1b9550a875fe8189eb0" }, - "mini.indentscope": { "branch": "main", "commit": "a8274b6ea2d868198d27bd91a31ed5ea3a6a5744" }, - "mini.pairs": { "branch": "main", "commit": "5c975d8f68dc1e11bf4b20ced71e7987ed782513" }, - "mini.surround": { "branch": "main", "commit": "a00d69be09e3fe27dfa9e5b0298410d0e148e3e2" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, - "neoconf.nvim": { "branch": "main", "commit": "9aeec25740fd009594e63b34b1c0b67f8eb3adce" }, - "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "34625be12649666b7ccb08761087cc97bb788552" }, - "noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, - "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, - "nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" }, - "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, - "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, - "nvim-spectre": { "branch": "master", "commit": "4651801ba37a9407b7257287aec45b6653ffc5e9" }, - "nvim-treesitter": { "branch": "master", "commit": "bbc67f736e22c37c23f2c11a05bfa23b715af30c" }, - "nvim-treesitter-context": { "branch": "master", "commit": "4fe0a54e86859744968e1a5c7867b49c86855774" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" }, - "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" }, - "nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" }, - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, - "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, - "rustaceanvim": { "branch": "master", "commit": "cd35b0f7fb0c9fe6879b084096230a74fefa4da8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8db12610bcb7ce67013cfdfaba4dd47a23c6e851" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.ai": { "branch": "main", "commit": "7859b6344f5cee567a94f173859d25e20ba1a77e" }, + "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, + "no-neck-pain.nvim": { "branch": "main", "commit": "741ad26c4acc45f2164a3933f7825b0e555b724d" }, + "noice.nvim": { "branch": "main", "commit": "e5cb20c6e14305d24025ecb77d7d4dd9d61f1a64" }, + "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, + "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, + "nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" }, + "nvim-lspconfig": { "branch": "master", "commit": "92166b89ab4b3d60f24e58170cac53b7141fd032" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-spectre": { "branch": "master", "commit": "4d22fe03554056de4325762add3e546c77e3a275" }, + "nvim-treesitter": { "branch": "master", "commit": "c5cbd3ec74f6f5ddbac939e6f24b99fe78262b4c" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, + "nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, + "nvim-web-devicons": { "branch": "master", "commit": "b4b302d6ae229f67df7a87ef69fa79473fe788a9" }, + "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "2d0d057791854decb2c9b6a0b52d43f3900dff40" }, - "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, - "tokyonight.nvim": { "branch": "main", "commit": "67afeaf7fd6ebba000633e89f63c31694057edde" }, + "telescope.nvim": { "branch": "master", "commit": "3a743491e5c6be0ed0aa8c31c6905df8f66179ba" }, + "todo-comments.nvim": { "branch": "main", "commit": "70a93ce66083699571adc361166504b03cc39c2b" }, + "tokyonight.nvim": { "branch": "main", "commit": "02e9028fe3560f38363c2d38f1c87e45eb04fdb3" }, "tree-sitter-asm": { "branch": "main", "commit": "b0306e9bb2ebe01c6562f1aef265cc42ccc53070" }, - "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, - "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, - "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } + "trouble.nvim": { "branch": "main", "commit": "806c50491078b66daf13c408042f2e74da46d0ff" }, + "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" } } \ No newline at end of file From 063cf3e61991807ad4491dc1992e80019278eaa3 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sat, 8 Jun 2024 02:17:17 -0400 Subject: [PATCH 08/23] fix: add baseHomeModule to outer scope for mac config --- flake.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index dc12d21..cdd4ef1 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,12 @@ home-manager.nixosModules.home-manager ./modules ]; + + baseHomeModule = { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inherit inputs;}; + }; in { # Your custom packages # Accessible through 'nix build', 'nix shell', etc @@ -85,14 +91,11 @@ }; nixosConfigurations = let - baseHomeModule = { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = {inherit inputs;}; - }; - homeModule = baseHomeModule // { - home-manager.users.michael = import ./user/environments/nixos/home.nix; - }; + homeModule = + baseHomeModule + // { + home-manager.users.michael = import ./user/environments/nixos/home.nix; + }; in { kitchen = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; From d04ce5cca479d51651d0b57d7f0618b6ade074ce Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:20:27 +0200 Subject: [PATCH 09/23] feat(nvim): add icons globals --- pkgs/nvim/config/icons.nix | 64 ++++++++++++++++++++++++++++++++++++++ pkgs/nvim/default.nix | 5 +-- 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 pkgs/nvim/config/icons.nix diff --git a/pkgs/nvim/config/icons.nix b/pkgs/nvim/config/icons.nix new file mode 100644 index 0000000..7c53f93 --- /dev/null +++ b/pkgs/nvim/config/icons.nix @@ -0,0 +1,64 @@ +{ + misc = { + dots = "󰇘"; + }; + dap = { + Stopped = ["󰁕 " "DiagnosticWarn" "DapStoppedLine"]; + Breakpoint = " "; + BreakpointCondition = " "; + BreakpointRejected = [" " "DiagnosticError"]; + LogPoint = ".>"; + }; + diagnostics = { + Error = " "; + Warn = " "; + Hint = " "; + Info = " "; + }; + git = { + added = " "; + modified = " "; + removed = " "; + }; + kinds = { + Array = " "; + Boolean = "󰨙 "; + Class = " "; + Codeium = "󰘦 "; + Color = " "; + Control = " "; + Collapsed = " "; + Constant = "󰏿 "; + Constructor = " "; + Copilot = " "; + Enum = " "; + EnumMember = " "; + Event = " "; + Field = " "; + File = " "; + Folder = " "; + Function = "󰊕 "; + Interface = " "; + Key = " "; + Keyword = " "; + Method = "󰊕 "; + Module = " "; + Namespace = "󰦮 "; + Null = " "; + Number = "󰎠 "; + Object = " "; + Operator = " "; + Package = " "; + Property = " "; + Reference = " "; + Snippet = " "; + String = " "; + Struct = "󰆼 "; + TabNine = "󰏚 "; + Text = " "; + TypeParameter = " "; + Unit = " "; + Value = " "; + Variable = "󰀫 "; + }; +} diff --git a/pkgs/nvim/default.nix b/pkgs/nvim/default.nix index 2efe8c6..3290e7c 100644 --- a/pkgs/nvim/default.nix +++ b/pkgs/nvim/default.nix @@ -5,9 +5,10 @@ }: let system = pkgs.system; nixvim = inputs.nixvim.legacyPackages.${system}; + icons = import ./config/icons.nix; nixvimModule = { - inherit pkgs; + pkgs = inputs.unstable.legacyPackages.${system}; module = import ./config; - extraSpecialArgs = {}; + extraSpecialArgs = {inherit icons;}; }; in (nixvim.makeNixvimWithModule nixvimModule) From 730b589fd16d4559ff329987f8a8323aa6924826 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:20:59 +0200 Subject: [PATCH 10/23] fix(nvim): disable unwanted modules, add gruvbox --- pkgs/nvim/config/colorschemes/gruvbox.nix | 5 +++++ pkgs/nvim/config/default.nix | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 pkgs/nvim/config/colorschemes/gruvbox.nix diff --git a/pkgs/nvim/config/colorschemes/gruvbox.nix b/pkgs/nvim/config/colorschemes/gruvbox.nix new file mode 100644 index 0000000..bae648e --- /dev/null +++ b/pkgs/nvim/config/colorschemes/gruvbox.nix @@ -0,0 +1,5 @@ +{ + colorschemes.gruvbox = { + enable = true; + }; +} diff --git a/pkgs/nvim/config/default.nix b/pkgs/nvim/config/default.nix index 1a3e5fe..34a9b8c 100644 --- a/pkgs/nvim/config/default.nix +++ b/pkgs/nvim/config/default.nix @@ -6,9 +6,10 @@ ./bufferlines/bufferline.nix - ./colorschemes/base16.nix - ./colorschemes/catppuccin.nix - ./colorschemes/rose-pine.nix + # ./colorschemes/base16.nix + # ./colorschemes/catppuccin.nix + # ./colorschemes/rose-pine.nix + ./colorschemes/gruvbox.nix ./completion/cmp.nix ./completion/copilot.nix @@ -42,7 +43,7 @@ ./snippets/luasnip.nix ./statusline/lualine.nix - ./statusline/staline.nix + # ./statusline/staline.nix ./telescope/telescope.nix @@ -54,7 +55,7 @@ ./ui/nui.nix ./utils/better-escape.nix - ./utils/neocord.nix + # ./utils/neocord.nix ./utils/flash.nix ./utils/hardtime.nix ./utils/harpoon.nix From b25a89b471b86d683dbfef073d353195ade9a230 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:21:15 +0200 Subject: [PATCH 11/23] fix(nvim): typo in nix linter name --- pkgs/nvim/config/languages/nvim-lint.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/nvim/config/languages/nvim-lint.nix b/pkgs/nvim/config/languages/nvim-lint.nix index 7876ddd..f256d17 100644 --- a/pkgs/nvim/config/languages/nvim-lint.nix +++ b/pkgs/nvim/config/languages/nvim-lint.nix @@ -2,7 +2,7 @@ plugins.lint = { enable = true; lintersByFt = { - nix = ["satix"]; + nix = ["statix"]; lua = ["selene"]; python = ["flake8"]; javascript = ["eslint_d"]; From 04fa8c1ab29b7c0eba7c8efc3724c4b808eade83 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:21:50 +0200 Subject: [PATCH 12/23] feat(nvim/bufferline): use lazyvim style and icons --- pkgs/nvim/config/bufferlines/bufferline.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/nvim/config/bufferlines/bufferline.nix b/pkgs/nvim/config/bufferlines/bufferline.nix index 9b717cd..02ebb83 100644 --- a/pkgs/nvim/config/bufferlines/bufferline.nix +++ b/pkgs/nvim/config/bufferlines/bufferline.nix @@ -1,8 +1,22 @@ { + helpers, + icons, + ... +}: { plugins = { bufferline = { enable = true; - separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin” + separatorStyle = "thin"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin” + alwaysShowBufferline = false; + diagnostics = "nvim_lsp"; + diagnosticsIndicator = '' + function(_, _, diag) + local icons = ${helpers.toLuaObject icons.diagnostics} + local ret = (diag.error and icons.Error .. diag.error .. " " or "") + .. (diag.warning and icons.Warn .. diag.warning or "") + return vim.trim(ret) + end + ''; offsets = [ { filetype = "neo-tree"; From 18ba939e269f532bb2090eca97efce4de499e825 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:22:16 +0200 Subject: [PATCH 13/23] fix(nvim/lsp): use correct icons --- pkgs/nvim/config/lsp/lsp.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/nvim/config/lsp/lsp.nix b/pkgs/nvim/config/lsp/lsp.nix index 4568642..4b1a547 100644 --- a/pkgs/nvim/config/lsp/lsp.nix +++ b/pkgs/nvim/config/lsp/lsp.nix @@ -1,4 +1,4 @@ -{ +{icons, ...}: { plugins = { lsp-format = { enable = false; # Enable it if you want lsp-format integration for none-ls @@ -24,7 +24,7 @@ }; }; }; - nil_ls = {enable = true;}; + nil-ls = {enable = true;}; tsserver = { enable = false; filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"]; @@ -156,9 +156,17 @@ } ) - vim.diagnostic.config{ - float={border=_border} - }; + vim.diagnostic.config({ + float={border=_border}, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = "${icons.diagnostics.Error}", + [vim.diagnostic.severity.WARN] = "${icons.diagnostics.Warn}", + [vim.diagnostic.severity.HINT] = "${icons.diagnostics.Hint}", + [vim.diagnostic.severity.INFO] = "${icons.diagnostics.Info}", + }, + }, + }) require('lspconfig.ui.windows').default_options = { border = _border From b64dd718c102da7f6e638a5aca3db556d2f4cfe1 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:22:37 +0200 Subject: [PATCH 14/23] fix(nvim/lspsaga): disable breadcrumbs --- pkgs/nvim/config/lsp/lspsaga.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/nvim/config/lsp/lspsaga.nix b/pkgs/nvim/config/lsp/lspsaga.nix index 6fdf5d9..5b142d3 100644 --- a/pkgs/nvim/config/lsp/lspsaga.nix +++ b/pkgs/nvim/config/lsp/lspsaga.nix @@ -18,7 +18,7 @@ showCodeAction = true; }; symbolInWinbar = { - enable = true; # Breadcrumbs + enable = false; # Breadcrumbs }; codeAction = { extendGitSigns = false; From 4281afe9cfe6ad25767ae5caf63a4cd05317deef Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:23:01 +0200 Subject: [PATCH 15/23] wip(nvim/lualine): make similar to lazyvim bar --- pkgs/nvim/config/statusline/lualine.nix | 69 +++++++++++++++++++------ 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/pkgs/nvim/config/statusline/lualine.nix b/pkgs/nvim/config/statusline/lualine.nix index 1a2d424..6cb1293 100644 --- a/pkgs/nvim/config/statusline/lualine.nix +++ b/pkgs/nvim/config/statusline/lualine.nix @@ -1,33 +1,72 @@ -{ +{icons, ...}: { plugins.lualine = { - enable = false; + enable = true; alwaysDivideMiddle = true; globalstatus = true; ignoreFocus = ["neo-tree"]; extensions = ["fzf"]; theme = "auto"; + disabledFiletypes = { + statusline = ["dashboard" "alpha" "starter"]; + }; componentSeparators = { - left = "|"; - right = "|"; + left = "·"; + right = "·"; }; sectionSeparators = { - left = "█"; #  - right = "█"; #  + left = ""; #  + right = ""; #  }; sections = { lualine_a = ["mode"]; - lualine_b = [ + lualine_b = ["branch"]; + lualine_c = [ { - name = "branch"; - icon = ""; + name = "diagnostics"; + extraConfig.symbols = { + error = icons.diagnostics.Error; + warn = icons.diagnostics.Warn; + info = icons.diagnostics.Info; + hint = icons.diagnostics.Hint; + }; } - "diff" - "diagnostics" + { + name = "filetype"; + extraConfig.icon_only = true; + separator = { + left = ""; + right = ""; + }; + padding = { + left = 1; + right = 0; + }; + } + "filename" ]; - lualine_c = ["filename"]; - lualine_x = ["filetype"]; - lualine_y = ["progress"]; - lualine_z = [''" " .. os.date("%R")'']; + + lualine_x = []; + lualine_y = [ + { + name = "progress"; + separator = { + left = " "; + right = " "; + }; + padding = { + left = 1; + right = 1; + }; + } + { + name = "location"; + padding = { + left = 0; + right = 1; + }; + } + ]; + lualine_z = [''" " .. os.date("%I:%M %p"):gsub("0*", "", 1)'']; }; }; } From 7908f337e3c69c5aad053bd4267a93f1dae265e8 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:23:24 +0200 Subject: [PATCH 16/23] feat(nvim/alpha): update dashboard to match lazyvim mostly --- pkgs/nvim/config/ui/alpha.nix | 241 +++++++++++++++------------------- 1 file changed, 106 insertions(+), 135 deletions(-) diff --git a/pkgs/nvim/config/ui/alpha.nix b/pkgs/nvim/config/ui/alpha.nix index 69658ae..a024e55 100644 --- a/pkgs/nvim/config/ui/alpha.nix +++ b/pkgs/nvim/config/ui/alpha.nix @@ -8,183 +8,154 @@ type = "padding"; inherit val; }; + shortcutOpts = { + position = "center"; + cursor = 3; + width = 50; + align_shortcut = "right"; + }; in [ - (padding 4) + (padding 8) { opts = { - hl = "AlphaHeader"; + hl = "Structure"; position = "center"; }; type = "text"; val = [ - " ██▀███ ▓█████ ▓█████▄▓██ ██▓ █████▒ " - " ▓██ ▒ ██▒▓█ ▀ ▒██▀ ██▌▒██ ██▒▓██ ▒ " - " ▓██ ░▄█ ▒▒███ ░██ █▌ ▒██ ██░▒████ ░ " - " ▒██▀▀█▄ ▒▓█ ▄ ░▓█▄ ▌ ░ ▐██▓░░▓█▒ ░ " - " ░██▓ ▒██▒░▒████▒░▒████▓ ░ ██▒▓░░▒█░ " - " ░ ▒▓ ░▒▓░░░ ▒░ ░ ▒▒▓ ▒ ██▒▒▒ ▒ ░ " - " ░▒ ░ ▒░ ░ ░ ░ ░ ▒ ▒ ▓██ ░▒░ ░ " - " ░░ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ ░ " - " ░ ░ ░ ░ ░ ░ " - " " - " git@github.com:redyf " + "███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗" + "████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║" + "██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║" + "██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║" + "██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║" + "╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝" ]; } - (padding 2) + (padding 3) { type = "button"; val = " Find File"; on_press.raw = "require('telescope.builtin').find_files"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "f" - ":Telescope find_files " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "f"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "f" + ":Telescope find_files " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "f"; + }; } (padding 1) { type = "button"; val = " New File"; on_press.__raw = "function() vim.cmd[[ene]] end"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "n" - ":ene startinsert " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "n"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "n" + ":ene startinsert " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "n"; + }; } (padding 1) { type = "button"; val = "󰈚 Recent Files"; on_press.raw = "require('telescope.builtin').oldfiles"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "r" - ":Telescope oldfiles " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "r"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "r" + ":Telescope oldfiles " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "r"; + }; } (padding 1) { type = "button"; val = "󰈭 Find Word"; on_press.raw = "require('telescope.builtin').live_grep"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "g" - ":Telescope live_grep " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "g"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "g" + ":Telescope live_grep " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "g"; + }; } (padding 1) { type = "button"; val = " Restore Session"; on_press.raw = "require('persistence').load()"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "s" - ":lua require('persistence').load()" - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "s"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "s" + ":lua require('persistence').load()" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "s"; + }; } (padding 1) { type = "button"; - val = " Quit Neovim"; + val = " Quit"; on_press.__raw = "function() vim.cmd[[qa]] end"; - opts = { - # hl = "comment"; - keymap = [ - "n" - "q" - ":qa" - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "q"; - - position = "center"; - cursor = 3; - width = 38; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; + opts = + shortcutOpts + // { + keymap = [ + "n" + "q" + ":qa" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "q"; + }; } ]; }; From f5b275385ca8a9109744c94dd043e2c44cfac0cb Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:27:20 +0200 Subject: [PATCH 17/23] feat(nvim/toggleterm): position based on screen size --- pkgs/nvim/config/utils/toggleterm.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pkgs/nvim/config/utils/toggleterm.nix b/pkgs/nvim/config/utils/toggleterm.nix index f9e23f8..f31229b 100644 --- a/pkgs/nvim/config/utils/toggleterm.nix +++ b/pkgs/nvim/config/utils/toggleterm.nix @@ -22,10 +22,28 @@ shell = "zsh"; direction = "float"; # 'vertical' | 'horizontal' | 'window' | 'float' auto_scroll = true; - float_opts = { + float_opts = let + widthP = "0.9"; + heightP = "0.9"; + in rec { border = "single"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open - width = 80; - height = 20; + width = '' + function() + return math.floor(vim.o.columns * ${widthP}) + end + ''; + height = '' + function() + return math.floor(vim.o.lines * ${heightP}) + end + ''; + row = '' + function() + local heightFn = ${height} + print(heightFn()) + return math.floor((vim.o.lines - heightFn()) / 2) - 1 + end + ''; winblend = 0; }; winbar = { From 553a0f269cf118bf9cd4d7f086685b141e2950ac Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 13 Jun 2024 01:27:57 +0200 Subject: [PATCH 18/23] feat(nvim): update configuration --- pkgs/nvim/config/sets.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/nvim/config/sets.nix b/pkgs/nvim/config/sets.nix index d50f286..f5c0b52 100644 --- a/pkgs/nvim/config/sets.nix +++ b/pkgs/nvim/config/sets.nix @@ -1,10 +1,11 @@ { - pkgs, - lib, - config, - ... -}: { config = { + # Set colorscheme + colorscheme = "gruvbox"; + + # Enable experimental lua loader + luaLoader.enable = true; + opts = { # Enable relative line numbers number = true; @@ -87,7 +88,7 @@ # Change cursor options guicursor = [ "n-v-c:block" # Normal, visual, command-line: block cursor - "i-ci-ve:block" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width + "i-ci-ve:ver25" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width "r-cr:hor20" # Replace, command-line replace: horizontal bar cursor with 20% height "o:hor50" # Operator-pending: horizontal bar cursor with 50% height "a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" # All modes: blinking settings @@ -95,7 +96,7 @@ ]; # Enable chars list - list = true; # Show invisible characters (tabs, eol, ...) + list = false; # Show invisible characters (tabs, eol, ...) listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣"; # More space in the neovim command line for displaying messages From 0257c9f30b33eec79b043451ab044be84c5c7ab8 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 14 Jun 2024 16:41:23 -0400 Subject: [PATCH 19/23] chore(nvim): remove unused modules --- pkgs/nvim/config/completion/copilot.nix | 46 ------------------------- pkgs/nvim/config/completion/lspkind.nix | 12 ------- pkgs/nvim/config/default.nix | 5 --- 3 files changed, 63 deletions(-) delete mode 100644 pkgs/nvim/config/completion/copilot.nix delete mode 100644 pkgs/nvim/config/completion/lspkind.nix diff --git a/pkgs/nvim/config/completion/copilot.nix b/pkgs/nvim/config/completion/copilot.nix deleted file mode 100644 index 4f8be48..0000000 --- a/pkgs/nvim/config/completion/copilot.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - plugins.copilot-lua = { - enable = true; - panel = { - enabled = false; - autoRefresh = true; - keymap = { - jumpPrev = "[["; - jumpNext = "]]"; - accept = ""; - refresh = "gr"; - open = ""; - }; - layout = { - position = "bottom"; # | top | left | right - ratio = 0.4; - }; - }; - suggestion = { - enabled = false; - autoTrigger = true; - debounce = 75; - keymap = { - accept = ""; - acceptWord = false; - acceptLine = false; - next = ""; - prev = ""; - dismiss = ""; - }; - }; - filetypes = { - yaml = false; - markdown = false; - help = false; - gitcommit = false; - gitrebase = false; - hgcommit = false; - svn = false; - cvs = false; - "." = false; - }; - copilotNodeCommand = "node"; # Node.js version must be > 18.x - serverOptsOverrides = {}; - }; -} diff --git a/pkgs/nvim/config/completion/lspkind.nix b/pkgs/nvim/config/completion/lspkind.nix deleted file mode 100644 index 69e8f78..0000000 --- a/pkgs/nvim/config/completion/lspkind.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - plugins.lspkind = { - enable = true; - symbolMap = { - Copilot = ""; - }; - extraOptions = { - maxwidth = 50; - ellipsis_char = "..."; - }; - }; -} diff --git a/pkgs/nvim/config/default.nix b/pkgs/nvim/config/default.nix index 34a9b8c..d8a133b 100644 --- a/pkgs/nvim/config/default.nix +++ b/pkgs/nvim/config/default.nix @@ -12,8 +12,6 @@ ./colorschemes/gruvbox.nix ./completion/cmp.nix - ./completion/copilot.nix - ./completion/lspkind.nix ./dap/dap.nix @@ -43,7 +41,6 @@ ./snippets/luasnip.nix ./statusline/lualine.nix - # ./statusline/staline.nix ./telescope/telescope.nix @@ -55,7 +52,6 @@ ./ui/nui.nix ./utils/better-escape.nix - # ./utils/neocord.nix ./utils/flash.nix ./utils/hardtime.nix ./utils/harpoon.nix @@ -78,7 +74,6 @@ ./utils/ultimate-autopair.nix ./utils/undotree.nix ./utils/vim-be-good.nix - # ./utils/wakatime.nix ./utils/whichkey.nix ./utils/wilder.nix ]; From 962917fd6cdb023c831d4438cd11da0fdcb7d9ea Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 14 Jun 2024 16:58:52 -0400 Subject: [PATCH 20/23] chore: update lockfile --- flake.lock | 186 ++++++++++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 86 deletions(-) diff --git a/flake.lock b/flake.lock index 4d6dab4..892b140 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1716561646, - "narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=", + "lastModified": 1718371084, + "narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", "owner": "ryantm", "repo": "agenix", - "rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9", + "rev": "3a56735779db467538fb2e577eda28a9daacaca6", "type": "github" }, "original": { @@ -73,11 +73,11 @@ ] }, "locked": { - "lastModified": 1716993688, - "narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=", + "lastModified": 1718345812, + "narHash": "sha256-FJhA+YFsOFrAYe6EaiTEfomNf7jeURaPiG5/+a3DRSc=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4", + "rev": "ff988d78f2f55641efacdf9a585d2937f7e32a9b", "type": "github" }, "original": { @@ -96,11 +96,11 @@ ] }, "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "owner": "numtide", "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "type": "github" }, "original": { @@ -179,11 +179,11 @@ ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -192,21 +192,6 @@ "type": "github" } }, - "flake-root": { - "locked": { - "lastModified": 1713493429, - "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=", - "owner": "srid", - "repo": "flake-root", - "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "flake-root", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems_3" @@ -329,11 +314,11 @@ ] }, "locked": { - "lastModified": 1716213921, - "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -392,11 +377,11 @@ ] }, "locked": { - "lastModified": 1716736833, - "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", + "lastModified": 1717527182, + "narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=", "owner": "rycee", "repo": "home-manager", - "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "rev": "845a5c4c073f74105022533907703441e0464bc3", "type": "github" }, "original": { @@ -414,11 +399,11 @@ ] }, "locked": { - "lastModified": 1717052710, - "narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=", + "lastModified": 1718141734, + "narHash": "sha256-cA+6l8ZCZ7MXGijVuY/1f55+wF/RT4PlTR9+g4bx86w=", "owner": "nix-community", "repo": "home-manager", - "rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae", + "rev": "892f76bd0aa09a0f7f73eb41834b8a904b6d0fad", "type": "github" }, "original": { @@ -443,11 +428,11 @@ ] }, "locked": { - "lastModified": 1716576411, - "narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=", + "lastModified": 1718368322, + "narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621", + "rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df", "type": "github" }, "original": { @@ -460,17 +445,18 @@ "inputs": { "hyprcursor": "hyprcursor", "hyprlang": "hyprlang", + "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs", "systems": "systems_2", "xdph": "xdph" }, "locked": { - "lastModified": 1717442018, - "narHash": "sha256-GhL4f5CedZE0UiuzUFkMwGXD+zqlhrzo0y4FC4wQLTM=", + "lastModified": 1718395253, + "narHash": "sha256-kbXUz5Pg0ph9HD9wRO0w+kyCyX9n1YuED0WZGIH8GH4=", "ref": "refs/heads/main", - "rev": "5517cc506b2754cb2485b1bf3e46918ee638ea6d", - "revCount": 4760, + "rev": "cb63398f079b4b4324c04e2e41ba17983d66487c", + "revCount": 4829, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -510,6 +496,10 @@ }, "hyprlang": { "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -520,11 +510,11 @@ ] }, "locked": { - "lastModified": 1716473782, - "narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=", + "lastModified": 1717881852, + "narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "87d5d984109c839482b88b4795db073eb9ed446f", + "rev": "ec6938c66253429192274d612912649a0cfe4d28", "type": "github" }, "original": { @@ -533,6 +523,31 @@ "type": "github" } }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1718271409, + "narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -545,11 +560,11 @@ ] }, "locked": { - "lastModified": 1716058375, - "narHash": "sha256-CwjWoVnBZE5SBpRx9dgSQGCr4Goxyfcyv3zZbOhVqzk=", + "lastModified": 1718119275, + "narHash": "sha256-nqDYXATNkyGXVmNMkT19fT4sjtSPBDS1LLOxa3Fueo4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "3afed4364790aebe0426077631af1e164a9650cc", + "rev": "1419520d5f7f38d35e05504da5c1b38212a38525", "type": "github" }, "original": { @@ -568,11 +583,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1717443201, - "narHash": "sha256-a0ZXSNQvklHhUkCnX+4wGN8Bu5WkG+I85h7NcKlehdk=", + "lastModified": 1718313789, + "narHash": "sha256-GFKLeZGIfMmLxeBNQyboh41i7Ca58G0tY0m+aOcxMNs=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "6e921eb567164f4ad46a7c74d665b3dc6223f928", + "rev": "d0bdf31ee9abb22e16cd7ea691da61319cb89990", "type": "github" }, "original": { @@ -607,11 +622,11 @@ ] }, "locked": { - "lastModified": 1716993688, - "narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=", + "lastModified": 1717976995, + "narHash": "sha256-u3HBinyIyUvL1+N816bODpJmSQdgn0Mbb8BprFw7kqo=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4", + "rev": "315aa649ba307704db0b16c92f097a08a65ec955", "type": "github" }, "original": { @@ -627,11 +642,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1717377936, - "narHash": "sha256-6inBsoiYEsTNJExq1G+0imL5pcDx1IkPf7PUqHARwmU=", + "lastModified": 1718328588, + "narHash": "sha256-dTuHdsZkPJg2YS7S/04d5gLpLqCmKEGuJkRO0yHklgo=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "1ae16af500525f1ca1b3295f5ee4e2b1b26f3004", + "rev": "ae25cb00075c72a2a91497814a11a00f567f5f75", "type": "github" }, "original": { @@ -649,11 +664,11 @@ ] }, "locked": { - "lastModified": 1716640344, - "narHash": "sha256-AZKQs+KrL70le0RZH8XqZJMc2SahU4LpfEJ2Vd5SWzM=", + "lastModified": 1717976391, + "narHash": "sha256-STKlWaiiFKDybexvQCg5U1+DSLRaxT93NwVaiBSEvTI=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "020cd466170204e448b24b246045599fce69ad91", + "rev": "e3f215e518d52f6f2e68cf713cefe773284e1aa6", "type": "github" }, "original": { @@ -664,11 +679,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716330097, - "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", + "lastModified": 1718318537, + "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", + "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "type": "github" }, "original": { @@ -710,11 +725,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1718208800, + "narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "cc54fb41d13736e92229c21627ea4f22199fee6b", "type": "github" }, "original": { @@ -744,7 +759,6 @@ "devshell": "devshell", "flake-compat": "flake-compat_3", "flake-parts": "flake-parts", - "flake-root": "flake-root", "git-hooks": "git-hooks", "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", @@ -754,11 +768,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1717444597, - "narHash": "sha256-8enVHsN7hLn1hPkY1U5Cfr3rzij4FsWRUx4jjHUHZQE=", + "lastModified": 1718376125, + "narHash": "sha256-NIJZxmY2CWsqJK/9BQCRSHfcCY9K6thjq/1XtJobxmU=", "owner": "nix-community", "repo": "nixvim", - "rev": "b7a8b0319098fdbaa719ef4dc375337ec4543c6e", + "rev": "7a2a25af02be25987aa43cd681312f4b5ba12317", "type": "github" }, "original": { @@ -769,11 +783,11 @@ }, "nur": { "locked": { - "lastModified": 1717443933, - "narHash": "sha256-hKPYAOnbqvy/eZMsp85KRHn5+K3QkGeU8cyLiXtxT48=", + "lastModified": 1718397909, + "narHash": "sha256-nQd/7GPc4OC0OY+uw0m2BbfXWj41jRoRotsUBarbN04=", "owner": "nix-community", "repo": "NUR", - "rev": "0122b0f415811dd2a367f362a595070b6451ff9a", + "rev": "24123cf5fea48b71954e81b0f4fe5db127109979", "type": "github" }, "original": { @@ -828,11 +842,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1717442957, - "narHash": "sha256-w0fqHofxM2hf3pGDXCPSdH0A09v6FgHm6I38nCWA96k=", + "lastModified": 1718331519, + "narHash": "sha256-6Ru37wS8uec626nHVIh6hSpCYB7eNc3RPFa2U//bhw4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "025e1742de4fa75b3fb63818bd9726d17da6a102", + "rev": "419e7fae2731f41dd9b3e34dfe8802be68558b92", "type": "github" }, "original": { @@ -984,11 +998,11 @@ ] }, "locked": { - "lastModified": 1715940852, - "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=", + "lastModified": 1718139168, + "narHash": "sha256-1TZQcdETNdJMcfwwoshVeCjwWfrPtkSQ8y8wFX3it7k=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b", + "rev": "1cb529bffa880746a1d0ec4e0f5076876af931f1", "type": "github" }, "original": { @@ -999,11 +1013,11 @@ }, "unstable": { "locked": { - "lastModified": 1717196966, - "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "lastModified": 1718318537, + "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", + "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "type": "github" }, "original": { @@ -1068,11 +1082,11 @@ ] }, "locked": { - "lastModified": 1716290197, - "narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=", + "lastModified": 1718272114, + "narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "91e48d6acd8a5a611d26f925e51559ab743bc438", + "rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d", "type": "github" }, "original": { From 43e6060c907de24d2bd23386678054f09875e068 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 14 Jun 2024 17:13:14 -0400 Subject: [PATCH 21/23] chore(nvim): remove autopairs module --- pkgs/nvim/config/default.nix | 1 - pkgs/nvim/config/utils/nvim-autopairs.nix | 5 ----- 2 files changed, 6 deletions(-) delete mode 100644 pkgs/nvim/config/utils/nvim-autopairs.nix diff --git a/pkgs/nvim/config/default.nix b/pkgs/nvim/config/default.nix index d8a133b..a95f326 100644 --- a/pkgs/nvim/config/default.nix +++ b/pkgs/nvim/config/default.nix @@ -60,7 +60,6 @@ ./utils/mini.nix ./utils/neodev.nix ./utils/neotest.nix - ./utils/nvim-autopairs.nix ./utils/nvim-colorizer.nix ./utils/nvim-surround.nix ./utils/oil.nix diff --git a/pkgs/nvim/config/utils/nvim-autopairs.nix b/pkgs/nvim/config/utils/nvim-autopairs.nix deleted file mode 100644 index 2af29dc..0000000 --- a/pkgs/nvim/config/utils/nvim-autopairs.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.nvim-autopairs = { - enable = false; - }; -} From 629b5ce741da0f10dd58c4a4a9086cf057faa481 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 14 Jun 2024 17:13:29 -0400 Subject: [PATCH 22/23] chore(nvim/toggleterm): remove debug print --- pkgs/nvim/config/utils/toggleterm.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/nvim/config/utils/toggleterm.nix b/pkgs/nvim/config/utils/toggleterm.nix index f31229b..1404c3d 100644 --- a/pkgs/nvim/config/utils/toggleterm.nix +++ b/pkgs/nvim/config/utils/toggleterm.nix @@ -40,7 +40,6 @@ row = '' function() local heightFn = ${height} - print(heightFn()) return math.floor((vim.o.lines - heightFn()) / 2) - 1 end ''; From b8efbc8f7d68c0101c0a37f36795a261d03b5347 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Fri, 14 Jun 2024 17:13:46 -0400 Subject: [PATCH 23/23] fix(nvim/cmp): reorganize and comment --- pkgs/nvim/config/completion/cmp.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/nvim/config/completion/cmp.nix b/pkgs/nvim/config/completion/cmp.nix index 012ff9e..c6824e5 100644 --- a/pkgs/nvim/config/completion/cmp.nix +++ b/pkgs/nvim/config/completion/cmp.nix @@ -1,11 +1,5 @@ { plugins = { - cmp-nvim-lsp = {enable = true;}; # lsp - cmp-buffer = {enable = true;}; - copilot-cmp = {enable = true;}; # copilot suggestions - cmp-path = {enable = true;}; # file system paths - cmp_luasnip = {enable = true;}; # snippets - cmp-cmdline = {enable = false;}; # autocomplete for cmdline cmp = { enable = true; autoEnableSources = false; @@ -70,6 +64,13 @@ }; }; }; + + # Completion from Language Server + cmp-nvim-lsp.enable = true; # lsp + # Completion for buffer words + cmp-buffer.enable = true; + # Completion for file system paths + cmp-path.enable = true; }; extraConfigLua = '' luasnip = require("luasnip")