From 8a6cdf76320f24c57d4751250b334ab343398514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 5 Apr 2023 08:51:06 +0200 Subject: [PATCH 01/30] feat(nvim): add comment-box.nvim --- flake.lock | 16 +++++++ flake.nix | 44 ++++++++++++------- .../nvim/plugins/comment-box-nvim.lua | 1 + overlays/vimPlugins.nix | 6 +++ 4 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 modules/programs/nvim/plugins/comment-box-nvim.lua diff --git a/flake.lock b/flake.lock index a20463e..ef05e23 100644 --- a/flake.lock +++ b/flake.lock @@ -98,6 +98,22 @@ "type": "github" } }, + "comment-box-nvim": { + "flake": false, + "locked": { + "lastModified": 1678772374, + "narHash": "sha256-hD9eCcrDsispi+Nvwjy/MlNW0UmFfSbh8arQpCjeneM=", + "owner": "LudoPinelli", + "repo": "comment-box.nvim", + "rev": "6672213bd5d2625a666a297b66307967effa50bc", + "type": "github" + }, + "original": { + "owner": "LudoPinelli", + "repo": "comment-box.nvim", + "type": "github" + } + }, "copilot-lua": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index f0b79cc..85c86a4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,11 @@ { description = "My awesome system config"; - ############## - ### Inputs ### - ############## - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Inputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ inputs = { master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; @@ -66,12 +67,20 @@ advanced-git-search-nvim.url = "github:aaronhallaert/advanced-git-search.nvim"; advanced-git-search-nvim.flake = false; + comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; + comment-box-nvim.flake = false; + attic.url = "github:zhaofengli/attic"; attic.inputs.nixpkgs.follows = "nixpkgs"; attic.inputs.nixpkgs-stable.follows = "stable"; attic.inputs.flake-utils.follows = "flake-utils"; }; + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Outputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ outputs = inputs@{ self, nixpkgs, utils, ... }: utils.lib.mkFlake { @@ -84,10 +93,11 @@ lib = nixpkgs.lib.extend (self: super: { my = import ./lib { lib = self; }; }); - ################ - ### Overlays ### - ################ - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Overlays ║ + ╚══════════════════════════════════════════════════════════╝ + */ overlay = import ./overlays { inherit inputs; inherit (self) lib; @@ -108,10 +118,11 @@ overlays.default = self.overlay; - ############### - ### Modules ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Modules ║ + ╚══════════════════════════════════════════════════════════╝ + */ nixosModules = utils.lib.exportModules [ ./modules/profiles/base.nix ./modules/profiles/gaming.nix @@ -148,10 +159,11 @@ self.nixosModules.gaming ]; - ############### - ### Outputs ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Other Outputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ outputsBuilder = channels: with channels.nixpkgs; { devShells.default = mkShell { diff --git a/modules/programs/nvim/plugins/comment-box-nvim.lua b/modules/programs/nvim/plugins/comment-box-nvim.lua new file mode 100644 index 0000000..e002043 --- /dev/null +++ b/modules/programs/nvim/plugins/comment-box-nvim.lua @@ -0,0 +1 @@ +require("comment-box").setup() diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index b9b6a4c..52630d0 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -31,5 +31,11 @@ with lib.my; version = mkVersionInput inputs.advanced-git-search-nvim; src = inputs.advanced-git-search-nvim; }; + + comment-box-nvim = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "comment-box-nvim"; + version = mkVersionInput inputs.comment-box-nvim; + src = inputs.comment-box-nvim; + }; }; } From f1f1ce943c6ab988fd7583560af76e0346cb5305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 5 Apr 2023 08:52:36 +0200 Subject: [PATCH 02/30] feat!: remove unused input and unneeded comments --- flake.nix | 6 ------ modules/programs/zsh.nix | 6 ------ 2 files changed, 12 deletions(-) diff --git a/flake.nix b/flake.nix index 85c86a4..e580be8 100644 --- a/flake.nix +++ b/flake.nix @@ -25,11 +25,6 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.utils.follows = "flake-utils"; - # Zsh specific - forgit-git.url = "github:wfxr/forgit"; - forgit-git.flake = false; - - # Laptop Touchpad asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; asus-touchpad-numpad-driver.flake = false; @@ -47,7 +42,6 @@ nil.inputs.nixpkgs.follows = "nixpkgs"; nil.inputs.flake-utils.follows = "flake-utils"; - # Hyprland hyprland.url = "github:hyprwm/Hyprland"; hyprpaper.url = "github:hyprwm/hyprpaper"; hypr-contrib.url = "github:hyprwm/contrib"; diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 8088627..50a6050 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -31,12 +31,6 @@ in readlink -f $(which $1) } ''; - plugins = [ - { - name = "forgit"; - src = inputs.forgit-git; - } - ]; }; }; }; From 37c4cc70e3b0269559eeb2414d7809fced9aabf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 5 Apr 2023 08:54:30 +0200 Subject: [PATCH 03/30] build!: update inputs --- flake.lock | 151 ++++++++++++++------------------ flake.nix | 2 +- hosts/nixos-desktop/default.nix | 2 +- modules/config/shell.nix | 2 +- modules/profiles/desktop.nix | 2 +- 5 files changed, 72 insertions(+), 87 deletions(-) diff --git a/flake.lock b/flake.lock index ef05e23..c7b06bd 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advanced-git-search-nvim": { "flake": false, "locked": { - "lastModified": 1677794481, - "narHash": "sha256-7G0WNcaIH1/4Zs4282UdWfRExdlAz6AHzqBlSu/qioQ=", + "lastModified": 1680558870, + "narHash": "sha256-p2G5VWTTlS1VhygwekuZoZ45s/vv+tHYYw8oA7NXpcw=", "owner": "aaronhallaert", "repo": "advanced-git-search.nvim", - "rev": "e36797ade1af3d0404e14db83fd09db4e619e8dc", + "rev": "500be1a583dfac0f7d715107fe29dac18b77ff49", "type": "github" }, "original": { @@ -24,11 +24,11 @@ ] }, "locked": { - "lastModified": 1677969766, - "narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=", + "lastModified": 1680281360, + "narHash": "sha256-XdLTgAzjJNDhAG2V+++0bHpSzfvArvr2pW6omiFfEJk=", "owner": "ryantm", "repo": "agenix", - "rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e", + "rev": "e64961977f60388dd0b49572bb0fc453b871f896", "type": "github" }, "original": { @@ -40,11 +40,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1678691587, - "narHash": "sha256-EGfPa1uGYwQLhM27nyWosJo5Pe4yIhC3JOW0vqajK7w=", + "lastModified": 1680151825, + "narHash": "sha256-EutseXvFnDkYq95GWiGrTFqI4fqybvsPQlVV0Wy5tFU=", "owner": "arkenfox", "repo": "user.js", - "rev": "e2e8c4ea8f9c8034a2ff72fe3c2d4a4a89404c10", + "rev": "c84c419544cbbe4442190cc6325b926b519d8db5", "type": "github" }, "original": { @@ -85,11 +85,11 @@ ] }, "locked": { - "lastModified": 1678041467, - "narHash": "sha256-qqHbiN0ZfEuZ2guMAW5T011TqgrPqGqNWlHtd8AXtQA=", + "lastModified": 1679445945, + "narHash": "sha256-UadTIRRA/okmLmdM+OzhCwSoovr72Pq0+3Tt7CAyYcg=", "owner": "zhaofengli", "repo": "attic", - "rev": "1a3b6513b02202198bb497608d0cedc45119799b", + "rev": "4d92e69fc1b279676f997e6b99d2cacc4d0a3e87", "type": "github" }, "original": { @@ -117,11 +117,11 @@ "copilot-lua": { "flake": false, "locked": { - "lastModified": 1677479736, - "narHash": "sha256-n/SCrzzzL5WUHJk0sCXbgGusk/dQuy8DI9Pqdh+lVeQ=", + "lastModified": 1680027228, + "narHash": "sha256-3u+2azMRm24mp5iOrxwYg9QrM2xJHnSjGsldIDRS6HQ=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "b41d4c9c7d4f5e0272bcf94061b88e244904c56f", + "rev": "f0b41fb89ef2ed7ab4e8cd5208a30755aa638fc4", "type": "github" }, "original": { @@ -361,22 +361,6 @@ "type": "github" } }, - "forgit-git": { - "flake": false, - "locked": { - "lastModified": 1677621471, - "narHash": "sha256-merUZ0IQ/qmDkquGFjKvc4vJBj4Ff62JpWYOB67lAVY=", - "owner": "wfxr", - "repo": "forgit", - "rev": "801239658718863b9c6e0ba21d027cb0caccd465", - "type": "github" - }, - "original": { - "owner": "wfxr", - "repo": "forgit", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -430,11 +414,11 @@ ] }, "locked": { - "lastModified": 1678886248, - "narHash": "sha256-ff81NJtc+AgQhUlTCkx8t8hda0o72vSxDeHVGrfxH70=", + "lastModified": 1680597706, + "narHash": "sha256-ZqJ3T+BxzjPH9TnmeUwS4Uu9ZQPeBXAFC9sUWlharT4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2bd74d92bc7345f323ebcbfeb631d5cf4067ed8e", + "rev": "ec06f419af79207b33d797064dfb3fc9dbe1df4a", "type": "github" }, "original": { @@ -470,11 +454,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1677679546, - "narHash": "sha256-L+QE6hIHxhYHWPA1jfgZsbQFYxheD/hzFhtwGFRdWOk=", + "lastModified": 1679036674, + "narHash": "sha256-2s3Hfq56jL8ePyc3+calPT34FNMK2zksqwPhIxAq20o=", "owner": "hyprwm", "repo": "contrib", - "rev": "d4eccc8e7d31d30c7ce39dc2b864c4f23f173855", + "rev": "1af47a008e850c595aeddc83bb3f04fd81935caa", "type": "github" }, "original": { @@ -491,11 +475,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1678899680, - "narHash": "sha256-o+bo+n1HYvYJVnOG/Y/nnxdx4Lu1oFgVyrHemBbT2sE=", + "lastModified": 1680616746, + "narHash": "sha256-y+0NkdRSmZonUhBsvPG+9BCOfIgZzGXxLfAuzo/3ULU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f5669a7d6bdb54d21426f6aa31a66fe813fc4e7d", + "rev": "6519c0308c4dd6ab484c7854e1eca2dc8f400485", "type": "github" }, "original": { @@ -530,11 +514,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1678893556, - "narHash": "sha256-FHhBetkV/S7M9BMpbCzUWX/P5E7tGE4mZIpj/2m0K2M=", + "lastModified": 1680428635, + "narHash": "sha256-/Kz4Qy+jx1+bfSq6e2W3MbyODkhs6GqKiiybNtqzvbc=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "61961973cfd10853b32c7f904cdb88f9ab6d84dd", + "rev": "db56f164dd4d6bba8f606fd49885cdbe9803fe9b", "type": "github" }, "original": { @@ -546,11 +530,11 @@ "lspsaga-nvim": { "flake": false, "locked": { - "lastModified": 1678361457, - "narHash": "sha256-nrsMdfF43k0RavCq2hZ799HpY/40O0bi4kAM18dR+f4=", + "lastModified": 1680586822, + "narHash": "sha256-396xNjMoMvfpHGqu27JuTTafKepWGkHG29TjV8taHZY=", "owner": "glepnir", "repo": "lspsaga.nvim", - "rev": "db6cdf51bf5ae45e4aa65760e597cf0d587c66ee", + "rev": "fb476086012e18e0001c3dcc5b18fd34a847e5fe", "type": "github" }, "original": { @@ -561,11 +545,11 @@ }, "master": { "locked": { - "lastModified": 1678898370, - "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", + "lastModified": 1680625698, + "narHash": "sha256-GLsNwSn8OqtE5qaw5viQR+iF3YSoS4dA4PIA+5nI7kg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ac718d02867a84b42522a0ece52d841188208f2c", + "rev": "5c54bec2de3a5cf005be903a5f3e33d0c9988c35", "type": "github" }, "original": { @@ -581,17 +565,18 @@ }, "locked": { "dir": "contrib", - "lastModified": 1678886704, - "narHash": "sha256-eSeJva5Wg9Dlccc9eLR/iPunQPpzHAYh6eGjPCJnnPE=", + "lastModified": 1680264322, + "narHash": "sha256-nv1lSK+y/vv6ASMhNFoJE1YcNisJmQ0A+anNLzscvKk=", "owner": "neovim", "repo": "neovim", - "rev": "5a38e951ec1532ba1ee8b35b42181003866d479c", + "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", "type": "github" }, "original": { "dir": "contrib", "owner": "neovim", "repo": "neovim", + "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", "type": "github" } }, @@ -606,11 +591,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1678728829, - "narHash": "sha256-KbA8uakGfjfvRH+Td/VegiLdHrnqIZHkMTQ5XBjL2dE=", + "lastModified": 1680544266, + "narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=", "owner": "oxalica", "repo": "nil", - "rev": "e7045f1779fd202a3316f84b864c304f339cccea", + "rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362", "type": "github" }, "original": { @@ -653,11 +638,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", "type": "github" }, "original": { @@ -701,11 +686,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1677676435, - "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=", + "lastModified": 1680487167, + "narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169", + "rev": "53dad94e874c9586e71decf82d972dfb640ef044", "type": "github" }, "original": { @@ -749,11 +734,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1678843226, - "narHash": "sha256-TkA5tsC8N38HNgaI/odBbSOJWkUrD1uIB2A7Yms72Is=", + "lastModified": 1680577567, + "narHash": "sha256-Y4W57i0TzczqwMTjfVSbAZT5RJx7u+mpQIW/ofrkTQs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "abb2ade261c33516716aa21068d8c10c48d03367", + "rev": "b01f185e4866de7c5b5a82f833ca9ea3c3f72fc4", "type": "github" }, "original": { @@ -765,11 +750,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1671271357, - "narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=", + "lastModified": 1678898370, + "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "40f79f003b6377bd2f4ed4027dde1f8f922995dd", + "rev": "ac718d02867a84b42522a0ece52d841188208f2c", "type": "github" }, "original": { @@ -857,11 +842,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", + "lastModified": 1680599552, + "narHash": "sha256-rQQJFGvWQ3Sr+m/r5KGIFN0iVaVKr6u9uraCz6jSKj4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", + "rev": "3342d7c51119030490fdcd07351b53b10806891c", "type": "github" }, "original": { @@ -877,10 +862,10 @@ "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "attic": "attic", + "comment-box-nvim": "comment-box-nvim", "copilot-lua": "copilot-lua", "emacs": "emacs", "flake-utils": "flake-utils_3", - "forgit-git": "forgit-git", "home-manager": "home-manager", "howdy": "howdy", "hypr-contrib": "hypr-contrib", @@ -937,11 +922,11 @@ ] }, "locked": { - "lastModified": 1678415622, - "narHash": "sha256-tems1jHETCYEen8QrW61yVVX0F4zOGy4ImB43iDc7bY=", + "lastModified": 1680488274, + "narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9f687941160108f89dd8bd2c650d32c15a35c7c7", + "rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8", "type": "github" }, "original": { @@ -953,11 +938,11 @@ "smartcolumn-nvim": { "flake": false, "locked": { - "lastModified": 1677732751, - "narHash": "sha256-uu9h5Pjw05IokTbJxrVlavZXpm3Ny6jrmhcHXzvwngU=", + "lastModified": 1679417638, + "narHash": "sha256-DjPWBOLbzdfOQAx+6xgV1CD5NKuP1N6An2lmHNHd39Q=", "owner": "m4xshen", "repo": "smartcolumn.nvim", - "rev": "6e16c7d1b5e8bf4cb7ddcab5c91745190e80e99d", + "rev": "0c572e3eae48874f25b74394a486f38cadb5c958", "type": "github" }, "original": { @@ -968,11 +953,11 @@ }, "stable": { "locked": { - "lastModified": 1678761643, - "narHash": "sha256-tapXZvg6Kg5Fm7Fm6i+7cRC5Exp2lX7cgMrqsfrGhuc=", + "lastModified": 1680498889, + "narHash": "sha256-4nGFBm+oILOO6DPoKTPxVlfkZSxCOY4W25zSRHESK48=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c4aec3c021620d98861639946123214207e98344", + "rev": "799d153e4f316143a9db0eb869ecf44d8d4c0356", "type": "github" }, "original": { @@ -1006,11 +991,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1677789111, - "narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=", + "lastModified": 1680044309, + "narHash": "sha256-OojM0I5vpipp4HDxx8TVrW+ASt3KNBRBeyXl3BzyKTo=", "owner": "wlroots", "repo": "wlroots", - "rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05", + "rev": "89dcecba39d4f49b673f2fa976354c91413a4c3f", "type": "gitlab" }, "original": { diff --git a/flake.nix b/flake.nix index e580be8..2be2925 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main"; - neovim.url = "github:neovim/neovim?dir=contrib"; + neovim.url = "github:neovim/neovim/83bfd94d1df5eecb8e4069a227c7d24598636d63?dir=contrib"; # HACK to fix neovim not building at the moment nil.url = "github:oxalica/nil"; nil.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index f5a34bf..377c478 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -15,7 +15,7 @@ my.programs.hyprland.nvidiaSupport = true; # KERNEL - boot.kernelPackages = pkgs.linuxPackages_6_1; # HACK to get nvidia kernel package to build + boot.kernelPackages = pkgs.linuxPackages_latest; # BOOT boot = { diff --git a/modules/config/shell.nix b/modules/config/shell.nix index b277bca..c491d49 100644 --- a/modules/config/shell.nix +++ b/modules/config/shell.nix @@ -17,7 +17,7 @@ in }; aliases = mkOption { default = { }; - type = with types; attrsOf (nullOr (either str path)); + type = with types; attrsOf str; }; variables = mkOption { default = { }; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 71732d3..7241498 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -116,7 +116,7 @@ with lib; { calibre jellyfin-media-player keepassxc - libreoffice + stable.libreoffice # HACK to fix build error pavucontrol stable.signal-desktop tlaplusToolbox From 5c2cb5feb4fdfed8f457849038e34729bb6884cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:26:03 +0200 Subject: [PATCH 04/30] feat(desktop): replace redshift with gammastep --- modules/profiles/desktop.nix | 2 +- modules/services/default.nix | 2 +- modules/services/gammastep.nix | 17 +++++++++++++++++ modules/services/redshift.nix | 17 ----------------- 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 modules/services/gammastep.nix delete mode 100644 modules/services/redshift.nix diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 7241498..29d9f23 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -97,7 +97,7 @@ with lib; { mullvad.enable = true; openconnect.enable = true; printing.enable = true; - redshift.enable = true; + gammastep.enable = true; wireguard.enable = true; }; }; diff --git a/modules/services/default.nix b/modules/services/default.nix index d63a582..2ec3a7f 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -10,7 +10,7 @@ ./openconnect.nix ./picom.nix ./printing.nix - ./redshift.nix + ./gammastep.nix ./wireguard.nix ]; } diff --git a/modules/services/gammastep.nix b/modules/services/gammastep.nix new file mode 100644 index 0000000..d951c1d --- /dev/null +++ b/modules/services/gammastep.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.my.services.gammastep; +in +{ + options.my.services.gammastep.enable = mkEnableOption "gammastep"; + + config = lib.mkIf cfg.enable { + home-manager.users.moritz.services.gammastep = { + enable = true; + latitude = 52.3; + longitude = 12.4; + }; + }; +} diff --git a/modules/services/redshift.nix b/modules/services/redshift.nix deleted file mode 100644 index 6e75b5e..0000000 --- a/modules/services/redshift.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.my.services.redshift; -in -{ - options.my.services.redshift.enable = mkEnableOption "redshift"; - - config = lib.mkIf cfg.enable { - services.redshift.enable = true; - location = { - latitude = 52.3; - longitude = 12.4; - }; - }; -} From e949f942de7ee0133274c9b8d49d8a94358973b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:27:34 +0200 Subject: [PATCH 05/30] feat(nvim): add keybinds for gitsigns --- .../programs/nvim/plugins/gitsigns-nvim.lua | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/programs/nvim/plugins/gitsigns-nvim.lua b/modules/programs/nvim/plugins/gitsigns-nvim.lua index d16d238..3cdce95 100644 --- a/modules/programs/nvim/plugins/gitsigns-nvim.lua +++ b/modules/programs/nvim/plugins/gitsigns-nvim.lua @@ -1 +1,22 @@ require("gitsigns").setup() +require("which-key").register({ + ["["] = { + h = { "Gitsigns prev_hunk", "Previous hunk" }, + }, + ["]"] = { + h = { "Gitsigns next_hunk", "Next hunk" }, + }, +}) +require("which-key").register({ + h = { + name = "hunk", + s = { "Gitsigns stage_hunk", "Stage hunk", mode = { "n", "v" } }, + r = { "Gitsigns reset_hunk", "Reset hunk", mode = { "n", "v" } }, + S = { "Gitsigns stage_buffer", "Stage buffer" }, + R = { "Gitsigns reset_buffer", "Reset buffer" }, + u = { "Gitsigns undo_stage_hunk", "Undo stage hunk" }, + }, +}, { prefix = "g" }) +require("which-key").register({ + h = { ":Gitsigns select_hunk", "Gitsigns select hunk" }, +}, { prefix = "i", mode = { "o", "x" } }) From d1159b1ea9b6fe02e5894d2bb7ef6b5be06fa58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:28:25 +0200 Subject: [PATCH 06/30] feat(nvim)!: replace nvim tree with neotree --- .../programs/nvim/plugins/neo-tree-nvim.lua | 195 ++++++++++++++++++ .../programs/nvim/plugins/nvim-tree-lua.lua | 10 - 2 files changed, 195 insertions(+), 10 deletions(-) create mode 100644 modules/programs/nvim/plugins/neo-tree-nvim.lua delete mode 100644 modules/programs/nvim/plugins/nvim-tree-lua.lua diff --git a/modules/programs/nvim/plugins/neo-tree-nvim.lua b/modules/programs/nvim/plugins/neo-tree-nvim.lua new file mode 100644 index 0000000..3cc61c3 --- /dev/null +++ b/modules/programs/nvim/plugins/neo-tree-nvim.lua @@ -0,0 +1,195 @@ +-- Unless you are still migrating, remove the deprecated commands from v1.x +vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) + +require("neo-tree").setup({ + close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab + popup_border_style = "rounded", + enable_git_status = true, + enable_diagnostics = true, + open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes + sort_case_insensitive = false, -- used when sorting files and directories in the tree + sort_function = nil, -- use a custom function for sorting files and directories in the tree + -- sort_function = function (a,b) + -- if a.type == b.type then + -- return a.path > b.path + -- else + -- return a.type > b.type + -- end + -- end , -- this sorts files and directories descendantly + default_component_configs = { + container = { + enable_character_fade = true, + }, + indent = { + indent_size = 2, + padding = 1, -- extra padding on left hand side + -- indent guides + with_markers = true, + indent_marker = "│", + last_indent_marker = "└", + highlight = "NeoTreeIndentMarker", + -- expander config, needed for nesting files + with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders + expander_collapsed = "", + expander_expanded = "", + expander_highlight = "NeoTreeExpander", + }, + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "ﰊ", + -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there + -- then these will never be used. + default = "*", + highlight = "NeoTreeFileIcon", + }, + modified = { + symbol = "[+]", + highlight = "NeoTreeModified", + }, + name = { + trailing_slash = false, + use_git_status_colors = true, + highlight = "NeoTreeFileName", + }, + git_status = { + symbols = { + -- Change type + added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name + modified = "", -- or "", but this is redundant info if you use git_status_colors on the name + deleted = "✖", -- this can only be used in the git_status source + renamed = "", -- this can only be used in the git_status source + -- Status type + untracked = "", + ignored = "", + unstaged = "", + staged = "", + conflict = "", + }, + }, + }, + window = { + position = "left", + width = 40, + mapping_options = { + noremap = true, + nowait = true, + }, + mappings = { + [""] = "open", + [""] = "revert_preview", + ["P"] = { "toggle_preview", config = { use_float = false } }, + ["S"] = "open_split", + ["s"] = "open_vsplit", + ["t"] = "open_tabnew", + ["C"] = "close_node", + ["z"] = "close_all_nodes", + ["a"] = { + "add", + -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details + -- some commands may take optional config options, see `:h neo-tree-mappings` for details + config = { + show_path = "none", -- "none", "relative", "absolute" + }, + }, + ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. + ["d"] = "delete", + ["r"] = "rename", + ["y"] = "copy_to_clipboard", + ["x"] = "cut_to_clipboard", + ["p"] = "paste_from_clipboard", + ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": + ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". + ["q"] = "close_window", + ["R"] = "refresh", + ["?"] = "show_help", + ["<"] = "prev_source", + [">"] = "next_source", + }, + }, + nesting_rules = {}, + filesystem = { + filtered_items = { + visible = false, -- when true, they will just be displayed differently than normal items + hide_dotfiles = true, + hide_gitignored = true, + hide_hidden = true, -- only works on Windows for hidden files/directories + hide_by_name = { + --"node_modules" + }, + hide_by_pattern = { -- uses glob style patterns + --"*.meta", + --"*/src/*/tsconfig.json", + }, + always_show = { -- remains visible even if other settings would normally hide it + --".gitignored", + }, + never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show + --".DS_Store", + --"thumbs.db" + }, + never_show_by_pattern = { -- uses glob style patterns + --".null-ls_*", + }, + }, + follow_current_file = false, -- This will find and focus the file in the active buffer every + -- time the current file is changed while the tree is open. + group_empty_dirs = false, -- when true, empty folders will be grouped together + hijack_netrw_behavior = "disabled", -- netrw disabled, opening a directory opens neo-tree + -- in whatever position is specified in window.position + -- "open_current", -- netrw disabled, opening a directory opens within the + -- window like netrw would, regardless of window.position + -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs + use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes + -- instead of relying on nvim autocmd events. + window = { + mappings = { + [""] = "navigate_up", + ["."] = "set_root", + ["H"] = "toggle_hidden", + ["/"] = "fuzzy_finder", + ["D"] = "fuzzy_finder_directory", + ["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm + ["f"] = "filter_on_submit", + [""] = "clear_filter", + ["[g"] = "prev_git_modified", + ["]g"] = "next_git_modified", + }, + fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode + [""] = "move_cursor_up", + [""] = "move_cursor_down", + }, + }, + }, + buffers = { + follow_current_file = true, -- This will find and focus the file in the active buffer every + -- time the current file is changed while the tree is open. + group_empty_dirs = true, -- when true, empty folders will be grouped together + show_unloaded = true, + window = { + mappings = { + ["bd"] = "buffer_delete", + [""] = "navigate_up", + ["."] = "set_root", + }, + }, + }, + git_status = { + window = { + position = "float", + mappings = { + ["A"] = "git_add_all", + ["gu"] = "git_unstage_file", + ["ga"] = "git_add_file", + ["gr"] = "git_revert_file", + ["gc"] = "git_commit", + ["gp"] = "git_push", + ["gg"] = "git_commit_and_push", + }, + }, + }, +}) + +require("which-key").register({ + t = { "Neotree toggle reveal", "Neotree" }, +}, { prefix = "t", silent = true }) diff --git a/modules/programs/nvim/plugins/nvim-tree-lua.lua b/modules/programs/nvim/plugins/nvim-tree-lua.lua deleted file mode 100644 index a8634bc..0000000 --- a/modules/programs/nvim/plugins/nvim-tree-lua.lua +++ /dev/null @@ -1,10 +0,0 @@ --- disable netrw at the very start of your init.lua (strongly advised) -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 --- set termguicolors to enable highlight groups -vim.opt.termguicolors = true --- empty setup using defaults -require("nvim-tree").setup() -require("which-key").register({ - t = { "NvimTreeFindFileToggle", "nvim tree" }, -}, { prefix = "t", silent = true }) From 66652a650cfad056d966ac0b978ee28d29a6a016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:31:14 +0200 Subject: [PATCH 07/30] feat(nvim): improve/add keybinds --- modules/programs/nvim/init.lua | 28 +++++------ modules/programs/nvim/keybinds.lua | 50 ++++++++++++++++++- .../programs/nvim/plugins/telescope-nvim.lua | 21 ++++++-- .../nvim/plugins/telescope-zoxide.lua | 4 +- 4 files changed, 78 insertions(+), 25 deletions(-) diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 8f97399..17bcb48 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -175,8 +175,6 @@ local on_attach_def = function(_, bufnr) l = { name = "lsp", d = { "Lspsaga show_cursor_diagnostics", "open diagnostic window" }, - n = { "Lspsaga diagnostic_jump_next", "next error" }, - p = { "Lspsaga diagnostic_jump_prev", "prev error" }, c = { "Lspsaga code_action", "code action" }, r = { "Lspsaga rename", "rename" }, i = { "Lspsaga hover_doc ++keep", "show info (sticky)" }, @@ -188,17 +186,6 @@ local on_attach_def = function(_, bufnr) mode = { "n", "v" }, }, }, - w = { - name = "workspace", - a = { vim.lsp.buf.add_workspace_folder, "add workspace folder" }, - r = { vim.lsp.buf.remove_workspace_folder, "remove workspace folder" }, - l = { - function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, - "list workspace folders", - }, - }, t = { name = "toggle", l = { lsp_lines.toggle, "lsp lines" }, @@ -206,9 +193,18 @@ local on_attach_def = function(_, bufnr) }, g = { name = "goto", - d = { "Lspsaga peek_definition", "definition" }, - t = { "Lspsaga peek_type_definition", "type defininition" }, - h = { "Lspsaga lsp_finder", "lsp finder" }, + d = { "Lspsaga peek_definition", "Goto definition" }, + t = { "Lspsaga peek_type_definition", "Goto type defininition" }, + h = { "Lspsaga lsp_finder", "Lsp finder" }, + r = { "Telescope lsp_references", "Goto reference" }, + D = { vim.lsp.buf.declaration, "Goto declaration" }, + I = { "Telescope lsp_implementations", "Goto implementation" }, + }, + ["["] = { + d = { "Lspsaga diagnostic_jump_prev", "Previous diagnostic" }, + }, + ["]"] = { + d = { "Lspsaga diagnostic_jump_next", "Next diagnostic" }, }, }, { buffer = bufnr, silent = true }) end diff --git a/modules/programs/nvim/keybinds.lua b/modules/programs/nvim/keybinds.lua index 52ae2e2..039104d 100644 --- a/modules/programs/nvim/keybinds.lua +++ b/modules/programs/nvim/keybinds.lua @@ -1,7 +1,7 @@ --- buffers +-- buffer require("which-key").register({ b = { - name = "buffers", + name = "buffer", b = { "Telescope buffers", "List buffers" }, d = { "bd", "Delete buffer" }, n = { "bnext", "Next buffer" }, @@ -9,6 +9,52 @@ require("which-key").register({ }, }) +-- window +require("which-key").register({ + w = { + name = "window", + ["|"] = { "v", "Split window horizontally" }, + ["-"] = { "s", "Split window vertically" }, + w = { "w", "Switch window" }, + d = { "c", "Delete window" }, + }, +}, { prefix = "" }) + +-- fast window move +require("which-key").register({ + [""] = { "h", "Move window left" }, + [""] = { "j", "Move window down" }, + [""] = { "k", "Move window up" }, + [""] = { "l", "Move window right" }, +}) + +-- tab +require("which-key").register({ + [""] = { + name = "tab", + [""] = { "tabnew", "New tab" }, + n = { "tabnext", "Next tab" }, + p = { "tabprevious", "Previous tab" }, + d = { "tabclose", "Close tab" }, + }, +}, { prefix = "" }) + +-- file +require("which-key").register({ + f = { + name = "file/find", + n = { "enew", "New file" }, + }, +}, { prefix = "" }) + +-- better descriptions for navigation +require("which-key").register({ + ["["] = { name = "prev" }, + ["]"] = { name = "next" }, + o = { name = "org" }, + x = { name = "diagnostics/quickfix" }, +}) + -- Clear search with require("which-key").register({ [""] = { "noh", "Escape and clear hlsearch", mode = { "n", "i" } }, diff --git a/modules/programs/nvim/plugins/telescope-nvim.lua b/modules/programs/nvim/plugins/telescope-nvim.lua index d83cec4..cfb87c8 100644 --- a/modules/programs/nvim/plugins/telescope-nvim.lua +++ b/modules/programs/nvim/plugins/telescope-nvim.lua @@ -1,9 +1,20 @@ require("which-key").register({ f = { - name = "find", - f = { "Telescope find_files", "find file" }, - l = { "Telescope current_buffer_fuzzy_find", "find line" }, - g = { "Telescope live_grep", "live grep" }, - b = { "Telescope buffers", "find buffer" }, + name = "file/find", + f = { "Telescope find_files", "Find files" }, + b = { "Telescope buffers", "Find buffers" }, + r = { "Telescope oldfiles", "Find recent files" }, + }, + s = { + name = "search", + l = { "Telescope current_buffer_fuzzy_find", "Search lines" }, + g = { "Telescope live_grep", "Live grep" }, + c = { "Telescope command_history", "Command history" }, + C = { "Telescope commands", "Commands" }, + d = { "Telescope diagnostics", "Diagnostics" }, + h = { "Telescope help_tags", "Help tags" }, + k = { "Telescope keymaps", "Keymaps" }, + s = { "Telescope lsp_document_symbols", "Symbols (Document)" }, + S = { "Telescope lsp_workspace_symbols", "Symbols (Workspace)" }, }, }, { prefix = "" }) diff --git a/modules/programs/nvim/plugins/telescope-zoxide.lua b/modules/programs/nvim/plugins/telescope-zoxide.lua index bb8f7f1..cd2c5af 100644 --- a/modules/programs/nvim/plugins/telescope-zoxide.lua +++ b/modules/programs/nvim/plugins/telescope-zoxide.lua @@ -1,7 +1,7 @@ require("telescope").load_extension("zoxide") require("which-key").register({ f = { - name = "find", - z = { "Telescope zoxide list", "find location" }, + name = "file/find", + z = { "Telescope zoxide list", "Find location (Zoxide)" }, }, }, { prefix = "" }) From 1a71d118c4ff0b16a0667e68099a1571acd6feaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:31:52 +0200 Subject: [PATCH 08/30] feat(nvim)!: remove advanced git search --- .../nvim/plugins/advanced-git-search-nvim.lua | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 modules/programs/nvim/plugins/advanced-git-search-nvim.lua diff --git a/modules/programs/nvim/plugins/advanced-git-search-nvim.lua b/modules/programs/nvim/plugins/advanced-git-search-nvim.lua deleted file mode 100644 index 9959064..0000000 --- a/modules/programs/nvim/plugins/advanced-git-search-nvim.lua +++ /dev/null @@ -1,18 +0,0 @@ -require("telescope").load_extension("advanced_git_search") -local advanced_git_search = require("telescope").extensions.advanced_git_search -vim.api.nvim_create_user_command( - "DiffCommitLine", - "lua require('telescope').extensions.advanced_git_search.diff_commit_line()", - { range = true } -) -require("which-key").register({ - g = { - name = "git", - b = { advanced_git_search.diff_branch_file, "diff branch file" }, - l = { vim.cmd.DiffCommitLine, "diff commit line", mode = "v" }, - f = { advanced_git_search.diff_commit_file, "diff commit file" }, - c = { advanced_git_search.search_log_content, "search log content" }, - C = { advanced_git_search.search_log_content_file, "search log content current file" }, - r = { advanced_git_search.checkout_reflog, "checkout reflog" }, - }, -}, { prefix = "" }) From 929773f3e8999404faa0460fae8685c9093bbd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:32:37 +0200 Subject: [PATCH 09/30] feat(nvim): add vim startuptime --- modules/programs/nvim/plugins/vim-startuptime.lua | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 modules/programs/nvim/plugins/vim-startuptime.lua diff --git a/modules/programs/nvim/plugins/vim-startuptime.lua b/modules/programs/nvim/plugins/vim-startuptime.lua new file mode 100644 index 0000000..2091837 --- /dev/null +++ b/modules/programs/nvim/plugins/vim-startuptime.lua @@ -0,0 +1,2 @@ +vim.g.startuptime_tries = 10 +vim.g.startuptime_exe_path = "vim" From bc12d257f196bf465bc9e8d8805b830f6c3e7a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:33:31 +0200 Subject: [PATCH 10/30] feat(nvim): add trouble nvim --- .../programs/nvim/plugins/trouble-nvim.lua | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 modules/programs/nvim/plugins/trouble-nvim.lua diff --git a/modules/programs/nvim/plugins/trouble-nvim.lua b/modules/programs/nvim/plugins/trouble-nvim.lua new file mode 100644 index 0000000..9a98571 --- /dev/null +++ b/modules/programs/nvim/plugins/trouble-nvim.lua @@ -0,0 +1,38 @@ +require("trouble").setup() +require("which-key").register({ + x = { "TroubleToggle document_diagnostics", "Document Diagnostics (Trouble)" }, + X = { "TroubleToggle workspace_diagnostics", "Workspace Diagnostics (Troule)" }, + l = { "TroubleToggle loclist", "Location List (Trouble)" }, + q = { "TroubleToggle quickfix", "Quickfix List (Trouble)" }, + t = { "TodoTrouble", "Todo (Trouble)" }, + T = { "TodoTrouble keywords=TODO,FIX,FIXME", "Todo/Fix/Fixme (Trouble)" }, +}, { prefix = "x" }) +require("which-key").register({ + t = { "TodoTelescope", "Todo" }, +}, { prefix = "s" }) +require("which-key").register({ + ["["] = { + q = { + function() + if require("trouble").is_open() then + require("trouble").previous({ skip_groups = true, jump = true }) + else + vim.cmd.cprev() + end + end, + "Previous trouble/quickfix item", + }, + }, + ["]"] = { + q = { + function() + if require("trouble").is_open() then + require("trouble").next({ skip_groups = true, jump = true }) + else + vim.cmd.cnext() + end + end, + "Next trouble/quickfix item", + }, + }, +}) From c5d1d1262ca3082fec9b39e075ddd5a18bfecaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:34:18 +0200 Subject: [PATCH 11/30] feat(nvim): add zen mode and twilight --- modules/programs/nvim/plugins/twilight-nvim.lua | 3 +++ modules/programs/nvim/plugins/zen-mode-nvim.lua | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 modules/programs/nvim/plugins/twilight-nvim.lua create mode 100644 modules/programs/nvim/plugins/zen-mode-nvim.lua diff --git a/modules/programs/nvim/plugins/twilight-nvim.lua b/modules/programs/nvim/plugins/twilight-nvim.lua new file mode 100644 index 0000000..f45d021 --- /dev/null +++ b/modules/programs/nvim/plugins/twilight-nvim.lua @@ -0,0 +1,3 @@ +require("twilight").setup({ + context = 20, +}) diff --git a/modules/programs/nvim/plugins/zen-mode-nvim.lua b/modules/programs/nvim/plugins/zen-mode-nvim.lua new file mode 100644 index 0000000..bacce51 --- /dev/null +++ b/modules/programs/nvim/plugins/zen-mode-nvim.lua @@ -0,0 +1,4 @@ +require("zen-mode").setup() +require("which-key").register({ + z = { "ZenMode", "Zen mode" }, +}, { prefix = "t" }) From 07e12949374cfb7467f8bb9c7c7bd925461f0ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:35:04 +0200 Subject: [PATCH 12/30] refactor: remove empty table --- modules/programs/nvim/plugins/nvim-surround.lua | 2 +- modules/programs/nvim/plugins/todo-comments-nvim.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/nvim/plugins/nvim-surround.lua b/modules/programs/nvim/plugins/nvim-surround.lua index f2499fd..8a06dad 100644 --- a/modules/programs/nvim/plugins/nvim-surround.lua +++ b/modules/programs/nvim/plugins/nvim-surround.lua @@ -1 +1 @@ -require("nvim-surround").setup({}) +require("nvim-surround").setup() diff --git a/modules/programs/nvim/plugins/todo-comments-nvim.lua b/modules/programs/nvim/plugins/todo-comments-nvim.lua index ae7ceee..57fce71 100644 --- a/modules/programs/nvim/plugins/todo-comments-nvim.lua +++ b/modules/programs/nvim/plugins/todo-comments-nvim.lua @@ -1 +1 @@ -require("todo-comments").setup({}) +require("todo-comments").setup() From e154f827fd6446e29f7bd1f740af74d8d3d8a56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 9 Apr 2023 19:39:17 +0200 Subject: [PATCH 13/30] refactor(nvim): use builtin table merge function --- modules/programs/nvim/init.lua | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 17bcb48..d020a0e 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -69,34 +69,6 @@ vim.api.nvim_create_autocmd("InsertEnter", { end, }) ----merge tables ----@param ... table[] ----@return table -local function table_merge(...) - local tables_to_merge = { ... } - assert(#tables_to_merge > 1, "There should be at least two tables to merge them") - - for k, t in ipairs(tables_to_merge) do - assert(type(t) == "table", string.format("Expected a table as function parameter %d", k)) - end - - local result = tables_to_merge[1] - - for i = 2, #tables_to_merge do - local from = tables_to_merge[i] - for k, v in pairs(from) do - if type(v) == "table" then - result[k] = result[k] or {} - result[k] = table_merge(result[k], v) - else - result[k] = v - end - end - end - - return result -end - local lsp_lines = require("lsp_lines") lsp_lines.setup() -- Disable virtual_text since it's redundant due to lsp_lines. @@ -222,7 +194,7 @@ local lspconfig_default_options = { ---@param options table ---@return nil local function lspconfig_setup(lsp, options) - local final_options = table_merge(lspconfig_default_options, options) + local final_options = vim.tbl_deep_extend("force", lspconfig_default_options, options) lspconfig[lsp].setup(final_options) end From 7b9674969a2aa1d95d6170224cb7449d0a4c6108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 01:05:25 +0200 Subject: [PATCH 14/30] feat(nvim): add null ls --- modules/programs/nvim/default.nix | 3 + .../programs/nvim/plugins/null-ls-nvim.lua | 58 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 modules/programs/nvim/plugins/null-ls-nvim.lua diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 74e0c28..8c66316 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -49,14 +49,17 @@ in extraPackages = with pkgs; [ alejandra black + deadnix isort jq nil nixpkgs-fmt nodePackages.bash-language-server + nodePackages.cspell rustfmt shellcheck shfmt + statix stylua sumneko-lua-language-server taplo diff --git a/modules/programs/nvim/plugins/null-ls-nvim.lua b/modules/programs/nvim/plugins/null-ls-nvim.lua new file mode 100644 index 0000000..e8d0931 --- /dev/null +++ b/modules/programs/nvim/plugins/null-ls-nvim.lua @@ -0,0 +1,58 @@ +local null_ls = require("null-ls") + +null_ls.setup({ + sources = { + -- Code actions + null_ls.builtins.code_actions.cspell, + null_ls.builtins.code_actions.gitsigns, + null_ls.builtins.code_actions.shellcheck, + null_ls.builtins.code_actions.statix, + -- Completion + null_ls.builtins.completion.spell, + -- Diagnostics + null_ls.builtins.diagnostics.cspell, + null_ls.builtins.diagnostics.deadnix, + null_ls.builtins.diagnostics.shellcheck, + null_ls.builtins.diagnostics.statix, + }, +}) + +-- disable cspell initially +null_ls.disable("cspell") + +-- make sources toggle able +require("which-key").register({ + n = { + name = "null-ls", + c = { + function() + null_ls.toggle("cspell") + end, + "cspell", + }, + g = { + function() + null_ls.toggle("gitsigns") + end, + "gitsigns", + }, + s = { + function() + null_ls.toggle("shellcheck") + end, + "shellcheck", + }, + S = { + function() + null_ls.toggle("statix") + end, + "statix", + }, + d = { + function() + null_ls.toggle("deadnix") + end, + "deadnix", + }, + }, +}, { prefix = "t" }) From 5a0fbea15cbe37cc4426435419320b320a7ccc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 11:52:13 +0200 Subject: [PATCH 15/30] feat(nvim): replace impatient with new vim loader --- modules/programs/nvim/default.nix | 1 - modules/programs/nvim/init.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 8c66316..c14501d 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -70,7 +70,6 @@ in cmp_luasnip copilot-cmp direnv-vim - impatient-nvim lsp_lines-nvim lspkind-nvim lspsaga-nvim-original diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index d020a0e..02706ab 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -1,4 +1,4 @@ -require("impatient") +vim.loader.enable() require("nvim-treesitter.configs").setup({ sync_install = false, From d90290398493b1f8b54eaf76617897c08655059e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 11:54:27 +0200 Subject: [PATCH 16/30] build!: update inputs --- flake.lock | 119 +++++++++++++------------- flake.nix | 4 - modules/programs/hyprland/default.nix | 7 -- 3 files changed, 60 insertions(+), 70 deletions(-) diff --git a/flake.lock b/flake.lock index c7b06bd..384f5f1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "advanced-git-search-nvim": { - "flake": false, - "locked": { - "lastModified": 1680558870, - "narHash": "sha256-p2G5VWTTlS1VhygwekuZoZ45s/vv+tHYYw8oA7NXpcw=", - "owner": "aaronhallaert", - "repo": "advanced-git-search.nvim", - "rev": "500be1a583dfac0f7d715107fe29dac18b77ff49", - "type": "github" - }, - "original": { - "owner": "aaronhallaert", - "repo": "advanced-git-search.nvim", - "type": "github" - } - }, "agenix": { "inputs": { "darwin": "darwin", @@ -85,11 +69,11 @@ ] }, "locked": { - "lastModified": 1679445945, - "narHash": "sha256-UadTIRRA/okmLmdM+OzhCwSoovr72Pq0+3Tt7CAyYcg=", + "lastModified": 1680646146, + "narHash": "sha256-NH+EhLFYDwLQ01BqfTwGvZAjfmZynnP1xxPjqH0XJss=", "owner": "zhaofengli", "repo": "attic", - "rev": "4d92e69fc1b279676f997e6b99d2cacc4d0a3e87", + "rev": "efa15b9788add910f6e8409dddfb7bb69c2ad201", "type": "github" }, "original": { @@ -302,12 +286,15 @@ } }, "flake-utils_3": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1681037374, + "narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "033b9f258ca96a10e543d4442071f614dc3f8412", "type": "github" }, "original": { @@ -414,11 +401,11 @@ ] }, "locked": { - "lastModified": 1680597706, - "narHash": "sha256-ZqJ3T+BxzjPH9TnmeUwS4Uu9ZQPeBXAFC9sUWlharT4=", + "lastModified": 1680667162, + "narHash": "sha256-2vgxK4j42y73S3XB2cThz1dSEyK9J9tfu4mhuEfAw68=", "owner": "nix-community", "repo": "home-manager", - "rev": "ec06f419af79207b33d797064dfb3fc9dbe1df4a", + "rev": "440faf5ae472657ef2d8cc7756d77b6ab0ace68d", "type": "github" }, "original": { @@ -475,11 +462,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1680616746, - "narHash": "sha256-y+0NkdRSmZonUhBsvPG+9BCOfIgZzGXxLfAuzo/3ULU=", + "lastModified": 1681066980, + "narHash": "sha256-68e+4txZITxbHP9IPYfLm36kOoI+rkMjRCbrPgtdQK8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6519c0308c4dd6ab484c7854e1eca2dc8f400485", + "rev": "f3909cf2bfdd72aff69112f18c920ac6c9ca28f1", "type": "github" }, "original": { @@ -496,11 +483,11 @@ ] }, "locked": { - "lastModified": 1671839510, - "narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=", + "lastModified": 1681065697, + "narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75", + "rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd", "type": "github" }, "original": { @@ -514,11 +501,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1680428635, - "narHash": "sha256-/Kz4Qy+jx1+bfSq6e2W3MbyODkhs6GqKiiybNtqzvbc=", + "lastModified": 1681080114, + "narHash": "sha256-rAKfgQJQRsw4QMOXdxfHIh/d5LPY6HHKBX1KtaPs2No=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "db56f164dd4d6bba8f606fd49885cdbe9803fe9b", + "rev": "4bcedde1dc1a06107ec32c93a937de30f40aa1fc", "type": "github" }, "original": { @@ -530,11 +517,11 @@ "lspsaga-nvim": { "flake": false, "locked": { - "lastModified": 1680586822, - "narHash": "sha256-396xNjMoMvfpHGqu27JuTTafKepWGkHG29TjV8taHZY=", + "lastModified": 1681041449, + "narHash": "sha256-ARbFiwfWsYapFH5p7xSCCe25RFUlUI/h8Jv81XHLBx4=", "owner": "glepnir", "repo": "lspsaga.nvim", - "rev": "fb476086012e18e0001c3dcc5b18fd34a847e5fe", + "rev": "1fbb3e4721354d0d0a20a28bb77b3f83fe68538b", "type": "github" }, "original": { @@ -545,11 +532,11 @@ }, "master": { "locked": { - "lastModified": 1680625698, - "narHash": "sha256-GLsNwSn8OqtE5qaw5viQR+iF3YSoS4dA4PIA+5nI7kg=", + "lastModified": 1681080342, + "narHash": "sha256-7GvJEuGANq9/zk549rf5zoeTyFdsw5irvVLf5crpBnE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5c54bec2de3a5cf005be903a5f3e33d0c9988c35", + "rev": "340acec509d71d0d0decd7a82e7cb52ae4c76065", "type": "github" }, "original": { @@ -686,11 +673,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1680487167, - "narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=", + "lastModified": 1680669251, + "narHash": "sha256-AVNE+0u4HlI3v96KCXE9risH7NKqj0QDLLfSckYXIbA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "53dad94e874c9586e71decf82d972dfb640ef044", + "rev": "9c8ff8b426a8b07b9e0a131ac3218740dc85ba1e", "type": "github" }, "original": { @@ -734,11 +721,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1680577567, - "narHash": "sha256-Y4W57i0TzczqwMTjfVSbAZT5RJx7u+mpQIW/ofrkTQs=", + "lastModified": 1681028957, + "narHash": "sha256-gKWkKT/nFg2d9HZyK7VAjRzkyPfKLx+uIGyWXDw0NB0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b01f185e4866de7c5b5a82f833ca9ea3c3f72fc4", + "rev": "11c129c16f4051ad215ea7b0d297a6c7cf5d24d7", "type": "github" }, "original": { @@ -842,11 +829,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1680599552, - "narHash": "sha256-rQQJFGvWQ3Sr+m/r5KGIFN0iVaVKr6u9uraCz6jSKj4=", + "lastModified": 1680981441, + "narHash": "sha256-Tqr2mCVssUVp1ZXXMpgYs9+ZonaWrZGPGltJz94FYi4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "3342d7c51119030490fdcd07351b53b10806891c", + "rev": "2144d9ddcb550d6dce64a2b44facdc8c5ea2e28a", "type": "github" }, "original": { @@ -857,7 +844,6 @@ }, "root": { "inputs": { - "advanced-git-search-nvim": "advanced-git-search-nvim", "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", @@ -953,11 +939,11 @@ }, "stable": { "locked": { - "lastModified": 1680498889, - "narHash": "sha256-4nGFBm+oILOO6DPoKTPxVlfkZSxCOY4W25zSRHESK48=", + "lastModified": 1680865339, + "narHash": "sha256-H6rmJ1CyJ3Q5ZyoLMYq/UEYMS9Q1orJjRpWiQ47HudE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "799d153e4f316143a9db0eb869ecf44d8d4c0356", + "rev": "0040164e473509b4aee6aedb3b923e400d6df10b", "type": "github" }, "original": { @@ -967,6 +953,21 @@ "type": "github" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { "inputs": { "flake-utils": [ @@ -991,11 +992,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1680044309, - "narHash": "sha256-OojM0I5vpipp4HDxx8TVrW+ASt3KNBRBeyXl3BzyKTo=", + "lastModified": 1680810405, + "narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=", "owner": "wlroots", "repo": "wlroots", - "rev": "89dcecba39d4f49b673f2fa976354c91413a4c3f", + "rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5", "type": "gitlab" }, "original": { @@ -1017,11 +1018,11 @@ ] }, "locked": { - "lastModified": 1673116118, - "narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=", + "lastModified": 1681066882, + "narHash": "sha256-8szxuwDOQcYyS8TZokGpIJYzaTwBQ9pmmcCkeuX2YV8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2", + "rev": "e48165c5637260cf2a88494a112269922dee58de", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2be2925..720ca78 100644 --- a/flake.nix +++ b/flake.nix @@ -58,9 +58,6 @@ lspsaga-nvim.url = "github:glepnir/lspsaga.nvim"; lspsaga-nvim.flake = false; - advanced-git-search-nvim.url = "github:aaronhallaert/advanced-git-search.nvim"; - advanced-git-search-nvim.flake = false; - comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; comment-box-nvim.flake = false; @@ -134,7 +131,6 @@ extraSpecialArgs = { inherit inputs self; }; }; } - inputs.hyprland.nixosModules.default inputs.agenix.nixosModules.age inputs.howdy.nixosModules.default ]; diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 62f4660..5496b13 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -36,13 +36,6 @@ in services.dunst.enable = true; }; - # enable nix module - programs.hyprland = { - enable = true; - package = null; # because we use the home-manager module - }; - - # enable home-manager module home-manager.users.moritz = { # import home-manager module From b1a6d5016a90f874d5b21875bd99e4aeee20450d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 14:36:40 +0200 Subject: [PATCH 17/30] feat(nvim): add gitignore nvim --- flake.lock | 17 +++++++++++++++++ flake.nix | 3 +++ .../programs/nvim/plugins/gitignore-nvim.lua | 3 +++ overlays/vimPlugins.nix | 12 +++++++++--- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 modules/programs/nvim/plugins/gitignore-nvim.lua diff --git a/flake.lock b/flake.lock index 384f5f1..3121f1b 100644 --- a/flake.lock +++ b/flake.lock @@ -370,6 +370,22 @@ "type": "github" } }, + "gitignore-nvim": { + "flake": false, + "locked": { + "lastModified": 1680653909, + "narHash": "sha256-H6IXZTskIAOmp3U57NIT4Of45xXqrX/6VRm1s28S89Y=", + "owner": "wintermute-cell", + "repo": "gitignore.nvim", + "rev": "b61e4a50b78f9a3702a4ed168ab6c9ceba5f6299", + "type": "github" + }, + "original": { + "owner": "wintermute-cell", + "repo": "gitignore.nvim", + "type": "github" + } + }, "gitignore_2": { "inputs": { "nixpkgs": [ @@ -852,6 +868,7 @@ "copilot-lua": "copilot-lua", "emacs": "emacs", "flake-utils": "flake-utils_3", + "gitignore-nvim": "gitignore-nvim", "home-manager": "home-manager", "howdy": "howdy", "hypr-contrib": "hypr-contrib", diff --git a/flake.nix b/flake.nix index 720ca78..96aa0d0 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,9 @@ comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; comment-box-nvim.flake = false; + gitignore-nvim.url = "github:wintermute-cell/gitignore.nvim"; + gitignore-nvim.flake = false; + attic.url = "github:zhaofengli/attic"; attic.inputs.nixpkgs.follows = "nixpkgs"; attic.inputs.nixpkgs-stable.follows = "stable"; diff --git a/modules/programs/nvim/plugins/gitignore-nvim.lua b/modules/programs/nvim/plugins/gitignore-nvim.lua new file mode 100644 index 0000000..9a994df --- /dev/null +++ b/modules/programs/nvim/plugins/gitignore-nvim.lua @@ -0,0 +1,3 @@ +require("which-key").register({ + i = { "Gitignore", "Create .gitignore" }, +}, { prefix = "g" }) diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 52630d0..e065626 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -1,6 +1,6 @@ { inputs, lib }: -final: prev: +_: prev: with lib.my; { vimPlugins = prev.vimPlugins // { @@ -16,12 +16,12 @@ with lib.my; src = inputs.smartcolumn-nvim; }; - copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (old: { + copilot-lua = prev.vimPlugins.copilot-lua.overrideAttrs (_: { version = mkVersionInput inputs.copilot-lua; src = inputs.copilot-lua; }); - lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (old: { + lspsaga-nvim-original = prev.vimPlugins.lspsaga-nvim-original.overrideAttrs (_: { version = mkVersionInput inputs.lspsaga-nvim; src = inputs.lspsaga-nvim; }); @@ -37,5 +37,11 @@ with lib.my; version = mkVersionInput inputs.comment-box-nvim; src = inputs.comment-box-nvim; }; + + gitignore-nvim = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "gitignore-nvim"; + version = mkVersionInput inputs.gitignore-nvim; + src = inputs.gitignore-nvim; + }; }; } From 5fc963c537797690ba3aa4c0105045553ced8093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 15:12:45 +0200 Subject: [PATCH 18/30] refactor!: remove unused modules, bindings, etc. --- flake.lock | 295 ++---------------- flake.nix | 92 +++--- hosts/nixos-desktop/default.nix | 9 +- .../nixos-desktop/hardware-configuration.nix | 1 - hosts/nixos-laptop/default.nix | 8 +- hosts/nixos-laptop/hardware-configuration.nix | 5 +- lib/default.nix | 2 +- modules/config/default.nix | 6 - modules/config/nix.nix | 1 - modules/config/shell.nix | 7 +- modules/config/theming/catppuccin.nix | 7 +- modules/config/theming/default.nix | 1 - modules/config/theming/dracula.nix | 5 +- modules/config/wallpapers.nix | 1 - modules/default.nix | 6 - modules/profiles/desktop.nix | 3 +- modules/profiles/gaming.nix | 4 +- modules/programs/adb.nix | 1 - modules/programs/default.nix | 8 - modules/programs/direnv.nix | 1 - modules/programs/emacs.nix | 33 -- modules/programs/firefox.nix | 1 - modules/programs/fish.nix | 1 - modules/programs/git.nix | 1 - modules/programs/gpg.nix | 1 - modules/programs/helix.nix | 1 - modules/programs/hub.nix | 1 - modules/programs/hyprland/config.nix | 2 - modules/programs/kakoune.nix | 1 - modules/programs/kitty.nix | 1 - modules/programs/ledger/default.nix | 2 +- modules/programs/python.nix | 2 +- modules/programs/ssh.nix | 1 - modules/programs/xmonad/default.nix | 50 --- modules/programs/xmonad/xmonad.hs | 39 --- modules/programs/zathura.nix | 1 - modules/programs/zsh.nix | 1 - modules/services/default.nix | 6 +- modules/services/gammastep.nix | 2 +- modules/services/kdeconnect.nix | 1 - modules/services/openconnect.nix | 1 - modules/services/wireguard.nix | 1 - modules/virtualisation/default.nix | 5 - modules/virtualisation/podman.nix | 1 - overlays/channels.nix | 4 +- overlays/lib.nix | 4 +- overlays/packages.nix | 4 +- overlays/wayland.nix | 2 +- 48 files changed, 93 insertions(+), 540 deletions(-) delete mode 100644 modules/programs/emacs.nix delete mode 100644 modules/programs/xmonad/default.nix delete mode 100644 modules/programs/xmonad/xmonad.hs diff --git a/flake.lock b/flake.lock index 3121f1b..ddac62c 100644 --- a/flake.lock +++ b/flake.lock @@ -166,47 +166,6 @@ "type": "github" } }, - "emacs": { - "inputs": { - "emacs-overlay": "emacs-overlay", - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2", - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1676394233, - "narHash": "sha256-RHO/MgRyFqgmIgogrL5LBmBhAt8hTpUJJ6Dww46GyZI=", - "ref": "main", - "rev": "6fb9f917901160b2b212f420a8a8e4995c823626", - "revCount": 98, - "type": "git", - "url": "ssh://git@gitea.moritzboeh.me/moritz/emacs.git" - }, - "original": { - "ref": "main", - "type": "git", - "url": "ssh://git@gitea.moritzboeh.me/moritz/emacs.git" - } - }, - "emacs-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1676025076, - "narHash": "sha256-sdYhoZsLLwRXZebP6DYfIgQRjFA+itdNXaPuCWfJYkk=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "581072bb0d49768da9370056f7b6e7b761b5d8be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -239,29 +198,16 @@ "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-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1681037374, + "narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "033b9f258ca96a10e543d4442071f614dc3f8412", "type": "github" }, "original": { @@ -286,54 +232,6 @@ } }, "flake-utils_3": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1681037374, - "narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "033b9f258ca96a10e543d4442071f614dc3f8412", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -351,7 +249,6 @@ "gitignore": { "inputs": { "nixpkgs": [ - "emacs", "pre-commit-hooks", "nixpkgs" ] @@ -386,27 +283,6 @@ "type": "github" } }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "pre-commit-hooks", - "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" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -430,31 +306,9 @@ "type": "github" } }, - "howdy": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks_2" - }, - "locked": { - "lastModified": 1665343480, - "narHash": "sha256-mMaZFrDDiBcHDe8+lA87P3iMPea+RGfik5/E4Dyzk8U=", - "owner": "~moritzboehme", - "repo": "howdy", - "rev": "24a7cfb8c2fef1873275dbdf7c8ad562c22083de", - "type": "sourcehut" - }, - "original": { - "owner": "~moritzboehme", - "repo": "howdy", - "type": "sourcehut" - } - }, "hypr-contrib": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1679036674, @@ -473,7 +327,7 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_2", "wlroots": "wlroots", "xdph": "xdph" }, @@ -514,7 +368,7 @@ }, "hyprpaper": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1681080114, @@ -563,8 +417,8 @@ }, "neovim": { "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_6" + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_4" }, "locked": { "dir": "contrib", @@ -609,11 +463,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1673540789, - "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", + "lastModified": 1658161305, + "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", + "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", "type": "github" }, "original": { @@ -624,22 +478,6 @@ } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1678872516, "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", @@ -656,38 +494,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1675758091, - "narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1658161305, - "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1680669251, "narHash": "sha256-AVNE+0u4HlI3v96KCXE9risH7NKqj0QDLLfSckYXIbA=", @@ -703,7 +509,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_3": { "locked": { "lastModified": 1674641431, "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", @@ -719,7 +525,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_4": { "locked": { "lastModified": 1671983799, "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", @@ -735,7 +541,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_5": { "locked": { "lastModified": 1681028957, "narHash": "sha256-gKWkKT/nFg2d9HZyK7VAjRzkyPfKLx+uIGyWXDw0NB0=", @@ -751,7 +557,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_6": { "locked": { "lastModified": 1678898370, "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", @@ -786,64 +592,11 @@ "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": [ - "emacs", - "flake-utils" - ], + "flake-utils": "flake-utils_3", "gitignore": "gitignore", - "nixpkgs": [ - "emacs", - "nixpkgs" - ], + "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable" }, - "locked": { - "lastModified": 1675688762, - "narHash": "sha256-oit/SxMk0B380ASuztBGQLe8TttO1GJiXF8aZY9AYEc=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "ab608394886fb04b8a5df3cb0bab2598400e3634", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks_2": { - "inputs": { - "flake-utils": [ - "howdy", - "flake-utils" - ], - "nixpkgs": [ - "howdy", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1664708386, - "narHash": "sha256-aCD8UUGNYb5nYzRmtsq/0yP9gFOQQHr/Lsb5vW+mucw=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "2e4a708918e14fdbd534cc94aaa9470cd19b2464", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks_3": { - "inputs": { - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_6", - "gitignore": "gitignore_2", - "nixpkgs": "nixpkgs_8", - "nixpkgs-stable": "nixpkgs-stable_2" - }, "locked": { "lastModified": 1680981441, "narHash": "sha256-Tqr2mCVssUVp1ZXXMpgYs9+ZonaWrZGPGltJz94FYi4=", @@ -866,11 +619,9 @@ "attic": "attic", "comment-box-nvim": "comment-box-nvim", "copilot-lua": "copilot-lua", - "emacs": "emacs", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils", "gitignore-nvim": "gitignore-nvim", "home-manager": "home-manager", - "howdy": "howdy", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpaper": "hyprpaper", @@ -878,9 +629,9 @@ "master": "master", "neovim": "neovim", "nil": "nil", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_5", "nvim-treesitter-textsubjects": "nvim-treesitter-textsubjects", - "pre-commit-hooks": "pre-commit-hooks_3", + "pre-commit-hooks": "pre-commit-hooks", "smartcolumn-nvim": "smartcolumn-nvim", "stable": "stable", "utils": "utils" diff --git a/flake.nix b/flake.nix index 96aa0d0..7a70cc7 100644 --- a/flake.nix +++ b/flake.nix @@ -7,67 +7,66 @@ ╚══════════════════════════════════════════════════════════╝ */ inputs = { + # Nix master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; stable.url = "github:nixos/nixpkgs/nixos-22.11"; - pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - flake-utils.url = "github:numtide/flake-utils"; - utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; utils.inputs.flake-utils.follows = "flake-utils"; - agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; + agenix.url = "github:ryantm/agenix"; + + attic.inputs.flake-utils.follows = "flake-utils"; + attic.inputs.nixpkgs-stable.follows = "stable"; + attic.inputs.nixpkgs.follows = "nixpkgs"; + attic.url = "github:zhaofengli/attic"; - home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.utils.follows = "flake-utils"; + home-manager.url = "github:nix-community/home-manager"; + nil.inputs.flake-utils.follows = "flake-utils"; + nil.inputs.nixpkgs.follows = "nixpkgs"; + nil.url = "github:oxalica/nil"; + + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + + # Neovim + neovim.url = "github:neovim/neovim/83bfd94d1df5eecb8e4069a227c7d24598636d63?dir=contrib"; # HACK to fix neovim not building at the moment + + comment-box-nvim.flake = false; + comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; + + copilot-lua.flake = false; + copilot-lua.url = "github:zbirenbaum/copilot.lua"; + + gitignore-nvim.flake = false; + gitignore-nvim.url = "github:wintermute-cell/gitignore.nvim"; + + lspsaga-nvim.flake = false; + lspsaga-nvim.url = "github:glepnir/lspsaga.nvim"; + + nvim-treesitter-textsubjects.flake = false; + nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects"; + + smartcolumn-nvim.flake = false; + smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; + + # Hyprland + hypr-contrib.url = "github:hyprwm/contrib"; + hyprland.url = "github:hyprwm/Hyprland"; + hyprpaper.url = "github:hyprwm/hyprpaper"; + + # Laptop asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout"; asus-touchpad-numpad-driver.flake = false; + # Firefox user.js arkenfox-userjs.url = "github:arkenfox/user.js"; arkenfox-userjs.flake = false; - - howdy.url = "sourcehut:~moritzboehme/howdy"; - howdy.inputs.nixpkgs.follows = "nixpkgs"; - - emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main"; - - neovim.url = "github:neovim/neovim/83bfd94d1df5eecb8e4069a227c7d24598636d63?dir=contrib"; # HACK to fix neovim not building at the moment - - nil.url = "github:oxalica/nil"; - nil.inputs.nixpkgs.follows = "nixpkgs"; - nil.inputs.flake-utils.follows = "flake-utils"; - - hyprland.url = "github:hyprwm/Hyprland"; - hyprpaper.url = "github:hyprwm/hyprpaper"; - hypr-contrib.url = "github:hyprwm/contrib"; - - nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects"; - nvim-treesitter-textsubjects.flake = false; - - smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; - smartcolumn-nvim.flake = false; - - copilot-lua.url = "github:zbirenbaum/copilot.lua"; - copilot-lua.flake = false; - - lspsaga-nvim.url = "github:glepnir/lspsaga.nvim"; - lspsaga-nvim.flake = false; - - comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; - comment-box-nvim.flake = false; - - gitignore-nvim.url = "github:wintermute-cell/gitignore.nvim"; - gitignore-nvim.flake = false; - - attic.url = "github:zhaofengli/attic"; - attic.inputs.nixpkgs.follows = "nixpkgs"; - attic.inputs.nixpkgs-stable.follows = "stable"; - attic.inputs.flake-utils.follows = "flake-utils"; }; /* @@ -85,7 +84,7 @@ channelsConfig.allowUnfree = true; lib = nixpkgs.lib.extend - (self: super: { my = import ./lib { lib = self; }; }); + (self: _: { my = import ./lib { lib = self; }; }); /* ╔══════════════════════════════════════════════════════════╗ @@ -97,9 +96,7 @@ inherit (self) lib; }; - channels.nixpkgs.overlaysBuilder = channels: [ - inputs.emacs.overlays.default - inputs.howdy.overlays.default + channels.nixpkgs.overlaysBuilder = _: [ inputs.hypr-contrib.overlays.default inputs.hyprland.overlays.default inputs.utils.overlay @@ -135,7 +132,6 @@ }; } inputs.agenix.nixosModules.age - inputs.howdy.nixosModules.default ]; diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 377c478..9dc9c88 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -1,12 +1,11 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ lib -, config -, pkgs -, inputs +{ pkgs , ... -}: { +}: + +{ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix diff --git a/hosts/nixos-desktop/hardware-configuration.nix b/hosts/nixos-desktop/hardware-configuration.nix index fab68a6..6ecf64c 100644 --- a/hosts/nixos-desktop/hardware-configuration.nix +++ b/hosts/nixos-desktop/hardware-configuration.nix @@ -3,7 +3,6 @@ # to /etc/nixos/configuration.nix instead. { config , lib -, pkgs , modulesPath , ... }: { diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 3042652..42c242c 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -1,8 +1,7 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config -, pkgs +{ pkgs , inputs , ... }: { @@ -11,11 +10,6 @@ ./hardware-configuration.nix ]; - # services.howdy = { - # enable = true; - # certainty = 3.0; - # }; - # BOOT boot = { supportedFilesystems = [ "btrfs" ]; diff --git a/hosts/nixos-laptop/hardware-configuration.nix b/hosts/nixos-laptop/hardware-configuration.nix index 216b8da..76defb8 100644 --- a/hosts/nixos-laptop/hardware-configuration.nix +++ b/hosts/nixos-laptop/hardware-configuration.nix @@ -1,10 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config -, lib -, pkgs -, modulesPath +{ modulesPath , ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/lib/default.nix b/lib/default.nix index da1b552..03dcebb 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,6 @@ { lib, ... }: -lib.makeExtensible (self: rec { +lib.makeExtensible (_: rec { mkDate = longDate: lib.concatStringsSep "-" [ (builtins.substring 0 4 longDate) (builtins.substring 4 2 longDate) diff --git a/modules/config/default.nix b/modules/config/default.nix index 7312bcb..f2be122 100644 --- a/modules/config/default.nix +++ b/modules/config/default.nix @@ -1,9 +1,3 @@ -{ config -, lib -, pkgs -, ... -}: - { imports = [ ./bin diff --git a/modules/config/nix.nix b/modules/config/nix.nix index a932cbb..12fcc32 100644 --- a/modules/config/nix.nix +++ b/modules/config/nix.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , inputs , ... }: diff --git a/modules/config/shell.nix b/modules/config/shell.nix index c491d49..9a4811b 100644 --- a/modules/config/shell.nix +++ b/modules/config/shell.nix @@ -1,13 +1,8 @@ -{ config -, lib -, pkgs +{ lib , ... }: with lib; -let - cfg = config.my.shell; -in { options.my.shell = { abbreviations = mkOption { diff --git a/modules/config/theming/catppuccin.nix b/modules/config/theming/catppuccin.nix index bca09bc..0c8d8a9 100644 --- a/modules/config/theming/catppuccin.nix +++ b/modules/config/theming/catppuccin.nix @@ -1,6 +1,4 @@ { config -, lib -, pkgs , rosewater , flamingo , pink @@ -27,12 +25,9 @@ , base , mantle , crust +, ... }: -with lib; -let - cfg = config.my.theming; -in { home-manager.users.moritz = { programs = { diff --git a/modules/config/theming/default.nix b/modules/config/theming/default.nix index 4feefe9..31d8cb4 100644 --- a/modules/config/theming/default.nix +++ b/modules/config/theming/default.nix @@ -1,7 +1,6 @@ { config , lib , pkgs -, inputs , ... }: diff --git a/modules/config/theming/dracula.nix b/modules/config/theming/dracula.nix index 76fa25a..317926a 100644 --- a/modules/config/theming/dracula.nix +++ b/modules/config/theming/dracula.nix @@ -1,4 +1,7 @@ -{ config, lib, pkgs, ... }: +{ config +, lib +, ... +}: with lib; let diff --git a/modules/config/wallpapers.nix b/modules/config/wallpapers.nix index 526a017..c19d5a8 100644 --- a/modules/config/wallpapers.nix +++ b/modules/config/wallpapers.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/default.nix b/modules/default.nix index 7c695aa..6e3b243 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,9 +1,3 @@ -{ config -, lib -, pkgs -, ... -}: - { imports = [ ./config diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 29d9f23..755c68a 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -1,5 +1,4 @@ -{ config -, lib +{ lib , pkgs , ... }: diff --git a/modules/profiles/gaming.nix b/modules/profiles/gaming.nix index f6d6ac2..e773f20 100644 --- a/modules/profiles/gaming.nix +++ b/modules/profiles/gaming.nix @@ -1,6 +1,4 @@ -{ config -, lib -, pkgs +{ pkgs , ... }: { programs.steam.enable = true; diff --git a/modules/programs/adb.nix b/modules/programs/adb.nix index c839ce6..e773d4c 100644 --- a/modules/programs/adb.nix +++ b/modules/programs/adb.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 9674641..337d90c 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -1,16 +1,9 @@ -{ config -, lib -, pkgs -, ... -}: - { imports = [ ./adb.nix ./bspwm ./code.nix ./direnv.nix - ./emacs.nix ./firefox.nix ./fish.nix ./git.nix @@ -31,7 +24,6 @@ ./sway.nix ./thunar.nix ./nvim - ./xmonad ./zathura.nix ./zsh.nix ]; diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index 92beef1..119ac6d 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix deleted file mode 100644 index 0d7128d..0000000 --- a/modules/programs/emacs.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config -, lib -, pkgs -, inputs -, ... -}: - -with lib; -let - cfg = config.my.programs.emacs; - myEmacs = pkgs.emacsPgtkWithPackages; -in -{ - options.my.programs.emacs.enable = mkEnableOption "emacs"; - - config = mkIf cfg.enable { - my.shell.aliases = { - emacs = "emacsclient -nw -a 'emacs -nw'"; - }; - fonts.fonts = with pkgs; [ - emacs-all-the-icons-fonts - (iosevka-bin.override { variant = "aile"; }) - ]; - users.users.moritz.packages = [ myEmacs ]; - home-manager.users.moritz = { - home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ]; - services.emacs = { - enable = true; - package = myEmacs; - }; - }; - }; -} diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index d0f8e4d..8461c47 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , inputs , ... }: diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 5ac37d0..1101cbf 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -1,7 +1,6 @@ { config , lib , pkgs -, inputs , ... }: diff --git a/modules/programs/git.nix b/modules/programs/git.nix index fa4fab0..225e50b 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/gpg.nix b/modules/programs/gpg.nix index 5371d62..64ce070 100644 --- a/modules/programs/gpg.nix +++ b/modules/programs/gpg.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 821a09c..3b9749a 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/hub.nix b/modules/programs/hub.nix index 14b9c60..1b55770 100644 --- a/modules/programs/hub.nix +++ b/modules/programs/hub.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 49a235d..cb2b447 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: @@ -161,7 +160,6 @@ in bind = $mainMod , B , exec , rofi-bluetooth bind = $mainMod , C , exec , rofi -show calc -modi calc -no-show-match -no-sort | wl-copy bind = $mainMod , D , exec , hyprctl keyword general:layout dwindle - bind = $mainMod , E , exec , emacsclient -c -a emacs bind = $mainMod , M , exec , hyprctl keyword general:layout master bind = $mainMod , R , exec , rofi -show combi bind = $mainMod , RETURN , exec , kitty diff --git a/modules/programs/kakoune.nix b/modules/programs/kakoune.nix index 874ef2d..bbe7a6b 100644 --- a/modules/programs/kakoune.nix +++ b/modules/programs/kakoune.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index 76c4a10..1261a65 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/ledger/default.nix b/modules/programs/ledger/default.nix index 348e0e1..ce54b3e 100644 --- a/modules/programs/ledger/default.nix +++ b/modules/programs/ledger/default.nix @@ -18,7 +18,7 @@ in }; aliases = let - applyCommon = name: command: "${command} --payee note --strict --explicit"; + applyCommon = _: command: "${command} --payee note --strict --explicit"; in mapAttrs applyCommon { bal = "ledger bal"; diff --git a/modules/programs/python.nix b/modules/programs/python.nix index adecd55..0310b08 100644 --- a/modules/programs/python.nix +++ b/modules/programs/python.nix @@ -9,7 +9,7 @@ let cfg = config.my.programs.python; pythonVersions = map (version: "3${toString version}") (range 8 11); - enabledVersions = filterAttrs (name: value: value.enable) cfg.versions; + enabledVersions = filterAttrs (_: value: value.enable) cfg.versions; pythonPackages = version: attrNames pkgs."python${version}Packages"; diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 2c484ae..f8b5ee2 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/xmonad/default.nix b/modules/programs/xmonad/default.nix deleted file mode 100644 index 80ceb83..0000000 --- a/modules/programs/xmonad/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config -, lib -, pkgs -, ... -}: - -with lib; -let - cfg = config.my.programs.xmonad; -in -{ - options.my.programs.xmonad.enable = mkEnableOption "xmonad"; - - config = lib.mkIf cfg.enable { - services = { - xserver = { - enable = true; - layout = "de"; - - displayManager = { - defaultSession = "none+xmonad"; - autoLogin = { - enable = true; - user = "moritz"; - }; - lightdm.enable = true; - }; - windowManager.xmonad.enable = true; - }; - }; - home-manager.users.moritz = - let - xmonadPackages = haskellPackages: [ - haskellPackages.xmonad-contrib - haskellPackages.xmonad-extras - haskellPackages.xmonad - haskellPackages.xmobar - ]; - in - { - xsession.windowManager.xmonad = { - enable = true; - enableContribAndExtras = true; - config = ./xmonad.hs; - # extraPackages = xmonadPackages; - }; - programs.xmobar.enable = true; - }; - }; -} diff --git a/modules/programs/xmonad/xmonad.hs b/modules/programs/xmonad/xmonad.hs deleted file mode 100644 index 5c27ff3..0000000 --- a/modules/programs/xmonad/xmonad.hs +++ /dev/null @@ -1,39 +0,0 @@ -import XMonad - ( Choose, - Default (def), - Full, - KeyMask, - Mirror, - Tall, - X, - XConfig (modMask, terminal), - mod4Mask, - spawn, - xmonad, - ) -import XMonad.Hooks.EwmhDesktops (ewmh) -import XMonad.Util.EZConfig (additionalKeysP) - -myModMask :: KeyMask -myModMask = mod4Mask - -myTerminal :: String -myTerminal = "kitty" - -myKeys :: [(String, X ())] -myKeys = - [ ("M-d", spawn "rofi -show combi"), - ("M-e", spawn "emacsclient -c -a emacs"), - ("M-f", spawn "firefox") - ] - -myConfig :: (XConfig (Choose Tall (Choose (Mirror Tall) Full))) -myConfig = - def - { modMask = myModMask, - terminal = myTerminal - } - `additionalKeysP` myKeys - -main :: IO () -main = xmonad $ ewmh $ ewmhFullscreen myConfig diff --git a/modules/programs/zathura.nix b/modules/programs/zathura.nix index 4eb23e3..d561c67 100644 --- a/modules/programs/zathura.nix +++ b/modules/programs/zathura.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 50a6050..b8cc5ab 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -1,7 +1,6 @@ { config , lib , pkgs -, inputs , ... }: diff --git a/modules/services/default.nix b/modules/services/default.nix index 2ec3a7f..ac126e9 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,8 +1,4 @@ -{ config -, lib -, pkgs -, ... -}: { +{ imports = [ ./dunst.nix ./kdeconnect.nix diff --git a/modules/services/gammastep.nix b/modules/services/gammastep.nix index d951c1d..8c7b25e 100644 --- a/modules/services/gammastep.nix +++ b/modules/services/gammastep.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: with lib; let diff --git a/modules/services/kdeconnect.nix b/modules/services/kdeconnect.nix index 3ce2e31..3efd6a8 100644 --- a/modules/services/kdeconnect.nix +++ b/modules/services/kdeconnect.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/services/openconnect.nix b/modules/services/openconnect.nix index 6a9433a..87c37a1 100644 --- a/modules/services/openconnect.nix +++ b/modules/services/openconnect.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/services/wireguard.nix b/modules/services/wireguard.nix index 2c81285..5463f1a 100644 --- a/modules/services/wireguard.nix +++ b/modules/services/wireguard.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 74bd309..bcc1863 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -1,8 +1,3 @@ -{ config -, lib -, pkgs -, ... -}: { imports = [ ./podman.nix diff --git a/modules/virtualisation/podman.nix b/modules/virtualisation/podman.nix index 1698fe3..744004f 100644 --- a/modules/virtualisation/podman.nix +++ b/modules/virtualisation/podman.nix @@ -1,6 +1,5 @@ { config , lib -, pkgs , ... }: diff --git a/overlays/channels.nix b/overlays/channels.nix index 8c19d82..5c2a49a 100644 --- a/overlays/channels.nix +++ b/overlays/channels.nix @@ -1,6 +1,6 @@ -{ lib, inputs }: +{ inputs, ... }: -final: prev: { +_: prev: { master = import inputs.master { inherit (prev) system; config.allowUnfree = true; diff --git a/overlays/lib.nix b/overlays/lib.nix index 69b149a..0d1a251 100644 --- a/overlays/lib.nix +++ b/overlays/lib.nix @@ -1,5 +1,5 @@ -{ lib, inputs }: +{ lib, ... }: -final: prev: { +_: _: { inherit lib; } diff --git a/overlays/packages.nix b/overlays/packages.nix index d1fb9c3..d4c1bed 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -1,6 +1,6 @@ -{ inputs, lib }: +{ inputs, ... }: -final: prev: +_: prev: { agenix = inputs.agenix.packages.${prev.system}.default; attic = inputs.attic.packages.${prev.system}.default; diff --git a/overlays/wayland.nix b/overlays/wayland.nix index f88709a..0ad9931 100644 --- a/overlays/wayland.nix +++ b/overlays/wayland.nix @@ -1,4 +1,4 @@ -{ lib, inputs }: +_: final: prev: { neovide-hyprland = final.symlinkJoin { From 2af3432410a0425171a379ddf55260d01e1b7c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 15:14:04 +0200 Subject: [PATCH 19/30] feat(nvim): improve/add keybindings --- modules/programs/nvim/init.lua | 3 --- modules/programs/nvim/keybinds.lua | 22 +++++++++++++++---- .../programs/nvim/plugins/telescope-nvim.lua | 6 +++-- .../nvim/plugins/telescope-zoxide.lua | 7 ++---- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 02706ab..ef1469a 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -145,7 +145,6 @@ local on_attach_def = function(_, bufnr) K = { "Lspsaga hover_doc ++quiet", "show info" }, [""] = { l = { - name = "lsp", d = { "Lspsaga show_cursor_diagnostics", "open diagnostic window" }, c = { "Lspsaga code_action", "code action" }, r = { "Lspsaga rename", "rename" }, @@ -159,12 +158,10 @@ local on_attach_def = function(_, bufnr) }, }, t = { - name = "toggle", l = { lsp_lines.toggle, "lsp lines" }, }, }, g = { - name = "goto", d = { "Lspsaga peek_definition", "Goto definition" }, t = { "Lspsaga peek_type_definition", "Goto type defininition" }, h = { "Lspsaga lsp_finder", "Lsp finder" }, diff --git a/modules/programs/nvim/keybinds.lua b/modules/programs/nvim/keybinds.lua index 039104d..0556448 100644 --- a/modules/programs/nvim/keybinds.lua +++ b/modules/programs/nvim/keybinds.lua @@ -4,8 +4,6 @@ require("which-key").register({ name = "buffer", b = { "Telescope buffers", "List buffers" }, d = { "bd", "Delete buffer" }, - n = { "bnext", "Next buffer" }, - p = { "bprevious", "Previous buffer" }, }, }) @@ -19,6 +17,14 @@ require("which-key").register({ d = { "c", "Delete window" }, }, }, { prefix = "" }) +require("which-key").register({ + ["["] = { + b = { "bprevious", "Previous buffer" }, + }, + ["]"] = { + b = { "bnext", "Next buffer" }, + }, +}) -- fast window move require("which-key").register({ @@ -49,10 +55,18 @@ require("which-key").register({ -- better descriptions for navigation require("which-key").register({ + [""] = { + f = { name = "file/find" }, + g = { name = "git" }, + l = { name = "lsp" }, + o = { name = "org" }, + s = { name = "search" }, + t = { name = "toggle" }, + x = { name = "diagnostics/quickfix" }, + }, ["["] = { name = "prev" }, ["]"] = { name = "next" }, - o = { name = "org" }, - x = { name = "diagnostics/quickfix" }, + g = { name = "goto" }, }) -- Clear search with diff --git a/modules/programs/nvim/plugins/telescope-nvim.lua b/modules/programs/nvim/plugins/telescope-nvim.lua index cfb87c8..95b228c 100644 --- a/modules/programs/nvim/plugins/telescope-nvim.lua +++ b/modules/programs/nvim/plugins/telescope-nvim.lua @@ -1,12 +1,10 @@ require("which-key").register({ f = { - name = "file/find", f = { "Telescope find_files", "Find files" }, b = { "Telescope buffers", "Find buffers" }, r = { "Telescope oldfiles", "Find recent files" }, }, s = { - name = "search", l = { "Telescope current_buffer_fuzzy_find", "Search lines" }, g = { "Telescope live_grep", "Live grep" }, c = { "Telescope command_history", "Command history" }, @@ -17,4 +15,8 @@ require("which-key").register({ s = { "Telescope lsp_document_symbols", "Symbols (Document)" }, S = { "Telescope lsp_workspace_symbols", "Symbols (Workspace)" }, }, + g = { + c = { "Telescope git_commits", "Commits" }, + s = { "Telescope git_status", "Status" }, + }, }, { prefix = "" }) diff --git a/modules/programs/nvim/plugins/telescope-zoxide.lua b/modules/programs/nvim/plugins/telescope-zoxide.lua index cd2c5af..e725f8d 100644 --- a/modules/programs/nvim/plugins/telescope-zoxide.lua +++ b/modules/programs/nvim/plugins/telescope-zoxide.lua @@ -1,7 +1,4 @@ require("telescope").load_extension("zoxide") require("which-key").register({ - f = { - name = "file/find", - z = { "Telescope zoxide list", "Find location (Zoxide)" }, - }, -}, { prefix = "" }) + z = { "Telescope zoxide list", "Find location (Zoxide)" }, +}, { prefix = "f" }) From b606eb4b447e179bd48a476478594cb89149b1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 15:14:42 +0200 Subject: [PATCH 20/30] feat(nvim): disable lsp lightbulb --- modules/programs/nvim/init.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index ef1469a..7bf12d5 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -131,11 +131,8 @@ require("lspsaga").setup({ enable = false, }, lightbulb = { - enable = true, - enable_in_insert = true, - sign = true, - sign_priority = 40, - virtual_text = false, + enable = false, + enable_in_insert = false, }, }) From 7ae552d69892eddac46e3032a48a9dbdcff5b479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 15:23:33 +0200 Subject: [PATCH 21/30] refactor: make mapModules more easily readable --- lib/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 03dcebb..b66d67d 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -16,7 +16,7 @@ lib.makeExtensible (_: rec { mapModules = f: dir: let - filter = name: type: + filterModules = name: type: let isPublic = !(lib.hasPrefix "_" name); isSomething = type != null; @@ -30,6 +30,8 @@ lib.makeExtensible (_: rec { in isPublic && isSomething && isModule; + modulesInDir = lib.filterAttrs filterModules (builtins.readDir dir); + mkModule = name: _: let path = "${toString dir}/${name}"; @@ -40,7 +42,7 @@ lib.makeExtensible (_: rec { in lib.nameValuePair normalizedName (f path); in - lib.mapAttrs' mkModule (lib.filterAttrs filter (builtins.readDir dir)); + lib.mapAttrs' mkModule modulesInDir; mapModules' = f: dir: lib.attrValues (mapModules f dir); }) From badc4ffa499c01e9db76b0217958733ea260e370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 10 Apr 2023 21:55:40 +0200 Subject: [PATCH 22/30] feat(nvim): add snippets for luasnip Add friendly snippets and load them with luasnip. --- modules/programs/nvim/default.nix | 1 + modules/programs/nvim/init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index c14501d..4d566e9 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -70,6 +70,7 @@ in cmp_luasnip copilot-cmp direnv-vim + friendly-snippets lsp_lines-nvim lspkind-nvim lspsaga-nvim-original diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 7bf12d5..cb87e87 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -14,6 +14,7 @@ vim.api.nvim_create_autocmd("InsertEnter", { callback = function() local cmp = require("cmp") local luasnip = require("luasnip") + require("luasnip.loaders.from_vscode").lazy_load() require("copilot_cmp").setup() cmp.setup({ From 58f6391273a78e4fd98d619d80ed06ed8a45f8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:49:54 +0200 Subject: [PATCH 23/30] refactor(nvim): use nix-community nightly neovim --- flake.nix | 3 ++- overlays/packages.nix | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 7a70cc7..ff387f2 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,7 @@ pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; # Neovim - neovim.url = "github:neovim/neovim/83bfd94d1df5eecb8e4069a227c7d24598636d63?dir=contrib"; # HACK to fix neovim not building at the moment + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; comment-box-nvim.flake = false; comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; @@ -99,6 +99,7 @@ channels.nixpkgs.overlaysBuilder = _: [ inputs.hypr-contrib.overlays.default inputs.hyprland.overlays.default + inputs.neovim-nightly-overlay.overlay inputs.utils.overlay self.overlay ]; diff --git a/overlays/packages.nix b/overlays/packages.nix index d4c1bed..01c938a 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -5,6 +5,5 @@ _: prev: agenix = inputs.agenix.packages.${prev.system}.default; attic = inputs.attic.packages.${prev.system}.default; hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; - neovim-nightly = inputs.neovim.packages.${prev.system}.default; nil = inputs.nil.packages.${prev.system}.default; } From a8c51c376c6d74b4ae22e48843c14b690bbc7c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:53:50 +0200 Subject: [PATCH 24/30] feat: add chromium module --- modules/programs/chromium.nix | 26 ++++++++++++++++++++++++++ modules/programs/default.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 modules/programs/chromium.nix diff --git a/modules/programs/chromium.nix b/modules/programs/chromium.nix new file mode 100644 index 0000000..3533ecb --- /dev/null +++ b/modules/programs/chromium.nix @@ -0,0 +1,26 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.chromium; +in +{ + options.my.programs.chromium = { + enable = mkEnableOption "chromium"; + package = mkOption { + type = types.package; + default = pkgs.stable.chromium; + defaultText = "pkgs.chromium"; + description = "Chromium package to install."; + }; + }; + + config = mkIf cfg.enable { + programs.chromium.enable = true; + environment.systemPackages = [ cfg.package ]; + }; +} diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 337d90c..703dcba 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -2,6 +2,7 @@ imports = [ ./adb.nix ./bspwm + ./chromium.nix ./code.nix ./direnv.nix ./firefox.nix From 48c2b30e18861d37cadbc521fcac2477facc463b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:54:44 +0200 Subject: [PATCH 25/30] feat(nvim): use latest version of bufferline.nvim --- flake.nix | 3 +++ overlays/vimPlugins.nix | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index ff387f2..89db2c0 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,9 @@ # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + bufferline-nvim.flake = false; + bufferline-nvim.url = "github:akinsho/bufferline.nvim"; + comment-box-nvim.flake = false; comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index e065626..1f56a3c 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -43,5 +43,10 @@ with lib.my; version = mkVersionInput inputs.gitignore-nvim; src = inputs.gitignore-nvim; }; + + bufferline-nvim = prev.vimPlugins.bufferline-nvim.overrideAttrs (_: { + version = mkVersionInput inputs.bufferline-nvim; + src = inputs.bufferline-nvim; + }); }; } From 55c17db428cf7495528ad61884685977b2be40ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:56:43 +0200 Subject: [PATCH 26/30] refactor(profiles)!: split up desktop profile --- flake.nix | 3 + hosts/nixos-desktop/default.nix | 7 +- modules/profiles/desktop.nix | 133 +++++++------------------------- modules/profiles/personal.nix | 60 ++++++++++++++ modules/profiles/ripping.nix | 32 ++++++++ 5 files changed, 126 insertions(+), 109 deletions(-) create mode 100644 modules/profiles/personal.nix create mode 100644 modules/profiles/ripping.nix diff --git a/flake.nix b/flake.nix index 89db2c0..e748da9 100644 --- a/flake.nix +++ b/flake.nix @@ -122,6 +122,7 @@ ./modules/profiles/base.nix ./modules/profiles/gaming.nix ./modules/profiles/desktop.nix + ./modules/profiles/personal.nix ]; hostDefaults.modules = [ @@ -143,6 +144,7 @@ ./hosts/nixos-laptop self.nixosModules.desktop self.nixosModules.gaming + self.nixosModules.personal ]; @@ -150,6 +152,7 @@ ./hosts/nixos-desktop self.nixosModules.desktop self.nixosModules.gaming + self.nixosModules.personal ]; /* diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 9dc9c88..b88a65e 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -10,8 +10,11 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ]; - - my.programs.hyprland.nvidiaSupport = true; + my = { + programs.hyprland.nvidiaSupport = true; + services.mullvad.enable = true; + programs.ledger.enable = true; + }; # KERNEL boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 755c68a..ef5a639 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -5,135 +5,56 @@ with lib; { my = { yubikey = { - enable = true; + enable = mkDefault true; luksSupport = { - enable = true; - devices = [ "enc" ]; + enable = mkDefault true; + devices = mkDefault [ "enc" ]; }; }; - wallpapers.enable = true; + wallpapers.enable = mkDefault true; theming = { - enable = true; - scheme = "catppuccin-macchiato"; - }; - virtualisation = { - podman.enable = true; - libvirtd.enable = true; + enable = mkDefault true; + scheme = mkDefault "catppuccin-macchiato"; }; + virtualisation.podman.enable = mkDefault true; programs = { - adb.enable = true; - hyprland.enable = true; - code.enable = true; - firefox = { - enable = true; - arkenfox = { - enable = true; - overrides = { - ## arkenfox overrides - # automatic search - "keyword.enabled" = true; - "browser.search.suggest.enabled" = true; - "browser.urlbar.suggest.searches" = true; - - # startup page - "browser.startup.homepage" = "https://searxng.moritzboeh.me/"; - "browser.startup.page" = 1; - - # drm - "media.eme.enabled" = true; - - # sanitisation - "privacy.clearOnShutdown.history" = false; - - # disable letterboxing - "privacy.resistFingerprinting.letterboxing" = false; - - ## OTHER - # Dont show warning when accessing about:config - "browser.aboutConfig.showWarning" = false; - - # Hide bookmarks - "browser.toolbars.bookmarks.visibility" = "never"; - - # Smooth scrolling - "general.smoothScroll.lines.durationMaxMS" = 125; - "general.smoothScroll.lines.durationMinMS" = 125; - "general.smoothScroll.mouseWheel.durationMaxMS" = 200; - "general.smoothScroll.mouseWheel.durationMinMS" = 100; - "general.smoothScroll.msdPhysics.enabled" = true; - "general.smoothScroll.other.durationMaxMS" = 125; - "general.smoothScroll.other.durationMinMS" = 125; - "general.smoothScroll.pages.durationMaxMS" = 125; - "general.smoothScroll.pages.durationMinMS" = 125; - "mousewheel.min_line_scroll_amount" = 40; - "mousewheel.system_scroll_override_on_root_content.enabled" = true; - "mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175; - "mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175; - "toolkit.scrollbox.horizontalScrollDistance" = 6; - "toolkit.scrollbox.verticalScrollDistance" = 2; - }; - }; - }; - git.signing = true; - gpg.enable = true; - hub.enable = true; - ledger.enable = true; - logseq.enable = true; - nvim.enable = true; - python.versions."311".enable = true; - ssh = { - enable = true; - includeSecrets = [ ../../secrets/ssh-home.age ]; - }; - spotify.enable = true; - thunar.enable = true; - zathura.enable = true; + chromium.enable = mkDefault true; + firefox.enable = mkDefault true; + gpg.enable = mkDefault true; + hyprland.enable = mkDefault true; + logseq.enable = mkDefault true; + nvim.enable = mkDefault true; + python.versions."311".enable = mkDefault true; + spotify.enable = mkDefault true; + ssh.enable = mkDefault true; + thunar.enable = mkDefault true; + zathura.enable = mkDefault true; }; services = { - dunst.enable = true; - kdeconnect.enable = true; - mullvad.enable = true; - openconnect.enable = true; - printing.enable = true; + dunst.enable = mkDefault true; gammastep.enable = true; + kdeconnect.enable = mkDefault true; + printing.enable = true; wireguard.enable = true; }; }; environment.systemPackages = with pkgs; [ - # nix - nixpkgs-review - - # ripping - abcde - handbrake - picard - - # other anki calibre - jellyfin-media-player keepassxc - stable.libreoffice # HACK to fix build error + nixpkgs-review pavucontrol + stable.libreoffice # HACK to fix build error stable.signal-desktop - tlaplusToolbox - vlc - thunderbird - plantuml - - jetbrains.pycharm-professional - synology-drive-client - texlive.combined.scheme-full + thunderbird + vlc ]; - programs = { - chromium.enable = true; - nix-ld.enable = true; - }; + programs.nix-ld.enable = true; home-manager.users.moritz = { services.nextcloud-client = { @@ -148,7 +69,5 @@ with lib; { alsa.enable = true; pulse.enable = true; }; - # Remap capslock to esc and shift + capslock to capslock - xserver.xkbOptions = "terminate:ctrl_alt_bksp,caps:escape_shifted_capslock"; }; } diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix new file mode 100644 index 0000000..6bf7167 --- /dev/null +++ b/modules/profiles/personal.nix @@ -0,0 +1,60 @@ +{ lib, ... }: + +with lib; +{ + my = { + services.openconnect.enable = true; + programs = { + ssh.includeSecrets = mkDefault [ ../../secrets/ssh-home.age ]; + git.signing = mkDefault true; + hub.enable = mkDefault true; + firefox.arkenfox = { + enable = mkDefault true; + overrides = mkDefault { + ## arkenfox overrides + # automatic search + "keyword.enabled" = true; + "browser.search.suggest.enabled" = true; + "browser.urlbar.suggest.searches" = true; + + # startup page + "browser.startup.homepage" = "https://searxng.moritzboeh.me/"; + "browser.startup.page" = 1; + + # drm + "media.eme.enabled" = true; + + # sanitisation + "privacy.clearOnShutdown.history" = false; + + # disable letterboxing + "privacy.resistFingerprinting.letterboxing" = false; + + ## OTHER + # Dont show warning when accessing about:config + "browser.aboutConfig.showWarning" = false; + + # Hide bookmarks + "browser.toolbars.bookmarks.visibility" = "never"; + + # Smooth scrolling + "general.smoothScroll.lines.durationMaxMS" = 125; + "general.smoothScroll.lines.durationMinMS" = 125; + "general.smoothScroll.mouseWheel.durationMaxMS" = 200; + "general.smoothScroll.mouseWheel.durationMinMS" = 100; + "general.smoothScroll.msdPhysics.enabled" = true; + "general.smoothScroll.other.durationMaxMS" = 125; + "general.smoothScroll.other.durationMinMS" = 125; + "general.smoothScroll.pages.durationMaxMS" = 125; + "general.smoothScroll.pages.durationMinMS" = 125; + "mousewheel.min_line_scroll_amount" = 40; + "mousewheel.system_scroll_override_on_root_content.enabled" = true; + "mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175; + "mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175; + "toolkit.scrollbox.horizontalScrollDistance" = 6; + "toolkit.scrollbox.verticalScrollDistance" = 2; + }; + }; + }; + }; +} diff --git a/modules/profiles/ripping.nix b/modules/profiles/ripping.nix new file mode 100644 index 0000000..be56abe --- /dev/null +++ b/modules/profiles/ripping.nix @@ -0,0 +1,32 @@ +{ pkgs }: + +{ + environment.systemPackages = with pkgs; [ + # nix + nixpkgs-review + + # ripping + abcde + handbrake + picard + + # other + anki + calibre + jellyfin-media-player + keepassxc + stable.libreoffice # HACK to fix build error + pavucontrol + stable.signal-desktop + tlaplusToolbox + vlc + thunderbird + plantuml + + jetbrains.pycharm-professional + + synology-drive-client + + texlive.combined.scheme-full + ]; +} From eca0d4ddb2b610380aa1ed23dd6e2a684ff9bfbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:57:53 +0200 Subject: [PATCH 27/30] build: update inputs --- flake.lock | 166 +++++++++++++++++++++++------------ flake.nix | 1 - modules/security/default.nix | 4 +- 3 files changed, 111 insertions(+), 60 deletions(-) diff --git a/flake.lock b/flake.lock index ddac62c..091046e 100644 --- a/flake.lock +++ b/flake.lock @@ -69,11 +69,11 @@ ] }, "locked": { - "lastModified": 1680646146, - "narHash": "sha256-NH+EhLFYDwLQ01BqfTwGvZAjfmZynnP1xxPjqH0XJss=", + "lastModified": 1681335578, + "narHash": "sha256-yIZqE6WpkgAllsJ7IAbn8k6IRz/0CS/xp6IR+8yrEP8=", "owner": "zhaofengli", "repo": "attic", - "rev": "efa15b9788add910f6e8409dddfb7bb69c2ad201", + "rev": "171c89fbe0f099e8bf6e466a1a1a12578f703f0e", "type": "github" }, "original": { @@ -82,6 +82,22 @@ "type": "github" } }, + "bufferline-nvim": { + "flake": false, + "locked": { + "lastModified": 1681547098, + "narHash": "sha256-WZAJiDm77rS9S4tN7dz03jjnv1jFvTur6dLg8OkYVM4=", + "owner": "akinsho", + "repo": "bufferline.nvim", + "rev": "243893ba9d5d1049dd451a25cab32ec7f8f67bcf", + "type": "github" + }, + "original": { + "owner": "akinsho", + "repo": "bufferline.nvim", + "type": "github" + } + }, "comment-box-nvim": { "flake": false, "locked": { @@ -101,11 +117,11 @@ "copilot-lua": { "flake": false, "locked": { - "lastModified": 1680027228, - "narHash": "sha256-3u+2azMRm24mp5iOrxwYg9QrM2xJHnSjGsldIDRS6HQ=", + "lastModified": 1681223911, + "narHash": "sha256-ttF9LW6PNKk/BBWET2BUqtq5f7OIZ7ohtQevAaP8srg=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "f0b41fb89ef2ed7ab4e8cd5208a30755aa638fc4", + "rev": "a4a37dda9e48986e5d2a90d6a3cbc88fca241dbb", "type": "github" }, "original": { @@ -198,16 +214,32 @@ "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-utils": { "inputs": { "systems": "systems" }, "locked": { - "lastModified": 1681037374, - "narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "033b9f258ca96a10e543d4442071f614dc3f8412", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -287,17 +319,14 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": [ - "flake-utils" ] }, "locked": { - "lastModified": 1680667162, - "narHash": "sha256-2vgxK4j42y73S3XB2cThz1dSEyK9J9tfu4mhuEfAw68=", + "lastModified": 1681586243, + "narHash": "sha256-vdP79IZuDZVNSl4RN1LgEuab1Tkbv4gCxiE8VLdRf7U=", "owner": "nix-community", "repo": "home-manager", - "rev": "440faf5ae472657ef2d8cc7756d77b6ab0ace68d", + "rev": "40ebb62101c83de81e5fd7c3cfe5cea2ed21b1ad", "type": "github" }, "original": { @@ -332,11 +361,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1681066980, - "narHash": "sha256-68e+4txZITxbHP9IPYfLm36kOoI+rkMjRCbrPgtdQK8=", + "lastModified": 1681652918, + "narHash": "sha256-ybXmD3OhyMG1Yz31lxT8de7aBi2mQmXmzAZ7q49Uvi4=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f3909cf2bfdd72aff69112f18c920ac6c9ca28f1", + "rev": "b05ff89c76b2c9454c76daf2120f4ccb076a018d", "type": "github" }, "original": { @@ -371,11 +400,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1681080114, - "narHash": "sha256-rAKfgQJQRsw4QMOXdxfHIh/d5LPY6HHKBX1KtaPs2No=", + "lastModified": 1681650457, + "narHash": "sha256-IGXRZrFGFqUeM5iDgP/ojbrd+gKL40PaFFAITxbkfZ0=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "4bcedde1dc1a06107ec32c93a937de30f40aa1fc", + "rev": "3bfaac09f58ce31c33e1a56e7eaa606a87fe4c32", "type": "github" }, "original": { @@ -387,11 +416,11 @@ "lspsaga-nvim": { "flake": false, "locked": { - "lastModified": 1681041449, - "narHash": "sha256-ARbFiwfWsYapFH5p7xSCCe25RFUlUI/h8Jv81XHLBx4=", + "lastModified": 1681470671, + "narHash": "sha256-mekeKttJSsBpTxMShC0l29/Wx3VKUnHMh6YtLYtx9Lk=", "owner": "glepnir", "repo": "lspsaga.nvim", - "rev": "1fbb3e4721354d0d0a20a28bb77b3f83fe68538b", + "rev": "b2feb95e84776f7c9cdfb96e4c89a582c9ade0e4", "type": "github" }, "original": { @@ -402,11 +431,11 @@ }, "master": { "locked": { - "lastModified": 1681080342, - "narHash": "sha256-7GvJEuGANq9/zk549rf5zoeTyFdsw5irvVLf5crpBnE=", + "lastModified": 1681658302, + "narHash": "sha256-KDXpkA7JOTnffQWAA5W246FoJNbdSur5HgzYScOzYKQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "340acec509d71d0d0decd7a82e7cb52ae4c76065", + "rev": "f30febf83039aaa4a4399d46d068900a2b449de6", "type": "github" }, "original": { @@ -415,25 +444,47 @@ "type": "github" } }, - "neovim": { + "neovim-flake": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] }, "locked": { "dir": "contrib", - "lastModified": 1680264322, - "narHash": "sha256-nv1lSK+y/vv6ASMhNFoJE1YcNisJmQ0A+anNLzscvKk=", + "lastModified": 1681631972, + "narHash": "sha256-zF+sWaQPJpoDyhWXvwJGR7VryYr9+qBCWMTNRjA3BhQ=", "owner": "neovim", "repo": "neovim", - "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", + "rev": "0d9b0fbe579343fa6d6c46e6e1bf6bb8719ea5e0", "type": "github" }, "original": { "dir": "contrib", "owner": "neovim", "repo": "neovim", - "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", + "type": "github" + } + }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat_2", + "neovim-flake": "neovim-flake", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1681632748, + "narHash": "sha256-c0CskvdpipnTn5TSjq6KqNkeKRPYCDMmVTdZL08HTJA=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "0e3e0029aa6353ecb7304d4a683d8d6ee69379ef", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", "type": "github" } }, @@ -448,11 +499,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1680544266, - "narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=", + "lastModified": 1681412802, + "narHash": "sha256-IcEala6vFQ7SFNOPCeXBh9Jbl8nL2QOtLmO7RbDsBbo=", "owner": "oxalica", "repo": "nil", - "rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362", + "rev": "1d5bc81023c21b22cfbea06a8b4b82963c01b941", "type": "github" }, "original": { @@ -527,27 +578,27 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1671983799, - "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", + "lastModified": 1681571934, + "narHash": "sha256-Q3B3HTqhTahhPCT53ahK1FPktOXlEWmudSttd9CWGbE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836", + "rev": "29176972b4be60f7d3eb3101f696c99f2e6ada57", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_5": { "locked": { - "lastModified": 1681028957, - "narHash": "sha256-gKWkKT/nFg2d9HZyK7VAjRzkyPfKLx+uIGyWXDw0NB0=", + "lastModified": 1681633309, + "narHash": "sha256-HvEzKU/ZWGyIt2G+AIEKmMt/ED3P+Tgjw3/BkArti0o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "11c129c16f4051ad215ea7b0d297a6c7cf5d24d7", + "rev": "cb578ff7040066fd1b3f6f087bca796ddbf598b5", "type": "github" }, "original": { @@ -559,11 +610,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1678898370, - "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", + "lastModified": 1681303793, + "narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac718d02867a84b42522a0ece52d841188208f2c", + "rev": "fe2ecaf706a5907b5e54d979fbde4924d84b65fc", "type": "github" }, "original": { @@ -591,18 +642,18 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", "gitignore": "gitignore", "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1680981441, - "narHash": "sha256-Tqr2mCVssUVp1ZXXMpgYs9+ZonaWrZGPGltJz94FYi4=", + "lastModified": 1681413034, + "narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "2144d9ddcb550d6dce64a2b44facdc8c5ea2e28a", + "rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5", "type": "github" }, "original": { @@ -617,6 +668,7 @@ "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "attic": "attic", + "bufferline-nvim": "bufferline-nvim", "comment-box-nvim": "comment-box-nvim", "copilot-lua": "copilot-lua", "flake-utils": "flake-utils", @@ -627,7 +679,7 @@ "hyprpaper": "hyprpaper", "lspsaga-nvim": "lspsaga-nvim", "master": "master", - "neovim": "neovim", + "neovim-nightly-overlay": "neovim-nightly-overlay", "nil": "nil", "nixpkgs": "nixpkgs_5", "nvim-treesitter-textsubjects": "nvim-treesitter-textsubjects", @@ -707,11 +759,11 @@ }, "stable": { "locked": { - "lastModified": 1680865339, - "narHash": "sha256-H6rmJ1CyJ3Q5ZyoLMYq/UEYMS9Q1orJjRpWiQ47HudE=", + "lastModified": 1681482634, + "narHash": "sha256-cT/nr3L8khEYZSGp8qqwxFH+/q4/547MfyOdSj6MhBk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0040164e473509b4aee6aedb3b923e400d6df10b", + "rev": "fda0d99c2cbbb5c89d8855d258cb0821bd9113ad", "type": "github" }, "original": { @@ -786,11 +838,11 @@ ] }, "locked": { - "lastModified": 1681066882, - "narHash": "sha256-8szxuwDOQcYyS8TZokGpIJYzaTwBQ9pmmcCkeuX2YV8=", + "lastModified": 1681127512, + "narHash": "sha256-vklOOhBj5W8fii6yN4L2WY5ZeifBmsq3+mJ2wC1Pk9U=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "e48165c5637260cf2a88494a112269922dee58de", + "rev": "04f579377a32781ce57c9cf4ba2a5bcb7f53fa97", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e748da9..a5ea24c 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,6 @@ attic.url = "github:zhaofengli/attic"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.inputs.utils.follows = "flake-utils"; home-manager.url = "github:nix-community/home-manager"; nil.inputs.flake-utils.follows = "flake-utils"; diff --git a/modules/security/default.nix b/modules/security/default.nix index c3cf86f..4ae5302 100644 --- a/modules/security/default.nix +++ b/modules/security/default.nix @@ -11,10 +11,10 @@ # tmpfs = /tmp is mounted in ram. Doing so makes temp file management speedy # on ssd systems, and volatile! Because it's wiped on reboot. - boot.tmpOnTmpfs = lib.mkDefault true; + boot.tmp.useTmpfs = lib.mkDefault true; # If not using tmpfs, which is naturally purged on reboot, we must clean it # /tmp ourselves. /tmp should be volatile storage! - boot.cleanTmpDir = lib.mkDefault (!config.boot.tmpOnTmpfs); + boot.tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmpOnTmpfs); # Fix a security hole in place for backwards compatibility. See desc in # nixpkgs/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix From bd9bbdda100d720a2927b4744c3ced0ac60faba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:59:21 +0200 Subject: [PATCH 28/30] feat(hyprland): decrease gap size --- modules/programs/hyprland/config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index cb2b447..71d512a 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -43,8 +43,8 @@ in general { # See https://wiki.hyprland.org/Configuring/Variables/ for more - gaps_in = 5 - gaps_out = 5 + gaps_in = 3 + gaps_out = 3 border_size = 2 col.active_border = rgba(1affffee) col.inactive_border = rgba(595959aa) From 8d5481949ec6c93ef7915567f7660b7f6b866ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 18:00:05 +0200 Subject: [PATCH 29/30] fix(nvim): org configuration --- modules/programs/nvim/init.lua | 6 +++++- modules/programs/nvim/plugins/orgmode.lua | 16 +--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index cb87e87..bd08d4c 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -1,11 +1,15 @@ vim.loader.enable() +-- Load custom treesitter grammar for org filetype +require("orgmode").setup_ts_grammar() require("nvim-treesitter.configs").setup({ sync_install = false, auto_install = false, highlight = { enable = true, - additional_vim_regex_highlighting = false, + -- Required for spellcheck, some LaTex highlights and + -- code block highlights that do not have ts grammar + additional_vim_regex_highlighting = { "org" }, }, }) diff --git a/modules/programs/nvim/plugins/orgmode.lua b/modules/programs/nvim/plugins/orgmode.lua index 556d5e6..789eb0a 100644 --- a/modules/programs/nvim/plugins/orgmode.lua +++ b/modules/programs/nvim/plugins/orgmode.lua @@ -1,18 +1,4 @@ -local orgmode = require("orgmode") --- Load custom treesitter grammar for org filetype -orgmode.setup_ts_grammar() --- Treesitter configuration -require("nvim-treesitter.configs").setup({ - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting - highlight = { - enable = true, - -- Required for spellcheck, some LaTex highlights and - -- code block highlights that do not have ts grammar - additional_vim_regex_highlighting = { "org" }, - }, -}) -orgmode.setup({ +require("orgmode").setup({ org_agenda_files = { "~/Notes/org" }, org_default_notes_file = "~/Notes/org/refile.org", }) From 5cffc8c06cdca81150ec553969480cf51c1dc32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 18:00:39 +0200 Subject: [PATCH 30/30] refactor(programs): sort imports --- modules/programs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 703dcba..788e8fd 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -18,13 +18,13 @@ ./ledger ./logseq.nix ./miracast.nix + ./nvim ./python.nix ./rofi ./spotify.nix ./ssh.nix ./sway.nix ./thunar.nix - ./nvim ./zathura.nix ./zsh.nix ];