Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
aae9a0f31f | |||
da75a7c00c |
130 changed files with 2964 additions and 5101 deletions
77
.config/alacritty/alacritty.yml
Normal file
77
.config/alacritty/alacritty.yml
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
window:
|
||||||
|
decorations: none
|
||||||
|
startup_mode: Maximized
|
||||||
|
|
||||||
|
font:
|
||||||
|
normal:
|
||||||
|
family: Iosevka Term SS09
|
||||||
|
style: Regular
|
||||||
|
|
||||||
|
bold:
|
||||||
|
family: Iosevka Term SS09
|
||||||
|
style: Semibold
|
||||||
|
|
||||||
|
italic:
|
||||||
|
family: Iosevka Term Curly Slab
|
||||||
|
style: Light Italic
|
||||||
|
|
||||||
|
bold_italic:
|
||||||
|
family: Iosevka SS15
|
||||||
|
style: Extralight Italic
|
||||||
|
|
||||||
|
size: 10
|
||||||
|
|
||||||
|
offset:
|
||||||
|
x: 0
|
||||||
|
y: 3
|
||||||
|
|
||||||
|
glyph_offset:
|
||||||
|
x: 0
|
||||||
|
y: 2
|
||||||
|
|
||||||
|
cursor:
|
||||||
|
# Values for `style`:
|
||||||
|
# - ▇ Block
|
||||||
|
# - _ Underline
|
||||||
|
# - | Beam
|
||||||
|
style: Block
|
||||||
|
vi_mode_style: Beam
|
||||||
|
unfocused_hollow: true
|
||||||
|
thickness: 0.15
|
||||||
|
|
||||||
|
mouse:
|
||||||
|
hide_when_typing: true
|
||||||
|
# url:
|
||||||
|
# launcher:
|
||||||
|
# program: /home/dln/bin/url-copy
|
||||||
|
|
||||||
|
colors:
|
||||||
|
primary:
|
||||||
|
background: '#fcfcfc'
|
||||||
|
foreground: '#000000'
|
||||||
|
|
||||||
|
normal:
|
||||||
|
black: '#212121'
|
||||||
|
red: '#b7141e'
|
||||||
|
green: '#457b23'
|
||||||
|
yellow: '#f5971d'
|
||||||
|
blue: '#134eb2'
|
||||||
|
magenta: '#550087'
|
||||||
|
cyan: '#0e707c'
|
||||||
|
white: '#eeeeee'
|
||||||
|
bright:
|
||||||
|
black: '#424242'
|
||||||
|
red: '#e83a3f'
|
||||||
|
green: '#7aba39'
|
||||||
|
yellow: '#fee92e'
|
||||||
|
blue: '#53a4f3'
|
||||||
|
magenta: '#a94dbb'
|
||||||
|
cyan: '#26bad1'
|
||||||
|
white: '#d8d8d8'
|
||||||
|
|
||||||
|
key_bindings:
|
||||||
|
- { key: V, mods: Alt, action: Paste }
|
||||||
|
- { key: C, mods: Alt, action: Copy }
|
||||||
|
- { key: V, mods: Shift|Alt, action: Paste }
|
||||||
|
- { key: C, mods: Shift|Alt, action: Copy }
|
||||||
|
- { key: Return, mods: Alt, action: ToggleFullscreen }
|
3
.config/bat/config
Normal file
3
.config/bat/config
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
--italic-text=always
|
||||||
|
--plain
|
||||||
|
--theme=ansi
|
1
.config/chrome-beta-flags.conf
Normal file
1
.config/chrome-beta-flags.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--enable-features=OzonePlatform --ozone-platform=wayland
|
14
.config/efm-langserver/config.yaml
Normal file
14
.config/efm-langserver/config.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
version: 2
|
||||||
|
root-markers:
|
||||||
|
- .git/
|
||||||
|
|
||||||
|
tools:
|
||||||
|
clang-format: &clang-format
|
||||||
|
format-command: 'clang-format -style="{BasedOnStyle: Google, IndentWidth: 2, AlignConsecutiveDeclarations: true, AlignConsecutiveAssignments: true, ColumnLimit: 0}"'
|
||||||
|
format-stdin: true
|
||||||
|
|
||||||
|
languages:
|
||||||
|
proto:
|
||||||
|
- <<: *clang-format
|
||||||
|
|
||||||
|
|
1
.config/environment.d/difftastic.conf
Normal file
1
.config/environment.d/difftastic.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DFT_BACKGROUND=light
|
1
.config/environment.d/docker.conf
Normal file
1
.config/environment.d/docker.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock
|
1
.config/environment.d/golang.conf
Normal file
1
.config/environment.d/golang.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
GOPROXY=https://athens.aarn.shelman.io
|
2
.config/environment.d/mozilla.conf
Normal file
2
.config/environment.d/mozilla.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
MOZ_ENABLE_WAYLAND=1
|
||||||
|
MOZ_DISABLE_RDD_SANDBOX=1
|
35
.config/fontconfig/fonts.conf
Normal file
35
.config/fontconfig/fonts.conf
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||||
|
<fontconfig>
|
||||||
|
<alias>
|
||||||
|
<family>serif</family>
|
||||||
|
<prefer>
|
||||||
|
<family>Noto Color Emoji</family>
|
||||||
|
</prefer>
|
||||||
|
</alias>
|
||||||
|
<alias>
|
||||||
|
<family>sans-serif</family>
|
||||||
|
<prefer>
|
||||||
|
<family>Noto Color Emoji</family>
|
||||||
|
</prefer>
|
||||||
|
</alias>
|
||||||
|
<alias>
|
||||||
|
<family>monospace</family>
|
||||||
|
<prefer>
|
||||||
|
<family>Noto Color Emoji</family>
|
||||||
|
</prefer>
|
||||||
|
</alias>
|
||||||
|
<!--
|
||||||
|
<dir>~/.fonts</dir>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="hinting">
|
||||||
|
<bool>true</bool>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="hintstyle">
|
||||||
|
<const>hintmedium</const>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
-->
|
||||||
|
</fontconfig>
|
23
.config/gitui/theme.ron
Normal file
23
.config/gitui/theme.ron
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
(
|
||||||
|
selected_tab: Reset,
|
||||||
|
command_fg: Rgb(2, 119, 189),
|
||||||
|
selection_bg: Rgb(225, 245, 254),
|
||||||
|
selection_fg: Reset,
|
||||||
|
cmdbar_extra_lines_bg: Rgb(2, 136, 209),
|
||||||
|
cmdbar_bg: Reset,
|
||||||
|
disabled_fg: Rgb(109, 76, 65),
|
||||||
|
diff_line_add: Rgb(56, 142, 60),
|
||||||
|
diff_line_delete: Rgb(230, 74, 25),
|
||||||
|
diff_file_added: Rgb(56, 142, 60),
|
||||||
|
diff_file_removed: Rgb(230, 74, 25),
|
||||||
|
diff_file_moved: Rgb(156, 39, 176),
|
||||||
|
diff_file_modified: Rgb(255, 111, 0),
|
||||||
|
commit_hash: Magenta,
|
||||||
|
commit_time: Rgb(0, 131, 143),
|
||||||
|
commit_author: Green,
|
||||||
|
danger_fg: Red,
|
||||||
|
push_gauge_bg: Blue,
|
||||||
|
push_gauge_fg: Reset,
|
||||||
|
tag_fg: LightMagenta,
|
||||||
|
branch_fg: LightBlue
|
||||||
|
)
|
100
.config/k9s/skin.yml
Normal file
100
.config/k9s/skin.yml
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
# K9s Gruvbox Light Skin Contributed by [@indiebrain](https://github.com/indiebrain)
|
||||||
|
foreground: &foreground default
|
||||||
|
background: &background default
|
||||||
|
current_line: ¤t_line "#ebdbb2"
|
||||||
|
selection: &selection "#3c3735"
|
||||||
|
comment: &comment "#bdad93"
|
||||||
|
cyan: &cyan "#78ad79"
|
||||||
|
green: &green "#989719"
|
||||||
|
orange: &orange "#d79920"
|
||||||
|
magenta: &magenta "#b16185"
|
||||||
|
blue: &blue "#448488"
|
||||||
|
red: &red "#cc231c"
|
||||||
|
|
||||||
|
k9s:
|
||||||
|
body:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
logoColor: *blue
|
||||||
|
prompt:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
suggestColor: *orange
|
||||||
|
info:
|
||||||
|
fgColor: *magenta
|
||||||
|
sectionColor: *foreground
|
||||||
|
help:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
keyColor: *magenta
|
||||||
|
numKeyColor: *blue
|
||||||
|
sectionColor: *green
|
||||||
|
dialog:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
buttonFgColor: *foreground
|
||||||
|
buttonBgColor: *magenta
|
||||||
|
buttonFocusFgColor: white
|
||||||
|
buttonFocusBgColor: *cyan
|
||||||
|
labelFgColor: *orange
|
||||||
|
fieldFgColor: *foreground
|
||||||
|
frame:
|
||||||
|
border:
|
||||||
|
fgColor: *selection
|
||||||
|
focusColor: *current_line
|
||||||
|
menu:
|
||||||
|
fgColor: *foreground
|
||||||
|
keyColor: *magenta
|
||||||
|
numKeyColor: *magenta
|
||||||
|
crumbs:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *comment
|
||||||
|
activeColor: *blue
|
||||||
|
status:
|
||||||
|
newColor: *cyan
|
||||||
|
modifyColor: *blue
|
||||||
|
addColor: *green
|
||||||
|
errorColor: *red
|
||||||
|
highlightColor: *orange
|
||||||
|
killColor: *comment
|
||||||
|
completedColor: *comment
|
||||||
|
title:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
highlightColor: *orange
|
||||||
|
counterColor: *blue
|
||||||
|
filterColor: *magenta
|
||||||
|
views:
|
||||||
|
charts:
|
||||||
|
bgColor: background
|
||||||
|
defaultDialColors:
|
||||||
|
- *blue
|
||||||
|
- *red
|
||||||
|
defaultChartColors:
|
||||||
|
- *blue
|
||||||
|
- *red
|
||||||
|
table:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
cursorFgColor: *foreground
|
||||||
|
cursorBgColor: *current_line
|
||||||
|
header:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
sorterColor: *selection
|
||||||
|
xray:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
cursorColor: *current_line
|
||||||
|
graphicColor: *blue
|
||||||
|
showIcons: false
|
||||||
|
yaml:
|
||||||
|
keyColor: *magenta
|
||||||
|
colonColor: *blue
|
||||||
|
valueColor: *foreground
|
||||||
|
logs:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
||||||
|
indicator:
|
||||||
|
fgColor: *foreground
|
||||||
|
bgColor: *background
|
12
.config/nvim/.netrwhist
Normal file
12
.config/nvim/.netrwhist
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
let g:netrw_dirhistmax =10
|
||||||
|
let g:netrw_dirhistcnt =4
|
||||||
|
let g:netrw_dirhist_4='/home/dln/src/github.com/tocaboca/Toca-Days/Infrastructure/Helm'
|
||||||
|
let g:netrw_dirhist_3='/home/dln/src/github.com/tocaboca/Toca-Days/Infrastructure/Helm/days'
|
||||||
|
let g:netrw_dirhist_2='/home/dln/src/github.com/tocaboca/toca-days-prod/blessings'
|
||||||
|
let g:netrw_dirhist_1='/home/dln/src/github.com/tocaboca/toca-infrastructure/flux/k8s/infra/tenants/toca-studio/clusters/studio'
|
||||||
|
let g:netrw_dirhist_0='/home/dln/src/github.com/tocaboca/toca-infrastructure/linkerd/gateway'
|
||||||
|
let g:netrw_dirhist_9='/home/dln/src/github.com/tocaboca/toca-infrastructure/cluster/terraform'
|
||||||
|
let g:netrw_dirhist_8='/home/dln/src/github.com/shelmangroup/tf-infra/lab001/vms/modules/fcos_vault_agent'
|
||||||
|
let g:netrw_dirhist_7='/tmp/squid/etc'
|
||||||
|
let g:netrw_dirhist_6='/tmp/squid'
|
||||||
|
let g:netrw_dirhist_5='/tmp/squid/etc'
|
2
.config/nvim/init.lua
Normal file
2
.config/nvim/init.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
require("config.options")
|
||||||
|
require("config.lazy")
|
56
.config/nvim/lazy-lock.json
Normal file
56
.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "6821b3ae27a57f1f3cf8ed030e4a55d70d0c4e43" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "7c392fb5f27daa6addee050f7b7522718e8d9357" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
|
||||||
|
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||||
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
|
||||||
|
"colorbuddy.vim": { "branch": "master", "commit": "cdb5b0654d3cafe61d2a845e15b2b4b0e78e752a" },
|
||||||
|
"copilot-cmp": { "branch": "master", "commit": "92535dfd9c430b49ca7d9a7da336c5db65826b65" },
|
||||||
|
"copilot.lua": { "branch": "master", "commit": "b41d4c9c7d4f5e0272bcf94061b88e244904c56f" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "76b71f74ce002119fce322df13bd21cc52c1d112" },
|
||||||
|
"go.nvim": { "branch": "master", "commit": "7d7b081bf3d3113d1d487d83a5436bd1e7215ff5" },
|
||||||
|
"hlargs.nvim": { "branch": "main", "commit": "2a7f9878326cdfd0eb8c91ad543c07680c976227" },
|
||||||
|
"inc-rename.nvim": { "branch": "main", "commit": "21c23c379342a731a0c90f226601ec0434627b26" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
|
||||||
|
"kanagawa": { "branch": "master", "commit": "4c8d48726621a7f3998c7ed35b2c2535abc22def" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "26d121ea13bee96b079403cee6598f04969d4983" },
|
||||||
|
"lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
|
||||||
|
"lush.nvim": { "branch": "main", "commit": "b1e8eb1da3fee95ef31515a73c9eff9bf251088d" },
|
||||||
|
"marks.nvim": { "branch": "master", "commit": "76aca5069c5ce5c0099e30168649e6393e494f26" },
|
||||||
|
"neogen": { "branch": "main", "commit": "93d997dbddfe084e77ba4541c54a7b8bfd754fb1" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "d8a1f3056ad713b5d471048f8d029264828e22c0" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" },
|
||||||
|
"null-ls.nvim": { "branch": "main", "commit": "689cdd78f70af20a37b5309ebc287ac645ae4f76" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "01f697a68905f9dcae70960a9eb013695a17f9a2" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "5b986edc95cf7b37da1db91a5c149daa3ac008d2" },
|
||||||
|
"nvim-dap-go": { "branch": "main", "commit": "b4ded7de579b4e2a85c203388233b54bf1028816" },
|
||||||
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "8db23ea51203b5f00ad107a0cef7e0b2d7a0476c" },
|
||||||
|
"nvim-lsp-ts-utils": { "branch": "main", "commit": "0a6a16ef292c9b61eac6dad00d52666c7f84b0e7" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "3b08f2edc461314b9051edf26348f8af3fe33e63" },
|
||||||
|
"nvim-navic": { "branch": "master", "commit": "7e9d2b2b601149fecdccd11b516acb721e571fe6" },
|
||||||
|
"nvim-osc52": { "branch": "main", "commit": "0abf3267090905accf348d19951640e3b95755c3" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "9dd1b9c09707bf1cdd565b999c79ac6461602591" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "4b30081d2736e09f90c890a8a7adfe4df36f5b36" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "c2c2317f356c8b7da0252f5da758f71bb60bb6b2" },
|
||||||
|
"packer.nvim": { "branch": "master", "commit": "1d0cf98a561f7fd654c970c49f917d74fafe1530" },
|
||||||
|
"playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||||
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
|
"stylua-nvim": { "branch": "main", "commit": "ce59a353f02938cba3e0285e662fcd3901cd270f" },
|
||||||
|
"telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" },
|
||||||
|
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||||
|
"telescope-github.nvim": { "branch": "master", "commit": "ee95c509901c3357679e9f2f9eaac3561c811736" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "67337644e38144b444d026b0df2dc5fa0038930f" },
|
||||||
|
"vim-cue": { "branch": "master", "commit": "bd1a62303d096aa24fe4160a475645087f8770b3" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "49062ab1dd8fec91833a69f0a1344223dd59d643" },
|
||||||
|
"zenbones.nvim": { "branch": "main", "commit": "910b8c240c6aaf5263db038db81c538602c766c3" }
|
||||||
|
}
|
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||||
|
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||||
|
end
|
||||||
|
vim.opt.runtimepath:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
import = "plugins",
|
||||||
|
defaults = { lazy = true },
|
||||||
|
checker = { enabled = true },
|
||||||
|
install = {
|
||||||
|
missing = true,
|
||||||
|
colorscheme = { "zenbones" },
|
||||||
|
},
|
||||||
|
performance = {
|
||||||
|
cache = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
rtp = {
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"matchit",
|
||||||
|
"matchparen",
|
||||||
|
"netrwPlugin",
|
||||||
|
"rplugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
debug = false,
|
||||||
|
})
|
71
.config/nvim/lua/config/options.lua
Normal file
71
.config/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
vim.cmd([[set undofile]])
|
||||||
|
vim.cmd([[set completeopt-=preview]])
|
||||||
|
vim.cmd([[set viewoptions-=options]])
|
||||||
|
vim.g.mapleader = ","
|
||||||
|
vim.o.hidden = true
|
||||||
|
vim.o.mouse = "a"
|
||||||
|
vim.o.splitbelow = true
|
||||||
|
vim.o.splitright = true
|
||||||
|
vim.o.ttimeout = true
|
||||||
|
vim.o.ttimeoutlen = 50
|
||||||
|
vim.o.updatetime = 100
|
||||||
|
vim.o.autochdir = false
|
||||||
|
vim.o.backupdir = "/home/dln/.local/share/nvim/backup/"
|
||||||
|
vim.o.backup = true
|
||||||
|
vim.g.netrw_dirhistmax = 0
|
||||||
|
vim.o.clipboard = "unnamedplus"
|
||||||
|
vim.g.do_filetype_lua = 1
|
||||||
|
vim.o.spell = false
|
||||||
|
vim.o.spelllang = "en_us"
|
||||||
|
vim.opt.winbar = nil
|
||||||
|
|
||||||
|
--- Indent
|
||||||
|
vim.o.autoindent = true
|
||||||
|
vim.o.breakindent = true
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.smartindent = true
|
||||||
|
vim.o.joinspaces = false
|
||||||
|
vim.o.listchars = "extends:›,precedes:‹,nbsp:·,tab:→ ,trail:·"
|
||||||
|
vim.wo.foldlevel = 99
|
||||||
|
vim.wo.linebreak = true
|
||||||
|
vim.wo.list = true
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.tabstop = 2
|
||||||
|
vim.o.softtabstop = 2
|
||||||
|
|
||||||
|
--- Search
|
||||||
|
vim.cmd("set path+=**")
|
||||||
|
vim.cmd("set wildignore+=/var/*,*.so,*.swp,*.zip,*.tar,*.pyc")
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
vim.o.wildmode = "longest:full,full"
|
||||||
|
|
||||||
|
if vim.fn.executable("rg") then
|
||||||
|
vim.o.grepprg = "rg --vimgrep --no-heading --smart-case"
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Completion
|
||||||
|
vim.cmd("set shortmess+=c")
|
||||||
|
vim.o.completeopt = "menuone,noinsert,noselect"
|
||||||
|
|
||||||
|
--- Appearance
|
||||||
|
vim.o.scrolloff = 7
|
||||||
|
vim.o.showmode = false
|
||||||
|
vim.o.sidescrolloff = 5
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.wo.cursorline = true
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.wo.signcolumn = "yes"
|
||||||
|
vim.o.laststatus = 3
|
||||||
|
vim.o.cmdheight = 1
|
||||||
|
-- vim.o.statusline = "═"
|
||||||
|
-- vim.o.title = true
|
||||||
|
-- vim.o.titlestring = "%F%m %r %y"
|
||||||
|
vim.o.fillchars = "stl: ,stlnc: ,eob:🮙"
|
||||||
|
-- vim.wo.foldmethod = "expr"
|
||||||
|
-- vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
vim.g.netrw_dirhistmax = 0
|
||||||
|
|
||||||
|
--- Key mappings
|
||||||
|
vim.keymap.set("n", "<C-l>", ':let @/=""<CR>') -- clear search
|
||||||
|
vim.keymap.set("n", ",L", ":luafile %<CR>") -- Reload lua file
|
83
.config/nvim/lua/plugins/cmp.lua
Normal file
83
.config/nvim/lua/plugins/cmp.lua
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
local M = {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"andersevenrud/cmp-tmux",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-emoji",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
|
"onsails/lspkind-nvim",
|
||||||
|
},
|
||||||
|
event = "InsertEnter",
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.o.completeopt = "menuone,noselect"
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,menuone,noinsert",
|
||||||
|
},
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
format = require("lspkind").cmp_format(),
|
||||||
|
},
|
||||||
|
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered({
|
||||||
|
winhighlight = "Normal:PMenu,FloatBorder:PMenuBorder,CursorLine:PMenuSel,Search:None",
|
||||||
|
}),
|
||||||
|
documentation = cmp.config.window.bordered({
|
||||||
|
winhighlight = "Normal:PMenu,FloatBorder:PMenu,CursorLine:PMenuSel,Search:None",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
mapping = {
|
||||||
|
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||||
|
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-2),
|
||||||
|
["<C-u>"] = cmp.mapping.scroll_docs(2),
|
||||||
|
["<C-e>"] = cmp.mapping({
|
||||||
|
i = cmp.mapping.abort(),
|
||||||
|
c = cmp.mapping.close(),
|
||||||
|
}),
|
||||||
|
-- ["<CR>"] = cmp.mapping(cmp.mapping.confirm({ select = false }), { "i", "c" }),
|
||||||
|
-- ["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||||
|
["<CR>"] = cmp.mapping(cmp.mapping.confirm({ select = true })),
|
||||||
|
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), {}),
|
||||||
|
},
|
||||||
|
|
||||||
|
-- experimental = {
|
||||||
|
-- ghost_text = {
|
||||||
|
-- hl_group = "LspCodeLens",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "nvim_lsp_signature_help" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "copilot" },
|
||||||
|
{
|
||||||
|
name = "tmux",
|
||||||
|
priority = 2,
|
||||||
|
option = {
|
||||||
|
all_panes = true,
|
||||||
|
trigger_characters = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ name = "emoji" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
54
.config/nvim/lua/plugins/copilot.lua
Normal file
54
.config/nvim/lua/plugins/copilot.lua
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
local M = {
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
event = { "VeryLazy" },
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
config = function()
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
require("copilot").setup({
|
||||||
|
panel = {
|
||||||
|
enabled = true,
|
||||||
|
auto_refresh = false,
|
||||||
|
keymap = {
|
||||||
|
jump_prev = "[[",
|
||||||
|
jump_next = "]]",
|
||||||
|
accept = "<CR>",
|
||||||
|
refresh = "gr",
|
||||||
|
open = "<M-CR>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
suggestion = {
|
||||||
|
enabled = true,
|
||||||
|
auto_trigger = true,
|
||||||
|
debounce = 75,
|
||||||
|
keymap = {
|
||||||
|
accept = "<C-j>",
|
||||||
|
next = "<M-]>",
|
||||||
|
prev = "<M-[>",
|
||||||
|
dismiss = "<C-]>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
yaml = false,
|
||||||
|
markdown = false,
|
||||||
|
help = false,
|
||||||
|
gitcommit = false,
|
||||||
|
gitrebase = false,
|
||||||
|
hgcommit = false,
|
||||||
|
svn = false,
|
||||||
|
cvs = false,
|
||||||
|
["."] = false,
|
||||||
|
},
|
||||||
|
copilot_node_command = "node", -- Node version must be < 18
|
||||||
|
server_opts_overrides = {},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
53
.config/nvim/lua/plugins/dap.lua
Normal file
53
.config/nvim/lua/plugins/dap.lua
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
return {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
config = function()
|
||||||
|
require("nvim-dap-virtual-text").setup({
|
||||||
|
commented = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leoluz/nvim-dap-go",
|
||||||
|
config = function()
|
||||||
|
require("dap-go").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "DD", ":lua require'dap'.toggle_breakpoint()<cr>", desc = "Toggle Breakpoint" },
|
||||||
|
{ "Dc", ":lua require'dap'.continue()<cr>", desc = "Continue" },
|
||||||
|
{ "Di", ":lua require'dap'.step_into()<cr>", desc = "Step Into" },
|
||||||
|
{ "Do", ":lua require'dap'.step_over()<cr>", desc = "Step Over" },
|
||||||
|
{ "DO", ":lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
||||||
|
{ "Dh", ":lua require'dap.ui.widgets'.hover()<cr>", desc = "Hover" },
|
||||||
|
{ "Dr", ":lua require'dap'.repl.toggle({height = 5})<cr>", desc = "Toogle Repl" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("dap")
|
||||||
|
require("dap.ext.vscode").load_launchjs()
|
||||||
|
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DapBreakpoint",
|
||||||
|
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DapBreakpointCondition",
|
||||||
|
{ text = "ﳁ", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DapBreakpointRejected",
|
||||||
|
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DapLogPoint",
|
||||||
|
{ text = "", texthl = "DapLogPoint", linehl = "DapLogPoint", numhl = "DapLogPoint" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DapStopped",
|
||||||
|
{ text = "", texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" }
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}
|
38
.config/nvim/lua/plugins/gitsigns.lua
Normal file
38
.config/nvim/lua/plugins/gitsigns.lua
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
local M = {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
require("gitsigns").setup({
|
||||||
|
numhl = true,
|
||||||
|
signs = {
|
||||||
|
add = { hl = "GitSignsAdd", text = "▌", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||||
|
change = {
|
||||||
|
hl = "GitSignsChange",
|
||||||
|
text = "▌",
|
||||||
|
numhl = "GitSignsChangeNr",
|
||||||
|
linehl = "GitSignsChangeLn",
|
||||||
|
},
|
||||||
|
delete = {
|
||||||
|
hl = "GitSignsDelete",
|
||||||
|
text = "▖",
|
||||||
|
numhl = "GitSignsDeleteNr",
|
||||||
|
linehl = "GitSignsDeleteLn",
|
||||||
|
},
|
||||||
|
topdelete = {
|
||||||
|
hl = "GitSignsDelete",
|
||||||
|
text = "▘",
|
||||||
|
numhl = "GitSignsDeleteNr",
|
||||||
|
linehl = "GitSignsDeleteLn",
|
||||||
|
},
|
||||||
|
changedelete = {
|
||||||
|
hl = "GitSignsChange",
|
||||||
|
text = "~",
|
||||||
|
numhl = "GitSignsChangeNr",
|
||||||
|
linehl = "GitSignsChangeLn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
9
.config/nvim/lua/plugins/illuminate.lua
Normal file
9
.config/nvim/lua/plugins/illuminate.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
local M = {
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
event = "BufReadPost",
|
||||||
|
config = function()
|
||||||
|
require("illuminate").configure({ delay = 200 })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
44
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
44
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
local M = {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
config = {
|
||||||
|
buftype_exclude = { "terminal", "nofile" },
|
||||||
|
filetype_exclude = {
|
||||||
|
"help",
|
||||||
|
"neogitstatus",
|
||||||
|
"NvimTree",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
},
|
||||||
|
char = "│",
|
||||||
|
-- char = "┊",
|
||||||
|
char_highlight_list = { "Indent1", "Indent2", "Indent3", "Indent4", "Indent5", "Indent6" },
|
||||||
|
use_treesitter_scope = false,
|
||||||
|
show_trailing_blankline_indent = false,
|
||||||
|
show_current_context = true,
|
||||||
|
context_patterns = {
|
||||||
|
"class",
|
||||||
|
"return",
|
||||||
|
"function",
|
||||||
|
"method",
|
||||||
|
"^if",
|
||||||
|
"^while",
|
||||||
|
"jsx_element",
|
||||||
|
"^for",
|
||||||
|
"^object",
|
||||||
|
"^table",
|
||||||
|
"block",
|
||||||
|
"arguments",
|
||||||
|
"if_statement",
|
||||||
|
"else_clause",
|
||||||
|
"jsx_element",
|
||||||
|
"jsx_self_closing_element",
|
||||||
|
"try_statement",
|
||||||
|
"catch_clause",
|
||||||
|
"import_statement",
|
||||||
|
"operation_type",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
241
.config/nvim/lua/plugins/lsp-config.lua
Normal file
241
.config/nvim/lua/plugins/lsp-config.lua
Normal file
|
@ -0,0 +1,241 @@
|
||||||
|
local M = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
event = "VeryLazy",
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
|
||||||
|
vim.keymap.set("i", "<C-k>", "<Cmd>lua vim.lsp.buf.signature_help()<CR>")
|
||||||
|
vim.keymap.set("n", "1gd", "<Cmd>lua vim.lsp.buf.type_definition()<CR>")
|
||||||
|
vim.keymap.set("n", "gf", "<Cmd>lua vim.lsp.buf.format()<CR>")
|
||||||
|
vim.keymap.set("n", "[d", "<Cmd>lua vim.lsp.diagnostic.goto_prev()<CR>")
|
||||||
|
vim.keymap.set("n", "]d", "<Cmd>lua vim.lsp.diagnostic.goto_next()<CR>")
|
||||||
|
vim.keymap.set("n", "gwa", "<Cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
|
||||||
|
vim.keymap.set("n", "gwr", "<Cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
|
||||||
|
vim.keymap.set("n", "gwl", "<Cmd>lua vim.lsp.buf.add_workspace_folder()<CR>")
|
||||||
|
|
||||||
|
vim.cmd([[autocmd BufWritePre * lua vim.lsp.buf.format({sync = true})]])
|
||||||
|
|
||||||
|
local border = {
|
||||||
|
{ "🭽", "FloatBorder" },
|
||||||
|
{ "▔", "FloatBorder" },
|
||||||
|
{ "🭾", "FloatBorder" },
|
||||||
|
{ "▕", "FloatBorder" },
|
||||||
|
{ "🭿", "FloatBorder" },
|
||||||
|
{ "▁", "FloatBorder" },
|
||||||
|
{ "🭼", "FloatBorder" },
|
||||||
|
{ "▏", "FloatBorder" },
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||||
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||||
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
update_in_insert = false,
|
||||||
|
virtual_text = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
local signs = { Error = "🔥", Warn = "⚠️ ", Hint = "💡", Info = "💡" }
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_attach(client, bufnr)
|
||||||
|
require("nvim-navic").attach(client, bufnr)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- simple setups --
|
||||||
|
local servers = {
|
||||||
|
"bashls",
|
||||||
|
"bufls",
|
||||||
|
"dockerls",
|
||||||
|
"gopls",
|
||||||
|
"jsonls",
|
||||||
|
-- "sql",
|
||||||
|
"pyright",
|
||||||
|
"lua_ls",
|
||||||
|
"terraformls",
|
||||||
|
"yamlls",
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
lspconfig[lsp].setup({ on_attach = on_attach })
|
||||||
|
end
|
||||||
|
|
||||||
|
local efm_prettier = {
|
||||||
|
formatCommand = "prettier --stdin-filepath ${INPUT}",
|
||||||
|
formatStdin = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.gopls.setup({
|
||||||
|
on_attach = on_attach,
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
directoryFilters = {
|
||||||
|
"-bazel-bin",
|
||||||
|
"-bazel-out",
|
||||||
|
"-bazel-testlogs",
|
||||||
|
"-proto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
on_attach(client, bufnr)
|
||||||
|
vim.cmd([[autocmd BufWritePre <buffer> lua require'stylua-nvim'.format_file()]])
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
completion = { kewordSnippet = "Disable" },
|
||||||
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
globals = { "renoise", "use", "vim" },
|
||||||
|
},
|
||||||
|
runtime = {
|
||||||
|
version = "LuaJIT",
|
||||||
|
path = { "?.lua", "?/init.lua", "?/?.lua" },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
maxPreload = 2000,
|
||||||
|
preloadFileSize = 1000,
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.terraformls.setup({})
|
||||||
|
|
||||||
|
local yaml_is_k8s = function(bufnr)
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, 50, false) -- Stop after the first 50 lines
|
||||||
|
for _, l in pairs(lines) do
|
||||||
|
if string.find(l, "apiVersion") ~= nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
lspconfig.cssls.setup({
|
||||||
|
cmd = { "vscode-css-languageserver", "--stdio" },
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.cssmodules_ls.setup({})
|
||||||
|
|
||||||
|
lspconfig.html.setup({
|
||||||
|
cmd = { "vscode-html-languageserver", "--stdio" },
|
||||||
|
filetypes = { "html" },
|
||||||
|
init_options = {
|
||||||
|
configurationSection = { "html", "css", "javascript" },
|
||||||
|
embeddedLanguages = {
|
||||||
|
css = true,
|
||||||
|
javascript = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
settings = {},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.yamlls.setup({
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
format = { enable = true, singleQuote = true },
|
||||||
|
schemaStore = { enable = true, url = "https://json.schemastore.org" },
|
||||||
|
schemas = {
|
||||||
|
-- ["https://json.schemastore.org/github-workflow"] = "*.github/workflows/*",
|
||||||
|
["https://json.schemastore.org/kustomization.json"] = "kustomization.yaml",
|
||||||
|
-- ["https://json.schemastore.org/ansible-role-2.9.json"] = "*/tasks/*.y*ml",
|
||||||
|
kubernetes = {
|
||||||
|
"clusterrolebinding.yaml",
|
||||||
|
"clusterrole-contour.yaml",
|
||||||
|
"clusterrole.yaml",
|
||||||
|
"configmap.yaml",
|
||||||
|
"cronjob.yaml",
|
||||||
|
"daemonset.yaml",
|
||||||
|
"deployment-*.yaml",
|
||||||
|
"deployment.yaml",
|
||||||
|
"*-deployment.yaml",
|
||||||
|
"hpa.yaml",
|
||||||
|
"ingress.yaml",
|
||||||
|
"job.yaml",
|
||||||
|
"namespace.yaml",
|
||||||
|
"pvc.yaml",
|
||||||
|
"rbac.yaml",
|
||||||
|
"rolebinding.yaml",
|
||||||
|
"role.yaml",
|
||||||
|
"sa.yaml",
|
||||||
|
"secret.yaml",
|
||||||
|
"serviceaccounts.yaml",
|
||||||
|
"service-account.yaml",
|
||||||
|
"serviceaccount.yaml",
|
||||||
|
"service-*.yaml",
|
||||||
|
"service.yaml",
|
||||||
|
"*-service.yaml",
|
||||||
|
"statefulset.yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
validate = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require("lspconfig").tsserver.setup({
|
||||||
|
root_dir = vim.loop.cwd,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- npm install -g typescript typescript-language-server
|
||||||
|
-- require("lspconfig").tsserver.setup({
|
||||||
|
-- on_attach = function(client, bufnr)
|
||||||
|
-- client.resolved_capabilities.document_formatting = false
|
||||||
|
-- on_attach(client)
|
||||||
|
|
||||||
|
-- local ts_utils = require("nvim-lsp-ts-utils")
|
||||||
|
|
||||||
|
-- ts_utils.setup({
|
||||||
|
-- debug = false,
|
||||||
|
-- disable_commands = false,
|
||||||
|
-- enable_import_on_completion = false,
|
||||||
|
-- import_all_timeout = 5000, -- ms
|
||||||
|
|
||||||
|
-- -- eslint
|
||||||
|
-- eslint_enable_code_actions = true,
|
||||||
|
-- eslint_enable_disable_comments = true,
|
||||||
|
-- eslint_bin = "eslint_d",
|
||||||
|
-- eslint_config_fallback = nil,
|
||||||
|
-- eslint_enable_diagnostics = true,
|
||||||
|
|
||||||
|
-- -- formatting
|
||||||
|
-- enable_formatting = true,
|
||||||
|
-- formatter = "prettier",
|
||||||
|
-- formatter_config_fallback = nil,
|
||||||
|
|
||||||
|
-- -- parentheses completion
|
||||||
|
-- complete_parens = false,
|
||||||
|
-- signature_help_in_parens = false,
|
||||||
|
|
||||||
|
-- -- update imports on file move
|
||||||
|
-- update_imports_on_move = true,
|
||||||
|
-- require_confirmation_on_move = true,
|
||||||
|
-- watch_dir = nil,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- ts_utils.setup_client(client)
|
||||||
|
|
||||||
|
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>co", ":TSLspOrganize<CR>", { silent = true })
|
||||||
|
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "qq", ":TSLspFixCurrent<CR>", { silent = true })
|
||||||
|
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>cR", ":TSLspRenameFile<CR>", { silent = true })
|
||||||
|
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>ci", ":TSLspImportAll<CR>", { silent = true })
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
--
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
50
.config/nvim/lua/plugins/lualine.lua
Normal file
50
.config/nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
local M = {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||||
|
event = "VeryLazy",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function clock()
|
||||||
|
return os.date("%H:%M")
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local lualine = require("lualine")
|
||||||
|
|
||||||
|
lualine.setup({
|
||||||
|
options = {
|
||||||
|
globalstatus = true,
|
||||||
|
theme = "onedark",
|
||||||
|
component_separators = { left = "╲", right = "╱" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
"filename",
|
||||||
|
path = 1,
|
||||||
|
file_status = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
local navic = require("nvim-navic")
|
||||||
|
local ret = navic.get_location()
|
||||||
|
return ret:len() > 2000 and "navic error" or ret
|
||||||
|
end,
|
||||||
|
cond = function()
|
||||||
|
if package.loaded["nvim-navic"] then
|
||||||
|
local navic = require("nvim-navic")
|
||||||
|
return navic.is_available()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
color = { fg = "#ff8f00" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = { "filetype" },
|
||||||
|
lualine_y = { "location" },
|
||||||
|
lualine_z = { clock },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
37
.config/nvim/lua/plugins/marks.lua
Normal file
37
.config/nvim/lua/plugins/marks.lua
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
local M = {
|
||||||
|
"chentoast/marks.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local marks = require("marks")
|
||||||
|
marks.setup({
|
||||||
|
|
||||||
|
default_mappings = true,
|
||||||
|
-- which builtin marks to show. default {}
|
||||||
|
-- builtin_marks = { ".", "<", ">", "^" },
|
||||||
|
|
||||||
|
cyclic = true,
|
||||||
|
force_write_shada = false,
|
||||||
|
|
||||||
|
-- marks, and bookmarks.
|
||||||
|
-- can be either a table with all/none of the keys, or a single number, in which case
|
||||||
|
-- the priority applies to all marks.
|
||||||
|
-- default 10.
|
||||||
|
-- sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
|
||||||
|
--
|
||||||
|
-- disables mark tracking for specific filetypes. default {}
|
||||||
|
excluded_filetypes = {},
|
||||||
|
|
||||||
|
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
||||||
|
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
||||||
|
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
||||||
|
-- default virt_text is "".
|
||||||
|
bookmark_1 = {
|
||||||
|
sign = "⚑",
|
||||||
|
virt_text = "",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
116
.config/nvim/lua/plugins/misc.lua
Normal file
116
.config/nvim/lua/plugins/misc.lua
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
return {
|
||||||
|
|
||||||
|
"tjdevries/colorbuddy.vim",
|
||||||
|
"wbthomason/packer.nvim",
|
||||||
|
"jose-elias-alvarez/nvim-lsp-ts-utils",
|
||||||
|
"jjo/vim-cue",
|
||||||
|
"ckipp01/stylua-nvim",
|
||||||
|
|
||||||
|
{
|
||||||
|
"m-demare/hlargs.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
enabled = true,
|
||||||
|
config = {
|
||||||
|
excluded_argnames = {
|
||||||
|
usages = {
|
||||||
|
lua = { "self", "use" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
cmd = { "TroubleToggle", "Trouble" },
|
||||||
|
config = {
|
||||||
|
auto_open = false,
|
||||||
|
use_diagnostic_signs = true,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>xx", "<cmd>TroubleToggle<cr>" },
|
||||||
|
{ "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>" },
|
||||||
|
{ "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>" },
|
||||||
|
{ "<leader>xl", "<cmd>TroubleToggle loclist<cr>" },
|
||||||
|
{ "<leader>xq", "<cmd>TroubleToggle quickfix<cr>" },
|
||||||
|
{ "gR", "<cmd>TroubleToggle lsp_references<cr>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"danymat/neogen",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>cc",
|
||||||
|
function()
|
||||||
|
require("neogen").generate({})
|
||||||
|
end,
|
||||||
|
desc = "Neogen Comment",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = { snippet_engine = "luasnip" },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"smjonas/inc-rename.nvim",
|
||||||
|
cmd = "IncRename",
|
||||||
|
config = true,
|
||||||
|
keys = {
|
||||||
|
{ "<Leader>rn", ":IncRename " },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
config = function()
|
||||||
|
vim.g.navic_silence = true
|
||||||
|
require("nvim-navic").setup({ separator = " ", highlight = true, depth_limit = 5 })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<C-_>", "<Plug>(comment_toggle_linewise_current)" },
|
||||||
|
{ "<C-_>", "<Plug>(comment_toggle_linewise_visual)", mode = "v" },
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("Comment").setup({
|
||||||
|
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
config = function()
|
||||||
|
require("go").setup({
|
||||||
|
comment_placeholder = "",
|
||||||
|
icons = { breakpoint = "🧘", currentpos = "🏃" },
|
||||||
|
dap_debug_gui = false,
|
||||||
|
})
|
||||||
|
vim.cmd("autocmd FileType go nmap <Leader>c :lua require('go.comment').gen()<cr>")
|
||||||
|
vim.cmd("autocmd BufWritePre *.go :silent! lua require('go.format').gofmt()")
|
||||||
|
vim.cmd("autocmd BufWritePre (InsertLeave?) <buffer> lua vim.lsp.buf.formatting_sync(nil,500)")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"onsails/lspkind-nvim",
|
||||||
|
config = function()
|
||||||
|
require("lspkind").init({})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
|
-- config = function()
|
||||||
|
-- require("lsp_lines").setup()
|
||||||
|
-- vim.diagnostic.config({
|
||||||
|
-- virtual_text = false,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
}
|
19
.config/nvim/lua/plugins/noice.lua
Normal file
19
.config/nvim/lua/plugins/noice.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
local M = {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
require("noice").setup({
|
||||||
|
presets = {
|
||||||
|
inc_rename = true,
|
||||||
|
long_message_to_split = true,
|
||||||
|
lsp_doc_border = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
40
.config/nvim/lua/plugins/null-ls.lua
Normal file
40
.config/nvim/lua/plugins/null-ls.lua
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
local M = {
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
local builtins = require("null-ls.builtins")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
builtins.formatting.black,
|
||||||
|
builtins.formatting.buf,
|
||||||
|
builtins.formatting.cue_fmt,
|
||||||
|
builtins.formatting.shfmt,
|
||||||
|
builtins.formatting.sqlfluff,
|
||||||
|
builtins.formatting.buildifier,
|
||||||
|
builtins.formatting.prettierd,
|
||||||
|
builtins.completion.spell,
|
||||||
|
builtins.code_actions.eslint_d,
|
||||||
|
builtins.diagnostics.buf.with({
|
||||||
|
args = { "lint", "--disable-symlinks", "--path", "$FILENAME" },
|
||||||
|
cwd = function()
|
||||||
|
local file_dir = vim.fn.expand("%:p:h") .. ";"
|
||||||
|
local buf_yaml = vim.fn.findfile("buf.yaml", file_dir)
|
||||||
|
if buf_yaml then
|
||||||
|
return vim.fn.fnamemodify(buf_yaml, ":h")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
builtins.diagnostics.buildifier,
|
||||||
|
builtins.diagnostics.cue_fmt,
|
||||||
|
builtins.diagnostics.golangci_lint,
|
||||||
|
builtins.diagnostics.eslint_d,
|
||||||
|
},
|
||||||
|
debug = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
18
.config/nvim/lua/plugins/osc52.lua
Normal file
18
.config/nvim/lua/plugins/osc52.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
local M = {
|
||||||
|
"ojroques/nvim-osc52",
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local osc52 = require("osc52")
|
||||||
|
osc52.setup({
|
||||||
|
max_length = 0, -- Maximum length of selection (0 for no limit)
|
||||||
|
silent = false, -- Disable message on successful copy
|
||||||
|
trim = false, -- Trim text before copy
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>c", require("osc52").copy_operator, { expr = true })
|
||||||
|
vim.keymap.set("n", "<leader>cc", "<leader>c_", { remap = true })
|
||||||
|
vim.keymap.set("x", "<leader>c", require("osc52").copy_visual)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
110
.config/nvim/lua/plugins/telescope.lua
Normal file
110
.config/nvim/lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
local function project_files()
|
||||||
|
require("telescope.builtin").find_files({
|
||||||
|
cwd = require("lspconfig.util").root_pattern(".git")(vim.fn.expand("%:p")),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
local M = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/popup.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope-fzy-native.nvim",
|
||||||
|
"nvim-telescope/telescope-github.nvim",
|
||||||
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.config()
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
local previewers = require("telescope.previewers")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>b", '<cmd>lua require("telescope.builtin").buffers()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>f", '<cmd>lua require("telescope.builtin").oldfiles()<CR>')
|
||||||
|
vim.keymap.set("n", "<space>", '<cmd>lua require("telescope.builtin").oldfiles({cwd_only=true})<CR>')
|
||||||
|
vim.keymap.set("n", "<leader><space>", '<cmd>lua require("telescope.builtin").oldfiles()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>d", '<cmd>lua require("telescope.builtin").diagnostics({bufnr=0})<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>e", '<cmd>lua require("telescope.builtin").git_files()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>g", '<cmd>lua require("telescope.builtin").git_status()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>a", '<cmd>lua require("telescope.builtin").lsp_code_actions()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>m", '<cmd>lua require("telescope.builtin").marks()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>s", '<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>t", '<cmd>lua require("telescope.builtin").treesitter()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>/", '<cmd>lua require("telescope.builtin").live_grep()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>.", '<cmd>lua require("telescope.builtin").file_browser()<CR>')
|
||||||
|
vim.keymap.set("n", "<leader>p", '<cmd>lua require("telescope.builtin").registers()<CR>')
|
||||||
|
vim.keymap.set("n", "ga", "<cmd>lua vim.lsp.buf.code_action()<CR>")
|
||||||
|
vim.keymap.set("n", "gr", '<cmd>lua require("telescope.builtin").lsp_references()<CR>')
|
||||||
|
vim.keymap.set("n", "gd", '<cmd>lua require("telescope.builtin").lsp_definitions()<CR>')
|
||||||
|
vim.keymap.set("n", "g/", '<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>')
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"g?",
|
||||||
|
'<cmd>lua require("telescope.builtin").lsp_workspace_symbols({query=(vim.bo.filetype == "go" and "\'" or "")})<CR>'
|
||||||
|
)
|
||||||
|
vim.keymap.set("n", "ge", '<cmd>lua require("telescope.builtin").lsp_document_diagnostics()<CR>')
|
||||||
|
vim.keymap.set("n", "Db", '<cmd>lua require("telescope").extensions.dap.list_breakpoints()<CR>')
|
||||||
|
vim.keymap.set("n", "Dcc", '<cmd>lua require("telescope").extensions.dap.commands()<CR>')
|
||||||
|
vim.keymap.set("n", "Df", '<cmd>lua require("telescope").extensions.dap.frames()<CR>')
|
||||||
|
vim.keymap.set("n", "Dv", '<cmd>lua require("telescope").extensions.dap.variables()<CR>')
|
||||||
|
|
||||||
|
-- Setup
|
||||||
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "flex",
|
||||||
|
-- layout_defaults = {flip_columns = 160},
|
||||||
|
layout_config = {
|
||||||
|
preview_cutoff = 10,
|
||||||
|
prompt_position = "bottom",
|
||||||
|
mirror = true,
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<CR>"] = actions.select_default + actions.center,
|
||||||
|
["<esc>"] = actions.close,
|
||||||
|
["<tab>"] = actions.add_selection,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color_devicons = true,
|
||||||
|
file_previewer = previewers.vim_buffer_cat.new,
|
||||||
|
grep_previewer = previewers.vim_buffer_vimgrep.new,
|
||||||
|
qflist_previewer = previewers.vim_buffer_qflist.new,
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown({
|
||||||
|
-- even more opts
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local layout_strategies = require("telescope.pickers.layout_strategies")
|
||||||
|
local config = require("telescope.config")
|
||||||
|
|
||||||
|
layout_strategies.flex = function(self, max_columns, max_lines)
|
||||||
|
local layout_config = self.layout_config or {}
|
||||||
|
|
||||||
|
local flip_columns = layout_config.flip_columns or 160 -- Here's why.
|
||||||
|
local flip_lines = layout_config.flip_lines or 20
|
||||||
|
|
||||||
|
if max_columns < flip_columns and max_lines > flip_lines then
|
||||||
|
self.layout_config = (config.values.layout_defaults or {})["vertical"]
|
||||||
|
return layout_strategies.vertical(self, max_columns, max_lines)
|
||||||
|
else
|
||||||
|
self.layout_config = (config.values.layout_defaults or {})["horizontal"]
|
||||||
|
return layout_strategies.horizontal(self, max_columns, max_lines)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Extensions
|
||||||
|
telescope.load_extension("dap")
|
||||||
|
telescope.load_extension("fzy_native")
|
||||||
|
telescope.load_extension("gh")
|
||||||
|
telescope.load_extension("ui-select")
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
124
.config/nvim/lua/plugins/treesitter.lua
Normal file
124
.config/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
return {
|
||||||
|
{ "nvim-treesitter/playground", cmd = "TSPlaygroundToggle" },
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
event = "BufReadPost",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"cmake",
|
||||||
|
"cpp",
|
||||||
|
"css",
|
||||||
|
"diff",
|
||||||
|
"dockerfile",
|
||||||
|
"gdscript",
|
||||||
|
"git_rebase",
|
||||||
|
"gitcommit",
|
||||||
|
"gitignore",
|
||||||
|
"go",
|
||||||
|
"gomod",
|
||||||
|
"graphql",
|
||||||
|
"help",
|
||||||
|
"hcl",
|
||||||
|
"html",
|
||||||
|
"http",
|
||||||
|
"java",
|
||||||
|
"javascript",
|
||||||
|
"jsdoc",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"kotlin",
|
||||||
|
"latex",
|
||||||
|
"lua",
|
||||||
|
"make",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"meson",
|
||||||
|
"ninja",
|
||||||
|
"php",
|
||||||
|
"proto",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"rego",
|
||||||
|
"rust",
|
||||||
|
"scss",
|
||||||
|
"sql",
|
||||||
|
"svelte",
|
||||||
|
"teal",
|
||||||
|
"toml",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vhs",
|
||||||
|
"vim",
|
||||||
|
"vue",
|
||||||
|
"wgsl",
|
||||||
|
"yaml",
|
||||||
|
"zig",
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
use_languagetree = true,
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
context_commentstring = { enable = true, enable_autocmd = false },
|
||||||
|
playground = {
|
||||||
|
enable = true,
|
||||||
|
disable = {},
|
||||||
|
updatetime = 25,
|
||||||
|
persist_queries = false,
|
||||||
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "ss",
|
||||||
|
node_incremental = "sq",
|
||||||
|
scope_incremental = "sd",
|
||||||
|
node_decremental = "sa",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
query_linter = {
|
||||||
|
enable = true,
|
||||||
|
use_virtual_text = true,
|
||||||
|
lint_events = { "BufWrite", "CursorHold" },
|
||||||
|
},
|
||||||
|
textobjects = {
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
goto_next_start = {
|
||||||
|
["]]"] = "@function.outer",
|
||||||
|
["]m"] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
["]["] = "@function.outer",
|
||||||
|
["]M"] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
["[["] = "@function.outer",
|
||||||
|
["[m"] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
["[]"] = "@function.outer",
|
||||||
|
["[M"] = "@class.outer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
--- nvim-ts-autotag ---
|
||||||
|
autotag = {
|
||||||
|
enable = true,
|
||||||
|
filetypes = { "html", "javascriptreact", "xml" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
10
.config/rg/rg.conf
Normal file
10
.config/rg/rg.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--glob=!/.git/
|
||||||
|
--glob=!/.terraform/
|
||||||
|
--pretty
|
||||||
|
--colors=column:fg:100,181,246
|
||||||
|
--colors=line:fg:100,181,246
|
||||||
|
--colors=path:fg:26,35,126
|
||||||
|
--colors=path:style:bold
|
||||||
|
--colors=match:style:nobold
|
||||||
|
--colors=match:bg:255,235,59
|
||||||
|
--colors=match:fg:0,0,0
|
22
.config/sapling/sapling.conf
Normal file
22
.config/sapling/sapling.conf
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
[ui]
|
||||||
|
username =Daniel Lundin <daniel@arity.se>
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
sw = switch
|
||||||
|
switch = !sl sl -M -T ':\033[31m{node|short} \033[1;33m{bookmarks}{if(bookmarks, " ")}{remotenames} {if(github_pull_request_number, "\033[1;37;41m PR #{github_pull_request_number} ")}\033[0;3;32m {date|age} \033[35;1;3mby {author|user} - \033[0;34;3m{desc|firstline}\033[0m' | sed -E -e '/31m[0-9abcdef]{12}/!d' -e 's/.+ ://' | fzf-tmux -p 90%,50% -y 0 --ansi --color=light | sed "s/ .*//" | xargs -r -n1 sl go && sl log -r . -T status
|
||||||
|
|
||||||
|
l = ll
|
||||||
|
ll = log -G -T '\033[31m{node|short} \033[3;32m{date|age} \033[35;1;3mby {author|person}\n \033[0;34;3m{desc|firstline}\033[0m\n\n'
|
||||||
|
|
||||||
|
[pager]
|
||||||
|
pager = delta --hunk-header-style "line-number file" --line-numbers --max-line-distance 0.9 --syntax-theme GitHub --inspect-raw-lines=false
|
||||||
|
|
||||||
|
[color]
|
||||||
|
sl.public = color70 bold
|
||||||
|
sl.draft = color208 bold
|
||||||
|
sl.current = color99 bold
|
||||||
|
sl.diff = red bold
|
||||||
|
|
||||||
|
[committemplate]
|
||||||
|
emptymsg = ""
|
||||||
|
|
61
.config/starship.toml
Normal file
61
.config/starship.toml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
add_newline = false
|
||||||
|
|
||||||
|
format = """\
|
||||||
|
$hostname\
|
||||||
|
$directory\
|
||||||
|
$git_branch\
|
||||||
|
$git_commit\
|
||||||
|
$git_state\
|
||||||
|
$git_status\
|
||||||
|
${custom.sl_status}\
|
||||||
|
($character)\
|
||||||
|
"""
|
||||||
|
|
||||||
|
right_format = """\
|
||||||
|
"""
|
||||||
|
|
||||||
|
[custom.sl_status]
|
||||||
|
command = '''~/bin/starship-sl-status'''
|
||||||
|
when = true
|
||||||
|
style = "italic fg:#79AE6F"
|
||||||
|
format = '[(🌱 $output )]($style)'
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "%"
|
||||||
|
error_symbol = "[%](bold red)"
|
||||||
|
|
||||||
|
[line_break]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
fish_style_pwd_dir_length = 1
|
||||||
|
truncation_length = 1
|
||||||
|
truncate_to_repo = false
|
||||||
|
style = "italic bold"
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
format = "[$symbol$branch]($style)"
|
||||||
|
style = "fg:#559955"
|
||||||
|
symbol = " "
|
||||||
|
truncation_length = 16
|
||||||
|
truncation_symbol = ""
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
format = "[ $hash$tag]($style) "
|
||||||
|
style = "fg:#559955"
|
||||||
|
|
||||||
|
[git_state]
|
||||||
|
style = ""
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
format = '([\[$all_status$ahead_behind\]]($style))'
|
||||||
|
style = "dimmed"
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
format = "[$hostname](bold italic):"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[kubernetes]
|
||||||
|
disabled = false
|
||||||
|
style = ""
|
9
.config/systemd/user/dbus-notification-proxy.service
Normal file
9
.config/systemd/user/dbus-notification-proxy.service
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=dbus proxy for desktop notifications
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/xdg-dbus-proxy "$DBUS_SESSION_BUS_ADDRESS" %t/bus-notification --filter --talk=org.freedesktop.Notifications
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
10
.config/systemd/user/tmux.service
Normal file
10
.config/systemd/user/tmux.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run tmux server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
StartLimitIntervalSec=0
|
||||||
|
ExecStart=/usr/bin/tmux -D -u
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
3
.config/vconsole/personal.map
Normal file
3
.config/vconsole/personal.map
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
include "linux-with-two-alt-keys"
|
||||||
|
keycode 58 = Control
|
||||||
|
|
158
.config/wezterm/wezterm.lua
Normal file
158
.config/wezterm/wezterm.lua
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
|
function font_with_fallback(name, params)
|
||||||
|
local names = { name, "Noto Color Emoji", "Iosevka Nerd Font Mono" }
|
||||||
|
return wezterm.font_with_fallback(names, params)
|
||||||
|
end
|
||||||
|
|
||||||
|
local themeShelmanDark = {
|
||||||
|
colors = {
|
||||||
|
foreground = "#ded9ce",
|
||||||
|
background = "#171a23",
|
||||||
|
cursor_bg = "#FB8C00",
|
||||||
|
cursor_border = "#FB8C00",
|
||||||
|
split = "#444444",
|
||||||
|
ansi = { "#000000", "#ff605a", "#b1e869", "#ead89c", "#5da9f6", "#e86aff", "#82fff6", "#ded9ce" },
|
||||||
|
brights = { "#313131", "#f58b7f", "#dcf88f", "#eee5b2", "#a5c7ff", "#ddaaff", "#b6fff9", "#fefffe" },
|
||||||
|
tab_bar = {
|
||||||
|
background = "#000000",
|
||||||
|
active_tab = { bg_color = "#171a23", fg_color = "#c0b070", intensity = "Normal" },
|
||||||
|
inactive_tab = { bg_color = "#000000", fg_color = "#c0c0c0", intensity = "Half" },
|
||||||
|
inactive_tab_hover = { bg_color = "#333333", fg_color = "#909090", italic = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
tab_bar_style = {
|
||||||
|
active_tab_left = wezterm.format({
|
||||||
|
{ Background = { Color = "#171a23" } },
|
||||||
|
{ Foreground = { Color = "#000000" } },
|
||||||
|
{ Text = " " },
|
||||||
|
}),
|
||||||
|
active_tab_right = wezterm.format({
|
||||||
|
{ Background = { Color = "#171a23" } },
|
||||||
|
{ Foreground = { Color = "#000000" } },
|
||||||
|
{ Text = " " },
|
||||||
|
}),
|
||||||
|
inactive_tab_left = wezterm.format({
|
||||||
|
{ Background = { Color = "#000000" } },
|
||||||
|
{ Foreground = { Color = "#171a23" } },
|
||||||
|
{ Text = " " },
|
||||||
|
}),
|
||||||
|
inactive_tab_right = wezterm.format({
|
||||||
|
{ Background = { Color = "#000000" } },
|
||||||
|
{ Foreground = { Color = "#171a23" } },
|
||||||
|
{ Text = "▕" },
|
||||||
|
}),
|
||||||
|
inactive_tab_hover_left = wezterm.format({
|
||||||
|
{ Background = { Color = "#333333" } },
|
||||||
|
{ Foreground = { Color = "#ffffff" } },
|
||||||
|
{ Text = " " },
|
||||||
|
}),
|
||||||
|
inactive_tab_hover_right = wezterm.format({
|
||||||
|
{ Background = { Color = "#333333" } },
|
||||||
|
{ Foreground = { Color = "#ffffff" } },
|
||||||
|
{ Text = " " },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local themeShelmanLight = {
|
||||||
|
colors = {
|
||||||
|
foreground = "#000000",
|
||||||
|
background = "#fcfcfc",
|
||||||
|
cursor_bg = "#EA526F",
|
||||||
|
cursor_fg = "#ffffff",
|
||||||
|
cursor_border = "#cc0000",
|
||||||
|
split = "#444444",
|
||||||
|
selection_bg = "#FFCA28",
|
||||||
|
ansi = { "#212121", "#b7141e", "#457b23", "#f5971d", "#134eb2", "#550087", "#0e707c", "#eeeeee" },
|
||||||
|
brights = { "#424242", "#e83a3f", "#7aba39", "#fee92e", "#53a4f3", "#a94dbb", "#26bad1", "#d8d8d8" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
colors = themeShelmanLight.colors,
|
||||||
|
font = font_with_fallback("Iosevka Shelman SS09", { weight = "Regular" }),
|
||||||
|
font_rules = {
|
||||||
|
{
|
||||||
|
italic = false,
|
||||||
|
intensity = "Half",
|
||||||
|
font = font_with_fallback("Iosevka Shelman SS09", { weight = "Thin" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
italic = true,
|
||||||
|
intensity = "Normal",
|
||||||
|
font = font_with_fallback("Iosevka Shelman Curly Slab", { weight = "Light", italic = true }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
italic = true,
|
||||||
|
intensity = "Bold",
|
||||||
|
font = font_with_fallback("Iosevka Shelman SS15", { weight = "ExtraLight", italic = true }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
intensity = "Bold",
|
||||||
|
font = font_with_fallback("Iosevka Shelman SS09", { weight = "DemiBold" }),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
freetype_load_target = "Light",
|
||||||
|
freetype_render_target = "HorizontalLcd",
|
||||||
|
--freetype_load_flags = "NO_HINTING",
|
||||||
|
--custom_block_glyphs = false,
|
||||||
|
|
||||||
|
warn_about_missing_glyphs = false,
|
||||||
|
bold_brightens_ansi_colors = false,
|
||||||
|
allow_square_glyphs_to_overflow_width = "Always",
|
||||||
|
|
||||||
|
font_size = 10.5,
|
||||||
|
line_height = 1.0,
|
||||||
|
cell_width = 0.9,
|
||||||
|
|
||||||
|
initial_cols = 128,
|
||||||
|
initial_rows = 45,
|
||||||
|
use_resize_increments = false,
|
||||||
|
|
||||||
|
window_background_opacity = 0.93,
|
||||||
|
window_padding = {
|
||||||
|
left = "0",
|
||||||
|
right = "0",
|
||||||
|
top = "0",
|
||||||
|
bottom = "0",
|
||||||
|
},
|
||||||
|
window_decorations = "RESIZE",
|
||||||
|
window_frame = {
|
||||||
|
border_left_width = "2px",
|
||||||
|
border_right_width = "2px",
|
||||||
|
border_bottom_height = "2px",
|
||||||
|
border_top_height = "2px",
|
||||||
|
border_left_color = "#cccccc",
|
||||||
|
border_right_color = "#cccccc",
|
||||||
|
border_bottom_color = "#cccccc",
|
||||||
|
border_top_color = "#cccccc",
|
||||||
|
},
|
||||||
|
|
||||||
|
default_cursor_style = "SteadyBlock",
|
||||||
|
cursor_thickness = "3px",
|
||||||
|
cursor_blink_rate = 300,
|
||||||
|
|
||||||
|
enable_wayland = true,
|
||||||
|
enable_tab_bar = false,
|
||||||
|
tab_bar_at_bottom = true,
|
||||||
|
show_tab_index_in_tab_bar = true,
|
||||||
|
enable_scroll_bar = false,
|
||||||
|
scrollback_lines = 5000,
|
||||||
|
alternate_buffer_wheel_scroll_speed = 2,
|
||||||
|
check_for_updates = false,
|
||||||
|
status_update_interval = 100,
|
||||||
|
audible_bell = "Disabled",
|
||||||
|
term = "wezterm",
|
||||||
|
|
||||||
|
disable_default_key_bindings = true,
|
||||||
|
keys = {
|
||||||
|
{ key = "c", mods = "ALT|SHIFT", action = wezterm.action({ CopyTo = "ClipboardAndPrimarySelection" }) },
|
||||||
|
{ key = "v", mods = "ALT|SHIFT", action = "Paste" },
|
||||||
|
{ key = "0", mods = "CTRL", action = "ResetFontSize" },
|
||||||
|
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
|
||||||
|
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
|
||||||
|
{ key = "Enter", mods = "ALT", action = "ToggleFullScreen" },
|
||||||
|
},
|
||||||
|
}
|
2
.envrc
2
.envrc
|
@ -1,2 +0,0 @@
|
||||||
# shellcheck shell=bash
|
|
||||||
use flake
|
|
123
.gitconfig
Normal file
123
.gitconfig
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
[core]
|
||||||
|
excludesfile = "~/.gitignore"
|
||||||
|
pager = delta --line-numbers --max-line-distance 0.9
|
||||||
|
compression = 0
|
||||||
|
looseCompression = 0
|
||||||
|
|
||||||
|
[user]
|
||||||
|
useConfigOnly = true
|
||||||
|
|
||||||
|
[column]
|
||||||
|
ui = auto
|
||||||
|
|
||||||
|
[push]
|
||||||
|
default = tracking
|
||||||
|
|
||||||
|
[branch "main"]
|
||||||
|
rebase = true
|
||||||
|
|
||||||
|
[branch "master"]
|
||||||
|
rebase = true
|
||||||
|
|
||||||
|
[alias]
|
||||||
|
b = branch -va
|
||||||
|
cl = clone --filter=blob:none
|
||||||
|
d = diff --stat -p -C
|
||||||
|
ds = diff --staged --stat -p -C
|
||||||
|
dt = difftool
|
||||||
|
patch = !git --no-pager diff --no-color
|
||||||
|
co = checkout
|
||||||
|
st = status -sb
|
||||||
|
pullr = pull --rebase
|
||||||
|
|
||||||
|
sl = branchless smartlog
|
||||||
|
sync = branchless sync
|
||||||
|
sw = branchless switch
|
||||||
|
|
||||||
|
gerrit-new = !git fetch origin main && git checkout --detach origin/main
|
||||||
|
gerrit-push = !git push origin HEAD:refs/for/main
|
||||||
|
gerrit-push-wip = !git push origin HEAD:refs/for/main%wip
|
||||||
|
gerrit-push-ready = !git push origin HEAD:refs/for/main%ready
|
||||||
|
gerrit-replace = !git commit --amend -a && git push origin HEAD:refs/for/main
|
||||||
|
gerrit-config = !git fetch origin refs/meta/config:refs/remotes/origin/meta/config && git checkout FETCH_HEAD
|
||||||
|
gerrit-config-push = !git push origin HEAD:refs/meta/config
|
||||||
|
gp = gerrit-push
|
||||||
|
gpw = gerrit-push-wip
|
||||||
|
gpr = gerrit-push-ready
|
||||||
|
|
||||||
|
ll = log --graph --date=relative --topo-order --pretty='format:%C(yellow)%h%C(yellow)%d %Cblue%ar %Cgreenby %an%Creset -- %s'
|
||||||
|
lla = log --graph --date=relative --topo-order --pretty='format:%Cgreen%h %Cblue%ar %Credby %an%Creset -- %s' --all
|
||||||
|
|
||||||
|
guilt = "!f(){ git log --pretty='format:%an <%ae>' $@ | sort | uniq -c | sort -rn; }; f"
|
||||||
|
serve = daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/
|
||||||
|
|
||||||
|
identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; git config user.signingkey \"$(git config user.$1.signingkey)\"; :"
|
||||||
|
|
||||||
|
[color]
|
||||||
|
ui = auto
|
||||||
|
branch = auto
|
||||||
|
diff = auto
|
||||||
|
status = auto
|
||||||
|
|
||||||
|
[apply]
|
||||||
|
whitespace = nowarn
|
||||||
|
|
||||||
|
[pack]
|
||||||
|
threads = 0
|
||||||
|
|
||||||
|
[blame]
|
||||||
|
date = relative
|
||||||
|
|
||||||
|
[delta]
|
||||||
|
syntax-theme = GitHub
|
||||||
|
hunk-header-style = line-number syntax
|
||||||
|
|
||||||
|
[hub]
|
||||||
|
protocol = git
|
||||||
|
|
||||||
|
[http]
|
||||||
|
cookiefile = /home/dln/.gitcookies
|
||||||
|
|
||||||
|
[interactive]
|
||||||
|
diffFilter = delta --color-only --features=interactive
|
||||||
|
|
||||||
|
[credential]
|
||||||
|
helper = store
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = false
|
||||||
|
|
||||||
|
[user]
|
||||||
|
name = Daniel Lundin
|
||||||
|
email = daniel@arity.se
|
||||||
|
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
; [url "git@github.com:"]
|
||||||
|
; insteadOf = https://github.com/
|
||||||
|
|
||||||
|
[lfs]
|
||||||
|
concurrenttransfers = 32
|
||||||
|
|
||||||
|
[filter "lfs"]
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
tool = difft
|
||||||
|
# external = difft
|
||||||
|
|
||||||
|
[difftool]
|
||||||
|
prompt = false
|
||||||
|
|
||||||
|
[difftool "difft"]
|
||||||
|
cmd = difft --display inline "$LOCAL" "$REMOTE"
|
||||||
|
[scalar]
|
||||||
|
repo = /tmp/k2/src
|
||||||
|
[maintenance]
|
||||||
|
repo = /tmp/k2/src
|
||||||
|
[fetch]
|
||||||
|
showForcedUpdates = true
|
15
.gitignore
vendored
15
.gitignore
vendored
|
@ -1 +1,14 @@
|
||||||
/result
|
*~
|
||||||
|
*.a
|
||||||
|
*.class
|
||||||
|
/.idea
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iwr
|
||||||
|
*.iws
|
||||||
|
*.la
|
||||||
|
*.o
|
||||||
|
*.pyc
|
||||||
|
*.so
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
|
4
.gnupg/gpg-agent.conf
Normal file
4
.gnupg/gpg-agent.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
enable-ssh-support
|
||||||
|
default-cache-ttl 3600
|
||||||
|
max-cache-ttl 3600
|
||||||
|
extra-socket /run/user/1000/gnupg/S.gpg-agent.extra
|
2
.gnupg/gpg.conf
Normal file
2
.gnupg/gpg.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#use-agent
|
||||||
|
keyid-format LONG
|
11
.inputrc
Normal file
11
.inputrc
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
set meta-flag on
|
||||||
|
set convert-meta off
|
||||||
|
set output-meta on
|
||||||
|
set completion-ignore-case on
|
||||||
|
set visible-stats on
|
||||||
|
set show-all-if-ambiguous on
|
||||||
|
set completion-query-items 150
|
||||||
|
|
||||||
|
#"\C-p": history-search-backward
|
||||||
|
#"\C-n": history-search-forward
|
||||||
|
|
13
.local/share/applications/firefox-arity.desktop
Normal file
13
.local/share/applications/firefox-arity.desktop
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Firefox (Arity)
|
||||||
|
GenericName=Web Browser
|
||||||
|
Comment=Browse the Web
|
||||||
|
Exec=firefox %u -P Arity --name firefox-arity
|
||||||
|
Icon=firefox
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
||||||
|
StartupWMClass=firefox-arity
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
Keywords=web;browser;internet;
|
13
.local/share/applications/firefox-work.desktop
Normal file
13
.local/share/applications/firefox-work.desktop
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Firefox (Work)
|
||||||
|
GenericName=Web Browser
|
||||||
|
Comment=Browse the Web
|
||||||
|
Exec=firefox %u -P Work --new-instance --name firefox-work
|
||||||
|
Icon=firefox
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
||||||
|
StartupWMClass=firefox-work
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
Keywords=web;browser;internet;
|
11
.local/share/applications/google-chrome-beta-client.desktop
Normal file
11
.local/share/applications/google-chrome-beta-client.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Client Chrome
|
||||||
|
StartupWMClass=Google-chrome-beta-client
|
||||||
|
Exec=/usr/bin/google-chrome-beta %U --user-data-dir=.config/Google-chrome-beta-client --class=Google-chrome-beta-client
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome-beta
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
|
11
.local/share/applications/google-chrome-beta-private.desktop
Normal file
11
.local/share/applications/google-chrome-beta-private.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Private Chrome
|
||||||
|
StartupWMClass=Google-chrome-beta-private
|
||||||
|
Exec=/usr/bin/google-chrome-beta %U --user-data-dir=.config/Google-chrome-beta-private --class=Google-chrome-beta-private
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome-beta
|
||||||
|
Type=Application
|
||||||
|
Categories=Netprivate;WebBrowser;
|
||||||
|
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
|
11
.local/share/applications/google-chrome-beta-work.desktop
Normal file
11
.local/share/applications/google-chrome-beta-work.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Work Chrome
|
||||||
|
StartupWMClass=Google-chrome-beta-work
|
||||||
|
Exec=/usr/bin/google-chrome-beta %U --user-data-dir=.config/Google-chrome-beta-work --class=Google-chrome-beta-work
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome-beta
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
|
9
.local/share/applications/meet.desktop
Normal file
9
.local/share/applications/meet.desktop
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Google Meet
|
||||||
|
StartupWMClass=meet.google.com
|
||||||
|
Exec=/usr/bin/google-chrome-stable --profile-directory='Profile 1' --app=https://meet.google.com
|
||||||
|
Terminal=false
|
||||||
|
Icon=camera-video
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;Office
|
9
.local/share/applications/plex.desktop
Normal file
9
.local/share/applications/plex.desktop
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=plex
|
||||||
|
StartupWMClass=plex.aarn.shelman.io
|
||||||
|
Exec=/usr/bin/google-chrome-stable --profile-directory='Profile 2' --app=https://plex.home:32400/web/index.html
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome
|
||||||
|
Type=Application
|
||||||
|
Categories=Audio;
|
11
.local/share/applications/spotify.desktop
Normal file
11
.local/share/applications/spotify.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Spotify
|
||||||
|
GenericName=Music Player
|
||||||
|
Icon=spotify-client
|
||||||
|
TryExec=spotify
|
||||||
|
Exec=spotify --force-device-scale-factor=2 %U
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/spotify;
|
||||||
|
Categories=Audio;Music;Player;AudioVideo;
|
||||||
|
StartupWMClass=spotify
|
10
.local/share/applications/wezterm-dln-dev-secondary.desktop
Normal file
10
.local/share/applications/wezterm-dln-dev-secondary.desktop
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=wezterm-dln-dev-secondary
|
||||||
|
GenericName=wezterm-dln-dev-secondary
|
||||||
|
StartupWMClass=org.wezfurlong.wezterm
|
||||||
|
Type=Application
|
||||||
|
TryExec=/usr/bin/wezterm
|
||||||
|
Icon=org.wezfurlong.wezterm
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;TerminalEmulator;
|
||||||
|
Exec=/usr/bin/wezterm --config 'default_prog={"ssh", "-q", "dln-dev", "--", "tmux", "-u", "new-session", "-As1", "-t0"}' --config font_size=9 --config=window_background_opacity=0.4 start --class=wezterm-dln-dev-secondary
|
11
.local/share/applications/wezterm-dln-dev.desktop
Normal file
11
.local/share/applications/wezterm-dln-dev.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=wezterm-dln-dev
|
||||||
|
GenericName=wezterm-dln-dev
|
||||||
|
StartupWMClass=org.wezfurlong.wezterm
|
||||||
|
Type=Application
|
||||||
|
TryExec=/usr/bin/wezterm
|
||||||
|
Icon=org.wezfurlong.wezterm
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;TerminalEmulator;
|
||||||
|
Exec=/usr/bin/wezterm --config 'default_prog={"ssh", "-q", "dln-dev", "--", "tmux", "-u", "new", "-As0"}' start --class=wezterm-dln-dev
|
||||||
|
#Exec=/usr/bin/wezterm --config 'default_prog={"ssh", "-q", "dln-dev"}' start --class=wezterm-dln-dev
|
10
.local/share/applications/wezterm-local.desktop
Normal file
10
.local/share/applications/wezterm-local.desktop
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=wezterm-local
|
||||||
|
GenericName=wezterm-local
|
||||||
|
StartupWMClass=wezterm-local
|
||||||
|
Type=Application
|
||||||
|
TryExec=/usr/bin/wezterm
|
||||||
|
Icon=org.wezfurlong.wezterm
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;TerminalEmulator;
|
||||||
|
Exec=/usr/bin/wezterm start --class=wezterm-local
|
9
.local/share/applications/youtube-music.desktop
Normal file
9
.local/share/applications/youtube-music.desktop
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=YouTube Music (provar)
|
||||||
|
StartupWMClass=music.youtube.com
|
||||||
|
Exec=/usr/bin/google-chrome-stable --user-data-dir=$HOME/.config/google-chrome --profile-directory='Profile 2' --app=https://music.youtube.com --class=music.youtube.com
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome
|
||||||
|
Type=Application
|
||||||
|
Categories=Audio;
|
31
.ssh/config
Normal file
31
.ssh/config
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
ForwardAgent yes
|
||||||
|
ServerAliveInterval 15
|
||||||
|
ServerAliveCountMax 3
|
||||||
|
ControlMaster auto
|
||||||
|
ControlPath ~/.ssh/control:%h:%p:%r
|
||||||
|
ControlPersist 1200
|
||||||
|
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
|
AddressFamily inet
|
||||||
|
RequestTty yes
|
||||||
|
PreferredAuthentications=publickey
|
||||||
|
|
||||||
|
Host gitlab.com
|
||||||
|
IdentityAgent /dev/null
|
||||||
|
PKCS11Provider /usr/lib/pkcs11/libtpm2_pkcs11.so
|
||||||
|
|
||||||
|
Host 10.1.100.16
|
||||||
|
Host dln-dev
|
||||||
|
Hostname 10.1.100.16
|
||||||
|
IdentityAgent ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
|
||||||
|
ForwardAgent yes
|
||||||
|
ForwardX11 no
|
||||||
|
ExitOnForwardFailure yes
|
||||||
|
Compression yes
|
||||||
|
LocalForward 127.0.0.1:3000 127.0.0.1:3000
|
||||||
|
LocalForward 127.0.0.1:3011 127.0.0.1:3011
|
||||||
|
LocalForward 127.0.0.1:8000 127.0.0.1:8000
|
||||||
|
LocalForward 127.0.0.1:8080 127.0.0.1:8080
|
||||||
|
# RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.extra
|
||||||
|
RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh ${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
|
||||||
|
# RemoteForward ${XDG_RUNTIME_DIR}/gnupg/S.scdaemon ${XDG_RUNTIME_DIR}/gnupg/S.scdaemon
|
||||||
|
RemoteForward ${XDG_RUNTIME_DIR}/bus-notification ${XDG_RUNTIME_DIR}/bus-notification
|
3
.ssh/rc
Executable file
3
.ssh/rc
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" $HOME/.ssh/ssh_auth_sock;
|
||||||
|
fi
|
84
.tmux.conf
Normal file
84
.tmux.conf
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
set -g prefix ^o
|
||||||
|
|
||||||
|
set -g base-index 1
|
||||||
|
set -g display-panes-time 3000
|
||||||
|
set -s escape-time 10
|
||||||
|
set -g status on
|
||||||
|
set -g status-interval 30
|
||||||
|
set -g focus-events on
|
||||||
|
set -g allow-passthrough on
|
||||||
|
setw -g alternate-screen on
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
setw -g automatic-rename off
|
||||||
|
setw -g mode-keys vi
|
||||||
|
set-option -g mouse on
|
||||||
|
|
||||||
|
# clipboard
|
||||||
|
set -g set-clipboard on
|
||||||
|
bind-key ] paste-buffer -p
|
||||||
|
|
||||||
|
set -g update-environment "BUILDCOMMAND GOPACKAGESDRIVER XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||||
|
set -g default-command zsh
|
||||||
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
set -g default-terminal "wezterm"
|
||||||
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # Underline color
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
bind -n M-1 select-window -t nvim
|
||||||
|
bind -n M-2 select-window -t 2
|
||||||
|
bind -n M-3 select-window -t 3
|
||||||
|
bind -n M-4 select-window -t 4
|
||||||
|
bind -n M-5 select-window -t 5
|
||||||
|
bind -n M-6 select-window -t 6
|
||||||
|
bind -n M-7 select-window -t 7
|
||||||
|
bind -n M-8 select-window -t 8
|
||||||
|
bind -n M-9 select-window -t 9
|
||||||
|
bind -n M-0 select-window -t 10
|
||||||
|
bind -n M-m send-keys -t 9 q C-u "clear; tmux clear-history -t 9" C-m C-p C-p C-p C-m
|
||||||
|
bind C-o send-keys C-o
|
||||||
|
bind r source-file ~/.tmux.conf
|
||||||
|
bind -n C-Right next-window
|
||||||
|
bind -n C-Left previous-window
|
||||||
|
bind C-s set-option -g status
|
||||||
|
bind K confirm kill-server
|
||||||
|
bind C-k clear-history
|
||||||
|
bind -n C-l send-keys C-l \; clear-history
|
||||||
|
bind-key -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
|
||||||
|
bind-key -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
|
||||||
|
bind-key / copy-mode \; send-key ?
|
||||||
|
bind-key P 'capture-pane' \; capture-pane -S - \; save-buffer /tmp/tmux \; delete-buffer
|
||||||
|
bind-key -n C-\\ copy-mode \; send -X search-backward " % "\; send -X search-again
|
||||||
|
bind -n M-g display-popup -S 'bg=#F1F8E9,fg=#689F38' -s 'bg=#F1F8E9' -h '90%' -w '90%' -b rounded -d '#{pane_current_path}' -E "gitui"
|
||||||
|
bind -n M-e display-popup -S 'bg=#E3F2FD,fg=#0288D1' -s 'bg=#E3F2FD' -h '40%' -w '90%' -y 0 -b rounded -d '#{pane_current_path}' -e FZF=fzf -E "~/bin/tmux-edit-helper"
|
||||||
|
bind -n M-m display-popup -S 'bg=#FFF8E1,fg=#FF6F00' -s 'bg=#FFF8E1' -h '90%' -w '90%' -b rounded -d '#{pane_current_path}' -E "~/bin/tmux-build-helper"
|
||||||
|
|
||||||
|
setw -g window-status-format ""
|
||||||
|
setw -g window-status-current-format ""
|
||||||
|
setw -g window-status-separator ""
|
||||||
|
set -g status-style "fg=#cc0000,dotted-underscore,italics"
|
||||||
|
set -g status-position top
|
||||||
|
set -g status-left-length 0
|
||||||
|
set -g status-right-length 0
|
||||||
|
set -g status-left '[#I] #{pane_current_path}'
|
||||||
|
set -g status-right '%F | %R'
|
||||||
|
set -g status off
|
||||||
|
set -g set-titles on
|
||||||
|
set -g set-titles-string "#H - #T"
|
||||||
|
|
||||||
|
new -s0 -n 1 nvim --listen $XDG_RUNTIME_DIR/nvim.sock
|
||||||
|
new-window -n 2
|
||||||
|
new-window -n 3
|
||||||
|
new-window -n 4
|
||||||
|
new-window -n 5
|
||||||
|
new-window -n 6
|
||||||
|
new-window -n 7
|
||||||
|
new-window -n 8
|
||||||
|
new-window -n 9
|
||||||
|
new-window -n 0
|
||||||
|
|
||||||
|
# vim:set ft=tmux:
|
2
.vault
Normal file
2
.vault
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#token_helper = "/home/dln/bin/vault-token-helper"
|
||||||
|
|
247
.zshrc
Normal file
247
.zshrc
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
|
||||||
|
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
|
||||||
|
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
|
||||||
|
command git clone --depth=1 https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
|
||||||
|
print -P "%F{33} %F{34}Installation successful.%f%b" || \
|
||||||
|
print -P "%F{160} The clone has failed.%f%b"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
||||||
|
autoload -Uz _zinit
|
||||||
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||||
|
|
||||||
|
zi ice wait lucid
|
||||||
|
zi load zsh-users/zsh-completions
|
||||||
|
zi ice wait lucid
|
||||||
|
zi load zsh-users/zsh-syntax-highlighting
|
||||||
|
zi ice wait lucid
|
||||||
|
zi load zsh-users/zsh-history-substring-search
|
||||||
|
|
||||||
|
## History
|
||||||
|
HISTSIZE=50000
|
||||||
|
SAVEHIST=50000
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
setopt append_history
|
||||||
|
setopt extended_history
|
||||||
|
setopt hist_expire_dups_first
|
||||||
|
setopt hist_fcntl_lock
|
||||||
|
setopt hist_ignore_all_dups
|
||||||
|
setopt hist_ignore_space
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt hist_lex_words
|
||||||
|
setopt hist_reduce_blanks
|
||||||
|
setopt hist_save_no_dups
|
||||||
|
setopt hist_subst_pattern
|
||||||
|
setopt hist_verify
|
||||||
|
setopt share_history
|
||||||
|
export HISTORY_IGNORE="(ls *|cd *|rm *|pwd|reboot|exit|e *|*AWS*|*SECRET*|*PASSWORD*|*TOKEN*|*API*|*KEY*|*PASS*|*SECRETS*|*SECRET_KEY*|*SECRET_TOKEN*|*SECRET_KEY_BASE*|*SECRET_TOKEN_BASE*)"
|
||||||
|
|
||||||
|
|
||||||
|
## zsh settings
|
||||||
|
setopt pipe_fail
|
||||||
|
setopt auto_pushd
|
||||||
|
setopt no_beep
|
||||||
|
setopt no_rm_star_silent
|
||||||
|
setopt extended_glob
|
||||||
|
setopt ksh_glob
|
||||||
|
setopt null_glob
|
||||||
|
|
||||||
|
## Autosuggest
|
||||||
|
# ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#D7CCC8,italic"
|
||||||
|
# ZSH_AUTOSUGGEST_USE_ASYNC=1
|
||||||
|
# ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
|
|
||||||
|
export PATH=$HOME/bin:$PATH
|
||||||
|
|
||||||
|
redraw-prompt() {
|
||||||
|
local precmd
|
||||||
|
for precmd in $precmd_functions; do
|
||||||
|
$precmd
|
||||||
|
done
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N redraw-prompt
|
||||||
|
|
||||||
|
_jump() {
|
||||||
|
_dir=$(fre --sorted | fzf-tmux --no-sort -p 90%,40% -y 0)
|
||||||
|
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
||||||
|
zle && zle redraw-prompt
|
||||||
|
}
|
||||||
|
zle -N _jump
|
||||||
|
|
||||||
|
fre_chpwd() {
|
||||||
|
fre --add "$(pwd)"
|
||||||
|
}
|
||||||
|
typeset -gaU chpwd_functions
|
||||||
|
chpwd_functions+=fre_chpwd
|
||||||
|
|
||||||
|
_cwd_gitroot() {
|
||||||
|
_gitroot=$(git rev-parse --show-toplevel 2>/dev/null || sl root 2>/dev/null || pwd)
|
||||||
|
_dir=$((echo "$_gitroot" && fd -td . "$_gitroot") | fzf-tmux -p 90%,40% -y 0)
|
||||||
|
[ -n "$_dir" ] && cd $_dir
|
||||||
|
zle && zle redraw-prompt
|
||||||
|
}
|
||||||
|
zle -N _cwd_gitroot
|
||||||
|
|
||||||
|
## Keybindings
|
||||||
|
bindkey -e
|
||||||
|
bindkey '^[[A' history-beginning-search-backward
|
||||||
|
bindkey '^[[B' history-beginning-search-forward
|
||||||
|
bindkey '^P' history-beginning-search-backward
|
||||||
|
bindkey '^N' history-beginning-search-forward
|
||||||
|
bindkey '^g' _jump
|
||||||
|
bindkey '^_' _cwd_gitroot
|
||||||
|
|
||||||
|
|
||||||
|
## Gnupg / gpg / ssh / yubikey
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
|
||||||
|
|
||||||
|
## Pager
|
||||||
|
export LESS="--mouse --wheel-lines=1 -nRXF"
|
||||||
|
|
||||||
|
## Clipboard OSC 52
|
||||||
|
function clip { echo -en "\x1b]52;c;$(base64 -w0)\x07" }
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
alias c='cut -c-${COLUMNS}'
|
||||||
|
alias e='tmux-edit-helper'
|
||||||
|
alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git'
|
||||||
|
alias l=bat
|
||||||
|
alias lw='bat --wrap=never'
|
||||||
|
alias ls=exa
|
||||||
|
alias tail='tail -n $LINES'
|
||||||
|
alias timestamp='TZ=Z date "+%Y%m%dT%H%M%SZ"'
|
||||||
|
alias tree='exa --tree'
|
||||||
|
alias v=vgrep
|
||||||
|
alias ve='env EDITOR= vgrep -s'
|
||||||
|
alias xc=clip
|
||||||
|
alias w="history -1 | sed -e 's/[0-9]* //' | xargs viddy -n1"
|
||||||
|
|
||||||
|
## ripgrep
|
||||||
|
export RIPGREP_CONFIG_PATH=${HOME}/.config/rg/rg.conf
|
||||||
|
|
||||||
|
# "auto paging"
|
||||||
|
rg() {
|
||||||
|
/usr/bin/rg -p "$@" | bat
|
||||||
|
}
|
||||||
|
|
||||||
|
fix_cursor() {
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
}
|
||||||
|
|
||||||
|
precmd_functions+=(fix_cursor)
|
||||||
|
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
## vim
|
||||||
|
export EDITOR=nvim
|
||||||
|
|
||||||
|
## fzf
|
||||||
|
export FZF_TMUX=1
|
||||||
|
export FZF_COMPLETION_TRIGGER=";"
|
||||||
|
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||||
|
. /usr/share/fzf/completion.zsh
|
||||||
|
. /usr/share/fzf/key-bindings.zsh
|
||||||
|
|
||||||
|
## direnv
|
||||||
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
|
## pyenv
|
||||||
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
export PATH="/home/dln/.pyenv/shims:${PATH}"
|
||||||
|
export PYENV_SHELL=zsh
|
||||||
|
# command pyenv rehash 2>/dev/null # this is slow
|
||||||
|
pyenv() {
|
||||||
|
local command
|
||||||
|
command="${1:-}"
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$command" in
|
||||||
|
activate|deactivate|rehash|shell)
|
||||||
|
eval "$(pyenv "sh-$command" "$@")"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
command pyenv "$command" "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
## eksctl
|
||||||
|
if [ ! -f "${fpath[1]}/_eksctl" ]; then
|
||||||
|
command -v eksctl >/dev/null 2>&1 && eksctl completion zsh > "${fpath[1]}/_eksctl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Kubernetes
|
||||||
|
if [ ! -f "${fpath[1]}/_kubectl" ]; then
|
||||||
|
command -v kubectl >/dev/null 2>&1 && kubectl completion zsh > "${fpath[1]}/_kubectl"
|
||||||
|
fi
|
||||||
|
export PATH=$HOME/.krew/bin:$PATH
|
||||||
|
|
||||||
|
## bazel
|
||||||
|
if [ ! -f "${fpath[1]}/_bazel" ]; then
|
||||||
|
curl -sLo "${fpath[1]}/_bazel" https://raw.githubusercontent.com/bazelbuild/bazel/master/scripts/zsh_completion/_bazel
|
||||||
|
fi
|
||||||
|
|
||||||
|
## sapling
|
||||||
|
if [ ! -f "${fpath[1]}/_sl" ]; then
|
||||||
|
# See: https://github.com/facebook/sapling/pull/369
|
||||||
|
curl -sLo "${fpath[1]}/_sl" https://github.com/facebook/sapling/raw/d6157db1ebc0868cf70805756e32541bd681bac2/eden/scm/contrib/zsh_completion_sl
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Tekton cli
|
||||||
|
if [ ! -f "${fpath[1]}/_tkn" ]; then
|
||||||
|
command -v tkn >/dev/null 2>&1 && tkn completion zsh > "${fpath[1]}/_tkn"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## kapp
|
||||||
|
if [ ! -f "${fpath[1]}/_kapp" ]; then
|
||||||
|
command -v kapp >/dev/null 2>&1 && kapp completion zsh --tty=false > "${fpath[1]}/_kapp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## kn
|
||||||
|
if [ ! -f "${fpath[1]}/_kn" ]; then
|
||||||
|
command -v kn >/dev/null 2>&1 && kn completion zsh > "${fpath[1]}/_kn"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## talos cli
|
||||||
|
if [ ! -f "${fpath[1]}/_talosctl" ]; then
|
||||||
|
command -v talosctl >/dev/null 2>&1 && talosctl completion zsh > "${fpath[1]}/_talosctl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Google Cloud
|
||||||
|
[ -f /opt/google-cloud-sdk/completion.zsh.inc ] && source /opt/google-cloud-sdk/completion.zsh.inc
|
||||||
|
|
||||||
|
## Golang
|
||||||
|
export PATH=$HOME/go/bin:$PATH
|
||||||
|
GOPROXY=https://athens.aarn.shelman.io
|
||||||
|
|
||||||
|
## Ansible
|
||||||
|
export ANSIBLE_NOCOWS=1
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
autoload -Uz compdef
|
||||||
|
|
||||||
|
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/dln/.config/tea/autocomplete.zsh"
|
||||||
|
|
||||||
|
## AWS
|
||||||
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
complete -o nospace -C /usr/bin/mcli mcli
|
||||||
|
complete -C '/usr/bin/aws_completer' aws
|
||||||
|
|
||||||
|
|
||||||
|
# The next line updates PATH for the Google Cloud SDK.
|
||||||
|
if [ -f '/home/dln/google-cloud-sdk/path.zsh.inc' ]; then . '/home/dln/google-cloud-sdk/path.zsh.inc'; fi
|
||||||
|
|
||||||
|
# The next line enables shell command completion for gcloud.
|
||||||
|
if [ -f '/home/dln/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/dln/google-cloud-sdk/completion.zsh.inc'; fi
|
|
@ -1,3 +0,0 @@
|
||||||
# Configuration and various sundries
|
|
||||||
|
|
||||||
IT in a box.
|
|
364
bin/git-wtf
Executable file
364
bin/git-wtf
Executable file
|
@ -0,0 +1,364 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
HELP = <<EOS
|
||||||
|
git-wtf displays the state of your repository in a readable, easy-to-scan
|
||||||
|
format. It's useful for getting a summary of how a branch relates to a remote
|
||||||
|
server, and for wrangling many topic branches.
|
||||||
|
|
||||||
|
git-wtf can show you:
|
||||||
|
- How a branch relates to the remote repo, if it's a tracking branch.
|
||||||
|
- How a branch relates to integration branches, if it's a feature branch.
|
||||||
|
- How a branch relates to the feature branches, if it's an integration
|
||||||
|
branch.
|
||||||
|
|
||||||
|
git-wtf is best used before a git push, or between a git fetch and a git
|
||||||
|
merge. Be sure to set color.ui to auto or yes for maximum viewing pleasure.
|
||||||
|
EOS
|
||||||
|
|
||||||
|
KEY = <<EOS
|
||||||
|
KEY:
|
||||||
|
() branch only exists locally
|
||||||
|
{} branch only exists on a remote repo
|
||||||
|
[] branch exists locally and remotely
|
||||||
|
|
||||||
|
x merge occurs both locally and remotely
|
||||||
|
~ merge occurs only locally
|
||||||
|
(space) branch isn't merged in
|
||||||
|
|
||||||
|
(It's possible for merges to occur remotely and not locally, of course, but
|
||||||
|
that's a less common case and git-wtf currently doesn't display anything
|
||||||
|
special for it.)
|
||||||
|
EOS
|
||||||
|
|
||||||
|
USAGE = <<EOS
|
||||||
|
Usage: git wtf [branch+] [options]
|
||||||
|
|
||||||
|
If [branch] is not specified, git-wtf will use the current branch. The possible
|
||||||
|
[options] are:
|
||||||
|
|
||||||
|
-l, --long include author info and date for each commit
|
||||||
|
-a, --all show all branches across all remote repos, not just
|
||||||
|
those from origin
|
||||||
|
-A, --all-commits show all commits, not just the first 5
|
||||||
|
-s, --short don't show commits
|
||||||
|
-k, --key show key
|
||||||
|
-r, --relations show relation to features / integration branches
|
||||||
|
--dump-config print out current configuration and exit
|
||||||
|
|
||||||
|
git-wtf uses some heuristics to determine which branches are integration
|
||||||
|
branches, and which are feature branches. (Specifically, it assumes the
|
||||||
|
integration branches are named "master", "next" and "edge".) If it guesses
|
||||||
|
incorrectly, you will have to create a .git-wtfrc file.
|
||||||
|
|
||||||
|
To start building a configuration file, run "git-wtf --dump-config >
|
||||||
|
.git-wtfrc" and edit it. The config file is a YAML file that specifies the
|
||||||
|
integration branches, any branches to ignore, and the max number of commits to
|
||||||
|
display when --all-commits isn't used. git-wtf will look for a .git-wtfrc file
|
||||||
|
starting in the current directory, and recursively up to the root.
|
||||||
|
|
||||||
|
IMPORTANT NOTE: all local branches referenced in .git-wtfrc must be prefixed
|
||||||
|
with heads/, e.g. "heads/master". Remote branches must be of the form
|
||||||
|
remotes/<remote>/<branch>.
|
||||||
|
EOS
|
||||||
|
|
||||||
|
COPYRIGHT = <<EOS
|
||||||
|
git-wtf Copyright 2008--2009 William Morgan <wmorgan at the masanjin dot nets>.
|
||||||
|
This program is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
more details.
|
||||||
|
|
||||||
|
You can find the GNU General Public License at: http://www.gnu.org/licenses/
|
||||||
|
EOS
|
||||||
|
|
||||||
|
require 'yaml'
|
||||||
|
CONFIG_FN = ".git-wtfrc"
|
||||||
|
|
||||||
|
class Numeric; def pluralize s; "#{to_s} #{s}" + (self != 1 ? "s" : "") end end
|
||||||
|
|
||||||
|
if ARGV.delete("--help") || ARGV.delete("-h")
|
||||||
|
puts USAGE
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
## poor man's trollop
|
||||||
|
$long = ARGV.delete("--long") || ARGV.delete("-l")
|
||||||
|
$short = ARGV.delete("--short") || ARGV.delete("-s")
|
||||||
|
$all = ARGV.delete("--all") || ARGV.delete("-a")
|
||||||
|
$all_commits = ARGV.delete("--all-commits") || ARGV.delete("-A")
|
||||||
|
$dump_config = ARGV.delete("--dump-config")
|
||||||
|
$key = ARGV.delete("--key") || ARGV.delete("-k")
|
||||||
|
$show_relations = ARGV.delete("--relations") || ARGV.delete("-r")
|
||||||
|
ARGV.each { |a| abort "Error: unknown argument #{a}." if a =~ /^--/ }
|
||||||
|
|
||||||
|
## search up the path for a file
|
||||||
|
def find_file fn
|
||||||
|
while true
|
||||||
|
return fn if File.exist? fn
|
||||||
|
fn2 = File.join("..", fn)
|
||||||
|
return nil if File.expand_path(fn2) == File.expand_path(fn)
|
||||||
|
fn = fn2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
want_color = `git config color.wtf`
|
||||||
|
want_color = `git config color.ui` if want_color.empty?
|
||||||
|
$color = case want_color.chomp
|
||||||
|
when "true"; true
|
||||||
|
when "auto"; $stdout.tty?
|
||||||
|
end
|
||||||
|
|
||||||
|
def red s; $color ? "\033[31m#{s}\033[0m" : s end
|
||||||
|
def green s; $color ? "\033[32m#{s}\033[0m" : s end
|
||||||
|
def yellow s; $color ? "\033[33m#{s}\033[0m" : s end
|
||||||
|
def cyan s; $color ? "\033[36m#{s}\033[0m" : s end
|
||||||
|
def grey s; $color ? "\033[1;30m#{s}\033[0m" : s end
|
||||||
|
def purple s; $color ? "\033[35m#{s}\033[0m" : s end
|
||||||
|
|
||||||
|
## the set of commits in 'to' that aren't in 'from'.
|
||||||
|
## if empty, 'to' has been merged into 'from'.
|
||||||
|
def commits_between from, to
|
||||||
|
if $long
|
||||||
|
`git log --pretty=format:"- %s [#{yellow "%h"}] (#{purple "%ae"}; %ar)" #{from}..#{to}`
|
||||||
|
else
|
||||||
|
`git log --pretty=format:"- %s [#{yellow "%h"}]" #{from}..#{to}`
|
||||||
|
end.split(/[\r\n]+/)
|
||||||
|
end
|
||||||
|
|
||||||
|
def show_commits commits, prefix=" "
|
||||||
|
if commits.empty?
|
||||||
|
puts "#{prefix} none"
|
||||||
|
else
|
||||||
|
max = $all_commits ? commits.size : $config["max_commits"]
|
||||||
|
max -= 1 if max == commits.size - 1 # never show "and 1 more"
|
||||||
|
commits[0 ... max].each { |c| puts "#{prefix}#{c}" }
|
||||||
|
puts grey("#{prefix}... and #{commits.size - max} more (use -A to see all).") if commits.size > max
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def ahead_behind_string ahead, behind
|
||||||
|
[ahead.empty? ? nil : "#{ahead.size.pluralize 'commit'} ahead",
|
||||||
|
behind.empty? ? nil : "#{behind.size.pluralize 'commit'} behind"].
|
||||||
|
compact.join("; ")
|
||||||
|
end
|
||||||
|
|
||||||
|
def widget merged_in, remote_only=false, local_only=false, local_only_merge=false
|
||||||
|
left, right = case
|
||||||
|
when remote_only; %w({ })
|
||||||
|
when local_only; %w{( )}
|
||||||
|
else %w([ ])
|
||||||
|
end
|
||||||
|
middle = case
|
||||||
|
when merged_in && local_only_merge; green("~")
|
||||||
|
when merged_in; green("x")
|
||||||
|
else " "
|
||||||
|
end
|
||||||
|
print left, middle, right
|
||||||
|
end
|
||||||
|
|
||||||
|
def show b
|
||||||
|
have_both = b[:local_branch] && b[:remote_branch]
|
||||||
|
|
||||||
|
pushc, pullc, oosync = if have_both
|
||||||
|
[x = commits_between(b[:remote_branch], b[:local_branch]),
|
||||||
|
y = commits_between(b[:local_branch], b[:remote_branch]),
|
||||||
|
!x.empty? && !y.empty?]
|
||||||
|
end
|
||||||
|
|
||||||
|
if b[:local_branch]
|
||||||
|
puts "Local branch: " + green(b[:local_branch].sub(/^heads\//, ""))
|
||||||
|
|
||||||
|
if have_both
|
||||||
|
if pushc.empty?
|
||||||
|
puts "#{widget true} in sync with remote"
|
||||||
|
else
|
||||||
|
action = oosync ? "push after rebase / merge" : "push"
|
||||||
|
puts "#{widget false} NOT in sync with remote (you should #{action})"
|
||||||
|
show_commits pushc unless $short
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if b[:remote_branch]
|
||||||
|
puts "Remote branch: #{cyan b[:remote_branch]} (#{b[:remote_url]})"
|
||||||
|
|
||||||
|
if have_both
|
||||||
|
if pullc.empty?
|
||||||
|
puts "#{widget true} in sync with local"
|
||||||
|
else
|
||||||
|
action = pushc.empty? ? "merge" : "rebase / merge"
|
||||||
|
puts "#{widget false} NOT in sync with local (you should #{action})"
|
||||||
|
show_commits pullc unless $short
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
puts "\n#{red "WARNING"}: local and remote branches have diverged. A merge will occur unless you rebase." if oosync
|
||||||
|
end
|
||||||
|
|
||||||
|
def show_relations b, all_branches
|
||||||
|
ibs, fbs = all_branches.partition { |name, br| $config["integration-branches"].include?(br[:local_branch]) || $config["integration-branches"].include?(br[:remote_branch]) }
|
||||||
|
if $config["integration-branches"].include? b[:local_branch]
|
||||||
|
puts "\nFeature branches:" unless fbs.empty?
|
||||||
|
fbs.each do |name, br|
|
||||||
|
next if $config["ignore"].member?(br[:local_branch]) || $config["ignore"].member?(br[:remote_branch])
|
||||||
|
next if br[:ignore]
|
||||||
|
local_only = br[:remote_branch].nil?
|
||||||
|
remote_only = br[:local_branch].nil?
|
||||||
|
name = if local_only
|
||||||
|
purple br[:name]
|
||||||
|
elsif remote_only
|
||||||
|
cyan br[:name]
|
||||||
|
else
|
||||||
|
green br[:name]
|
||||||
|
end
|
||||||
|
|
||||||
|
## for remote_only branches, we'll compute wrt the remote branch head. otherwise, we'll
|
||||||
|
## use the local branch head.
|
||||||
|
head = remote_only ? br[:remote_branch] : br[:local_branch]
|
||||||
|
|
||||||
|
remote_ahead = b[:remote_branch] ? commits_between(b[:remote_branch], head) : []
|
||||||
|
local_ahead = b[:local_branch] ? commits_between(b[:local_branch], head) : []
|
||||||
|
|
||||||
|
if local_ahead.empty? && remote_ahead.empty?
|
||||||
|
puts "#{widget true, remote_only, local_only} #{name} #{local_only ? "(local-only) " : ""}is merged in"
|
||||||
|
elsif local_ahead.empty?
|
||||||
|
puts "#{widget true, remote_only, local_only, true} #{name} merged in (only locally)"
|
||||||
|
else
|
||||||
|
behind = commits_between head, (br[:local_branch] || br[:remote_branch])
|
||||||
|
ahead = remote_only ? remote_ahead : local_ahead
|
||||||
|
puts "#{widget false, remote_only, local_only} #{name} #{local_only ? "(local-only) " : ""}is NOT merged in (#{ahead_behind_string ahead, behind})"
|
||||||
|
show_commits ahead unless $short
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "\nIntegration branches:" unless ibs.empty? # unlikely
|
||||||
|
ibs.sort_by { |v, br| v }.each do |v, br|
|
||||||
|
next if $config["ignore"].member?(br[:local_branch]) || $config["ignore"].member?(br[:remote_branch])
|
||||||
|
next if br[:ignore]
|
||||||
|
local_only = br[:remote_branch].nil?
|
||||||
|
remote_only = br[:local_branch].nil?
|
||||||
|
name = remote_only ? cyan(br[:name]) : green(br[:name])
|
||||||
|
|
||||||
|
ahead = commits_between v, (b[:local_branch] || b[:remote_branch])
|
||||||
|
if ahead.empty?
|
||||||
|
puts "#{widget true, local_only} merged into #{name}"
|
||||||
|
else
|
||||||
|
#behind = commits_between b[:local_branch], v
|
||||||
|
puts "#{widget false, local_only} NOT merged into #{name} (#{ahead.size.pluralize 'commit'} ahead)"
|
||||||
|
show_commits ahead unless $short
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#### EXECUTION STARTS HERE ####
|
||||||
|
|
||||||
|
## find config file and load it
|
||||||
|
$config = { "integration-branches" => %w(heads/master heads/next heads/edge), "ignore" => [], "max_commits" => 5 }.merge begin
|
||||||
|
fn = find_file CONFIG_FN
|
||||||
|
if fn && (h = YAML::load_file(fn)) # yaml turns empty files into false
|
||||||
|
h["integration-branches"] ||= h["versions"] # support old nomenclature
|
||||||
|
h
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if $dump_config
|
||||||
|
puts $config.to_yaml
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
## first, index registered remotes
|
||||||
|
remotes = `git config --get-regexp ^remote\.\*\.url`.split(/[\r\n]+/).inject({}) do |hash, l|
|
||||||
|
l =~ /^remote\.(.+?)\.url (.+)$/ or next hash
|
||||||
|
hash[$1] ||= $2
|
||||||
|
hash
|
||||||
|
end
|
||||||
|
|
||||||
|
## next, index followed branches
|
||||||
|
branches = `git config --get-regexp ^branch\.`.split(/[\r\n]+/).inject({}) do |hash, l|
|
||||||
|
case l
|
||||||
|
when /branch\.(.*?)\.remote (.+)/
|
||||||
|
name, remote = $1, $2
|
||||||
|
|
||||||
|
hash[name] ||= {}
|
||||||
|
hash[name].merge! :remote => remote, :remote_url => remotes[remote]
|
||||||
|
when /branch\.(.*?)\.merge ((refs\/)?heads\/)?(.+)/
|
||||||
|
name, remote_branch = $1, $4
|
||||||
|
hash[name] ||= {}
|
||||||
|
hash[name].merge! :remote_mergepoint => remote_branch
|
||||||
|
end
|
||||||
|
hash
|
||||||
|
end
|
||||||
|
|
||||||
|
## finally, index all branches
|
||||||
|
remote_branches = {}
|
||||||
|
`git show-ref`.split(/[\r\n]+/).each do |l|
|
||||||
|
sha1, ref = l.chomp.split " refs/"
|
||||||
|
|
||||||
|
if ref =~ /^heads\/(.+)$/ # local branch
|
||||||
|
name = $1
|
||||||
|
next if name == "HEAD"
|
||||||
|
branches[name] ||= {}
|
||||||
|
branches[name].merge! :name => name, :local_branch => ref
|
||||||
|
elsif ref =~ /^remotes\/(.+?)\/(.+)$/ # remote branch
|
||||||
|
remote, name = $1, $2
|
||||||
|
remote_branches["#{remote}/#{name}"] = true
|
||||||
|
next if name == "HEAD"
|
||||||
|
ignore = !($all || remote == "origin")
|
||||||
|
|
||||||
|
branch = name
|
||||||
|
if branches[name] && branches[name][:remote] == remote
|
||||||
|
# nothing
|
||||||
|
else
|
||||||
|
name = "#{remote}/#{branch}"
|
||||||
|
end
|
||||||
|
|
||||||
|
branches[name] ||= {}
|
||||||
|
branches[name].merge! :name => name, :remote => remote, :remote_branch => "#{remote}/#{branch}", :remote_url => remotes[remote], :ignore => ignore
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## assemble remotes
|
||||||
|
branches.each do |k, b|
|
||||||
|
next unless b[:remote] && b[:remote_mergepoint]
|
||||||
|
b[:remote_branch] = if b[:remote] == "."
|
||||||
|
b[:remote_mergepoint]
|
||||||
|
else
|
||||||
|
t = "#{b[:remote]}/#{b[:remote_mergepoint]}"
|
||||||
|
remote_branches[t] && t # only if it's still alive
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
show_dirty = ARGV.empty?
|
||||||
|
targets = if ARGV.empty?
|
||||||
|
[`git symbolic-ref HEAD`.chomp.sub(/^refs\/heads\//, "")]
|
||||||
|
else
|
||||||
|
ARGV.map { |x| x.sub(/^heads\//, "") }
|
||||||
|
end.map { |t| branches[t] or abort "Error: can't find branch #{t.inspect}." }
|
||||||
|
|
||||||
|
targets.each do |t|
|
||||||
|
show t
|
||||||
|
show_relations t, branches if $show_relations || t[:remote_branch].nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
modified = show_dirty && `git ls-files -m` != ""
|
||||||
|
uncommitted = show_dirty && `git diff-index --cached HEAD` != ""
|
||||||
|
|
||||||
|
if $key
|
||||||
|
puts
|
||||||
|
puts KEY
|
||||||
|
end
|
||||||
|
|
||||||
|
puts if modified || uncommitted
|
||||||
|
puts "#{red "NOTE"}: working directory contains modified files." if modified
|
||||||
|
puts "#{red "NOTE"}: staging area contains staged but uncommitted files." if uncommitted
|
||||||
|
|
||||||
|
# the end!
|
16
bin/gren
Executable file
16
bin/gren
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
echo "Usage: $0 <branch name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
hub sync
|
||||||
|
|
||||||
|
if git rev-parse --verify --quiet $1; then
|
||||||
|
git checkout $1
|
||||||
|
else
|
||||||
|
git checkout -b $1 main
|
||||||
|
git push -u origin $1
|
||||||
|
fi
|
5
bin/ktail
Executable file
5
bin/ktail
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
kubectl get pod --output json \
|
||||||
|
| jq -r '[.items[].metadata.labels]|map(to_entries[]|(.key) + "=" + .value)|unique|.[]' \
|
||||||
|
| fzf \
|
||||||
|
| xargs kubectl tail "$@" -l
|
1
bin/ktoolbox
Symbolic link
1
bin/ktoolbox
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/dln/src/github.com/dln/ktoolbox/ktoolbox
|
46
bin/pw
Executable file
46
bin/pw
Executable file
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author: Daniel Lundin <dln@arity.se>
|
||||||
|
#
|
||||||
|
# Convenience script to hide sensitive variables on the command line.
|
||||||
|
# Uses keyctl to store secrets in the keyring.
|
||||||
|
#
|
||||||
|
# Example usage: mycommand --user=foo --password=$(pw mypass)
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
purge=0
|
||||||
|
ttl=${PW_TTL:-259200}
|
||||||
|
|
||||||
|
usage() { echo "Usage: $0 [-t SECONDS] [-f] SECRET_NAME" 1>&2; exit 1; }
|
||||||
|
|
||||||
|
while getopts ":ft:" o; do
|
||||||
|
case "${o}" in
|
||||||
|
f)
|
||||||
|
purge=1
|
||||||
|
;;
|
||||||
|
t)
|
||||||
|
ttl=${OPTARG}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
|
var="$1"
|
||||||
|
shift || usage
|
||||||
|
[ -z "$1" ] || usage
|
||||||
|
|
||||||
|
key="pw.${var}"
|
||||||
|
|
||||||
|
if [ "${purge}" == "1" ]; then
|
||||||
|
keyctl purge user "${key}" >>/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
out=$(systemd-ask-password --accept-cached --keyname="${key}" "${var}:")
|
||||||
|
key_id=$(keyctl request user "${key}" 2>/dev/null)
|
||||||
|
keyctl timeout "$key_id" "$ttl"
|
||||||
|
|
||||||
|
printf "%s" "$out"
|
26
bin/starship-sl-status
Executable file
26
bin/starship-sl-status
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -xfeuo pipefail
|
||||||
|
|
||||||
|
state="${XDG_RUNTIME_DIR}/starship-sl-status"
|
||||||
|
checkout="${state}.checkout"
|
||||||
|
status="${state}.data"
|
||||||
|
|
||||||
|
if [[ "$PWD" != $(readlink -f "$state")* ]]; then
|
||||||
|
rm -f "$state"
|
||||||
|
root="$(sl root 2>/dev/null || true)"
|
||||||
|
ln -s "$root" "$state"
|
||||||
|
if [[ -z "${root}" ]]; then
|
||||||
|
echo >"${status}"
|
||||||
|
echo >"${checkout}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
saved_cid=$(cat "${checkout}" 2>/dev/null || true)
|
||||||
|
root_cid=$(cat "${state}/.sl/checkoutidentifier" || true)
|
||||||
|
if [[ ${root_cid} != "${saved_cid}" ]]; then
|
||||||
|
echo "${root_cid}" >"${checkout}"
|
||||||
|
sl log -r . -T '{if(github_pull_request_number, "#{github_pull_request_number} @ ", if(bookmarks, "{bookmarks} @ "))}{node|short}{if(remotenames, ":{remotenames}")}' >"${status}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat "$status" || true
|
4
bin/tmux-build-helper
Executable file
4
bin/tmux-build-helper
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ef -o pipefail
|
||||||
|
eval "$(direnv export bash)"
|
||||||
|
eval "${BUILD_COMMAND:-echo 'BUILD_COMMAND not set'}" | bat --paging=always
|
24
bin/tmux-edit-helper
Executable file
24
bin/tmux-edit-helper
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -fe -o pipefail
|
||||||
|
|
||||||
|
eval "$(direnv export bash)"
|
||||||
|
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
_file=$(readlink -f "$@")
|
||||||
|
else
|
||||||
|
FZF=${FZF:-"fzf-tmux -p 90%,50% -y 0"}
|
||||||
|
_root=$(git rev-parse --show-toplevel 2>/dev/null || sl root 2>/dev/null || pwd)
|
||||||
|
_store=$(echo "$_root" | sha1sum | cut -d ' ' -f 1)
|
||||||
|
_file=$( ( (fre --store_name "$_store" --sorted | xargs -n 100 ls -d 2>/dev/null || true) && fd --type f --hidden --follow --exclude .git --exclude .sl --ignore-file "${_root}/.gitignore" . "$_root") | cat -n | sort -k2 -k1n | uniq -f1 | sort -nk1,1 | cut -f2- | sed -e "s#^${_root}/##" | $FZF --no-sort)
|
||||||
|
_file="${_root}/${_file}"
|
||||||
|
fre --store_name "$_store" --add "$_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux select-window -t nvim 2>/dev/null ||
|
||||||
|
tmux new-window -S -n nvim \
|
||||||
|
-e "BUILD_COMMAND=$BUILD_COMMAND" \
|
||||||
|
-e "GOPACKAGESDRIVER=$GOPACKAGESDRIVER" \
|
||||||
|
-e "GOFLAGS=$GOFLAGS" \
|
||||||
|
nvim --listen "$XDG_RUNTIME_DIR/nvim.sock"
|
||||||
|
|
||||||
|
nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote "$_file"
|
5
bin/tmux-nvr
Executable file
5
bin/tmux-nvr
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
tmux select-window -t1
|
||||||
|
FILE="$1"
|
||||||
|
shift
|
||||||
|
exec nvr --remote "$@" $(readlink -f "$FILE")
|
24
bin/tpm2-pkcs11-init-ssh.sh
Executable file
24
bin/tpm2-pkcs11-init-ssh.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
store=$1
|
||||||
|
if [ -z "$store" ]; then
|
||||||
|
echo "Usage: $0 [store-name]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export TPM2_PKCS11_STORE=$HOME/.local/share/tpm2-pkcs11/${store}
|
||||||
|
|
||||||
|
echo "=> Initializing store ${TPM2_PKCS11_STORE}"
|
||||||
|
mkdir -p $TPM2_PKCS11_STORE
|
||||||
|
tpm2_ptool init
|
||||||
|
tpm2_ptool addtoken --pid=1 --label=ssh --sopin="$(systemd-ask-password SOPIN)" --userpin="$(systemd-ask-password USERPIN)"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "=> Adding SSH key"
|
||||||
|
tpm2_ptool addkey --label=ssh --algorithm=ecc256 --userpin="$(systemd-ask-password USERPIN)"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Store path: $TPM2_PKCS11_STORE"
|
||||||
|
echo "SSH public key:"
|
||||||
|
ssh-keygen -D /usr/lib/pkcs11/libtpm2_pkcs11.so 2>>/dev/null
|
2
bin/url-copy
Executable file
2
bin/url-copy
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
echo "$@" | xclip -selection clipboard
|
55
bin/vault-token-helper.sh
Executable file
55
bin/vault-token-helper.sh
Executable file
|
@ -0,0 +1,55 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Vault Token helper for the Linux key retention service.
|
||||||
|
#
|
||||||
|
# Since version 2.6, the Linux kernel has included a efficiently store
|
||||||
|
# authentication data on a per thread, per process, per user, or per session
|
||||||
|
# bases.
|
||||||
|
#
|
||||||
|
# Linux Key Management Utilities (keyutils) provides `keyctl` to control
|
||||||
|
# the facility from the shell.
|
||||||
|
#
|
||||||
|
# see https://www.kernel.org/doc/Documentation/security/keys/core.rst
|
||||||
|
# see https://www.kernel.org/doc/Documentation/security/keys.txt
|
||||||
|
# see https://lwn.net/Articles/210502/
|
||||||
|
# see https://www.ibm.com/developerworks/library/l-key-retention/index.html
|
||||||
|
#
|
||||||
|
# Vault allows an external programs to be configured as a token helper
|
||||||
|
# that can get, store, and erase tokens on behalf of the Vault client.
|
||||||
|
#
|
||||||
|
# see https://www.vaultproject.io/docs/commands/token-helper.html
|
||||||
|
#
|
||||||
|
# To use this script, make it executable and set your ~/.vault file to
|
||||||
|
# contain:
|
||||||
|
#
|
||||||
|
# token_helper = "/path/to/vault-token-helper.sh"
|
||||||
|
|
||||||
|
# Exit on error.
|
||||||
|
set -o errexit
|
||||||
|
# Exit on error inside any functions or subshells.
|
||||||
|
set -o errtrace
|
||||||
|
# Do not allow use of undefined vars.
|
||||||
|
set -o nounset
|
||||||
|
# Catch the error if any piped command fails.
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
desc=VAULT_TOKEN:${VAULT_ADDR}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
get)
|
||||||
|
# If the key is not set, keyctl returns "request_key: Required key not available"
|
||||||
|
# on stderr and exits with a non-zero status. The implied
|
||||||
|
key_id=$(keyctl request user ${desc} || echo '')
|
||||||
|
[ -z ${key_id} ] && exit 0
|
||||||
|
keyctl pipe ${key_id}
|
||||||
|
;;
|
||||||
|
store)
|
||||||
|
# Vault sends the token on stdin but there is no linebreak, so EOF is reached
|
||||||
|
# which causes read to return a non-zero status.
|
||||||
|
read -r token || true
|
||||||
|
echo -n ${token} | keyctl padd user ${desc} @u
|
||||||
|
;;
|
||||||
|
erase)
|
||||||
|
keyctl purge user ${desc}
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -1,71 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
|
||||||
initrd.systemd.enable = true;
|
|
||||||
|
|
||||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Temporary files
|
|
||||||
boot.tmp.useTmpfs = true;
|
|
||||||
systemd.services.nix-daemon = {
|
|
||||||
environment.TMPDIR = "/var/tmp";
|
|
||||||
};
|
|
||||||
|
|
||||||
system.switch = {
|
|
||||||
enable = false;
|
|
||||||
enableNg = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Stockholm";
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
btrfs-progs
|
|
||||||
btrfs-snap
|
|
||||||
git
|
|
||||||
glibcLocales
|
|
||||||
qemu_kvm
|
|
||||||
qemu-utils
|
|
||||||
vim
|
|
||||||
zstd
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use fish, but not in /etc/passwd . See https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
|
|
||||||
programs.bash = {
|
|
||||||
interactiveShellInit = ''
|
|
||||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
|
||||||
then
|
|
||||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
|
||||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
shellInit = ''
|
|
||||||
export NIX_LD=$(nix eval --impure --raw --expr 'let pkgs = import <nixpkgs> {}; NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; in NIX_LD')
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.avahi = {
|
|
||||||
nssmdns4 = true;
|
|
||||||
enable = true;
|
|
||||||
ipv4 = true;
|
|
||||||
ipv6 = true;
|
|
||||||
publish = {
|
|
||||||
enable = true;
|
|
||||||
addresses = true;
|
|
||||||
workstation = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./base.nix
|
|
||||||
./desktop.nix
|
|
||||||
./hardening.nix
|
|
||||||
./laptop.nix
|
|
||||||
./nix.nix
|
|
||||||
./plymouth.nix
|
|
||||||
./podman.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,106 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
cfg = config.patagia.podman;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.patagia.desktop.enable = mkEnableOption "Desktop environment and common applications";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages = with pkgs; [ gnome-ssh-askpass4 ];
|
|
||||||
|
|
||||||
# Excluding some GNOME applications from the default install
|
|
||||||
environment.gnome.excludePackages =
|
|
||||||
(with pkgs; [
|
|
||||||
gnome-connections
|
|
||||||
gnome-photos
|
|
||||||
gnome-tour
|
|
||||||
snapshot
|
|
||||||
])
|
|
||||||
++ (with pkgs; [
|
|
||||||
atomix # puzzle game
|
|
||||||
baobab # disk usage analyzer
|
|
||||||
cheese # webcam tool
|
|
||||||
epiphany # web browser
|
|
||||||
geary # email reader
|
|
||||||
gnome-clocks
|
|
||||||
gnome-contacts
|
|
||||||
gnome-disk-utility
|
|
||||||
gnome-logs
|
|
||||||
gnome-music
|
|
||||||
gnome-terminal
|
|
||||||
hitori # sudoku game
|
|
||||||
iagno # go game
|
|
||||||
simple-scan
|
|
||||||
tali # poker game
|
|
||||||
yelp # help viewer
|
|
||||||
]);
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
fontDir.enable = true;
|
|
||||||
fontconfig = {
|
|
||||||
allowBitmaps = false;
|
|
||||||
antialias = true;
|
|
||||||
defaultFonts = {
|
|
||||||
serif = [ "Liberation Serif" ];
|
|
||||||
sansSerif = [ "Inter" ];
|
|
||||||
};
|
|
||||||
hinting.enable = true;
|
|
||||||
hinting.style = "slight";
|
|
||||||
subpixel.rgba = "rgb";
|
|
||||||
};
|
|
||||||
packages = with pkgs; [
|
|
||||||
inter
|
|
||||||
liberation_ttf
|
|
||||||
monaspace
|
|
||||||
nerd-fonts.symbols-only
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-color-emoji
|
|
||||||
roboto
|
|
||||||
ubuntu_font_family
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh.askPassword = "${pkgs.gnome-ssh-askpass4}/bin/gnome-ssh-askpass4";
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
services.displayManager.defaultSession = "gnome";
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
displayManager.gdm.autoSuspend = false;
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
xkb.layout = "se";
|
|
||||||
xkb.variant = "us";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
nix.settings.allowed-users = [
|
|
||||||
"@wheel"
|
|
||||||
"root"
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.specialFileSystems = lib.mkIf (
|
|
||||||
!config.security.rtkit.enable && !config.security.polkit.enable
|
|
||||||
) { "/proc".options = [ "hidepid=2" ]; };
|
|
||||||
|
|
||||||
boot.kernel.sysctl."kernel.dmesg_restrict" = 1;
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.doas-sudo-shim ];
|
|
||||||
|
|
||||||
security = {
|
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
groups = [ "wheel" ];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
sudo.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
settings.PasswordAuthentication = false;
|
|
||||||
settings.KbdInteractiveAuthentication = false;
|
|
||||||
# prevents mutable /home/$user/.ssh/authorized_keys from being loaded to ensure that all user keys are config managed
|
|
||||||
# authorizedKeysFiles = lib.mkForce [ "/etc/ssh/authorized_keys.d/%u" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.root.hashedPassword = "!";
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.patagia.laptop.enable = mkEnableOption "Laptop tools and configuration";
|
|
||||||
|
|
||||||
config = mkIf config.patagia.laptop.enable {
|
|
||||||
environment.systemPackages = with pkgs; [ gnomeExtensions.battery-health-charging ];
|
|
||||||
|
|
||||||
services.fprintd.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
nix =
|
|
||||||
let
|
|
||||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
settings = {
|
|
||||||
auto-optimise-store = true;
|
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
flake-registry = "";
|
|
||||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
|
||||||
nix-path = config.nix.nixPath;
|
|
||||||
substituters = [
|
|
||||||
"https://cache-nixos-org.aarn.patagia.net/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
|
||||||
extra-substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
extra-trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
channel.enable = false;
|
|
||||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
|
||||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.nh = {
|
|
||||||
enable = true;
|
|
||||||
clean.enable = true;
|
|
||||||
clean.extraArgs = "--keep-since 14d --keep 5";
|
|
||||||
};
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nvd
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
cfg = config.patagia.plymouth;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.patagia.plymouth.enable = mkEnableOption "Fancy boot splash";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
boot = {
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
initrd.verbose = false;
|
|
||||||
|
|
||||||
# Hide the OS choice for bootloaders.
|
|
||||||
# It's still possible to open the bootloader list by pressing any key
|
|
||||||
# It will just not appear on screen unless a key is pressed
|
|
||||||
loader.timeout = 0;
|
|
||||||
|
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"splash"
|
|
||||||
"boot.shell_on_fail"
|
|
||||||
"loglevel=3"
|
|
||||||
"rd.systemd.show_status=false"
|
|
||||||
"rd.udev.log_level=3"
|
|
||||||
"udev.log_priority=3"
|
|
||||||
];
|
|
||||||
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "spinner_alt";
|
|
||||||
themePackages = with pkgs; [
|
|
||||||
(adi1090x-plymouth-themes.override { selected_themes = [ "spinner_alt" ]; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
cfg = config.patagia.podman;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.patagia.podman.enable = mkEnableOption "Podman";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.extraInit = ''
|
|
||||||
if [ -z "$DOCKER_HOST" -a -n "$XDG_RUNTIME_DIR" ]; then
|
|
||||||
export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
containers = {
|
|
||||||
enable = true;
|
|
||||||
storage.settings = {
|
|
||||||
storage = {
|
|
||||||
driver = "overlay";
|
|
||||||
runroot = "/run/containers/storage";
|
|
||||||
graphroot = "/var/lib/containers/storage";
|
|
||||||
rootless_storage_path = "/tmp/containers-$USER";
|
|
||||||
options.overlay.mountopt = "nodev,metacopy=on";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
oci-containers.backend = "podman";
|
|
||||||
podman = {
|
|
||||||
enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
# Bindings
|
|
||||||
bind \cg __zoxide_zi_repaint
|
|
||||||
bind \cJ forward-char
|
|
||||||
bind \cn history-prefix-search-forward
|
|
||||||
bind \cp history-prefix-search-backward
|
|
||||||
bind \e\[109\;5u execute # C-m in ghostty
|
|
||||||
|
|
||||||
# Settings
|
|
||||||
set fish_greeting
|
|
||||||
set fish_emoji_width 2
|
|
||||||
|
|
||||||
# Colors
|
|
||||||
set fish_color_command --bold
|
|
||||||
set fish_color_comment --italics --dim
|
|
||||||
set fish_color_autosuggestion --italics --bold --dim
|
|
||||||
set fish_color_cancel
|
|
||||||
set fish_color_command --bold
|
|
||||||
set fish_color_comment --italics --dim
|
|
||||||
set fish_color_cwd normal
|
|
||||||
set fish_color_cwd_root normal
|
|
||||||
set fish_color_end
|
|
||||||
set fish_color_error
|
|
||||||
set fish_color_escape
|
|
||||||
set fish_color_gray 6c7086
|
|
||||||
set fish_color_history_current
|
|
||||||
set fish_color_host normal
|
|
||||||
set fish_color_host_remote yellow
|
|
||||||
set fish_color_keyword
|
|
||||||
set fish_color_match
|
|
||||||
set fish_color_normal normal
|
|
||||||
set fish_color_operator
|
|
||||||
set fish_color_option
|
|
||||||
set fish_color_param normal
|
|
||||||
set fish_color_quote --italics
|
|
||||||
set fish_color_redirection
|
|
||||||
set fish_color_search_match -r
|
|
||||||
set fish_color_selection -r
|
|
||||||
set fish_color_status normal
|
|
||||||
set fish_color_string --italics
|
|
||||||
set fish_color_user normal
|
|
||||||
set fish_color_valid_path
|
|
||||||
set fish_pager_color_background
|
|
||||||
set fish_pager_color_completion normal
|
|
||||||
set fish_pager_color_description --dim
|
|
||||||
set fish_pager_color_prefix --underline
|
|
||||||
set fish_pager_color_progress --dim
|
|
||||||
set fish_pager_color_secondary_background
|
|
||||||
set fish_pager_color_secondary_completion
|
|
||||||
set fish_pager_color_secondary_description
|
|
||||||
set fish_pager_color_secondary_prefix
|
|
||||||
set fish_pager_color_selected_background -r
|
|
||||||
set fish_pager_color_selected_completion
|
|
||||||
set fish_pager_color_selected_description
|
|
||||||
set fish_pager_color_selected_prefix
|
|
|
@ -1,55 +0,0 @@
|
||||||
## Semantic prompt (for Wezterm)
|
|
||||||
|
|
||||||
set _fishprompt_aid "fish"$fish_pid
|
|
||||||
set _fishprompt_started 0
|
|
||||||
# empty if running; or a numeric exit code; or CANCEL
|
|
||||||
set _fishprompt_postexec ""
|
|
||||||
|
|
||||||
functions -c fish_prompt _fishprompt_saved_prompt
|
|
||||||
set _fishprompt_prompt_count 0
|
|
||||||
set _fishprompt_disp_count 0
|
|
||||||
function _fishprompt_start --on-event fish_prompt
|
|
||||||
set _fishprompt_prompt_count (math $_fishprompt_prompt_count + 1)
|
|
||||||
# don't use post-exec, because it is called *before* omitted-newline output
|
|
||||||
if [ -n "$_fishprompt_postexec" ]
|
|
||||||
printf "\033]133;D;%s;aid=%s\007" "$_fishprompt_postexec" $_fishprompt_aid
|
|
||||||
end
|
|
||||||
printf "\033]133;A;aid=%s;cl=m\007" $_fishprompt_aid
|
|
||||||
end
|
|
||||||
|
|
||||||
function fish_prompt
|
|
||||||
set _fishprompt_disp_count (math $_fishprompt_disp_count + 1)
|
|
||||||
printf "\033]133;P;k=i\007%b\033]133;B\007" (string join "\n" (_fishprompt_saved_prompt))
|
|
||||||
set _fishprompt_started 1
|
|
||||||
set _fishprompt_postexec ""
|
|
||||||
end
|
|
||||||
|
|
||||||
function _fishprompt_preexec --on-event fish_preexec
|
|
||||||
if [ "$_fishprompt_started" = 1 ]
|
|
||||||
printf "\033]133;C;\007"
|
|
||||||
end
|
|
||||||
set _fishprompt_started 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function _fishprompt_postexec --on-event fish_postexec
|
|
||||||
set _fishprompt_postexec $status
|
|
||||||
_fishprompt_start
|
|
||||||
end
|
|
||||||
|
|
||||||
function __fishprompt_cancel --on-event fish_cancel
|
|
||||||
set _fishprompt_postexec CANCEL
|
|
||||||
_fishprompt_start
|
|
||||||
end
|
|
||||||
|
|
||||||
function _fishprompt_exit --on-process %self
|
|
||||||
if [ "$_fishprompt_started" = 1 ]
|
|
||||||
printf "\033]133;Z;aid=%s\007" $_fishprompt_aid
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if functions -q fish_right_prompt
|
|
||||||
functions -c fish_right_prompt _fishprompt_saved_right_prompt
|
|
||||||
function fish_right_prompt
|
|
||||||
printf "\033]133;P;k=r\007%b\033]133;B\007" (string join "\n" (_fishprompt_saved_right_prompt))
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,70 +0,0 @@
|
||||||
|
|
||||||
function __jj_in_repo
|
|
||||||
jj --ignore-working-copy --quiet root >>/dev/null 2>&1
|
|
||||||
end
|
|
||||||
|
|
||||||
function vcs_root
|
|
||||||
jj workspace root --ignore-working-copy 2>/dev/null || git rev-parse --show-toplevel 2>/dev/null || pwd
|
|
||||||
end
|
|
||||||
|
|
||||||
function vcs_broot
|
|
||||||
br (vcs_root)
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
function vcs_jump
|
|
||||||
set _dir (vcs_root)
|
|
||||||
if [ "$_dir" = "$PWD" ]
|
|
||||||
set _dir (br -f --conf "$HOME/.config/broot/conf.toml")
|
|
||||||
end
|
|
||||||
[ -n "$_dir" ] && pushd $_dir >>/dev/null
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
function vcs_status
|
|
||||||
if __jj_in_repo
|
|
||||||
echo
|
|
||||||
printf '\e[38;5;240m\u2504%.0s\e[0m' (seq 1 (tput cols)) '\n'
|
|
||||||
jj show --stat
|
|
||||||
printf '\e[38;5;240m\u2504%.0s\e[0m' (seq 1 (tput cols)) '\n'
|
|
||||||
jj log --ignore-working-copy --limit=20 -T builtin_log_comfortable -r "(main..@) | (main..@)-"
|
|
||||||
else
|
|
||||||
git status -sb
|
|
||||||
end
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
function vcs_diff
|
|
||||||
if __jj_in_repo
|
|
||||||
jj show $argv
|
|
||||||
else
|
|
||||||
git diff --stat -p -C --color-words $argv
|
|
||||||
end
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function vcs_log
|
|
||||||
if __jj_in_repo
|
|
||||||
jj log --ignore-working-copy $argv
|
|
||||||
else
|
|
||||||
git diff --stat -p -C --color-words $argv
|
|
||||||
end
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
||||||
|
|
||||||
# Abbreviations
|
|
||||||
|
|
||||||
abbr -a d vcs_diff
|
|
||||||
abbr -a s vcs_status
|
|
||||||
|
|
||||||
# Bindings
|
|
||||||
bind \c_ vcs_jump
|
|
||||||
bind \ea vcs_log
|
|
||||||
bind \ee vcs_broot
|
|
||||||
bind \eS vcs_diff
|
|
||||||
bind \es vcs_status
|
|
||||||
|
|
||||||
# jj completions
|
|
||||||
|
|
||||||
COMPLETE=fish jj | source
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
ssh-add -L | awk '/^sk-ssh-/ { print "key::" $1 " " $2 }'
|
|
|
@ -1,294 +0,0 @@
|
||||||
echo -ne '\e[0mnormal\e[0m\t\t\t'
|
|
||||||
echo -e '\e[7m reverse \e[0m'
|
|
||||||
|
|
||||||
echo -ne '\e[2mdim\e[0m\t\t\t'
|
|
||||||
echo -e '\e[7;2m reverse dim \e[0m'
|
|
||||||
|
|
||||||
echo -ne '\e[1mbold\e[0m\t\t\t'
|
|
||||||
echo -e '\e[7;1m reverse bold \e[0m'
|
|
||||||
|
|
||||||
echo -ne '\e[3mitalic\e[0m\t\t\t'
|
|
||||||
echo -e '\e[7;3m reverse italic \e[0m'
|
|
||||||
|
|
||||||
echo -ne '\e[2;3mdim italic\e[0m\t\t'
|
|
||||||
echo -e '\e[7;2;3m reverse dim italic \e[0m'
|
|
||||||
|
|
||||||
echo -ne '\e[1;3mbold italic\e[0m\t\t'
|
|
||||||
echo -e '\e[7;1;3m reverse bold italic \e[0m'
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo -e '\e[4munderline\e[0m'
|
|
||||||
echo -e '\e[3;4mitalic underline\e[0m'
|
|
||||||
echo -e '\e[4:1mthis is also underline \e[0m'
|
|
||||||
echo -e '\e[21mdouble underline \e[0m'
|
|
||||||
echo -e '\e[4:2mthis is also double underline \e[0m'
|
|
||||||
echo -e '\e[4:3mcurly underline \e[0m'
|
|
||||||
echo -e '\e[21m\e[58;5;42m256-color underline \e[0m'
|
|
||||||
echo -e '\e[4:3m\e[58;2;240;143;104mtruecolor underline (*)\e[0m'
|
|
||||||
echo -e "\e[58:2::255:0:0m\e[4:1msingle underline \e[0m"
|
|
||||||
echo -e "\e[4:2mdouble underline \e[58:2::255:0:0m and with color\e[0m"
|
|
||||||
echo -e "\e[4:3mcurly underline \e[58:2::255:0:0m and with color\e[0m"
|
|
||||||
echo -e "\e[4:4mdotted underline \e[58:2::255:0:0m and with color\e[0m"
|
|
||||||
echo -e "\e[4:5mdashed underline \e[58:2::255:0:0m and with color\e[0m"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo -e '\e[5mblink \e[0m'
|
|
||||||
echo -e '\e[8minvisible\e[0m <- invisible (but copy-pasteable)'
|
|
||||||
echo -e '\e[9mstrikethrough\e[0m'
|
|
||||||
echo -e '\e[53moverline \e[0m'
|
|
||||||
echo -e '\e[51mframed \e[0m'
|
|
||||||
echo -e '\e[52mencircled \e[0m'
|
|
||||||
|
|
||||||
echo -e '\e[31mred\e[0m'
|
|
||||||
echo -e '\e[91mbright red\e[0m'
|
|
||||||
echo -e '\e[38:5:42m256-color, de jure standard (ITU-T T.416)\e[0m'
|
|
||||||
echo -e '\e[38;5;42m256-color, de facto standard (commonly used)\e[0m'
|
|
||||||
echo -e '\e[38:2::240:143:104mtruecolor, de jure standard (ITU-T T.416) \e[0m'
|
|
||||||
echo -e '\e[38;2;240;143;104mtruecolor, de facto standard (commonly used)\e[0m'
|
|
||||||
|
|
||||||
echo -e '\e[46mcyan background\e[0m'
|
|
||||||
echo -e '\e[106mbright cyan background\e[0m'
|
|
||||||
echo -e '\e[48:5:42m256-color background, de jure standard (ITU-T T.416)\e[0m'
|
|
||||||
echo -e '\e[48;5;42m256-color background, de facto standard (commonly used)\e[0m'
|
|
||||||
echo -e '\e[48:2::240:143:104mtruecolor background, de jure standard (ITU-T T.416) \e[0m'
|
|
||||||
echo -e '\e[48:2:240:143:104mtruecolor background, rarely used incorrect format (might be removed at some point)\e[0m'
|
|
||||||
echo -e '\e[48;2;240;143;104mtruecolor background, de facto standard (commonly used)\e[0m'
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Emoji: 🚀 💩 😁 🍖 🔥 🔷 ❤️ "
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Nerdfonts: "
|
|
||||||
echo " "
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Geometrical:"
|
|
||||||
echo -e '◆ ◇ ◈ ● ○ ◉ ◎ ◍ ◌'
|
|
||||||
echo -e '■ □ ▢ ▣ ▤ ▥ ▦ ▧ ▨ ▩'
|
|
||||||
echo -e '◧ ◨ ◩ ◪ ◫ ◬ ◭ ◮ △ ▲ ▱ ▰ ▽ ▼ ▾ ▿'
|
|
||||||
echo -e '◠ ◡ ◢ ◣ ◤ ◥ ◦ ◧ ◨ ◩ ◪ ◫ ◬ ◭ ◮ ◯ ◰ ◱ ◲ ◳ ◴ ◵ ◶ ◷ ◸ ◹ ◺ ◻ ◼ ◽ ◾ ◿'
|
|
||||||
|
|
||||||
echo "Arrows:"
|
|
||||||
echo -e '▲ ▶ ▼ ◀ △ ▷ ▽ ◁'
|
|
||||||
echo -e '← → ↑ ↓ ↔ ↔ ↕ ↖ ↗ ↙ ↘ ↠ ↣ ↦ ↧ ↨ ↩ ↪ ↫ ↬ ↭ ↮ ↯ ↰ ↱ ↲ ↳ ↴ ↵ ↶ ↷ ↸ ↹ ↺ ↻ ↼ ↽ ↾ ↿ ↼ ↽ ↾ ↿'
|
|
||||||
echo -e '⇄ ↔ ⇀ ⇂ ⇄ ⇆ ⇌ ⇎ ⇐ ⇑ ⇓ ⇕ ⇖ ⇗ ⇘ ⇙ ⇚ ⇛ ⇜ ⇝ ⇞ ⇟'
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Blocks:"
|
|
||||||
echo -e '▄ ▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▀ ▔ ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▐ ▕ ▖ ▗ ▘ ▙ ▚ ▛ ▜ ▝ ▞ ▟ ░ ▒ ▓ 🮘 🮙 🮐 '
|
|
||||||
echo -e '▄ ▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▀ ▔ ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▐ ▕ ▖ ▗ ▘ ▙ ▚ ▛ ▜ ▝ ▞ ▟ ░ ▒ ▓ 🮘 🮙 🮐 '
|
|
||||||
echo -e '▄ ▀ ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▀ ▔ ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▐ ▕ ▖ ▗ ▘ ▙ ▚ ▛ ▜ ▝ ▞ ▟ ░ ▒ ▓ 🮘 🮙 🮐 '
|
|
||||||
echo
|
|
||||||
echo -e '───── ━━━━━ ┄┄┄┄┄ ┅┅┅┅┅ ┈┈┈┈┈ ┉┉┉┉┉ ╌╌╌╌╌ ╍╍╍╍╍ │ ┃ ┆ ┇ ┊ ┋ ╎ ╏ ║ ╵ ╷ ╹ ╻ '
|
|
||||||
echo -e '───── ━━━━━ ┄┄┄┄┄ ┅┅┅┅┅ ┈┈┈┈┈ ┉┉┉┉┉ ╌╌╌╌╌ ╍╍╍╍╍ │ ┃ ┆ ┇ ┊ ┋ ╎ ╏ ║ ╵ ╷ ╹ ╻ '
|
|
||||||
echo -e '───── ━━━━━ ┄┄┄┄┄ ┅┅┅┅┅ ┈┈┈┈┈ ┉┉┉┉┉ ╌╌╌╌╌ ╍╍╍╍╍ │ ┃ ┆ ┇ ┊ ┋ ╎ ╏ ║ ╵ ╷ ╹ ╻ '
|
|
||||||
echo
|
|
||||||
echo -e '╭──────────────╮ ┌─┬─┬─┬─┐ ╔═╦═╦═╦═╗ ┏━┳━┳━┳━┓ '
|
|
||||||
echo -e '│ border chars │ │ ├─┼─┤ │ ║ ╠═╬═╣ ║ ┃ ┣━╋━┫ ┃ '
|
|
||||||
echo -e '╰──────────────╯ └─┴─┴─┴─┘ ╚═╩═╩═╩═╝ ┗━┻━┻━┻━┛ '
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Ligatures:"
|
|
||||||
echo "-<< -< -<- <-- <--- <<- <- -> ->> --> ---> ->- >- >>- <-> <--> <---> <----> <!--"
|
|
||||||
echo "=<< =< =<= <== <=== <<= <= => =>> ==> ===> =>= >= >>= <=> <==> <===> <====> <!---"
|
|
||||||
echo "[| |] {| |} <=< >=> <~~ <~ ~> ~~> :: ::: \/ /\ == != /= ~= <> === !== =/= =!= :>"
|
|
||||||
echo ":= :- :+ <* <*> *> <| <|> |> <. <.> .> +: -: =: <***> __ (* comm *) ++ +++ |- -|"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo 24-bit colors:
|
|
||||||
|
|
||||||
# This file was originally taken from iterm2 https://github.com/gnachman/iTerm2/blob/master/tests/24-bit-color.sh
|
|
||||||
#
|
|
||||||
# This file echoes a bunch of 24-bit color codes
|
|
||||||
# to the terminal to demonstrate its functionality.
|
|
||||||
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
|
|
||||||
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
|
|
||||||
# <r> <g> <b> range from 0 to 255 inclusive.
|
|
||||||
# The escape sequence ^[0m returns output to default
|
|
||||||
|
|
||||||
setBackgroundColor() {
|
|
||||||
printf '\x1b[48;2;%s;%s;%sm' $1 $2 $3
|
|
||||||
}
|
|
||||||
|
|
||||||
resetOutput() {
|
|
||||||
echo -en "\x1b[0m\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Gives a color $1/255 % along HSV
|
|
||||||
# Who knows what happens when $1 is outside 0-255
|
|
||||||
# Echoes "$red $green $blue" where
|
|
||||||
# $red $green and $blue are integers
|
|
||||||
# ranging between 0 and 255 inclusive
|
|
||||||
rainbowColor() {
|
|
||||||
let h=$1/43
|
|
||||||
let f=$1-43*$h
|
|
||||||
let t=$f*255/43
|
|
||||||
let q=255-t
|
|
||||||
|
|
||||||
if [ $h -eq 0 ]; then
|
|
||||||
echo "255 $t 0"
|
|
||||||
elif [ $h -eq 1 ]; then
|
|
||||||
echo "$q 255 0"
|
|
||||||
elif [ $h -eq 2 ]; then
|
|
||||||
echo "0 255 $t"
|
|
||||||
elif [ $h -eq 3 ]; then
|
|
||||||
echo "0 $q 255"
|
|
||||||
elif [ $h -eq 4 ]; then
|
|
||||||
echo "$t 0 255"
|
|
||||||
elif [ $h -eq 5 ]; then
|
|
||||||
echo "255 0 $q"
|
|
||||||
else
|
|
||||||
# execution should never reach here
|
|
||||||
echo "0 0 0"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $(seq 0 127); do
|
|
||||||
setBackgroundColor $i 0 0
|
|
||||||
echo -en " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in $(seq 255 -1 128); do
|
|
||||||
setBackgroundColor $i 0 0
|
|
||||||
echo -en " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in $(seq 0 127); do
|
|
||||||
setBackgroundColor 0 $i 0
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in $(seq 255 -1 128); do
|
|
||||||
setBackgroundColor 0 $i 0
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in $(seq 0 127); do
|
|
||||||
setBackgroundColor 0 0 $i
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in $(seq 255 -1 128); do
|
|
||||||
setBackgroundColor 0 0 $i
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
for i in $(seq 0 127); do
|
|
||||||
setBackgroundColor $(rainbowColor $i)
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
for i in $(seq 255 -1 128); do
|
|
||||||
setBackgroundColor $(rainbowColor $i)
|
|
||||||
echo -n " "
|
|
||||||
done
|
|
||||||
resetOutput
|
|
||||||
|
|
||||||
|
|
||||||
## Color test
|
|
||||||
|
|
||||||
# Tom Hale, 2016. MIT Licence.
|
|
||||||
# Print out 256 colours, with each number printed in its corresponding colour
|
|
||||||
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
|
|
||||||
|
|
||||||
set -eu # Fail on errors or undeclared variables
|
|
||||||
|
|
||||||
printable_colours=256
|
|
||||||
|
|
||||||
# Return a colour that contrasts with the given colour
|
|
||||||
# Bash only does integer division, so keep it integral
|
|
||||||
function contrast_colour {
|
|
||||||
local r g b luminance
|
|
||||||
colour="$1"
|
|
||||||
|
|
||||||
if (( colour < 16 )); then # Initial 16 ANSI colours
|
|
||||||
(( colour == 0 )) && printf "15" || printf "0"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Greyscale # rgb_R = rgb_G = rgb_B = (number - 232) * 10 + 8
|
|
||||||
if (( colour > 231 )); then # Greyscale ramp
|
|
||||||
(( colour < 244 )) && printf "15" || printf "0"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# All other colours:
|
|
||||||
# 6x6x6 colour cube = 16 + 36*R + 6*G + B # Where RGB are [0..5]
|
|
||||||
# See http://stackoverflow.com/a/27165165/5353461
|
|
||||||
|
|
||||||
# r=$(( (colour-16) / 36 ))
|
|
||||||
g=$(( ((colour-16) % 36) / 6 ))
|
|
||||||
# b=$(( (colour-16) % 6 ))
|
|
||||||
|
|
||||||
# If luminance is bright, print number in black, white otherwise.
|
|
||||||
# Green contributes 587/1000 to human perceived luminance - ITU R-REC-BT.601
|
|
||||||
(( g > 2)) && printf "0" || printf "15"
|
|
||||||
return
|
|
||||||
|
|
||||||
# Uncomment the below for more precise luminance calculations
|
|
||||||
|
|
||||||
# # Calculate percieved brightness
|
|
||||||
# # See https://www.w3.org/TR/AERT#color-contrast
|
|
||||||
# # and http://www.itu.int/rec/R-REC-BT.601
|
|
||||||
# # Luminance is in range 0..5000 as each value is 0..5
|
|
||||||
# luminance=$(( (r * 299) + (g * 587) + (b * 114) ))
|
|
||||||
# (( $luminance > 2500 )) && printf "0" || printf "15"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print a coloured block with the number of that colour
|
|
||||||
function print_colour {
|
|
||||||
local colour="$1" contrast
|
|
||||||
contrast=$(contrast_colour "$1")
|
|
||||||
printf "\e[48;5;%sm" "$colour" # Start block of colour
|
|
||||||
printf "\e[38;5;%sm%3d" "$contrast" "$colour" # In contrast, print number
|
|
||||||
printf "\e[0m " # Reset colour
|
|
||||||
}
|
|
||||||
|
|
||||||
# Starting at $1, print a run of $2 colours
|
|
||||||
function print_run {
|
|
||||||
local i
|
|
||||||
for (( i = "$1"; i < "$1" + "$2" && i < printable_colours; i++ )) do
|
|
||||||
print_colour "$i"
|
|
||||||
done
|
|
||||||
printf " "
|
|
||||||
}
|
|
||||||
|
|
||||||
# Print blocks of colours
|
|
||||||
function print_blocks {
|
|
||||||
local start="$1" i
|
|
||||||
local end="$2" # inclusive
|
|
||||||
local block_cols="$3"
|
|
||||||
local block_rows="$4"
|
|
||||||
local blocks_per_line="$5"
|
|
||||||
local block_length=$((block_cols * block_rows))
|
|
||||||
|
|
||||||
# Print sets of blocks
|
|
||||||
for (( i = start; i <= end; i += (blocks_per_line-1) * block_length )) do
|
|
||||||
printf "\n" # Space before each set of blocks
|
|
||||||
# For each block row
|
|
||||||
for (( row = 0; row < block_rows; row++ )) do
|
|
||||||
# Print block columns for all blocks on the line
|
|
||||||
for (( block = 0; block < blocks_per_line; block++ )) do
|
|
||||||
print_run $(( i + (block * block_length) )) "$block_cols"
|
|
||||||
done
|
|
||||||
(( i += block_cols )) # Prepare to print the next row
|
|
||||||
printf "\n"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "ANSI 4-bit colors:"
|
|
||||||
echo
|
|
||||||
|
|
||||||
print_run 0 16 # The first 16 colours are spread over the whole spectrum
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "ANSI 8-bit colors:"
|
|
||||||
|
|
||||||
print_blocks 16 231 6 6 3 # 6x6x6 colour cube between 16 and 231 inclusive
|
|
||||||
print_blocks 232 255 12 2 1 # Not 50, but 24 Shades of Grey
|
|
542
flake.lock
542
flake.lock
|
@ -1,542 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733328505,
|
|
||||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_3": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696426674,
|
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736143030,
|
|
||||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"hercules-ci-effects",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733312601,
|
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "flake-parts",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705309234,
|
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ghostty": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
|
||||||
"zig": "zig"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736911212,
|
|
||||||
"narHash": "sha256-OLly4X2kN1tDb2gMYcWeim6uJECPoc52ltJsz1iD5Ug=",
|
|
||||||
"owner": "ghostty-org",
|
|
||||||
"repo": "ghostty",
|
|
||||||
"rev": "ff9414d9ea7b16a375d41cde8f6f193de7e5db72",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "ghostty-org",
|
|
||||||
"repo": "ghostty",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"git-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735882644,
|
|
||||||
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "git-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"git-hooks",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1709087332,
|
|
||||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hercules-ci-effects": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735695978,
|
|
||||||
"narHash": "sha256-cwk53OX1S1bCFY09zydubZNmmwcx9l5XEba8mVYuNE4=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "hercules-ci-effects",
|
|
||||||
"rev": "f6233b5cfbada692d93a73d6ed35bdbfd0fdb9c4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "hercules-ci-effects",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736785676,
|
|
||||||
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jujutsu": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735928141,
|
|
||||||
"narHash": "sha256-KN5rfdDj3vB/GNVw4YZU4tJv2BnUQiQdOz1kEQyketI=",
|
|
||||||
"owner": "dln",
|
|
||||||
"repo": "jj",
|
|
||||||
"rev": "cb103fb4692c4e2b90c4663804b81a5ff1e49c06",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "dln",
|
|
||||||
"ref": "openssh",
|
|
||||||
"repo": "jj",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neovim-nightly-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_2",
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"git-hooks": "git-hooks",
|
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
|
||||||
"neovim-src": "neovim-src",
|
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736924666,
|
|
||||||
"narHash": "sha256-1Mnw9hNMmsnfZuNbeTgmRev99vLZ9FsgrfCChjwnzSk=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "neovim-nightly-overlay",
|
|
||||||
"rev": "7e61ee6d94536d30888c2fbeb1e9d53f4aa3f8b8",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "neovim-nightly-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neovim-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736864394,
|
|
||||||
"narHash": "sha256-QEbgudJG4M9kVmuhGDEG2EP397zAbPmnZ5DX2GFwZCI=",
|
|
||||||
"owner": "neovim",
|
|
||||||
"repo": "neovim",
|
|
||||||
"rev": "e8a6c1b02122852da83dc52184e78369598d8240",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "neovim",
|
|
||||||
"repo": "neovim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-index-database": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736652904,
|
|
||||||
"narHash": "sha256-8uolHABgroXqzs03QdulHp8H9e5kWQZnnhcda1MKbBM=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"rev": "271e5bd7c57e1f001693799518b10a02d1123b12",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731890469,
|
|
||||||
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5083ec887760adfe12af64830a66807423a859a7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733423277,
|
|
||||||
"narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "e36963a147267afc055f7cf65225958633e536bf",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "release-24.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736867362,
|
|
||||||
"narHash": "sha256-i/UJ5I7HoqmFMwZEH6vAvBxOrjjOJNU739lnZnhUln8=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9c6b49aeac36e2ed73a8c472f1546f6d9cf1addc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-24.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733229606,
|
|
||||||
"narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736848588,
|
|
||||||
"narHash": "sha256-9B6fQqphF3j9lpcxQnKyIUgp3NyGi7ikb9CjCYqixcY=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "357cd3dfdb8993af11268d755d53357720675e66",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736848588,
|
|
||||||
"narHash": "sha256-9B6fQqphF3j9lpcxQnKyIUgp3NyGi7ikb9CjCYqixcY=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "357cd3dfdb8993af11268d755d53357720675e66",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736798957,
|
|
||||||
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"ghostty": "ghostty",
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"jujutsu": "jujutsu",
|
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
|
||||||
"nix-index-database": "nix-index-database",
|
|
||||||
"nixpkgs": "nixpkgs_3",
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable_2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"jujutsu",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1732242723,
|
|
||||||
"narHash": "sha256-NWI8csIK0ujFlFuEXKnoc+7hWoCiEtINK9r48LUUMeU=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "a229311fcb45b88a95fdfa5cecd8349c809a272a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"treefmt-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"neovim-nightly-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1736154270,
|
|
||||||
"narHash": "sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"rev": "13c913f5deb3a5c08bb810efd89dc8cb24dd968b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zig": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": [
|
|
||||||
"ghostty"
|
|
||||||
],
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"ghostty",
|
|
||||||
"nixpkgs-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1717848532,
|
|
||||||
"narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=",
|
|
||||||
"owner": "mitchellh",
|
|
||||||
"repo": "zig-overlay",
|
|
||||||
"rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mitchellh",
|
|
||||||
"repo": "zig-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
91
flake.nix
91
flake.nix
|
@ -1,91 +0,0 @@
|
||||||
{
|
|
||||||
description = "NixOS configuration";
|
|
||||||
|
|
||||||
nixConfig = {
|
|
||||||
substituters = [
|
|
||||||
"https://cache-nixos-org.aarn.patagia.net/"
|
|
||||||
];
|
|
||||||
extra-substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
extra-trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
ghostty.url = "github:ghostty-org/ghostty";
|
|
||||||
jujutsu.url = "github:dln/jj/openssh";
|
|
||||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
||||||
|
|
||||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs =
|
|
||||||
inputs@{
|
|
||||||
self,
|
|
||||||
nix-index-database,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (self) outputs;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
|
|
||||||
mkHost =
|
|
||||||
modules:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
};
|
|
||||||
modules = [ ./common ] ++ modules;
|
|
||||||
};
|
|
||||||
|
|
||||||
mkHome =
|
|
||||||
modules:
|
|
||||||
home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./home/common
|
|
||||||
nix-index-database.hmModules.nix-index
|
|
||||||
] ++ modules;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
overlays = import ./overlays { inherit inputs outputs; };
|
|
||||||
|
|
||||||
devShell.${system} = pkgs.mkShell {
|
|
||||||
packages = with pkgs; [
|
|
||||||
just
|
|
||||||
nh
|
|
||||||
nil
|
|
||||||
nixd
|
|
||||||
nixfmt-rfc-style
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
|
||||||
dinky = mkHost [ ./hosts/dinky ];
|
|
||||||
nemo = mkHost [ ./hosts/nemo ];
|
|
||||||
pearl = mkHost [ ./hosts/pearl ];
|
|
||||||
};
|
|
||||||
|
|
||||||
homeConfigurations = {
|
|
||||||
"dln@dinky" = mkHome [ ./home/dln/dinky.nix ];
|
|
||||||
"dln@nemo" = mkHome [ ./home/dln/nemo.nix ];
|
|
||||||
"dln@pearl" = mkHome [ ./home/dln/pearl.nix ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.atuin = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
settings = {
|
|
||||||
ctrl_n_shortcuts = true;
|
|
||||||
enter_accept = true;
|
|
||||||
filter_mode_shell_up_key_binding = "session";
|
|
||||||
history_filter = [ ];
|
|
||||||
inline_height = 8;
|
|
||||||
prefers_reduced_motion = true;
|
|
||||||
search_mode_shell_up_key_binding = "prefix";
|
|
||||||
show_help = false;
|
|
||||||
style = "compact";
|
|
||||||
sync_address = "https://atuin.patagia.net";
|
|
||||||
sync.records = true;
|
|
||||||
|
|
||||||
daemon = {
|
|
||||||
enabled = true;
|
|
||||||
socket_path = "/run/user/1000/atuin.socket"; # FIXME: remove hard coded uid
|
|
||||||
systemd_socket = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
stats.common_subcommands = [
|
|
||||||
"cargo"
|
|
||||||
"git"
|
|
||||||
"go"
|
|
||||||
"jj"
|
|
||||||
"just"
|
|
||||||
"kubectl"
|
|
||||||
"nix"
|
|
||||||
"npm"
|
|
||||||
"pnpm"
|
|
||||||
"talosctl"
|
|
||||||
"task"
|
|
||||||
"yarn"
|
|
||||||
];
|
|
||||||
|
|
||||||
stats.common_prefix = [
|
|
||||||
"doas"
|
|
||||||
"sudo"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.atuin-daemon = {
|
|
||||||
Unit = {
|
|
||||||
Description = "atuin shell history daemon";
|
|
||||||
Requires = [ "atuin-daemon.socket" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${lib.getExe pkgs.atuin} daemon";
|
|
||||||
Environment = [ "ATUIN_LOG=info" ];
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSteps = 5;
|
|
||||||
RestartMaxDelaySec = 10;
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
Also = [ "atuin-daemon.socket" ];
|
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.sockets.atuin-daemon = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Unix socket activation for atuin shell history daemon";
|
|
||||||
};
|
|
||||||
|
|
||||||
Socket = {
|
|
||||||
ListenStream = "%t/atuin.socket";
|
|
||||||
SocketMode = "0600";
|
|
||||||
RemoveOnStop = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "sockets.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.broot = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
settings = {
|
|
||||||
content_search_max_file_size = "10MB";
|
|
||||||
enable_kitty_keyboard = lib.mkForce true;
|
|
||||||
icon_theme = "nerdfont";
|
|
||||||
lines_before_match_in_preview = 1;
|
|
||||||
lines_after_match_in_preview = 1;
|
|
||||||
quit_on_last_cancel = true;
|
|
||||||
show_selection_mark = true;
|
|
||||||
special_paths = {
|
|
||||||
"~/media" = {
|
|
||||||
list = "never";
|
|
||||||
sum = "never";
|
|
||||||
};
|
|
||||||
"~/.config" = {
|
|
||||||
show = "always";
|
|
||||||
};
|
|
||||||
"trav" = {
|
|
||||||
show = "always";
|
|
||||||
list = "always";
|
|
||||||
sum = "never";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
true_colors = true;
|
|
||||||
|
|
||||||
verbs = [
|
|
||||||
{
|
|
||||||
invocation = "broot_home";
|
|
||||||
key = "ctrl-7";
|
|
||||||
external = "br $HOME";
|
|
||||||
from_shell = true;
|
|
||||||
leave_broot = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
invocation = "edit";
|
|
||||||
key = "enter";
|
|
||||||
shortcut = "e";
|
|
||||||
external = "edit {file}";
|
|
||||||
apply_to = "text_file";
|
|
||||||
from_shell = true;
|
|
||||||
leave_broot = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
invocation = "nvim";
|
|
||||||
key = "enter";
|
|
||||||
apply_to = "text_file";
|
|
||||||
external = "edit {file}";
|
|
||||||
from_shell = true;
|
|
||||||
leave_broot = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./atuin.nix
|
|
||||||
./broot.nix
|
|
||||||
./devel.nix
|
|
||||||
./fish.nix
|
|
||||||
./ghostty.nix
|
|
||||||
./gnome.nix
|
|
||||||
./k8s.nix
|
|
||||||
./nix.nix
|
|
||||||
./nvim
|
|
||||||
./scripts.nix
|
|
||||||
./ssh.nix
|
|
||||||
./tmux.nix
|
|
||||||
./utils.nix
|
|
||||||
./vcs.nix
|
|
||||||
./web.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.patagia.desktop.enable = lib.mkEnableOption "Desktop environment";
|
|
||||||
options.patagia.laptop.enable = lib.mkEnableOption "Laptop";
|
|
||||||
options.patagia.oled.enable = lib.mkEnableOption "Darker darks on oled screens";
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
age-plugin-fido2-hmac
|
|
||||||
comma
|
|
||||||
dogdns
|
|
||||||
file
|
|
||||||
just
|
|
||||||
nix-output-monitor
|
|
||||||
passage
|
|
||||||
rage
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
GOPROXY = "https://athena.patagia.net";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "transient";
|
|
||||||
src = pkgs.fishPlugins.transient-fish.src;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
functions = {
|
|
||||||
confirm = {
|
|
||||||
description = "Ask for confirmation";
|
|
||||||
argumentNames = [ "message" ];
|
|
||||||
body = ''
|
|
||||||
read -l -p 'printf "\\e[31;1m$message\\e[0m (y/N) "' confirm
|
|
||||||
test "$confirm" = 'y'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
poweroff = {
|
|
||||||
description = "Wraps poweroff to first prompt for confirmation";
|
|
||||||
wraps = "poweroff";
|
|
||||||
body = ''confirm "⚠ Really poweroff $(hostname)?" && command poweroff $argv'';
|
|
||||||
};
|
|
||||||
|
|
||||||
reboot = {
|
|
||||||
description = "Wraps reboot to first prompt for confirmation";
|
|
||||||
wraps = "reboot";
|
|
||||||
body = ''confirm "⚠ Really reboot $(hostname)?" && command reboot $argv'';
|
|
||||||
};
|
|
||||||
|
|
||||||
shutdown = {
|
|
||||||
description = "Wraps shutdown to first prompt for confirmation";
|
|
||||||
wraps = "shutdown";
|
|
||||||
body = ''confirm "⚠ Really shutdown $(hostname)?" && command shutdown $argv'';
|
|
||||||
};
|
|
||||||
|
|
||||||
e = {
|
|
||||||
description = "Open a file in already running nvim";
|
|
||||||
argumentNames = [ "file" ];
|
|
||||||
body = ''
|
|
||||||
nvim-remote --remote (readlink -f "$file")
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
jl.body = ''
|
|
||||||
jj log --color=always --no-graph -T builtin_log_oneline -r 'all()' | fzf --ansi --reverse --wrap --preview 'jj show --tool=difftu {1}' --preview-window=down,70% --color=light
|
|
||||||
'';
|
|
||||||
|
|
||||||
__zoxide_zi_repaint.body = ''
|
|
||||||
__zoxide_zi
|
|
||||||
commandline -f repaint
|
|
||||||
'';
|
|
||||||
|
|
||||||
fish_jj_prompt.body = ''
|
|
||||||
if not command -sq jj || not jj root --quiet &>/dev/null
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
jj log --ignore-working-copy --no-graph --color never -r @ -T '
|
|
||||||
surround(
|
|
||||||
" \e[2;3m",
|
|
||||||
"\e[0m",
|
|
||||||
separate(
|
|
||||||
" ",
|
|
||||||
surround(
|
|
||||||
"\e[0;2;3m",
|
|
||||||
"\e[0m",
|
|
||||||
coalesce(
|
|
||||||
surround(
|
|
||||||
"\e[1;2;3m❝",
|
|
||||||
"❞\e[0m",
|
|
||||||
if(
|
|
||||||
description.first_line().substr(0, 80).starts_with(description.first_line()),
|
|
||||||
description.first_line().substr(0, 80),
|
|
||||||
description.first_line().substr(0, 79) ++ "…"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
"…"
|
|
||||||
),
|
|
||||||
),
|
|
||||||
surround("\e[0;1;95m ", "\e[0;2;3m", change_id.shortest()),
|
|
||||||
surround("\e[0;35m ", "\e[0m", bookmarks.join("╱")),
|
|
||||||
surround("\e[0;34m ", "\e[0;2;3m", commit_id.shortest()),
|
|
||||||
if(conflict, ""),
|
|
||||||
if(empty, ""),
|
|
||||||
if(divergent, ""),
|
|
||||||
if(hidden, ""),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
'
|
|
||||||
'';
|
|
||||||
|
|
||||||
fish_prompt.body = ''
|
|
||||||
echo -e "\033[s\033[$LINES;1H\033[1;2;38;5;238m$(string pad -c '┄' -w $COLUMNS (fish_jj_prompt || fish_vcs_prompt))\033[0m\033[u"
|
|
||||||
string join "" -- (set_color --dim) (prompt_hostname) ':' (prompt_pwd --full-length-dirs=4) (set_color --bold normal) ' ❯ ' (set_color normal)
|
|
||||||
'';
|
|
||||||
|
|
||||||
transient_prompt_func.body = ''
|
|
||||||
echo
|
|
||||||
string join "" -- (set_color --bold) '❯ ' (set_color normal)
|
|
||||||
'';
|
|
||||||
|
|
||||||
rg.body = ''
|
|
||||||
if status is-interactive
|
|
||||||
command rg -p $argv --json | delta
|
|
||||||
else
|
|
||||||
command rg $argv
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
interactiveShellInit = lib.concatStringsSep "\n" [
|
|
||||||
(builtins.readFile ../../files/config/fish/config.fish)
|
|
||||||
(builtins.readFile ../../files/config/fish/semantic-prompt.fish)
|
|
||||||
(builtins.readFile ../../files/config/fish/vcs.fish)
|
|
||||||
];
|
|
||||||
|
|
||||||
shellAbbrs = {
|
|
||||||
l = "bat";
|
|
||||||
top = "btm --basic --enable_cache_memory --battery";
|
|
||||||
ts = "TZ=Z date '+%Y%m%dT%H%M%SZ'";
|
|
||||||
w = "viddy $history[1]";
|
|
||||||
xc = "fish_clipboard_copy";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,164 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config = lib.mkIf config.patagia.desktop.enable {
|
|
||||||
programs.ghostty = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
package = inputs.ghostty.packages.${pkgs.system}.default;
|
|
||||||
settings = {
|
|
||||||
font-size = 12.5;
|
|
||||||
font-family = "TX-02";
|
|
||||||
font-family-bold-italic = "Monaspace Xenon";
|
|
||||||
font-style-bold = "Bold";
|
|
||||||
font-style-italic = "Light Oblique";
|
|
||||||
font-style-bold-italic = "ExtraLight Italic";
|
|
||||||
font-synthetic-style = false;
|
|
||||||
|
|
||||||
adjust-cursor-thickness = 4;
|
|
||||||
adjust-underline-position = 5;
|
|
||||||
adjust-underline-thickness = -2;
|
|
||||||
|
|
||||||
mouse-hide-while-typing = true;
|
|
||||||
unfocused-split-opacity = 1.0;
|
|
||||||
|
|
||||||
shell-integration = "fish";
|
|
||||||
|
|
||||||
gtk-tabs-location = "hidden";
|
|
||||||
gtk-titlebar = true;
|
|
||||||
gtk-titlebar-hide-when-maximized = true;
|
|
||||||
window-padding-balance = true;
|
|
||||||
window-padding-color = "extend";
|
|
||||||
window-theme = "system";
|
|
||||||
theme = "light:PatagiaLight,dark:PatagiaDark";
|
|
||||||
|
|
||||||
keybind = [
|
|
||||||
"alt+shift+c=copy_to_clipboard"
|
|
||||||
"alt+shift+v=paste_from_clipboard"
|
|
||||||
"ctrl+i=text:\\x09"
|
|
||||||
"ctrl+m=text:\\x0D"
|
|
||||||
"ctrl+tab=goto_split:previous"
|
|
||||||
"ctrl+[=text:\\x1B"
|
|
||||||
"super+enter=toggle_fullscreen"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."ghostty/themes/PatagiaDark".text =
|
|
||||||
let
|
|
||||||
background = if config.patagia.oled.enable then "#000000" else "#14151a";
|
|
||||||
in
|
|
||||||
''
|
|
||||||
background = "${background}"
|
|
||||||
foreground = #b7bec7
|
|
||||||
cursor-color = #e7e7b7
|
|
||||||
selection-background = #84979f
|
|
||||||
selection-foreground = #000000
|
|
||||||
palette = 0=#000000
|
|
||||||
palette = 1=#ff0035
|
|
||||||
palette = 2=#85ff00
|
|
||||||
palette = 3=#ffc900
|
|
||||||
palette = 4=#00a7ff
|
|
||||||
palette = 5=#cb01ff
|
|
||||||
palette = 6=#00e0ff
|
|
||||||
palette = 7=#b7bec7
|
|
||||||
palette = 8=#444444
|
|
||||||
palette = 9=#ff8c88
|
|
||||||
palette = 10=#baff94
|
|
||||||
palette = 11=#ffe090
|
|
||||||
palette = 12=#88ccff
|
|
||||||
palette = 13=#e38dff
|
|
||||||
palette = 14=#97eeff
|
|
||||||
palette = 15=#ffffff
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.configFile."ghostty/themes/PatagiaLight".text = ''
|
|
||||||
background = #fefeff
|
|
||||||
foreground = #222222
|
|
||||||
cursor-color = #aa0000
|
|
||||||
selection-background = #ffe6a4
|
|
||||||
selection-foreground = #483600
|
|
||||||
palette = 0=#000000
|
|
||||||
palette = 1=#9e001d
|
|
||||||
palette = 2=#306300
|
|
||||||
palette = 3=#deae00
|
|
||||||
palette = 4=#00669e
|
|
||||||
palette = 5=#7d009e
|
|
||||||
palette = 6=#008a9e
|
|
||||||
palette = 7=#f7f7f7
|
|
||||||
palette = 8=#b0b0b0
|
|
||||||
palette = 9=#ff0035
|
|
||||||
palette = 10=#509e00
|
|
||||||
palette = 11=#ffc900
|
|
||||||
palette = 12=#00a7ff
|
|
||||||
palette = 13=#cb01ff
|
|
||||||
palette = 14=#00e0ff
|
|
||||||
palette = 15=#ffffff
|
|
||||||
'';
|
|
||||||
|
|
||||||
xdg.desktopEntries = {
|
|
||||||
ghostty-secondary = {
|
|
||||||
categories = [
|
|
||||||
"System"
|
|
||||||
"TerminalEmulator"
|
|
||||||
];
|
|
||||||
exec = ''
|
|
||||||
ghostty --class=com.mitchellh.ghostty-secondary --font-style="ExtraCondensed" --font-style-bold="Bold ExtraCondensed" --font-style-italic="ExtraCondensed Oblique" -e bash
|
|
||||||
'';
|
|
||||||
genericName = "Ghostty Secondary";
|
|
||||||
icon = "com.mitchellh.ghostty";
|
|
||||||
name = "Ghostty Secondary";
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "com.mitchellh.ghostty-secondary";
|
|
||||||
TryExec = "ghostty";
|
|
||||||
};
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
};
|
|
||||||
|
|
||||||
ghostty-devel = {
|
|
||||||
categories = [
|
|
||||||
"System"
|
|
||||||
"TerminalEmulator"
|
|
||||||
];
|
|
||||||
exec = ''
|
|
||||||
ghostty --class=com.mitchellh.ghostty-devel --command="ssh -t devel" --initial-command="ssh -t devel"
|
|
||||||
'';
|
|
||||||
genericName = "Ghostty (devel)";
|
|
||||||
icon = "com.mitchellh.ghostty";
|
|
||||||
name = "Ghostty (devel)";
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "com.mitchellh.ghostty-devel";
|
|
||||||
TryExec = "ghostty";
|
|
||||||
};
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
};
|
|
||||||
|
|
||||||
ghostty-devel-secondary = {
|
|
||||||
categories = [
|
|
||||||
"System"
|
|
||||||
"TerminalEmulator"
|
|
||||||
];
|
|
||||||
exec = ''
|
|
||||||
ghostty --class=com.mitchellh.ghostty-devel-secondary --font-style="ExtraCondensed" --font-style-bold="Bold ExtraCondensed" --font-style-italic="ExtraCondensed Oblique" --command="ssh -t devel" --initial-command="ssh -t devel"
|
|
||||||
'';
|
|
||||||
genericName = "Ghostty Secondary (devel)";
|
|
||||||
icon = "com.mitchellh.ghostty";
|
|
||||||
name = "Ghostty Secondary (devel)";
|
|
||||||
settings = {
|
|
||||||
StartupWMClass = "com.mitchellh.ghostty-devel-secondary";
|
|
||||||
TryExec = "ghostty";
|
|
||||||
};
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,194 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib.hm.gvariant;
|
|
||||||
{
|
|
||||||
config = lib.mkIf config.patagia.desktop.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gnome-tweaks
|
|
||||||
gnome-pomodoro
|
|
||||||
gnomeExtensions.desktop-clock
|
|
||||||
gnomeExtensions.emoji-copy
|
|
||||||
gnomeExtensions.just-perfection
|
|
||||||
];
|
|
||||||
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/desktop/background" = {
|
|
||||||
color-shading-type = "solid";
|
|
||||||
picture-options = "zoom";
|
|
||||||
picture-uri = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-l.png";
|
|
||||||
picture-uri-dark = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-d.png";
|
|
||||||
primary-color = "#77767B";
|
|
||||||
secondary-color = "#000000";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/screensaver" = {
|
|
||||||
color-shading-type = "solid";
|
|
||||||
picture-options = "zoom";
|
|
||||||
picture-uri = "file:///run/current-system/sw/share/backgrounds/gnome/vnc-l.png";
|
|
||||||
primary-color = "#77767B";
|
|
||||||
secondary-color = "#000000";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
|
||||||
close = [ "<Super>q" ];
|
|
||||||
toggle-on-all-workspaces = [ "<Super>s" ];
|
|
||||||
toggle-maximized = [ "<Super>m" ];
|
|
||||||
maximize-vertically = [ "<Super>Up" ];
|
|
||||||
minimize = [ "<Super>comma" ];
|
|
||||||
move-to-center = [ "<Super>c" ];
|
|
||||||
switch-applications = [ "<Super>Tab" ];
|
|
||||||
switch-windows = [ "<Alt>Tab" ];
|
|
||||||
move-to-workspace-1 = [ "<Shift>F1" ];
|
|
||||||
move-to-workspace-2 = [ "<Shift>F2" ];
|
|
||||||
move-to-workspace-3 = [ "<Shift>F3" ];
|
|
||||||
move-to-workspace-4 = [ "<Shift>F4" ];
|
|
||||||
move-to-workspace-5 = [ "<Shift>F5" ];
|
|
||||||
move-to-workspace-6 = [ "<Shift>F6" ];
|
|
||||||
move-to-workspace-7 = [ "<Shift>F7" ];
|
|
||||||
move-to-workspace-8 = [ "<Shift>F8" ];
|
|
||||||
move-to-workspace-9 = [ "<Shift>F9" ];
|
|
||||||
switch-to-workspace-1 = [ "F1" ];
|
|
||||||
switch-to-workspace-2 = [ "F2" ];
|
|
||||||
switch-to-workspace-3 = [ "F3" ];
|
|
||||||
switch-to-workspace-4 = [ "F4" ];
|
|
||||||
switch-to-workspace-5 = [ "F5" ];
|
|
||||||
switch-to-workspace-6 = [ "F6" ];
|
|
||||||
switch-to-workspace-7 = [ "F7" ];
|
|
||||||
switch-to-workspace-8 = [ "F8" ];
|
|
||||||
switch-to-workspace-9 = [ "F9" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/input-sources" = {
|
|
||||||
mru-sources = [
|
|
||||||
(mkTuple [
|
|
||||||
"xkb"
|
|
||||||
"us"
|
|
||||||
])
|
|
||||||
];
|
|
||||||
sources = [
|
|
||||||
(mkTuple [
|
|
||||||
"xkb"
|
|
||||||
"se+us"
|
|
||||||
])
|
|
||||||
];
|
|
||||||
xkb-options = [ "caps:ctrl_modifier" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
enable-animations = false;
|
|
||||||
enable-hot-corners = false;
|
|
||||||
show-battery-percentage = true;
|
|
||||||
font-antialiasing = "grayscale";
|
|
||||||
font-hinting = "slight";
|
|
||||||
font-name = "Inter Variable 11";
|
|
||||||
document-font-name = "Inter Variable 11";
|
|
||||||
monospace-font-name = "BerkeleyMono Nerd Font 11";
|
|
||||||
toolkit-accessibility = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/search-providers" = {
|
|
||||||
disabled = [
|
|
||||||
"org.gnome.Contacts.desktop"
|
|
||||||
"org.gnome.Nautilus.desktop"
|
|
||||||
"org.gnome.Calendar.desktop"
|
|
||||||
"org.gnome.clocks.desktop"
|
|
||||||
"org.gnome.Epiphany.desktop"
|
|
||||||
];
|
|
||||||
sort-order = [
|
|
||||||
"org.gnome.Contacts.desktop"
|
|
||||||
"org.gnome.Documents.desktop"
|
|
||||||
"org.gnome.Nautilus.desktop"
|
|
||||||
"org.gnome.Settings.desktop"
|
|
||||||
"org.gnome.Calculator.desktop"
|
|
||||||
"org.gnome.Calendar.desktop"
|
|
||||||
"org.gnome.clocks.desktop"
|
|
||||||
"org.gnome.seahorse.Application.desktop"
|
|
||||||
"org.gnome.Weather.desktop"
|
|
||||||
"org.gnome.Characters.desktop"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
focus-mode = "sloppy";
|
|
||||||
num-workspaces = 10;
|
|
||||||
resize-with-right-button = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/GWeather4" = {
|
|
||||||
temperature-unit = "centigrade";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/Weather" = {
|
|
||||||
locations = [
|
|
||||||
(mkVariant (mkTuple [
|
|
||||||
(mkUint32 2)
|
|
||||||
(mkVariant (mkTuple [
|
|
||||||
"Stockholm-Arlanda Airport"
|
|
||||||
"ESSA"
|
|
||||||
false
|
|
||||||
[
|
|
||||||
(mkTuple [
|
|
||||||
1.0410888988146176
|
|
||||||
0.31328660073298215
|
|
||||||
])
|
|
||||||
]
|
|
||||||
[
|
|
||||||
(mkTuple [
|
|
||||||
1.0410888988146176
|
|
||||||
0.31328660073298215
|
|
||||||
])
|
|
||||||
]
|
|
||||||
]))
|
|
||||||
]))
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/calendar" = {
|
|
||||||
show-weekdate = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/mutter" = {
|
|
||||||
center-new-windows = true;
|
|
||||||
edge-tiling = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/color" = {
|
|
||||||
night-light-schedule-automatic = false;
|
|
||||||
night-light-schedule-from = 0.0;
|
|
||||||
night-light-schedule-to = 0.0;
|
|
||||||
night-light-temperature = mkUint32 3575;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
enabled-extensions = [
|
|
||||||
"emoji-copy@felipeftn"
|
|
||||||
"just-perfection-desktop@just-perfection"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/emoji-copy" = {
|
|
||||||
emoji-keybind = [ "<Super>e" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/just-perfection" = {
|
|
||||||
animation = 0;
|
|
||||||
notification-banner-position = 2;
|
|
||||||
osd-position = 6;
|
|
||||||
panel = false;
|
|
||||||
panel-in-overview = true;
|
|
||||||
startup-status = 0;
|
|
||||||
switcher-popup-delay = false;
|
|
||||||
top-panel-position = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/tweaks" = {
|
|
||||||
show-extensions-notice = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,176 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
kail
|
|
||||||
kapp
|
|
||||||
krew
|
|
||||||
kubectl
|
|
||||||
kubectl-cnpg
|
|
||||||
kubectl-neat
|
|
||||||
kubectl-view-secret
|
|
||||||
kubectx
|
|
||||||
kubelogin-oidc
|
|
||||||
kubernetes-helm
|
|
||||||
kustomize
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.k9s = {
|
|
||||||
enable = true;
|
|
||||||
settings.k9s = {
|
|
||||||
liveViewAutoRefresh = false;
|
|
||||||
refreshRate = 2;
|
|
||||||
maxConnRetry = 5;
|
|
||||||
readOnly = false;
|
|
||||||
noExitOnCtrlC = false;
|
|
||||||
skipLatestRevCheck = false;
|
|
||||||
disablePodCounting = false;
|
|
||||||
imageScans.enable = false;
|
|
||||||
logger = {
|
|
||||||
tail = 100;
|
|
||||||
buffer = 5000;
|
|
||||||
sinceSeconds = -1;
|
|
||||||
textWrap = false;
|
|
||||||
showTime = false;
|
|
||||||
};
|
|
||||||
shellPod.image = "alpine:3";
|
|
||||||
thresholds = {
|
|
||||||
cpu = {
|
|
||||||
critical = 90;
|
|
||||||
warn = 70;
|
|
||||||
};
|
|
||||||
memory = {
|
|
||||||
critical = 90;
|
|
||||||
warn = 70;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ui = {
|
|
||||||
crumbsless = true;
|
|
||||||
defaultsToFullScreen = true;
|
|
||||||
enableMouse = false;
|
|
||||||
headless = true;
|
|
||||||
logoless = true;
|
|
||||||
noIcons = false;
|
|
||||||
reactive = false;
|
|
||||||
skin = "dieter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
views = {
|
|
||||||
views = {
|
|
||||||
"v1/pods" = {
|
|
||||||
columns = [
|
|
||||||
"NAME"
|
|
||||||
"PF"
|
|
||||||
"READY"
|
|
||||||
"STATUS"
|
|
||||||
"NODE"
|
|
||||||
"AGE"
|
|
||||||
"RESTARTS"
|
|
||||||
"IP"
|
|
||||||
"CPU"
|
|
||||||
"MEM"
|
|
||||||
"CPU/R:L"
|
|
||||||
"MEM/R:L"
|
|
||||||
"%CPU/R"
|
|
||||||
"%CPU/L"
|
|
||||||
"%MEM/R"
|
|
||||||
"%MEM/L"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
skins.dieter.k9s = {
|
|
||||||
body = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
logoColor = "default";
|
|
||||||
};
|
|
||||||
prompt = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
suggestColor = "default";
|
|
||||||
};
|
|
||||||
info = {
|
|
||||||
fgColor = "default";
|
|
||||||
sectionColor = "default";
|
|
||||||
};
|
|
||||||
dialog = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
buttonFgColor = "default";
|
|
||||||
buttonBgColor = "default";
|
|
||||||
buttonFocusFgColor = "white";
|
|
||||||
buttonFocusBgColor = "darkblue";
|
|
||||||
labelFgColor = "default";
|
|
||||||
fieldFgColor = "default";
|
|
||||||
};
|
|
||||||
frame = {
|
|
||||||
border = {
|
|
||||||
fgColor = "default";
|
|
||||||
focusColor = "default";
|
|
||||||
};
|
|
||||||
menu = {
|
|
||||||
fgColor = "default";
|
|
||||||
keyColor = "default";
|
|
||||||
numKeyColor = "default";
|
|
||||||
};
|
|
||||||
crumbs = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
activeColor = "default";
|
|
||||||
};
|
|
||||||
status = {
|
|
||||||
newColor = "default";
|
|
||||||
modifyColor = "default";
|
|
||||||
addColor = "default";
|
|
||||||
errorColor = "red";
|
|
||||||
highlightColor = "default";
|
|
||||||
killColor = "default";
|
|
||||||
completedColor = "default";
|
|
||||||
};
|
|
||||||
title = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
highlightColor = "default";
|
|
||||||
counterColor = "default";
|
|
||||||
filterColor = "default";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
views = {
|
|
||||||
table = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
cursorFgColor = "teal";
|
|
||||||
cursorBgColor = "darkblue";
|
|
||||||
header = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
sorterColor = "blue";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xray = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
cursorColor = "blue";
|
|
||||||
graphicColor = "blue";
|
|
||||||
};
|
|
||||||
yaml = {
|
|
||||||
keyColor = "default";
|
|
||||||
colonColor = "default";
|
|
||||||
valueColor = "default";
|
|
||||||
};
|
|
||||||
logs = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
indicator = {
|
|
||||||
fgColor = "default";
|
|
||||||
bgColor = "default";
|
|
||||||
toggleOnColor = "default";
|
|
||||||
toggleOffColor = "default";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
outputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
nixpkgs = {
|
|
||||||
config.allowUnfree = true;
|
|
||||||
overlays = [
|
|
||||||
outputs.overlays.additions
|
|
||||||
outputs.overlays.modifications
|
|
||||||
outputs.overlays.unstable-packages
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
require 'blink-cmp'.setup({
|
|
||||||
keymap = {
|
|
||||||
preset = 'enter',
|
|
||||||
['<Tab>'] = { 'select_next', 'fallback' },
|
|
||||||
['<S-Tab>'] = { 'select_prev', 'fallback' },
|
|
||||||
['<PageDown>'] = { 'scroll_documentation_down', 'fallback' },
|
|
||||||
['<PageUp>'] = { 'scroll_documentation_up', 'fallback' },
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
accept = {
|
|
||||||
auto_brackets = { enabled = true, },
|
|
||||||
},
|
|
||||||
|
|
||||||
documentation = {
|
|
||||||
auto_show = true,
|
|
||||||
auto_show_delay_ms = 800,
|
|
||||||
window = { border = 'rounded', },
|
|
||||||
},
|
|
||||||
|
|
||||||
ghost_text = { enabled = false },
|
|
||||||
|
|
||||||
list = {
|
|
||||||
selection = {
|
|
||||||
preselect = false,
|
|
||||||
auto_insert = false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
menu = {
|
|
||||||
auto_show = true,
|
|
||||||
border = 'rounded',
|
|
||||||
direction_priority = { 'n' },
|
|
||||||
draw = {
|
|
||||||
components = {
|
|
||||||
kind_icon = {
|
|
||||||
ellipsis = false,
|
|
||||||
text = function(ctx)
|
|
||||||
local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind)
|
|
||||||
return kind_icon
|
|
||||||
end,
|
|
||||||
-- Optionally, you may also use the highlights from mini.icons
|
|
||||||
highlight = function(ctx)
|
|
||||||
local _, hl, _ = require('mini.icons').get('lsp', ctx.kind)
|
|
||||||
return hl
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fuzzy = {
|
|
||||||
prebuilt_binaries = {
|
|
||||||
download = false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
signature = {
|
|
||||||
enabled = true,
|
|
||||||
window = { border = 'rounded', },
|
|
||||||
},
|
|
||||||
|
|
||||||
sources = {
|
|
||||||
default = { 'lsp' },
|
|
||||||
cmdline = {},
|
|
||||||
providers = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
})
|
|
|
@ -1,186 +0,0 @@
|
||||||
{
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
nvim-remote = pkgs.writeShellApplication {
|
|
||||||
name = "nvim-remote";
|
|
||||||
text = ''
|
|
||||||
_sess=$(echo -n "$USER@''${SSH_CONNECTION:-$HOSTNAME}" | tr -c '[:alnum:]@.' '_')
|
|
||||||
_nvim_sock="''${XDG_RUNTIME_DIR:-/tmp}/nvim.$_sess.sock"
|
|
||||||
exec nvim --listen "$_nvim_sock" --server "$_nvim_sock" "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./treesitter.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = [ nvim-remote ];
|
|
||||||
|
|
||||||
programs.man.generateCaches = false;
|
|
||||||
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
|
||||||
defaultEditor = true;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
withNodeJs = false;
|
|
||||||
withPython3 = false;
|
|
||||||
withRuby = false;
|
|
||||||
|
|
||||||
extraLuaConfig = lib.fileContents ./init.lua;
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
codeium
|
|
||||||
harper
|
|
||||||
lua-language-server
|
|
||||||
nixd
|
|
||||||
shellcheck
|
|
||||||
shfmt
|
|
||||||
stylua
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
friendly-snippets
|
|
||||||
go-nvim
|
|
||||||
targets-vim
|
|
||||||
ts-comments-nvim
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "direnv-nvim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "actionshrimp";
|
|
||||||
repo = "direnv.nvim";
|
|
||||||
rev = "main";
|
|
||||||
hash = "sha256-7NcVskgAurbIuEVIXxHvXZfYQBOEXLURGzllfVEQKNE=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
require('direnv-nvim').setup {
|
|
||||||
type = "dir"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = nvim-lspconfig;
|
|
||||||
type = "lua";
|
|
||||||
config = lib.fileContents ./lsp.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = blink-cmp;
|
|
||||||
type = "lua";
|
|
||||||
config = lib.fileContents ./blink-cmp.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "blink.compat";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "saghen";
|
|
||||||
repo = "blink.compat";
|
|
||||||
rev = "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc"; # Dec 25, 2024
|
|
||||||
hash = "sha256-tFQeKyqdo3mvptYnWxKhTpI4ROFNQ6u3P8cLqtlsozw=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
require('blink.compat').setup()
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "inlay-hints";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "MysticalDevil";
|
|
||||||
repo = "inlay-hints.nvim";
|
|
||||||
rev = "3259b54f3b954b4d8260f3ee49ceabe978ea5636";
|
|
||||||
hash = "sha256-99KCGoPowa4PA1jkCm4ZbbgrFl84NWnKQMgkfy8KS5E=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
require('inlay-hints').setup {
|
|
||||||
autocmd = { enable = false },
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "neocodeium";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "monkoose";
|
|
||||||
repo = "neocodeium";
|
|
||||||
rev = "4da81528468b33585c411f31eb390dce573ccb14"; # v1.8.0
|
|
||||||
hash = "sha256-1n9nNqBNwNDSzbAkm8eB4HZLNy5HmMg25jPwQAnW5OU=";
|
|
||||||
};
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
local neocodeium =require('neocodeium')
|
|
||||||
neocodeium.setup()
|
|
||||||
vim.keymap.set("i", "<C-j>", neocodeium.accept, { remap = true })
|
|
||||||
vim.keymap.set("i", "<A-f>", neocodeium.accept, { remap = true })
|
|
||||||
vim.keymap.set("i", "<C-h>", neocodeium.cycle_or_complete, { remap = true })
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "diagflow";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "dgagn";
|
|
||||||
repo = "diagflow.nvim";
|
|
||||||
rev = "fc09d55d2e60edc8ed8f9939ba97b7b7e6488c99";
|
|
||||||
hash = "sha256-2WNuaIEXcAgUl2Kb/cCHEOrtehw9alaoM96qb4MLArw=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
require('diagflow').setup {
|
|
||||||
scope = "line",
|
|
||||||
gap_size = 0,
|
|
||||||
max_width = 50,
|
|
||||||
max_height = 20,
|
|
||||||
show_borders = true,
|
|
||||||
toggle_event = { "InsertEnter", "InsertLeave" },
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "dieter-nvim";
|
|
||||||
src = ./dieter;
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
vim.cmd.colorscheme "dieter-nocolor"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = mini-nvim;
|
|
||||||
type = "lua";
|
|
||||||
config = lib.fileContents ./mini.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = rustaceanvim;
|
|
||||||
type = "lua";
|
|
||||||
config = lib.fileContents ./rust.lua;
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue