all repos — dotfiles @ 45b1048dfc8a41d4144790fee6ec7672969100da

my *nix dotfiles

all: things
Anirudh Oppiliappan x@icyphox.sh
Fri, 12 May 2023 13:45:42 +0300
commit

45b1048dfc8a41d4144790fee6ec7672969100da

parent

d0a06450aabdab097dd90ddff7044deb494c273e

M config/nvim/lua/fzy/edit.luaconfig/nvim/lua/fzy/edit.lua

@@ -5,7 +5,7 @@

function M.fzy_edit(ls_cmd) fzy_cmd = { ls_cmd, - ' | fzy -p "edit > "', + '| zf', } require('fzy/fzy').fzy_search(table.concat(fzy_cmd), function(stdout)
M config/nvim/lua/lsp/lua.luaconfig/nvim/lua/lsp/lua.lua

@@ -2,7 +2,7 @@ local runtime_path = vim.split(package.path, ';')

table.insert(runtime_path, "lua/?.lua") table.insert(runtime_path, "lua/?/init.lua") -require'lspconfig'.sumneko_lua.setup { +require'lspconfig'.lua_ls.setup { settings = { Lua = { runtime = {
M nix/bin/default.nixnix/bin/default.nix

@@ -54,15 +54,15 @@ pw = import ./pw.nix pkgs;

# kubectx wrapper kctx = import ./kctx.nix pkgs; + + # kubeconfig manager + kcfg = import ./kcfg.nix pkgs; + in [ git-new-push-remote git-new-repo jp - xurls - nvidia-offload - cputil kctx - pw - webcam + kcfg ]
A nix/bin/kcfg.nix

@@ -0,0 +1,13 @@

+{ pkgs, ... }: + +let + name = "kcfg"; + fzy = "${pkgs.fzy}/bin/fzy"; + fd = "${pkgs.fd}/bin/fd"; +in +pkgs.writeShellScriptBin name + '' + cfg="$(${fd} . ~/code/upcloud/.kube | ${fzy})" + export KUBECONFIG="$cfg" + echo "KUBECONFIG set to $cfg" + ''
M nix/darwin/com.googlecode.iterm2.plistnix/darwin/com.googlecode.iterm2.plist

@@ -1287,7 +1287,7 @@ <string>Monaco 12</string>

<key>Non-ASCII Anti Aliased</key> <true/> <key>Normal Font</key> - <string>Menlo-Regular 15</string> + <string>SFMono-Regular 15</string> <key>Option Key Sends</key> <integer>2</integer> <key>Prompt Before Closing 2</key>

@@ -1359,7 +1359,7 @@ <true/>

<key>Use Non-ASCII Font</key> <false/> <key>Vertical Spacing</key> - <real>1.1399999999999999</real> + <real>1.1699999999999999</real> <key>Visual Bell</key> <true/> <key>Window Type</key>
M nix/darwin/home.nixnix/darwin/home.nix

@@ -31,5 +31,6 @@ fd

gnupg docker pinentry_mac - ]; #++ (import ../bin { inherit pkgs host; }); + kubectl + ] ++ (import ../bin { inherit pkgs host; }); }
M nix/flake.locknix/flake.lock

@@ -7,11 +7,11 @@ "nixpkgs"

] }, "locked": { - "lastModified": 1671020882, - "narHash": "sha256-nilsez0cjzvWUZzcWI+ZK3gY/wT3RvkQA9qw8GYJmEU=", + "lastModified": 1682773107, + "narHash": "sha256-+h94XeJnG3uk5imJlBi/1lVmcfCbxHpwZp5u7n3Krwg=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "2795e05cca69bddad989186888175548f4fca33d", + "rev": "379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8", "type": "github" }, "original": {

@@ -46,11 +46,27 @@ },

"flake-compat": { "flake": false, "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": {

@@ -59,6 +75,67 @@ "repo": "flake-compat",

"type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "neovim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680392223, + "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "neovim", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1667395993,

@@ -74,24 +151,121 @@ "repo": "flake-utils",

"type": "github" } }, + "flake-utils_2": { + "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" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "neovim", + "hercules-ci-effects", + "hercules-ci-agent", + "pre-commit-hooks-nix", + "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" + } + }, + "haskell-flake": { + "locked": { + "lastModified": 1678138103, + "narHash": "sha256-D0lao82bV3t2gEFjHiU6RN233t+1MnkQV+bq8MEu2ic=", + "owner": "hercules-ci", + "repo": "haskell-flake", + "rev": "1e1660e6dd00838ba73bc7952e6e73be67da18d1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "ref": "0.1-extraLibraries", + "repo": "haskell-flake", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_3", + "haskell-flake": "haskell-flake", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs", + "pre-commit-hooks-nix": "pre-commit-hooks-nix" + }, + "locked": { + "lastModified": 1678446614, + "narHash": "sha256-Z6Gsba5ahn/N0QlF0vJfIEfnZgCs4qr1IZtXAqjbE7s=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "0b90d1a87c117a5861785cb85833dd1c9df0b6ef", + "type": "github" + }, + "original": { + "id": "hercules-ci-agent", + "type": "indirect" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": [ + "neovim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681898675, + "narHash": "sha256-nIJ7CAdiHv4i1no/VgDoeTJLzbLYwu5+/Ycoyzn0S78=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "15ff4f63e5f28070391a5b09a82f6d5c6cc5c9d0", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1670253003, - "narHash": "sha256-/tJIy4+FbsQyslq1ipyicZ2psOEd8dvl4OJ9lfisjd0=", + "lastModified": 1683276742, + "narHash": "sha256-QURv/m81hd6TN5RMjlSHhE1zLpXHsvDEm66qv3MRBsM=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e8125916b420e41bf0d23a0aa33fadd0328beb3", + "rev": "38271ead8e7b291beb9d3b8312e66c3268796c0a", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.11", "repo": "home-manager", "type": "github" }

@@ -99,15 +273,17 @@ },

"neovim": { "inputs": { "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1672560816, - "narHash": "sha256-E50oV/kxBHivHUnpP/rghnAUcSuVO6f9E2PlDTGTOfA=", + "lastModified": 1682955971, + "narHash": "sha256-6Orm5CIh/Zz3X/RHbMbLnii5jSyEjLxV9KF7lrrI5pA=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "ce4158d859d54c8c4f948c2e01158e132c9bb908", + "rev": "a9719c5050b1abbb0adada7dd9f98e0cdbd3ed53", "type": "github" }, "original": {

@@ -118,7 +294,7 @@ }

}, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "neovim", "nixpkgs"

@@ -126,11 +302,11 @@ ]

}, "locked": { "dir": "contrib", - "lastModified": 1672499781, - "narHash": "sha256-YFUj+w0f6bjMI9TJI0rQOuXepzhQzngbXxYbQ0+NTLA=", + "lastModified": 1682581904, + "narHash": "sha256-9P4T2erXXrPxXTTLgD29U/IdKCOYqP4xbwdYswtVBA8=", "owner": "neovim", "repo": "neovim", - "rev": "6ba34e21fee2a81677e8261dfeaf24c8cd320500", + "rev": "d321deb4a9b05e9d81b79ac166274f4a6e7981bf", "type": "github" }, "original": {

@@ -140,13 +316,36 @@ "repo": "neovim",

"type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "neovim", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1673295039, + "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixos-hardware": { "locked": { - "lastModified": 1670959777, - "narHash": "sha256-9nQJWL7S77YZERxairPLFO6TUuF1RgQmdZO6dKRCHz4=", + "lastModified": 1683009613, + "narHash": "sha256-jJh8JaoHOLlk7iFLgZk1PlxCCNA2KTKfOLMLCa9mduA=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "0fbf27af51a7c9bc68a168fdcd63513c4f100b15", + "rev": "7dc46304675f4ff2d6be921ef60883efd31363c4", "type": "github" }, "original": {

@@ -157,27 +356,77 @@ }

}, "nixpkgs": { "locked": { - "lastModified": 1672428209, - "narHash": "sha256-eejhqkDz2cb2vc5VeaWphJz8UXNuoNoM8/Op8eWv2tQ=", - "owner": "nixos", + "lastModified": 1678293141, + "narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847", + "rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1678375444, + "narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "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_2": { "locked": { - "lastModified": 1674459583, - "narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=", + "lastModified": 1682929865, + "narHash": "sha256-jxVrgnf5QNjO+XoxDxUWtN2G5xyJSGZ5SWDQFxMuHxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f", + "rev": "f2e9a130461950270f87630b11132323706b4d91", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1683014792, + "narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42", "type": "github" }, "original": {

@@ -187,6 +436,33 @@ "repo": "nixpkgs",

"type": "github" } }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils", + "gitignore": "gitignore", + "nixpkgs": [ + "neovim", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1678376203, + "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "prompt": { "inputs": { "fenix": "fenix",

@@ -214,7 +490,7 @@ "darwin": "darwin",

"home-manager": "home-manager", "neovim": "neovim", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "prompt": "prompt" } },

@@ -232,21 +508,6 @@ "original": {

"owner": "rust-analyzer", "ref": "nightly", "repo": "rust-analyzer", - "type": "github" - } - }, - "utils": { - "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" } }
M nix/flake.nixnix/flake.nix

