From 001783fc7e462c6c5331bb67c0ebf4d133e74083 Mon Sep 17 00:00:00 2001 From: mat ess Date: Fri, 29 Jul 2022 18:01:24 -0400 Subject: [PATCH] Add some packages and configs --- darwin/default.nix | 1 - darwin/homebrew.nix | 6 +++++- flake.lock | 34 ++++++++++++++++++++++++++++++++++ flake.nix | 13 +++++++++++++ home/default.nix | 15 +++++++++++++++ home/kakoune.nix | 37 +++++++++++++++++++++++++++++++++---- home/kitty.nix | 2 ++ pkgs/default.nix | 1 + pkgs/kakoune-sudo-write.nix | 8 ++++++++ 9 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 pkgs/kakoune-sudo-write.nix diff --git a/darwin/default.nix b/darwin/default.nix index c02e978..45f16da 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -13,7 +13,6 @@ # See workaround at ../home/copyApplications.nix environment.systemPackages = with pkgs; [ discord-ptb - element-desktop # firefox * kitty lagrange diff --git a/darwin/homebrew.nix b/darwin/homebrew.nix index 140352b..1be11cc 100644 --- a/darwin/homebrew.nix +++ b/darwin/homebrew.nix @@ -7,7 +7,9 @@ let in { - environment.shellInit = mkIf brewEnabled '' + # perma-enabling to prevent losing brew when we skip bundling + # environment.shellInit = mkIf brewEnabled '' + environment.shellInit = '' eval "$(${config.homebrew.brewPrefix}/brew shellenv)" ''; @@ -63,6 +65,8 @@ in # "mullvadvpn" "origin" "rectangle" + "seaglass" + "secretive" "signal" "steam" "transmission" diff --git a/flake.lock b/flake.lock index 1d366a8..4b8b1f0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "auto-pairs-kak-src": { + "flake": false, + "locked": { + "lastModified": 1647175978, + "narHash": "sha256-MgqCuGj03ctKty2yQgQvy6qV/0s7euNwukhSjqauqW8=", + "owner": "alexherbo2", + "repo": "auto-pairs.kak", + "rev": "bfdcb8566076f653ec707f86207f83ea75173ce9", + "type": "github" + }, + "original": { + "owner": "alexherbo2", + "repo": "auto-pairs.kak", + "type": "github" + } + }, "dark-mode-notify-src": { "flake": false, "locked": { @@ -104,6 +120,22 @@ "type": "github" } }, + "kakoune-sudo-write-src": { + "flake": false, + "locked": { + "lastModified": 1629101282, + "narHash": "sha256-O+yw8upyYnQThDoWKnFbjrjthPTCm6EaBUoJNqpUPLA=", + "owner": "occivink", + "repo": "kakoune-sudo-write", + "rev": "ec0d6d26ceaadd93d6824630ba587b31e442214d", + "type": "github" + }, + "original": { + "owner": "occivink", + "repo": "kakoune-sudo-write", + "type": "github" + } + }, "luar-src": { "flake": false, "locked": { @@ -170,12 +202,14 @@ }, "root": { "inputs": { + "auto-pairs-kak-src": "auto-pairs-kak-src", "dark-mode-notify-src": "dark-mode-notify-src", "darwin": "darwin", "flake-compat": "flake-compat", "flake-utils": "flake-utils", "home-manager": "home-manager", "homebrew-enabled": "homebrew-enabled", + "kakoune-sudo-write-src": "kakoune-sudo-write-src", "luar-src": "luar-src", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", diff --git a/flake.nix b/flake.nix index 05cad43..ac7090c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,14 @@ url = github:andreyorst/smarttab.kak; flake = false; }; + auto-pairs-kak-src = { + url = github:alexherbo2/auto-pairs.kak; + flake = false; + }; + kakoune-sudo-write-src = { + url = github:occivink/kakoune-sudo-write; + flake = false; + }; }; outputs = { self, darwin, nixpkgs, home-manager, flake-utils, ... }@inputs: @@ -205,6 +213,11 @@ lib = prev.lib // { homebrew-enabled = inputs.homebrew-enabled.value; }; + kakounePlugins = prev.kakounePlugins // { + auto-pairs-kak = prev.kakounePlugins.auto-pairs-kak.overrideAttrs (attrs: { + src = inputs.auto-pairs-kak-src; + }); + }; }; }; diff --git a/home/default.nix b/home/default.nix index 1759f3c..782bbf9 100644 --- a/home/default.nix +++ b/home/default.nix @@ -62,6 +62,19 @@ ctrlp ]; }; + ssh = { + enable = true; + matchBlocks."*".extraOptions = { + UseKeychain = "yes"; + AddKeysToAgent = "yes"; + IdentityFile = "~/.ssh/id_ed25519"; + }; + matchBlocks.remarkable = { + hostname = "10.11.99.1"; + user = "root"; + port = 22; + }; + }; # vscode vscode = with pkgs; { enable = true; @@ -76,6 +89,7 @@ home.packages = with pkgs; [ # System abduco # lightweight session management + atool # archive tool bottom # fancy version of `top` with ASCII graphs coreutils curl @@ -85,6 +99,7 @@ mosh # wrapper for `ssh` that better at not dropping connections procs # fancy version of `ps` pv # pipe progress viewer + rage # command line file encryption thefuck unrar # extract RAR archives wget diff --git a/home/kakoune.nix b/home/kakoune.nix index 98dd8d8..6d140f6 100644 --- a/home/kakoune.nix +++ b/home/kakoune.nix @@ -106,9 +106,10 @@ in # lsp hooks { name = "WinSetOption"; - option = "filetype=(haskell)"; + option = "filetype=(none)"; commands = '' lsp-enable-window + lsp-auto-hover-enable ''; } # general hooks @@ -119,6 +120,13 @@ in set-option window indentwidth 2 ''; } + { + name = "WinCreate"; + option = ".*"; + commands = '' + kakboard-enable + ''; + } ]; indentWidth = 4; @@ -142,6 +150,24 @@ in mode = "normal"; docstring = "Open fzf-mode buffer dialog with ctrl-b"; } + { + key = "v"; + effect = ": vertical-selection-down"; + mode = "user"; + docstring = "Extend vertical selection down"; + } + { + key = ""; + effect = ": vertical-selection-up"; + mode = "user"; + docstring = "Extend vertical selection up"; + } + { + key = "V"; + effect = ": vertical-selection-up-and-down"; + mode = "user"; + docstring = "Extend vertical selection both up and down"; + } ]; numberLines.enable = true; @@ -167,6 +193,8 @@ in extraConfig = '' eval %sh{${pkgs.kak-lsp}/bin/kak-lsp --kakoune -s $kak_session} + enable-auto-pairs + alias global w!! sudo-write ''; plugins = with pkgs.kakounePlugins; [ @@ -179,9 +207,10 @@ in kakoune-state-save kakoune-vertical-selection pkgs.smarttab-kak - # needs luar - pkgs.luar - tabs-kak + pkgs.kakoune-sudo-write + # disabled, tabs-kak tries to load before luar for some reason + # pkgs.luar + # tabs-kak ]; }; programs.fish.functions.set-kak-colors = { diff --git a/home/kitty.nix b/home/kitty.nix index 3bcd788..5688e46 100644 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -66,6 +66,8 @@ in # Shell integration manually enabled for fish shell_integration = "disabled"; + + macos_option_as_alt = "both"; }; # Change the style of italic font variants diff --git a/pkgs/default.nix b/pkgs/default.nix index dffbb1e..c3a6f94 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,6 +8,7 @@ let "dark-mode-notify" "luar" "smarttab-kak" + "kakoune-sudo-write" ]; in genAttrs pkgs buildPkg diff --git a/pkgs/kakoune-sudo-write.nix b/pkgs/kakoune-sudo-write.nix new file mode 100644 index 0000000..98485d7 --- /dev/null +++ b/pkgs/kakoune-sudo-write.nix @@ -0,0 +1,8 @@ +{ kakouneUtils, kakoune-sudo-write-src, ... }: + +with kakouneUtils; + +buildKakounePlugin { + name = "kakoune-sudo-write"; + src = kakoune-sudo-write-src; +}