diff --git a/flake.lock b/flake.lock index 68ff334..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": 1675728165, - "narHash": "sha256-ebSx6DaXoGKcCoK6UcDnWvdAW6J2X6pJRPD1Pw7UNOw=", + "lastModified": 1680151825, + "narHash": "sha256-EutseXvFnDkYq95GWiGrTFqI4fqybvsPQlVV0Wy5tFU=", "owner": "arkenfox", "repo": "user.js", - "rev": "73884850632ffe284f76881786f7d5903b917f58", + "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": { @@ -98,14 +98,30 @@ "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": { - "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": { @@ -287,11 +303,11 @@ }, "flake-utils_3": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "type": "github" }, "original": { @@ -345,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": [ @@ -414,11 +414,11 @@ ] }, "locked": { - "lastModified": 1678271387, - "narHash": "sha256-H2dv/i1LRlunRtrESirELzfPWdlG/6ElDB1ksO529H4=", + "lastModified": 1680597706, + "narHash": "sha256-ZqJ3T+BxzjPH9TnmeUwS4Uu9ZQPeBXAFC9sUWlharT4=", "owner": "nix-community", "repo": "home-manager", - "rev": "36999b8d19eb6eebb41983ef017d7e0095316af2", + "rev": "ec06f419af79207b33d797064dfb3fc9dbe1df4a", "type": "github" }, "original": { @@ -454,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": { @@ -475,11 +475,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1678371846, - "narHash": "sha256-fOFX0PASpIpU4NK9Wen9yJKwg5RYe5jFIu1H0OUzglE=", + "lastModified": 1680616746, + "narHash": "sha256-y+0NkdRSmZonUhBsvPG+9BCOfIgZzGXxLfAuzo/3ULU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c9167d96467f0c1546f337828e874d7dd849f900", + "rev": "6519c0308c4dd6ab484c7854e1eca2dc8f400485", "type": "github" }, "original": { @@ -514,11 +514,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1677282271, - "narHash": "sha256-wNooEHZpKMJN2jj2qPa1jRhi6f5q1yTYCxQcXEJ32eM=", + "lastModified": 1680428635, + "narHash": "sha256-/Kz4Qy+jx1+bfSq6e2W3MbyODkhs6GqKiiybNtqzvbc=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "83867464c523c3ac2f7ce53d2c4b8d4f9b7551cd", + "rev": "db56f164dd4d6bba8f606fd49885cdbe9803fe9b", "type": "github" }, "original": { @@ -530,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": { @@ -545,11 +545,11 @@ }, "master": { "locked": { - "lastModified": 1678375527, - "narHash": "sha256-0W7Xu8XJLr8wUAf0fYKI2Ese3HB1fC5b/+lS9BPVgOQ=", + "lastModified": 1680625698, + "narHash": "sha256-GLsNwSn8OqtE5qaw5viQR+iF3YSoS4dA4PIA+5nI7kg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "87af394014d51f563dade30f3f7ef55a00a3d1d6", + "rev": "5c54bec2de3a5cf005be903a5f3e33d0c9988c35", "type": "github" }, "original": { @@ -565,17 +565,18 @@ }, "locked": { "dir": "contrib", - "lastModified": 1678371176, - "narHash": "sha256-tsPKurteDIU0bz9GutdRr4vwQ1kIsbJEbaY0nsz+H94=", + "lastModified": 1680264322, + "narHash": "sha256-nv1lSK+y/vv6ASMhNFoJE1YcNisJmQ0A+anNLzscvKk=", "owner": "neovim", "repo": "neovim", - "rev": "9ef7297ef142354ace8b1f3f277d0eee3cfdc6d4", + "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", "type": "github" }, "original": { "dir": "contrib", "owner": "neovim", "repo": "neovim", + "rev": "83bfd94d1df5eecb8e4069a227c7d24598636d63", "type": "github" } }, @@ -590,11 +591,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1678313833, - "narHash": "sha256-HUkOzLVYDTYzxH4zMeR2JIrh1zY/n3LIs8rtNnKeOTA=", + "lastModified": 1680544266, + "narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=", "owner": "oxalica", "repo": "nil", - "rev": "d1017418841c612552f73d1f670d87f57dc5e090", + "rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362", "type": "github" }, "original": { @@ -637,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": { @@ -685,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": { @@ -733,11 +734,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1678298120, - "narHash": "sha256-iaV5xqgn29xy765Js3EoZePQyZIlLZA3pTYtTnKkejg=", + "lastModified": 1680577567, + "narHash": "sha256-Y4W57i0TzczqwMTjfVSbAZT5RJx7u+mpQIW/ofrkTQs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1e383aada51b416c6c27d4884d2e258df201bc11", + "rev": "b01f185e4866de7c5b5a82f833ca9ea3c3f72fc4", "type": "github" }, "original": { @@ -749,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": { @@ -841,11 +842,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1677832802, - "narHash": "sha256-XQf+k6mBYTiQUjWRf/0fozy5InAs03O1b30adCpWeXs=", + "lastModified": 1680599552, + "narHash": "sha256-rQQJFGvWQ3Sr+m/r5KGIFN0iVaVKr6u9uraCz6jSKj4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "382bee738397ca005206eefa36922cc10df8a21c", + "rev": "3342d7c51119030490fdcd07351b53b10806891c", "type": "github" }, "original": { @@ -861,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", @@ -921,11 +922,11 @@ ] }, "locked": { - "lastModified": 1677638104, - "narHash": "sha256-vbdOoDYnQ1QYSchMb3fYGCLYeta3XwmGvMrlXchST5s=", + "lastModified": 1680488274, + "narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "f388187efb41ce4195b2f4de0b6bb463d3cd0a76", + "rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8", "type": "github" }, "original": { @@ -937,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": { @@ -952,11 +953,11 @@ }, "stable": { "locked": { - "lastModified": 1678230755, - "narHash": "sha256-SFAXgNjNTXzcAideXcP0takfUGVft/VR5CACmYHg+Fc=", + "lastModified": 1680498889, + "narHash": "sha256-4nGFBm+oILOO6DPoKTPxVlfkZSxCOY4W25zSRHESK48=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a7cc81913bb3cd1ef05ed0ece048b773e1839e51", + "rev": "799d153e4f316143a9db0eb869ecf44d8d4c0356", "type": "github" }, "original": { @@ -990,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 a95217f..6993b91 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"; @@ -24,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; @@ -40,13 +36,12 @@ 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"; nil.inputs.flake-utils.follows = "flake-utils"; - # Hyprland hyprland.url = "github:hyprwm/Hyprland"; hyprpaper.url = "github:hyprwm/hyprpaper"; hypr-contrib.url = "github:hyprwm/contrib"; @@ -66,12 +61,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 +87,11 @@ lib = nixpkgs.lib.extend (self: super: { my = import ./lib { lib = self; }; }); - ################ - ### Overlays ### - ################ - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Overlays ║ + ╚══════════════════════════════════════════════════════════╝ + */ overlay = import ./overlays { inherit inputs; inherit (self) lib; @@ -108,10 +112,11 @@ overlays.default = self.overlay; - ############### - ### Modules ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Modules ║ + ╚══════════════════════════════════════════════════════════╝ + */ nixosModules = utils.lib.exportModules [ ./modules/profiles/base.nix ./modules/profiles/gaming.nix @@ -154,10 +159,11 @@ self.nixosModules.work ]; - ############### - ### Outputs ### - ############### - + /* + ╔══════════════════════════════════════════════════════════╗ + ║ Other Outputs ║ + ╚══════════════════════════════════════════════════════════╝ + */ outputsBuilder = channels: with channels.nixpkgs; { devShells.default = mkShell { 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/config/theming/catppuccin.nix b/modules/config/theming/catppuccin.nix index 99ecea9..bca09bc 100644 --- a/modules/config/theming/catppuccin.nix +++ b/modules/config/theming/catppuccin.nix @@ -36,6 +36,20 @@ in { home-manager.users.moritz = { programs = { + fzf.colors = { + "bg+" = "#${surface0}"; + "fg+" = "#${text}"; + "hl+" = "#${red}"; + bg = "#${base}"; + fg = "#${text}"; + header = "#${red}"; + hl = "#${red}"; + info = "#${mauve}"; + marker = "#${rosewater}"; + pointer = "#${rosewater}"; + prompt = "#${mauve}"; + spinner = "#${rosewater}"; + }; kitty.extraConfig = '' # vim:ft=kitty diff --git a/modules/config/theming/dracula.nix b/modules/config/theming/dracula.nix index 22ef8e6..76fa25a 100644 --- a/modules/config/theming/dracula.nix +++ b/modules/config/theming/dracula.nix @@ -4,22 +4,36 @@ with lib; let cfg = config.my.theming; - background = "#282a36"; - currentLine = "#44475a"; - foreground = "#f8f8f2"; - comment = "#6272a4"; - cyan = "#8be9fd"; - green = "#50fa7b"; - orange = "#ffb86c"; - pink = "#ff79c6"; - purple = "#bd93f9"; - red = "#ff5555"; - yellow = "#f1fa8c"; + background = "282a36"; + currentLine = "44475a"; + foreground = "f8f8f2"; + comment = "6272a4"; + cyan = "8be9fd"; + green = "50fa7b"; + orange = "ffb86c"; + pink = "ff79c6"; + purple = "bd93f9"; + red = "ff5555"; + yellow = "f1fa8c"; in { config = mkIf (cfg.enable && cfg.scheme == "dracula") { home-manager.users.moritz = { programs = { + fzf.colors = { + "bg+" = "#${currentLine}"; + "fg+" = "#${foreground}"; + "hl+" = "#${purple}"; + bg = "#${background}"; + fg = "#${foreground}"; + header = "#${comment}"; + hl = "#${purple}"; + info = "#${orange}"; + marker = "#${pink}"; + pointer = "#${pink}"; + prompt = "#${green}"; + spinner = "#${orange}"; + }; kitty.extraConfig = '' # https://draculatheme.com/kitty @@ -142,9 +156,9 @@ in }; xsession.windowManager.bspwm = { settings = { - focused_border_color = purple; - normal_border_color = background; - active_border_color = background; + focused_border_color = "#${purple}"; + normal_border_color = "#${background}"; + active_border_color = "#${background}"; }; }; services = { @@ -181,42 +195,43 @@ in polybar = { config = { "bar/bottom" = { - inherit background foreground; - border-color = background; + background = "#${background}"; + foreground = "#${foreground}"; + border-color = "#${background}"; }; "module/bspwm" = { - label-focused-foreground = pink; - label-occupied-foreground = comment; - label-urgent-foreground = red; - label-empty-foreground = currentLine; - label-separator-foreground = background; + label-focused-foreground = "#${pink}"; + label-occupied-foreground = "#${comment}"; + label-urgent-foreground = "#${red}"; + label-empty-foreground = "#${currentLine}"; + label-separator-foreground = "#${background}"; }; "module/cpu" = { - format-foreground = background; - format-background = green; + format-foreground = "#${background}"; + format-background = "#${green}"; }; "module/time" = { - format-foreground = background; - format-background = cyan; + format-foreground = "#${background}"; + format-background = "#${cyan}"; }; "module/date" = { - format-foreground = background; - format-background = yellow; + format-foreground = "#${background}"; + format-background = "#${yellow}"; }; "module/memory" = { - format-foreground = background; - format-background = cyan; + format-foreground = "#${background}"; + format-background = "#${cyan}"; }; "module/pulseaudio" = { - format-volume-foreground = background; - format-volume-background = purple; - label-muted = "%{F${red}}婢 %{F${background}}muted"; - format-muted-foreground = background; - format-muted-background = red; + format-volume-foreground = "#${background}"; + format-volume-background = "#${purple}"; + label-muted = "%{F#${red}}婢 %{F#${background}}muted"; + format-muted-foreground = "#${background}"; + format-muted-background = "#${red}"; }; "module/network" = { - format-connected-foreground = background; - format-connected-background = purple; + format-connected-foreground = "#${background}"; + format-connected-background = "#${purple}"; }; }; }; diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index f24182c..7d1c6e7 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -45,7 +45,6 @@ in aliases = { ls = "exa -lh --icons --git"; cat = "bat"; - grep = "rg"; rm = "rm -i"; mv = "mv -i"; cd = "z"; @@ -137,8 +136,14 @@ in programs = { # Let Home Manager install and manage itself. home-manager.enable = true; - fzf.enable = true; + fzf = { + enable = true; + defaultOptions = [ + "--height 50%" + ]; + }; zoxide.enable = true; + navi.enable = true; }; home = { username = "moritz"; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index cc73d24..7241498 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -116,9 +116,9 @@ with lib; { calibre jellyfin-media-player keepassxc - libreoffice + stable.libreoffice # HACK to fix build error pavucontrol - signal-desktop + stable.signal-desktop tlaplusToolbox vlc thunderbird diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index c143217..5ac37d0 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -32,8 +32,6 @@ in shellAliases = shellConfig.aliases; shellInit = '' - fzf_configure_bindings --git_log=\cg - # Vi Mode fish_vi_key_bindings @@ -74,8 +72,6 @@ in cheat = "cht.sh $argv | bat -p"; }; }; - fzf.enableFishIntegration = true; - starship.enableFishIntegration = true; }; }; }; diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 3a32217..74e0c28 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -41,7 +41,11 @@ in vimdiffAlias = true; withNodeJs = true; withPython3 = true; - extraLuaConfig = builtins.readFile ./init.lua; + extraLuaConfig = lib.concatLines ( + builtins.map + builtins.readFile + [ ./options.lua ./keybinds.lua ./init.lua ] + ); extraPackages = with pkgs; [ alejandra black diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 3a9ce13..8f97399 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -1,46 +1,5 @@ -vim.g.mapleader = " " -vim.g.maplocalleader = "," - --- FIX to create spell dir if not existent -local spelldir = vim.fn.stdpath("data") .. "/site/spell" -if not vim.loop.fs_stat(spelldir) then - vim.fn.mkdir(spelldir, "p") -end - -vim.opt.autoindent = true -vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup/" } -- don't store backup in files dir -vim.opt.clipboard = "unnamedplus" -- sync with system clipboard -vim.opt.conceallevel = 2 -vim.opt.expandtab = true -- spaces instead of tabs -vim.opt.ignorecase = true -vim.opt.mouse = "a" -- mouse for all modes -vim.opt.number = true -vim.opt.relativenumber = true -vim.opt.scrolloff = 4 -- lines of context -vim.opt.shiftround = true -- round indent -vim.opt.shiftwidth = 0 -- use tabstop value -vim.opt.shortmess:append({ c = true }) -vim.opt.signcolumn = "yes" -vim.opt.smartcase = true -vim.opt.splitbelow = true -vim.opt.splitright = true -vim.opt.tabstop = 2 -vim.opt.termguicolors = true -vim.opt.undofile = true -vim.opt.undolevels = 10000 -vim.opt.updatetime = 300 -vim.opt_local.spell = true -vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling - -if vim.g.neovide then - vim.opt.guifont = "Fira Code Nerd Font:h10" - vim.g.neovide_scale_factor = 0.7 -end - require("impatient") -local wk = require("which-key") - require("nvim-treesitter.configs").setup({ sync_install = false, auto_install = false, @@ -181,7 +140,7 @@ vim.o.statuscolumn = "%= " .. "%= " -- spacing between end of column and start of text -- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -wk.register({ +require("which-key").register({ z = { R = { require("ufo").openAllFolds, "Open all folds" }, M = { require("ufo").closeAllFolds, "Close all folds" }, @@ -210,7 +169,7 @@ require("lspsaga").setup({ local lspconfig = require("lspconfig") local on_attach_def = function(_, bufnr) - wk.register({ + require("which-key").register({ K = { "Lspsaga hover_doc ++quiet", "show info" }, [""] = { l = { diff --git a/modules/programs/nvim/keybinds.lua b/modules/programs/nvim/keybinds.lua new file mode 100644 index 0000000..52ae2e2 --- /dev/null +++ b/modules/programs/nvim/keybinds.lua @@ -0,0 +1,21 @@ +-- buffers +require("which-key").register({ + b = { + name = "buffers", + b = { "Telescope buffers", "List buffers" }, + d = { "bd", "Delete buffer" }, + n = { "bnext", "Next buffer" }, + p = { "bprevious", "Previous buffer" }, + }, +}) + +-- Clear search with +require("which-key").register({ + [""] = { "noh", "Escape and clear hlsearch", mode = { "n", "i" } }, +}) + +-- better indenting +require("which-key").register({ + ["<"] = { ""] = { ">gv", "Shift right" }, +}, { mode = "v" }) diff --git a/modules/programs/nvim/options.lua b/modules/programs/nvim/options.lua new file mode 100644 index 0000000..4ebf278 --- /dev/null +++ b/modules/programs/nvim/options.lua @@ -0,0 +1,38 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = "," + +-- FIX to create spell dir if not existent +local spelldir = vim.fn.stdpath("data") .. "/site/spell" +if not vim.loop.fs_stat(spelldir) then + vim.fn.mkdir(spelldir, "p") +end + +vim.opt.autoindent = true +vim.opt.backupdir = { vim.fn.stdpath("state") .. "/nvim/backup/" } -- don't store backup in files dir +vim.opt.clipboard = "unnamedplus" -- sync with system clipboard +vim.opt.conceallevel = 2 +vim.opt.expandtab = true -- spaces instead of tabs +vim.opt.ignorecase = true +vim.opt.mouse = "a" -- mouse for all modes +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.scrolloff = 4 -- lines of context +vim.opt.shiftround = true -- round indent +vim.opt.shiftwidth = 0 -- use tabstop value +vim.opt.shortmess:append({ c = true }) +vim.opt.signcolumn = "yes" +vim.opt.smartcase = true +vim.opt.splitbelow = true +vim.opt.splitright = true +vim.opt.tabstop = 2 +vim.opt.termguicolors = true +vim.opt.undofile = true +vim.opt.undolevels = 10000 +vim.opt.updatetime = 300 +vim.opt_local.spell = true +vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling + +if vim.g.neovide then + vim.opt.guifont = "Fira Code Nerd Font:h10" + vim.g.neovide_scale_factor = 0.7 +end diff --git a/modules/programs/nvim/plugins/bufferline-nvim.lua b/modules/programs/nvim/plugins/bufferline-nvim.lua new file mode 100644 index 0000000..d6f74f1 --- /dev/null +++ b/modules/programs/nvim/plugins/bufferline-nvim.lua @@ -0,0 +1,2 @@ +vim.opt.termguicolors = true +require("bufferline").setup() 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/modules/programs/nvim/plugins/nvim-autopairs.lua b/modules/programs/nvim/plugins/nvim-autopairs.lua index 4de6add..540723f 100644 --- a/modules/programs/nvim/plugins/nvim-autopairs.lua +++ b/modules/programs/nvim/plugins/nvim-autopairs.lua @@ -1 +1,6 @@ require("nvim-autopairs").setup() + +-- If you want insert `(` after select function or method item +local cmp_autopairs = require("nvim-autopairs.completion.cmp") +local cmp = require("cmp") +cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) diff --git a/modules/programs/nvim/plugins/oil-nvim.lua b/modules/programs/nvim/plugins/oil-nvim.lua new file mode 100644 index 0000000..ee12680 --- /dev/null +++ b/modules/programs/nvim/plugins/oil-nvim.lua @@ -0,0 +1 @@ +require("oil").setup() 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; - } - ]; }; }; }; 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; + }; }; }