@@ -7,7 +7,7 @@

nixos-hardware.url = "github:nixos/nixos-hardware"; home-manager = { - url = "github:nix-community/home-manager/release-22.11"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
M nix/programs/bash.nixnix/programs/bash.nix

@@ -104,6 +104,8 @@

bind -x '"\C-r": READLINE_LINE=$(__fzy_history); READLINE_POINT="''${#READLINE_LINE}"' complete -cf doas + + source <(kubectl completion bash) complete -F __start_kubectl k '';
M nix/programs/neovim.nixnix/programs/neovim.nix

@@ -34,6 +34,8 @@ tree-sitter-grammars.tree-sitter-lua

tree-sitter-grammars.tree-sitter-html tree-sitter-grammars.tree-sitter-vim tree-sitter-grammars.tree-sitter-nix + + zf ]; extraConfig = '' runtime _init.lua
M nix/programs/tmux.nixnix/programs/tmux.nix

@@ -46,6 +46,7 @@

# window binds bind -n C-M-y previous-window bind -n C-M-o next-window + bind-key \" split-window -v -c "#{pane_current_path}" bind-key c split-window -h -c "#{pane_current_path}" bind-key v new-window -c "#{pane_current_path}" bind-key s choose-session

@@ -85,10 +86,9 @@ set -g window-status-current-format "#[fg=colour15] #W"

set -g window-status-format "#[fg=colour8] #W" set -g status-left-length 100 - if-shell '[[ $HOSTNAME != methi ]]' { - set -ag status-left "#[fg=colour8]cwd #[fg=colour15]#(${pkgs.prompt}/bin/prompt cwd #{pane_current_path}) " - set -ag status-left "#[fg=colour8]#(${pkgs.prompt}/bin/prompt vcs #{pane_current_path}) " - } + set -ag status-left "#[fg=colour8]cwd #[fg=colour15]#(${pkgs.prompt}/bin/prompt cwd #{pane_current_path}) " + set -ag status-left "#[fg=colour8]#(${pkgs.prompt}/bin/prompt vcs #{pane_current_path}) " + set -ag status-left "#[fg=color8]kube #[fg=color15]#(printf $KUBECONFIG)" # dim inactive pane set -g window-style 'fg=color8,bg=default'