From d3f0fe0539e694fa1649d8b24330edaf27a5469b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 8 May 2023 13:03:20 +0200 Subject: [PATCH 01/15] refactor(hyprland): use getExe --- modules/programs/hyprland/default.nix | 6 +++--- modules/programs/nvim/default.nix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 0be3db8..98b41d1 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -88,11 +88,11 @@ in events = [ { event = "before-sleep"; - command = "${pkgs.swaylock}/bin/swaylock -fF"; + command = "${getExe pkgs.swaylock} -fF"; } { event = "lock"; - command = "${pkgs.swaylock}/bin/swaylock -fF"; + command = "${getExe pkgs.swaylock} -fF"; } ]; timeouts = [ @@ -132,7 +132,7 @@ in wantedBy = [ "graphical-session.target" ]; after = [ "graphical-session.target" ]; serviceConfig = { - ExecStart = "${pkgs.hyprpaper}/bin/hyprpaper -c ${config}"; + ExecStart = "${getExe pkgs.hyprpaper} -c ${config}"; RestartSec = "1s"; Restart = "on-failure"; }; diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 092636b..805e88b 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -94,3 +94,4 @@ in }; }; } + From 3a0d4845b0c71218019479108c0d9b48dfc0f137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 14 May 2023 15:27:25 +0200 Subject: [PATCH 02/15] fix: use suspend and hibernate --- hosts/nixos-laptop/default.nix | 11 +---------- modules/programs/hyprland/default.nix | 10 ++++------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 42c242c..39725c7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -29,6 +29,7 @@ xserver.libinput.enable = true; xserver.libinput.touchpad.disableWhileTyping = true; printing.enable = true; + logind.lidSwitch = "suspend-and-hibernate"; }; hardware.bluetooth.enable = true; @@ -101,16 +102,6 @@ wantedBy = [ "multi-user.target" ]; }; - programs.ssh.extraConfig = '' - Host builder - Hostname 192.168.0.14 - Port 22 - User moritz - - IdentitiesOnly yes - IdentityFile /etc/ssh/ssh_host_ed25519_key - ''; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 3a3ffeb..6f0b197 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -118,12 +118,10 @@ in } ] ++ optional (!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728 - [ - { - timeout = 30 * 60; - command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate"; - } - ]; + { + timeout = 30 * 60; + command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate"; + }; systemdTarget = "hyprland-session.target"; }; }; From e503567eda9fb13cc7e2782d300fa446773d5c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 14 May 2023 15:28:27 +0200 Subject: [PATCH 03/15] feat(desktop): add illum for backlight control --- modules/profiles/desktop.nix | 1 + modules/programs/hyprland/config.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index ac348a0..4010852 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -63,6 +63,7 @@ with lib; { }; }; services = { + illum.enable = true; gnome.gnome-keyring.enable = true; pipewire = { enable = true; diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 5feef36..eaa5a2e 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -171,8 +171,6 @@ in bind = , XF86AudioNext , exec , playerctl -p "spotifyd,firefox" next bind = , XF86AudioPlay , exec , playerctl -p "spotifyd,firefox" play-pause bind = , XF86AudioPrev , exec , playerctl -p "spotifyd,firefox" previous - binde = , XF86MonBrightnessDown , exec , brightnessctl s 10%- - binde = , XF86MonBrightnessUp , exec , brightnessctl s 10%+ # Move focus with mainMod + hjkl binde = $mainMod, H, movefocus, l From 9df08be993a41b8820fc9602816015e81986d151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 14 May 2023 15:29:09 +0200 Subject: [PATCH 04/15] feat(laptop): enable virtualisation --- hosts/nixos-laptop/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 39725c7..543e7c7 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -10,6 +10,8 @@ ./hardware-configuration.nix ]; + my.virtualisation.libvirtd.enable = true; + # BOOT boot = { supportedFilesystems = [ "btrfs" ]; From 57f2094c446d16e2214e89f8feb8d4cc3cf4a6ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 16 May 2023 12:13:20 +0200 Subject: [PATCH 05/15] feat: add webis module --- hosts/nixos-laptop/default.nix | 1 + modules/profiles/personal.nix | 2 +- modules/profiles/webis.nix | 28 ++++++++++++++++++++++++++++ secrets/secrets.nix | 5 ++++- secrets/webis-ssh.age | Bin 0 -> 669 bytes secrets/webis.age | Bin 0 -> 8187 bytes 6 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 modules/profiles/webis.nix create mode 100644 secrets/webis-ssh.age create mode 100644 secrets/webis.age diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index dedaf80..e682ab2 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -15,6 +15,7 @@ profiles = { desktop.enable = true; personal.enable = true; + webis.enable = true; }; }; diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix index 37cca50..e1cb308 100644 --- a/modules/profiles/personal.nix +++ b/modules/profiles/personal.nix @@ -18,7 +18,7 @@ in synology-drive.enable = true; }; programs = { - ssh.includeSecrets = mkDefault [ ../../secrets/ssh-home.age ]; + ssh.includeSecrets = [ ../../secrets/ssh-home.age ]; git.signing = mkDefault true; hub.enable = mkDefault true; firefox.arkenfox = { diff --git a/modules/profiles/webis.nix b/modules/profiles/webis.nix new file mode 100644 index 0000000..bded073 --- /dev/null +++ b/modules/profiles/webis.nix @@ -0,0 +1,28 @@ +{ lib +, config +, ... +}: + +with lib; +let + cfg = config.my.profiles.webis; +in + +{ + options.my.profiles.webis.enable = mkEnableOption "webis profile"; + + config = mkIf cfg.enable { + my.programs.ssh.includeSecrets = [ ../../secrets/webis-ssh.age ]; + age.secrets.webis = { + file = ../../secrets/webis.age; + name = "webis.ovpn"; + }; + services.openvpn.servers = { + webis = { + config = "config /run/agenix/webis.ovpn"; + autoStart = false; + updateResolvConf = true; + }; + }; + }; +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 179ef3a..723b0a8 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -6,7 +6,8 @@ let nixos-laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO"; nixos-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI"; nixos-work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGQdruRBgcS3JbX+8DP4GE+28M/ZnxqxhoaMM5EVUkrD"; - hosts = [ nixos-laptop nixos-desktop nixos-work ]; + hosts-personal = [ nixos-laptop nixos-desktop ]; + hosts = hosts-personal ++ [ nixos-work ]; all = users ++ hosts; in @@ -18,4 +19,6 @@ in "uni-vpn.age".publicKeys = all; "wireguard-preshared-key.age".publicKeys = all; "wireguard-private-key.age".publicKeys = all; + "webis.age".publicKeys = hosts-personal ++ [ moritz ]; + "webis-ssh.age".publicKeys = hosts-personal ++ [ moritz ]; } diff --git a/secrets/webis-ssh.age b/secrets/webis-ssh.age new file mode 100644 index 0000000000000000000000000000000000000000..f5ddae0f4df351f04fc32af8a65e3c423d9c2af1 GIT binary patch literal 669 zcmZ9_OKZ~r007_}HZ}sA)te{7MA(S2N!K)u;3Q4jq;1moBh6s0OVgxvYx+u)6zX9o zk%0(1OvVNi@xj=t_+UCjL3HX#VRKILpm^CX^E8JC6|ejLz?W5IST0Fbt6VQ=r88Pp zu{Tfv9tLYQ6_#@j3_}UfU|d{A0ckE?55`hdMNq;E{`#_^cv=pzNQ9IhH^<{AaCkA7cEe9K%f-B1G&A1!6b`0EyrU~(v#ukpx+bX zC57Qlo@HE6qY$z%kyQ?FR8gh2 ziV#*40bm#gRUwEX5kf14IUWgwRy`>@BweHhHk0uJp+&whmZv!S!-+V71Hr_}Rl( z`|FRUfA?=BcCM`kyS6)zy={GObbfu3Jtxlh*pCj5^mgm}pI7=EBeyn}PV_oP9z_54 XQ3JIO+wRKU_U!m|pj#!Dm-7Dr4xRH* literal 0 HcmV?d00001 diff --git a/secrets/webis.age b/secrets/webis.age new file mode 100644 index 0000000000000000000000000000000000000000..c7e921afba7309debff07c1c4a4e443c3f5c9e7b GIT binary patch literal 8187 zcmVniW@|-3S~hi8HgI`bYH>GXS951&I5k;LZc1ZBD^Yl7aZ+-6QZI2#XGsbzJ|Jp5 zEoX9NVRK~)FLqHjV@X(NdU9%GWJz#DYDZ0VRY6o@STAl^b4gWkV@Y>LGEhb|V`Fbg zZ!}{HEiEk|K~HTtVMa<-c49+%Rc26nR9Hf8LRM^XWlUp3HZ^8bRdjG+bWvnxRWnHn zq*(i|a`4;%%#(Vm%@=ktcUpH|N{HJ6WYLs_hy;esS3KaU$aNa3HlnBHOmjM&%r1Rs zGAMEl7Qd&k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ivIVt5@e4_G`;t*5C5P=XR!kJVIR)>TX-?fa8V7p* zO=vi4~~$7gPM^SATcs zhA~ad{}si6Fu73rFiwIL9T%^jt|7KXnCJXry!wH0;aJMDKwUBXaRQ^_Fbzw*6n&fL zPdOYzy>~7fotdDxvV%A0+0}uB{c)M}ii#;4J0dP9fk*+ARd3+$r{a8VFCjZJF^$)K zh<=rm!lj2B_C{#CRMI@4m~Z6$V>9KMoh0ACrucj?kNGtVv7cPCVSpWw*200((sx=h zvIET7=Gl9I-f(-WlQWsfDHiwJLTJt)A1t@snEsVENiLn!fwT@Wd?|F;l6A_Kl7ZgN z0Ee>J!6Zg4u$9mUKxQG874{$MOqbUC{zuS^ zg!R;@SiqS^w5zUN_Hn7geDa)@AWnb6G<^J~()L|%g|eq_dwxn%H@*;RwdAWyH!=?k zs{r<`dU$0g-H-)^xw3smoML7i*y)<4;T+6ss4CWf&>@IL$!bGYZ4r@_x>0GJk3I&X zbxSe5%@xQFF`F}K4--i~g1fzl++kkXlu0zd41Ac^oaSM0Mn_3USRe=muhkb9u6@Wg hX4!8@;l1@qaEQN$t@4N@cAi*9uq6@&2y Date: Sat, 27 May 2023 11:58:10 +0200 Subject: [PATCH 06/15] feat: add ouch --- modules/profiles/base.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 9f35c6a..a623af5 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -84,9 +84,7 @@ in environment.systemPackages = with pkgs; [ # archives - p7zip - unzip - zip + ouch # file management trash-cli From a6e8356cb58546b21ced44fb8936df218af7a4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 27 May 2023 11:59:07 +0200 Subject: [PATCH 07/15] feat(nvim)!: remove unused plugins --- modules/programs/nvim/plugins/comment-box-nvim.lua | 1 - modules/programs/nvim/plugins/gitignore-nvim.lua | 3 --- modules/programs/nvim/plugins/twilight-nvim.lua | 3 --- modules/programs/nvim/plugins/zen-mode-nvim.lua | 4 ---- 4 files changed, 11 deletions(-) delete mode 100644 modules/programs/nvim/plugins/comment-box-nvim.lua delete mode 100644 modules/programs/nvim/plugins/gitignore-nvim.lua delete mode 100644 modules/programs/nvim/plugins/twilight-nvim.lua delete mode 100644 modules/programs/nvim/plugins/zen-mode-nvim.lua diff --git a/modules/programs/nvim/plugins/comment-box-nvim.lua b/modules/programs/nvim/plugins/comment-box-nvim.lua deleted file mode 100644 index e002043..0000000 --- a/modules/programs/nvim/plugins/comment-box-nvim.lua +++ /dev/null @@ -1 +0,0 @@ -require("comment-box").setup() diff --git a/modules/programs/nvim/plugins/gitignore-nvim.lua b/modules/programs/nvim/plugins/gitignore-nvim.lua deleted file mode 100644 index 9a994df..0000000 --- a/modules/programs/nvim/plugins/gitignore-nvim.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("which-key").register({ - i = { "Gitignore", "Create .gitignore" }, -}, { prefix = "g" }) diff --git a/modules/programs/nvim/plugins/twilight-nvim.lua b/modules/programs/nvim/plugins/twilight-nvim.lua deleted file mode 100644 index f45d021..0000000 --- a/modules/programs/nvim/plugins/twilight-nvim.lua +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index bacce51..0000000 --- a/modules/programs/nvim/plugins/zen-mode-nvim.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("zen-mode").setup() -require("which-key").register({ - z = { "ZenMode", "Zen mode" }, -}, { prefix = "t" }) From d2111cc64516f31c1e72af4a67752deee06845c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 27 May 2023 12:00:08 +0200 Subject: [PATCH 08/15] feat(code)!: improve interface --- modules/programs/code.nix | 66 ++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 15 deletions(-) diff --git a/modules/programs/code.nix b/modules/programs/code.nix index 93cda16..f2a2955 100644 --- a/modules/programs/code.nix +++ b/modules/programs/code.nix @@ -9,21 +9,57 @@ let cfg = config.my.programs.code; in { - options.my.programs.code.enable = mkEnableOption "code"; - - config = mkIf cfg.enable { - home-manager.users.moritz = { - programs.vscode = { - enable = true; - package = pkgs.vscode-fhsWithPackages (ps: with ps; [ git ]); - extensions = with pkgs.vscode-extensions; [ - bbenoist.nix - dracula-theme.theme-dracula - esbenp.prettier-vscode - pkief.material-icon-theme - vscodevim.vim - ]; - }; + options.my.programs.code = { + enable = mkEnableOption "code"; + package = mkOption { + type = types.package; + default = pkgs.vscode; + }; + extensions = mkOption { + type = types.listOf types.package; + default = with pkgs.vscode-extensions; [ + bbenoist.nix + vscodevim.vim + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "copilot-nightly"; + publisher = "GitHub"; + version = "1.86.118"; + sha256 = "04nspnmd5cfnv3m9igww6h6la6pvhdqzqmdnbm1znapxqiw2m927"; + } + { + name = "copilot-chat"; + publisher = "GitHub"; + version = "0.1.2023052602"; + sha256 = "0anlzzs4g7c9mmw7yxy5bgjcs0niwa3bswgvhwspf5fh8bbq5n44"; + } + ]; + }; + wayland = mkOption { + type = types.bool; + default = true; }; }; + + config = mkIf cfg.enable { + environment.systemPackages = + let + withExtensions = pkgs.vscode-with-extensions.override { + vscode = cfg.package; + vscodeExtensions = cfg.extensions; + }; + maybeExtensions = if cfg.extensions == [ ] then cfg.package else withExtensions; + withWayland = pkgs.symlinkJoin { + name = "${maybeExtensions.name}-wayland"; + paths = [ maybeExtensions ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/code* \ + --set NIXOS_OZONE_WL 1 + ''; + }; + final = if cfg.wayland then withWayland else maybeExtensions; + in + [ final ]; + }; } From e51a263590e00e15697092b4dee4422bb0a850cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 27 May 2023 12:01:06 +0200 Subject: [PATCH 09/15] feat: add idea for desktop --- hosts/nixos-desktop/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index f0c06dd..b2b31b5 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -22,6 +22,10 @@ programs.ledger.enable = true; }; + home-manager.users.moritz.home.packages = with pkgs; [ + jetbrains.idea-community + ]; + # KERNEL boot.kernelPackages = pkgs.linuxPackages_latest; From 6e33ac75096eb1edeb2b321d26a295c736203cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 27 May 2023 12:01:36 +0200 Subject: [PATCH 10/15] feat(git): replace delta with difftastic --- modules/programs/git.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 225e50b..c3995dc 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -1,5 +1,6 @@ { config , lib +, pkgs , ... }: @@ -51,8 +52,8 @@ in extraConfig = { init.defaultBranch = "main"; merge.conflictstyle = "zdiff3"; + diff.external = getExe pkgs.difftastic; }; - delta.enable = true; signing = mkIf cfg.signing { key = "0x970C6E89EB0547A9"; signByDefault = true; From 069aaa55bbdce3a671db8c957d3a9bd30a63b27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 27 May 2023 12:02:34 +0200 Subject: [PATCH 11/15] build: update inputs --- flake.lock | 138 ++++++++++++++++++-------------- hosts/nixos-desktop/default.nix | 1 - hosts/nixos-laptop/default.nix | 1 - 3 files changed, 80 insertions(+), 60 deletions(-) diff --git a/flake.lock b/flake.lock index b514e2c..a211aea 100644 --- a/flake.lock +++ b/flake.lock @@ -3,16 +3,17 @@ "agenix": { "inputs": { "darwin": "darwin", + "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1682101079, - "narHash": "sha256-MdAhtjrLKnk2uiqun1FWABbKpLH090oeqCSiWemtuck=", + "lastModified": 1684153753, + "narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=", "owner": "ryantm", "repo": "agenix", - "rev": "2994d002dcff5353ca1ac48ec584c7f6589fe447", + "rev": "db5637d10f797bb251b94ef9040b237f4702cde3", "type": "github" }, "original": { @@ -69,11 +70,11 @@ ] }, "locked": { - "lastModified": 1681335578, - "narHash": "sha256-yIZqE6WpkgAllsJ7IAbn8k6IRz/0CS/xp6IR+8yrEP8=", + "lastModified": 1683433501, + "narHash": "sha256-9L+OZeU3bcNZ55mhMINBxnqskbaEU0mhiZIMhkEtNl0=", "owner": "zhaofengli", "repo": "attic", - "rev": "171c89fbe0f099e8bf6e466a1a1a12578f703f0e", + "rev": "5f85e35a25085b75e1cbb6cc7291726fa4fab2ed", "type": "github" }, "original": { @@ -85,11 +86,11 @@ "bufferline-nvim": { "flake": false, "locked": { - "lastModified": 1683111101, - "narHash": "sha256-KiJ/jyqNCW28dazs6ex7Ng5TjRetZFjQunsmG5Wp5C8=", + "lastModified": 1684703438, + "narHash": "sha256-WM8/dHqiEykuw0qEQtenM5Rcv/Jr3Jxj5vulC/IKfAE=", "owner": "akinsho", "repo": "bufferline.nvim", - "rev": "41660189da6951d14436147dff30ed7f0d12ed01", + "rev": "32d74d5d044f7cc89892d4781a83d55ee4ed552a", "type": "github" }, "original": { @@ -133,11 +134,11 @@ "copilot-lua": { "flake": false, "locked": { - "lastModified": 1683276482, - "narHash": "sha256-xZFDqZUdrD69LuUIu8MjhZ8WFH0hC5yX5nYKJkxzlJs=", + "lastModified": 1683572689, + "narHash": "sha256-+dqwwBHDRh1vmbgx8o1RVMEAN7Hlr5I5L71wdagDo/o=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "8b0fd23747ef82154ef9f919c75623156465cc89", + "rev": "653bbdc44cd569a5fd0617e5a9d3df2b1359e230", "type": "github" }, "original": { @@ -270,11 +271,11 @@ ] }, "locked": { - "lastModified": 1680392223, - "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "lastModified": 1683560683, + "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "rev": "006c75898cf814ef9497252b022e91c946ba8e17", "type": "github" }, "original": { @@ -510,15 +511,36 @@ "home-manager": { "inputs": { "nixpkgs": [ + "agenix", "nixpkgs" ] }, "locked": { - "lastModified": 1683276742, - "narHash": "sha256-QURv/m81hd6TN5RMjlSHhE1zLpXHsvDEm66qv3MRBsM=", + "lastModified": 1682203081, + "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "38271ead8e7b291beb9d3b8312e66c3268796c0a", + "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1684824189, + "narHash": "sha256-k3nCkn5Qy67rCguuw6YkGuL6hOUNRKxQoKOjnapk5sU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "58eb968c21d309a6c2b020ea8d64e25c38ceebba", "type": "github" }, "original": { @@ -532,11 +554,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1683107384, - "narHash": "sha256-maCeGSr7UaxMzHgqHBtahwhf8nhenTytJnCWOA+DoXI=", + "lastModified": 1684479483, + "narHash": "sha256-NCkOkgR7PtkAQmYgeYd6vOzkulQjxlf+vWGUmrQu4uw=", "owner": "hyprwm", "repo": "contrib", - "rev": "a5792efdb113e9e971dc6fe5114fee814afbfb81", + "rev": "805bedf51a2f75a2279b6fc75b3066ff21f235ee", "type": "github" }, "original": { @@ -553,11 +575,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1683276380, - "narHash": "sha256-Sd8dfgA46ov9bynmGysBXsrqGuqi49Pa3OrUvPtSXQE=", + "lastModified": 1684844798, + "narHash": "sha256-ZrMXFoEA535jOZ+eDA3s+URZ5MkVRksBgL5qGnb6Ciw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d1d4683c9162aa4777a4a0da0691ba8c0bd6b7e7", + "rev": "eb1f832fcec5838053c6b031b656e4f949ada57b", "type": "github" }, "original": { @@ -592,11 +614,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1682542538, - "narHash": "sha256-752hHXEGsvKdw1Hm2LoFfi6sj2zVxu2AuKi4sRA7HN0=", + "lastModified": 1684265311, + "narHash": "sha256-zFOShOYS7zMcyCT9bFQlWB/ZtTelAFKKGUq4XBRQLE0=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "b4fdc0be52d7c3e48e932698bafc3f69dbd45b3b", + "rev": "b82254e957cfa60124240e8d94e7368cbf6d392d", "type": "github" }, "original": { @@ -608,11 +630,11 @@ "lspsaga-nvim": { "flake": false, "locked": { - "lastModified": 1683277504, - "narHash": "sha256-0F5Lyp/XWMTd01YuLKEIk3Xg1pLy6enRMbisQHioRmY=", + "lastModified": 1684482876, + "narHash": "sha256-ETT0HPLTA6ZO2C51+YXQ2PTkol61Azzn9FhLhmObrr8=", "owner": "glepnir", "repo": "lspsaga.nvim", - "rev": "76696bed4397c3b58563c246dc1f7856ed4af023", + "rev": "01b9633aefd010f272d6c7e3d8293c44fcfe7696", "type": "github" }, "original": { @@ -623,11 +645,11 @@ }, "master": { "locked": { - "lastModified": 1683293296, - "narHash": "sha256-bDFpYbryuE2wSy3iRbkyD1kX6P9YW+fGhc7sYHDRW8o=", + "lastModified": 1684857135, + "narHash": "sha256-MrX+6QO3xf+Gkm+BgU45jBB/l9XRvH/hGsLfx8fEetU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8f797fa93d996ed714c2877af0a663dd0a99d10b", + "rev": "499cad7a722caf0bebb2a382a67fa39c992acebd", "type": "github" }, "original": { @@ -646,11 +668,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1682581904, - "narHash": "sha256-9P4T2erXXrPxXTTLgD29U/IdKCOYqP4xbwdYswtVBA8=", + "lastModified": 1684757802, + "narHash": "sha256-Uo8HJ5j33mzgfrpK2zo0N/vgzTFG8KhMBE4+M1C9oCo=", "owner": "neovim", "repo": "neovim", - "rev": "d321deb4a9b05e9d81b79ac166274f4a6e7981bf", + "rev": "07883940b2294e0ab32fb58e6624d18d9dd1715a", "type": "github" }, "original": { @@ -669,11 +691,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1682955971, - "narHash": "sha256-6Orm5CIh/Zz3X/RHbMbLnii5jSyEjLxV9KF7lrrI5pA=", + "lastModified": 1684800319, + "narHash": "sha256-cyR9g1WSX1WCPGOgL/JXjzwir0Db7k9WMWfwuMgMl5w=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "a9719c5050b1abbb0adada7dd9f98e0cdbd3ed53", + "rev": "1d9dcda97f8d16214821ace2cf92f61f1cc348c3", "type": "github" }, "original": { @@ -693,11 +715,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1683254762, - "narHash": "sha256-BjJ3hNPCGBHJ/PttVFdVc2ogDAQqrOLSuWqLPAl72Lw=", + "lastModified": 1684534870, + "narHash": "sha256-QrOkY6Ei/7FZg50Ht8iC9ryqrQyBzjtnSQoftL8ZNNc=", "owner": "oxalica", "repo": "nil", - "rev": "c2f303fd8be05039958b5fefcd0ea38e362cf04b", + "rev": "17ed1578f3a225f2760d4da3adb440eb8677f2d3", "type": "github" }, "original": { @@ -813,11 +835,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1674641431, - "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", + "lastModified": 1683014792, + "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", + "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42", "type": "github" }, "original": { @@ -845,11 +867,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1682929865, - "narHash": "sha256-jxVrgnf5QNjO+XoxDxUWtN2G5xyJSGZ5SWDQFxMuHxc=", + "lastModified": 1684724044, + "narHash": "sha256-OysG4ORx60BcUyBVClbOBVybqZ4Ep8Xh8EIDvNam4WU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f2e9a130461950270f87630b11132323706b4d91", + "rev": "b31c968ff28927d477eed85012e8090578c70852", "type": "github" }, "original": { @@ -861,11 +883,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1683267615, - "narHash": "sha256-A/zAy9YauwdPut90h6cYC1zgP/WmuW9zmJ+K/c5i6uc=", + "lastModified": 1684759798, + "narHash": "sha256-Kpbf5yKvKcj/yPqE1zYC6gju4JwTsYxTIZEvOII0jr4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b6445b611472740f02eae9015150c07c5373340", + "rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054", "type": "github" }, "original": { @@ -916,11 +938,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1682596858, - "narHash": "sha256-Hf9XVpqaGqe/4oDGr30W8HlsWvJXtMsEPHDqHZA6dDg=", + "lastModified": 1684842236, + "narHash": "sha256-rYWsIXHvNhVQ15RQlBUv67W3YnM+Pd+DuXGMvCBq2IE=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "fb58866e20af98779017134319b5663b8215d912", + "rev": "61e567d6497bc9556f391faebe5e410e6623217f", "type": "github" }, "original": { @@ -968,7 +990,7 @@ "copilot-lua": "copilot-lua", "flake-utils": "flake-utils", "gitignore-nvim": "gitignore-nvim", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpaper": "hyprpaper", @@ -1053,11 +1075,11 @@ }, "stable": { "locked": { - "lastModified": 1683207485, - "narHash": "sha256-gs+PHt/y/XQB7S8+YyBLAM8LjgYpPZUVFQBwpFSmJro=", + "lastModified": 1684661732, + "narHash": "sha256-2/Xo/UmUUoMXc0T5tzoUsYjMLLMjEfzRWDAQB0WwtW0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cc45a3f8c98e1c33ca996e3504adefbf660a72d1", + "rev": "b0671cbf1e5c443f7fbfd4941ee0f8a151435114", "type": "github" }, "original": { diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index b2b31b5..3b72865 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -35,7 +35,6 @@ loader = { grub = { enable = true; - version = 2; device = "nodev"; efiSupport = true; useOSProber = true; diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index f58998f..742c13a 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -21,7 +21,6 @@ loader = { grub = { enable = true; - version = 2; device = "nodev"; efiSupport = true; }; From 1366bf3e088100055e9d271b99450f5bd15f0779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 28 May 2023 18:23:25 +0200 Subject: [PATCH 12/15] feat(nvim)!: add mini-nvim --- flake.nix | 9 - modules/programs/nvim/default.nix | 2 - modules/programs/nvim/init.lua | 10 +- .../programs/nvim/plugins/bufferline-nvim.lua | 2 - .../programs/nvim/plugins/catppuccin-nvim.lua | 11 + .../programs/nvim/plugins/comment-nvim.lua | 1 - modules/programs/nvim/plugins/copilot-lua.lua | 3 + .../programs/nvim/plugins/dashboard-nvim.lua | 9 - .../programs/nvim/plugins/lualine-nvim.lua | 44 ---- modules/programs/nvim/plugins/mini-nvim.lua | 72 +++++++ .../programs/nvim/plugins/neo-tree-nvim.lua | 195 ------------------ .../programs/nvim/plugins/null-ls-nvim.lua | 35 +--- .../programs/nvim/plugins/nvim-autopairs.lua | 5 - .../programs/nvim/plugins/nvim-surround.lua | 1 - modules/programs/nvim/plugins/oil-nvim.lua | 3 + .../nvim/plugins/telescope-zoxide.lua | 4 - overlays/vimPlugins.nix | 19 +- 17 files changed, 104 insertions(+), 321 deletions(-) delete mode 100644 modules/programs/nvim/plugins/bufferline-nvim.lua delete mode 100644 modules/programs/nvim/plugins/comment-nvim.lua delete mode 100644 modules/programs/nvim/plugins/dashboard-nvim.lua delete mode 100644 modules/programs/nvim/plugins/lualine-nvim.lua create mode 100644 modules/programs/nvim/plugins/mini-nvim.lua delete mode 100644 modules/programs/nvim/plugins/neo-tree-nvim.lua delete mode 100644 modules/programs/nvim/plugins/nvim-autopairs.lua delete mode 100644 modules/programs/nvim/plugins/nvim-surround.lua delete mode 100644 modules/programs/nvim/plugins/telescope-zoxide.lua diff --git a/flake.nix b/flake.nix index cdb572c..a40219e 100644 --- a/flake.nix +++ b/flake.nix @@ -34,21 +34,12 @@ # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; - bufferline-nvim.flake = false; - bufferline-nvim.url = "github:akinsho/bufferline.nvim"; - cmp-async-path.url = "github:FelipeLema/cmp-async-path"; cmp-async-path.flake = false; - 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"; diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index 805e88b..ac10533 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -75,7 +75,6 @@ in lsp_lines-nvim lspkind-nvim lspsaga-nvim-original - lualine-lsp-progress luasnip nui-nvim nvim-cmp @@ -87,7 +86,6 @@ in popup-nvim promise-async vim-fugitive - vim-lion vim-tmux-navigator ] ++ pluginsWithConfig; }; diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index d7bc4e7..cb933b2 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -22,10 +22,10 @@ vim.api.nvim_create_autocmd("InsertEnter", { require("copilot_cmp").setup() local default_sources = { - { name = "async_path", priority = 4 }, - { name = "copilot", priority = 3 }, + { name = "async_path", priority = 1 }, + { name = "copilot", priority = 2 }, { name = "luasnip", priority = 2 }, - { name = "nvim_lsp", priority = 4 }, + { name = "nvim_lsp", priority = 3 }, } cmp.setup({ @@ -75,8 +75,8 @@ vim.api.nvim_create_autocmd("InsertEnter", { cmp.setup.filetype("org", { sources = vim.tbl_deep_extend("force", default_sources, { - { name = "buffer", priority = 5 }, - { name = "orgmode", priority = 5 }, + { name = "buffer", priority = 1 }, + { name = "orgmode", priority = 3 }, }), }) end, diff --git a/modules/programs/nvim/plugins/bufferline-nvim.lua b/modules/programs/nvim/plugins/bufferline-nvim.lua deleted file mode 100644 index d6f74f1..0000000 --- a/modules/programs/nvim/plugins/bufferline-nvim.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.opt.termguicolors = true -require("bufferline").setup() diff --git a/modules/programs/nvim/plugins/catppuccin-nvim.lua b/modules/programs/nvim/plugins/catppuccin-nvim.lua index 9c3b7d7..921651c 100644 --- a/modules/programs/nvim/plugins/catppuccin-nvim.lua +++ b/modules/programs/nvim/plugins/catppuccin-nvim.lua @@ -1,6 +1,17 @@ require("catppuccin").setup({ compile_path = vim.fn.stdpath("cache") .. "/catppuccin", -- fix issue of writing to nix store integrations = { + gitsigns = true, + lsp_saga = true, + mini = true, + noice = true, + cmp = true, + native_lsp = { + enabled = true, + }, + treesitter = true, + telescope = true, + lsp_trouble = true, which_key = true, }, }) diff --git a/modules/programs/nvim/plugins/comment-nvim.lua b/modules/programs/nvim/plugins/comment-nvim.lua deleted file mode 100644 index bd47faf..0000000 --- a/modules/programs/nvim/plugins/comment-nvim.lua +++ /dev/null @@ -1 +0,0 @@ -require("Comment").setup() diff --git a/modules/programs/nvim/plugins/copilot-lua.lua b/modules/programs/nvim/plugins/copilot-lua.lua index 7135331..94e9600 100644 --- a/modules/programs/nvim/plugins/copilot-lua.lua +++ b/modules/programs/nvim/plugins/copilot-lua.lua @@ -6,3 +6,6 @@ vim.api.nvim_create_autocmd("VimEnter", { desc = "Disable Copilot by default on startup", command = "Copilot disable", }) +require("which-key").register({ + c = { "Copilot toggle", "Toggle Copilot" }, +}, { prefix = "t" }) diff --git a/modules/programs/nvim/plugins/dashboard-nvim.lua b/modules/programs/nvim/plugins/dashboard-nvim.lua deleted file mode 100644 index 83dcf23..0000000 --- a/modules/programs/nvim/plugins/dashboard-nvim.lua +++ /dev/null @@ -1,9 +0,0 @@ -require("dashboard").setup({ - theme = "hyper", - config = { - packages = { enable = false }, - week_header = { - enable = true, - }, - }, -}) diff --git a/modules/programs/nvim/plugins/lualine-nvim.lua b/modules/programs/nvim/plugins/lualine-nvim.lua deleted file mode 100644 index b72eb13..0000000 --- a/modules/programs/nvim/plugins/lualine-nvim.lua +++ /dev/null @@ -1,44 +0,0 @@ -require("lualine").setup({ - options = { - icons_enabled = true, - theme = "auto", - component_separators = "|", - section_separators = { left = "", right = "" }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - }, - }, - sections = { - lualine_a = { - { "mode", separator = { left = "" }, right_padding = 2 }, - }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename", "lsp_progress" }, - lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_y = { "progress" }, - lualine_z = { - { "location", separator = { right = "" }, left_padding = 2 }, - }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { "filename" }, - lualine_x = { "location" }, - lualine_y = {}, - lualine_z = {}, - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {}, -}) diff --git a/modules/programs/nvim/plugins/mini-nvim.lua b/modules/programs/nvim/plugins/mini-nvim.lua new file mode 100644 index 0000000..fa40eda --- /dev/null +++ b/modules/programs/nvim/plugins/mini-nvim.lua @@ -0,0 +1,72 @@ +require("mini.align").setup() +require("mini.comment").setup() +require("mini.surround").setup() +require("mini.move").setup() +require("mini.pairs").setup() +require("mini.starter").setup() + +require("mini.tabline").setup() +local tabline_current = vim.api.nvim_get_hl(0, { name = "MiniTablineCurrent" }) +vim.api.nvim_set_hl(0, "MiniTablineCurrent", { + fg = tabline_current.fg, + bg = tabline_current.bg, + bold = true, + italic = true, +}) + +require("mini.statusline").setup({ + content = { + active = function() + local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) + local git = MiniStatusline.section_git({ trunc_width = 75 }) + local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 }) + local filename = MiniStatusline.section_filename({ trunc_width = 140 }) + local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 }) + local location = MiniStatusline.section_location({ trunc_width = 75 }) + local mode_hl_inverse = mode_hl .. "Inverse" + -- Usage of `MiniStatusline.combine_groups()` ensures highlighting and + -- correct padding with spaces between groups (accounts for 'missing' + -- sections, etc.) + return MiniStatusline.combine_groups({ + { hl = mode_hl_inverse, strings = {} }, + "", + { hl = mode_hl, strings = { mode } }, + { hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } }, + "%<", -- Mark general truncate point + { hl = "MiniStatuslineFilename", strings = { filename } }, + "%=", -- End left alignment + { hl = "MiniStatuslineFileinfo", strings = { fileinfo } }, + { hl = mode_hl, strings = { location } }, + { hl = mode_hl_inverse, strings = {} }, + "", + }) + end, + }, +}) +local MiniStatuslineModes = { + "MiniStatuslineModeInsert", + "MiniStatuslineModeNormal", + "MiniStatuslineModeReplace", + "MiniStatuslineModeVisual", + "MiniStatuslineModeCommand", + "MiniStatuslineModeOther", +} +for _, mode_hl in ipairs(MiniStatuslineModes) do + local hl_table = vim.api.nvim_get_hl(0, { name = mode_hl }) + local fg = hl_table.fg + hl_table.fg = hl_table.bg + hl_table.bg = fg + vim.api.nvim_set_hl(0, mode_hl .. "Inverse", hl_table) +end + +local animate = require("mini.animate") +local animation = { + timing = animate.gen_timing.quadratic({ duration = 100, unit = "total" }), +} +animate.setup({ + cursor = animation, + scroll = { enable = false }, + resize = animation, + open = animation, + close = animation, +}) diff --git a/modules/programs/nvim/plugins/neo-tree-nvim.lua b/modules/programs/nvim/plugins/neo-tree-nvim.lua deleted file mode 100644 index 3cc61c3..0000000 --- a/modules/programs/nvim/plugins/neo-tree-nvim.lua +++ /dev/null @@ -1,195 +0,0 @@ --- 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/null-ls-nvim.lua b/modules/programs/nvim/plugins/null-ls-nvim.lua index e8d0931..7d65248 100644 --- a/modules/programs/nvim/plugins/null-ls-nvim.lua +++ b/modules/programs/nvim/plugins/null-ls-nvim.lua @@ -17,42 +17,25 @@ null_ls.setup({ }, }) --- disable cspell initially +-- disable (c)spell initially null_ls.disable("cspell") +null_ls.disable("spell") -- make sources toggle able require("which-key").register({ n = { name = "null-ls", - c = { + s = { + function() + null_ls.toggle("spell") + end, + "spell", + }, + S = { 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" }) diff --git a/modules/programs/nvim/plugins/nvim-autopairs.lua b/modules/programs/nvim/plugins/nvim-autopairs.lua deleted file mode 100644 index c537bba..0000000 --- a/modules/programs/nvim/plugins/nvim-autopairs.lua +++ /dev/null @@ -1,5 +0,0 @@ -require("nvim-autopairs").setup() - --- If you want insert `(` after select function or method item -local cmp_autopairs = require("nvim-autopairs.completion.cmp") -require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) diff --git a/modules/programs/nvim/plugins/nvim-surround.lua b/modules/programs/nvim/plugins/nvim-surround.lua deleted file mode 100644 index 8a06dad..0000000 --- a/modules/programs/nvim/plugins/nvim-surround.lua +++ /dev/null @@ -1 +0,0 @@ -require("nvim-surround").setup() diff --git a/modules/programs/nvim/plugins/oil-nvim.lua b/modules/programs/nvim/plugins/oil-nvim.lua index ee12680..e2afffb 100644 --- a/modules/programs/nvim/plugins/oil-nvim.lua +++ b/modules/programs/nvim/plugins/oil-nvim.lua @@ -1 +1,4 @@ require("oil").setup() +require("which-key").register({ + d = { require("oil").toggle_float, "directory (oil)" }, +}, { prefix = "t" }) diff --git a/modules/programs/nvim/plugins/telescope-zoxide.lua b/modules/programs/nvim/plugins/telescope-zoxide.lua deleted file mode 100644 index e725f8d..0000000 --- a/modules/programs/nvim/plugins/telescope-zoxide.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("telescope").load_extension("zoxide") -require("which-key").register({ - z = { "Telescope zoxide list", "Find location (Zoxide)" }, -}, { prefix = "f" }) diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 71a81a1..4c1e2aa 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -26,27 +26,10 @@ with lib.my; src = inputs.lspsaga-nvim; }); - cmp-async-path = prev.vimPlugins.cmp-path.overrideAttrs (old: { + cmp-async-path = prev.vimPlugins.cmp-path.overrideAttrs (_: { pname = "cmp-async-path"; version = mkVersionInput inputs.cmp-async-path; src = inputs.cmp-async-path; }); - - comment-box-nvim = prev.vimUtils.buildVimPluginFrom2Nix { - pname = "comment-box-nvim"; - 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; - }; - - bufferline-nvim = prev.vimPlugins.bufferline-nvim.overrideAttrs (_: { - version = mkVersionInput inputs.bufferline-nvim; - src = inputs.bufferline-nvim; - }); }; } From f76a8dc53f272faa6707b51d25e3d8bd13097abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 29 May 2023 12:48:43 +0200 Subject: [PATCH 13/15] feat(nix): add nix-super --- flake.lock | 144 +++++++++++++++++++++++++-------------- flake.nix | 3 + modules/programs/nix.nix | 4 +- overlays/packages.nix | 1 + 4 files changed, 99 insertions(+), 53 deletions(-) diff --git a/flake.lock b/flake.lock index a211aea..288f5fb 100644 --- a/flake.lock +++ b/flake.lock @@ -83,22 +83,6 @@ "type": "github" } }, - "bufferline-nvim": { - "flake": false, - "locked": { - "lastModified": 1684703438, - "narHash": "sha256-WM8/dHqiEykuw0qEQtenM5Rcv/Jr3Jxj5vulC/IKfAE=", - "owner": "akinsho", - "repo": "bufferline.nvim", - "rev": "32d74d5d044f7cc89892d4781a83d55ee4ed552a", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "bufferline.nvim", - "type": "github" - } - }, "cmp-async-path": { "flake": false, "locked": { @@ -115,22 +99,6 @@ "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": { @@ -263,6 +231,22 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -411,22 +395,6 @@ "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": [ @@ -627,6 +595,22 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, "lspsaga-nvim": { "flake": false, "locked": { @@ -751,6 +735,30 @@ "type": "github" } }, + "nix-super": { + "inputs": { + "flake-compat": "flake-compat_4", + "lowdown-src": "lowdown-src", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1683240066, + "narHash": "sha256-XXTB64SAMukIt2suhoPP87QDKX9vB2ByXXuE7l2Vyxw=", + "owner": "privatevoid-net", + "repo": "nix-super", + "rev": "aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d", + "type": "github" + }, + "original": { + "owner": "privatevoid-net", + "repo": "nix-super", + "rev": "aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1658161305, @@ -785,6 +793,22 @@ "type": "github" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1673800717, @@ -931,7 +955,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-utils": "flake-utils_4", "gitignore": "gitignore_2", "nixpkgs": "nixpkgs_7", @@ -978,18 +1002,32 @@ "type": "github" } }, + "rofi-wayland": { + "flake": false, + "locked": { + "lastModified": 1679493688, + "narHash": "sha256-8Hu9k84LNi+Gz8zJNE7AxYxmv8XXQz3cG7CFhv31fz4=", + "owner": "lbonn", + "repo": "rofi", + "rev": "d06095b5ed40e5d28236b7b7b575ca867696d847", + "type": "github" + }, + "original": { + "owner": "lbonn", + "ref": "wayland", + "repo": "rofi", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "attic": "attic", - "bufferline-nvim": "bufferline-nvim", "cmp-async-path": "cmp-async-path", - "comment-box-nvim": "comment-box-nvim", "copilot-lua": "copilot-lua", "flake-utils": "flake-utils", - "gitignore-nvim": "gitignore-nvim", "home-manager": "home-manager_2", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", @@ -998,9 +1036,11 @@ "master": "master", "neovim-nightly-overlay": "neovim-nightly-overlay", "nil": "nil", + "nix-super": "nix-super", "nixpkgs": "nixpkgs_6", "nvim-treesitter-textsubjects": "nvim-treesitter-textsubjects", "pre-commit-hooks": "pre-commit-hooks", + "rofi-wayland": "rofi-wayland", "smartcolumn-nvim": "smartcolumn-nvim", "stable": "stable" } diff --git a/flake.nix b/flake.nix index a40219e..d6d2b93 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,9 @@ pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + nix-super.url = "github:privatevoid-net/nix-super/aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d"; + nix-super.inputs.nixpkgs.follows = "nixpkgs"; + # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; diff --git a/modules/programs/nix.nix b/modules/programs/nix.nix index dbbf277..309e2ed 100644 --- a/modules/programs/nix.nix +++ b/modules/programs/nix.nix @@ -2,6 +2,7 @@ , lib , inputs , self +, pkgs , ... }: @@ -23,7 +24,7 @@ in }; config.nix = { - extraOptions = "experimental-features = nix-command flakes"; + package = pkgs.nix-super; gc = { automatic = cfg.gc.enable; @@ -46,6 +47,7 @@ in nixpkgs.flake = inputs.nixpkgs; stable.flake = inputs.stable; dotfiles.flake = self; + default.flake = self; }; settings = { diff --git a/overlays/packages.nix b/overlays/packages.nix index 01c938a..7412ab4 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -6,4 +6,5 @@ _: prev: attic = inputs.attic.packages.${prev.system}.default; hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; nil = inputs.nil.packages.${prev.system}.default; + nix-super = inputs.nix-super.packages.${prev.system}.default; } From bc8972b5813d43069ef1d97add4c834c5e00900e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 29 May 2023 12:49:53 +0200 Subject: [PATCH 14/15] feat(rofi): add run to combi mode --- modules/programs/rofi/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/rofi/default.nix b/modules/programs/rofi/default.nix index 1bb06dd..b5795d5 100644 --- a/modules/programs/rofi/default.nix +++ b/modules/programs/rofi/default.nix @@ -22,7 +22,7 @@ in enable = true; package = pkgs.rofi-wayland.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; }; - extraConfig = { combi-modi = "drun,window,emoji"; }; + extraConfig = { combi-modi = "drun,window,emoji,run"; }; }; xdg = { enable = true; From 04d63a1977b6e74e7e3864476aed90b4e3df3ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 29 May 2023 12:50:15 +0200 Subject: [PATCH 15/15] feat(rofi): use latest version of wayland fork --- flake.nix | 3 +++ overlays/packages.nix | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d6d2b93..31149d5 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,9 @@ nix-super.url = "github:privatevoid-net/nix-super/aaba1f91e7eba8ce029fa6bfa81ad9e14a13708d"; nix-super.inputs.nixpkgs.follows = "nixpkgs"; + rofi-wayland.url = "github:lbonn/rofi/wayland"; + rofi-wayland.flake = false; + # Neovim neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; diff --git a/overlays/packages.nix b/overlays/packages.nix index 7412ab4..f541331 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ inputs, lib, ... }: _: prev: { @@ -7,4 +7,8 @@ _: prev: hyprpaper = inputs.hyprpaper.packages.${prev.system}.default; nil = inputs.nil.packages.${prev.system}.default; nix-super = inputs.nix-super.packages.${prev.system}.default; + rofi-wayland = prev.rofi-wayland.overrideAttrs (_: { + src = inputs.rofi-wayland; + version = lib.my.mkVersionInput inputs.rofi-wayland; + }); }