style: format with scripts/fmt.bash

This commit is contained in:
Price Hiller 2024-03-16 13:01:28 -05:00
parent 13169cdecd
commit c56f4ad68d
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
28 changed files with 172 additions and 236 deletions

View File

@ -3,7 +3,7 @@
main() {
local mon_count
mon_count="$(hyprctl monitors -j | jq length)"
if (( mon_count > 1 )); then
if ((mon_count > 1)); then
hyprctl keyword monitor "eDP-1, disable"
fi
}

View File

@ -19,7 +19,7 @@ M.setup = function()
local fts_to_lang_registration = {
["azure-pipelines"] = "yaml",
["dockerignore"] = "gitignore",
["zsh"] = "bash"
["zsh"] = "bash",
}
vim.iter(fts_to_lang_registration):each(function(filetype, language)

View File

@ -28,7 +28,7 @@ M.setup = function()
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "",
}
},
},
float = {
focusable = true,

View File

@ -15,9 +15,9 @@ vim.g.neovide_remember_window_size = false
vim.g.neovide_fullscreen = false
-- Allow clipboard copy paste in neovim
vim.keymap.set({ 'n', 'v' }, '<D-v>', '"+P') -- Paste normal and visual mode
vim.keymap.set({ 'i', 'c' }, '<D-v>', '<C-R>+') -- Paste insert and command mode
vim.keymap.set('t', '<D-v>', [[<C-\><C-N>"+P]]) -- Paste terminal mode
vim.keymap.set({ "n", "v" }, "<D-v>", '"+P') -- Paste normal and visual mode
vim.keymap.set({ "i", "c" }, "<D-v>", "<C-R>+") -- Paste insert and command mode
vim.keymap.set("t", "<D-v>", [[<C-\><C-N>"+P]]) -- Paste terminal mode
-- Next/prev tabs
vim.keymap.set({ "", "!", "v", "t" }, "<D-x>", "<cmd>tabnext<CR>", { noremap = true, silent = true })
@ -25,4 +25,3 @@ vim.keymap.set({ "", "!", "v", "t" }, "<D-z>", "<cmd>tabprevious<CR>", { noremap
-- Spawn new terminal in new tab
vim.keymap.set({ "", "!", "v", "t" }, "<D-t>", "<cmd>tabnew | terminal<CR>", { noremap = true, silent = true })

View File

@ -2,7 +2,7 @@ return {
{
"LunarVim/bigfile.nvim",
opts = {
filesize = 10
}
}
filesize = 10,
},
},
}

View File

@ -272,7 +272,10 @@ return {
--- If the completion item looks like a file path and exists, go ahead and
--- abbreviate it relative to the home directory
if vim.fn.isdirectory(completion_item.abbr) == 1 or vim.fn.filereadable(completion_item.abbr) == 1 then
if
vim.fn.isdirectory(completion_item.abbr) == 1
or vim.fn.filereadable(completion_item.abbr) == 1
then
completion_item.abbr = vim.fn.fnamemodify(completion_item.abbr, ":~")
end
@ -296,7 +299,7 @@ return {
disallow_fullfuzzy_matching = false,
disallow_partial_matching = false,
disallow_fuzzy_matching = false,
disallow_prefix_unmatching = false
disallow_prefix_unmatching = false,
},
window = {
documentation = {
@ -433,7 +436,7 @@ return {
"!",
},
},
priority = 100
priority = 100,
},
{ name = "cmdline_history", max_item_count = 3 },
{ name = "fuzzy_buffer", max_item_count = 3 },

View File

@ -21,10 +21,10 @@ return {
},
ft = { "sql" },
keys = {
{ "<leader>a", desc = "Dadbod" },
{ "<leader>aa", "<cmd>DBUIToggle<CR>", desc = "Dadbod: Toggle UI" },
{ "<leader>a", desc = "Dadbod" },
{ "<leader>aa", "<cmd>DBUIToggle<CR>", desc = "Dadbod: Toggle UI" },
{ "<leader>ac", "<cmd>DBUIAddConnection<CR>", desc = "Dadbod: Add Connection" },
{ "<leader>ab", "<cmd>DBUIFindBuffer<CR>", desc = "Dadbod: Find Buffer" },
{ "<leader>ab", "<cmd>DBUIFindBuffer<CR>", desc = "Dadbod: Find Buffer" },
},
init = function()
vim.g.db_ui_use_nerd_fonts = 1

View File

@ -14,7 +14,7 @@ return {
end,
-- I know this is a lie below, but I'm used to the key being LSP bound, so fuck it
desc = "LSP: Format",
mode = { "v", "n" }
mode = { "v", "n" },
},
},
opts = function()

View File

@ -14,7 +14,7 @@ return {
icons = false,
run_in_floaterm = true,
trouble = true,
luasnip = true
luasnip = true,
})
end,
event = { "CmdlineEnter" },

View File

@ -52,8 +52,8 @@ return {
{ "NvimNotifyTrace", { fg = colors.oniViolet } },
{ "StatusLineNC", { bg = nil } },
{ "WinBarNC", { bg = nil } },
{ "Visual", { bg = colors.sumiInk5 }},
{ "CursorLine", { bg = colors.sumiInk4 }},
{ "Visual", { bg = colors.sumiInk5 } },
{ "CursorLine", { bg = colors.sumiInk4 } },
{ "CursorLineNr", { fg = colors.roninYellow, bg = palette.theme.ui.bg_m1 } },
{ "CursorLineFold", { fg = colors.crystalBlue, bg = palette.theme.ui.bg_m1 } },
{ "CursorLineSign", { bg = palette.theme.ui.bg_m1 } },
@ -194,7 +194,14 @@ return {
{ "TreesitterContext", { bg = colors.sumiInk0 } },
{ "FloatTitle", { bg = "NONE" } },
{ "DiffviewFilePanelTitle", { fg = colors.crystalBlue } },
{ "DiffviewDiffDeleteDim", { fg = function() return get_hl("Comment")().fg end } },
{
"DiffviewDiffDeleteDim",
{
fg = function()
return get_hl("Comment")().fg
end,
},
},
{ "LspInlayHint", { fg = colors.springViolet2, bg = colors.winterBlue } },
{ "@text", { fg = colors.fujiWhite } },
{ "RainbowDelimiterRed", { fg = colors.peachRed } },

View File

@ -477,9 +477,9 @@ return {
maxMemoryMB = 60000,
flake = {
autoArchive = true,
autoEvalInputs = true
}
}
autoEvalInputs = true,
},
},
},
},
})

View File

@ -7,36 +7,36 @@ return {
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-go",
"mrcjkb/rustaceanvim",
"nvim-neotest/neotest-plenary"
"nvim-neotest/neotest-plenary",
},
keys = {
{ "<localleader>n", desc = "> Neotest" },
{ "<localleader>nrr", "<cmd>Neotest run<CR>", desc = "Neotest: Run Test" },
{ "<localleader>nrl", "<cmd>Neotest run file<CR>", desc = "Neotest: Run Tests in File" },
{ "<localleader>nrl", "<cmd>Neotest run last<CR>", desc = "Neotest: Run Last Tests" },
{ "<localleader>np", "<cmd>Neotest output-panel<CR>", desc = "Neotest: Output Panel" },
{ "<localleader>no", "<cmd>Neotest output<CR>", desc = "Neotest: Output" },
{ "<localleader>nn", "<cmd>Neotest summary toggle<CR>", desc = "Neotest: Summary Toggle" },
{ "<localleader>nk", "<cmd>Neotest jump prev<CR>", desc = "Neotest: Jump Prev" },
{ "<localleader>nj", "<cmd>Neotest jump next<CR>", desc = "Neotest: Jump Next" },
{ "<localleader>na", "<cmd>Neotest attach<CR>", desc = "Neotest: Attach" },
{ "<localleader>n", desc = "> Neotest" },
{ "<localleader>nrr", "<cmd>Neotest run<CR>", desc = "Neotest: Run Test" },
{ "<localleader>nrl", "<cmd>Neotest run file<CR>", desc = "Neotest: Run Tests in File" },
{ "<localleader>nrl", "<cmd>Neotest run last<CR>", desc = "Neotest: Run Last Tests" },
{ "<localleader>np", "<cmd>Neotest output-panel<CR>", desc = "Neotest: Output Panel" },
{ "<localleader>no", "<cmd>Neotest output<CR>", desc = "Neotest: Output" },
{ "<localleader>nn", "<cmd>Neotest summary toggle<CR>", desc = "Neotest: Summary Toggle" },
{ "<localleader>nk", "<cmd>Neotest jump prev<CR>", desc = "Neotest: Jump Prev" },
{ "<localleader>nj", "<cmd>Neotest jump next<CR>", desc = "Neotest: Jump Next" },
{ "<localleader>na", "<cmd>Neotest attach<CR>", desc = "Neotest: Attach" },
},
opts = function()
return {
diagnostic = {
enable = true,
severity = 1
enable = true,
severity = 1,
},
discovery = {
concurrent = 4
concurrent = 4,
},
status = {
virtual_text = true
virtual_text = true,
},
adapters = {
require("neotest-plenary"),
require("neotest-go"),
require('rustaceanvim.neotest')
require("rustaceanvim.neotest"),
},
}
end,

View File

@ -8,7 +8,7 @@ return {
"Nmlogs",
"Nmdelete",
"Nmread",
"Nmwrite"
"Nmwrite",
},
config = function()
require("netman")

View File

@ -25,7 +25,11 @@ return {
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
vim.api.nvim_set_hl(0, name, vim.tbl_deep_extend("force", hl, { bg = bg, force = true }))
local cul_hl_name = name .. "Cul"
vim.api.nvim_set_hl(0, cul_hl_name, vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true }))
vim.api.nvim_set_hl(
0,
cul_hl_name,
vim.tbl_deep_extend("force", hl, { bg = cl_bg, nocombine = true, force = true })
)
sign.culhl = cul_hl_name
vim.fn.sign_define(sign.name, sign)
end

View File

@ -206,7 +206,7 @@ return {
frecency = {
show_scores = true,
auto_validate = true,
db_safe_mode = false
db_safe_mode = false,
},
},
})

View File

@ -109,14 +109,15 @@ end
U.select_hl = function(name, fields)
---@return vim.api.keyset.highlight
return function()
return vim.iter(U.get_hl(name)()):filter(function(k, _)
return vim.list_contains(fields, k)
end):fold({}, function(t, k, v)
t[k] = v
return t
end)
return vim.iter(U.get_hl(name)())
:filter(function(k, _)
return vim.list_contains(fields, k)
end)
:fold({}, function(t, k, v)
t[k] = v
return t
end)
end
end
return U

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
get-album-info () {
get-album-info() {
local class
local text=""
@ -25,7 +25,6 @@ get-album-info () {
done
}
main() {
get-album-info
}

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
main () {
main() {
local notify_application_name="RF Status"
local enable_airplane_mode=true
@ -11,7 +11,6 @@ main () {
local device
local device_type
for rf_status in $(rfkill -J | jq '.rfkilldevices[]' | jq -r tostring); do
rf_soft_status="$(printf "%s" "${rf_status}" | jq -r '.soft')"
rf_hard_status="$(printf "%s" "${rf_status}" | jq -r '.hard')"
@ -45,7 +44,6 @@ main () {
fi
fi
}
main

View File

@ -8,33 +8,33 @@ return {
key_tables = {
-- NOTE: Pane Resizing Submap
resize_pane = {
{ key = "LeftArrow", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "h", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "LeftArrow", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "h", action = wezterm.action.AdjustPaneSize({ "Left", adjust_pane_size_amount }) },
{ key = "RightArrow", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) },
{ key = "l", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) },
{ key = "UpArrow", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "k", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "DownArrow", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
{ key = "j", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
{ key = "l", action = wezterm.action.AdjustPaneSize({ "Right", adjust_pane_size_amount }) },
{ key = "UpArrow", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "k", action = wezterm.action.AdjustPaneSize({ "Up", adjust_pane_size_amount }) },
{ key = "DownArrow", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
{ key = "j", action = wezterm.action.AdjustPaneSize({ "Down", adjust_pane_size_amount }) },
-- Cancel the mode by pressing escape
{ key = "Escape", action = "PopKeyTable" },
{ key = "Escape", action = "PopKeyTable" },
},
-- NOTE: Pane Rotate Position Submap
rotate_panes = {
{ key = "h", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "LeftArrow", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "l", action = wezterm.action.RotatePanes("Clockwise") },
{ key = "h", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "LeftArrow", action = wezterm.action.RotatePanes("CounterClockwise") },
{ key = "l", action = wezterm.action.RotatePanes("Clockwise") },
{ key = "RightArrow", action = wezterm.action.RotatePanes("Clockwise") },
{ key = "Escape", action = "PopKeyTable" },
}
{ key = "Escape", action = "PopKeyTable" },
},
},
keys = {
{
key = "r",
mods = "SUPER",
action = "ReloadConfiguration"
action = "ReloadConfiguration",
},
{
key = "z",
@ -71,7 +71,7 @@ return {
CloseCurrentTab = { confirm = false },
}),
},
{ key = "Copy", action = wezterm.action({ CopyTo = "Clipboard" }) },
{ key = "Copy", action = wezterm.action({ CopyTo = "Clipboard" }) },
{ key = "Paste", action = wezterm.action({ PasteFrom = "Clipboard" }) },
-- NOTE: Pane Splitting
{
@ -115,9 +115,9 @@ return {
mods = "CTRL",
action = wezterm.action({ ActivatePaneDirection = "Down" }),
},
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "0", mods = "CTRL", action = "ResetFontSize" },
{ key = "=", mods = "CTRL", action = "IncreaseFontSize" },
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
{ key = "0", mods = "CTRL", action = "ResetFontSize" },
-- NOTE: Leader dependent binds
{ key = "h", mods = "LEADER", action = wezterm.action({ EmitEvent = "trigger-nvim-with-scrollback" }) },
@ -153,7 +153,6 @@ return {
name = "rotate_panes",
one_shot = false,
}),
}
},
},
}

View File

@ -1,4 +1,4 @@
return {
window_decorations = "TITLE | RESIZE",
win32_system_backdrop = "Acrylic"
win32_system_backdrop = "Acrylic",
}

View File

@ -57,7 +57,6 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid
title = "N/A"
end
if tab.is_active then
bg = color_names.kanagawa.sumiInk0
fg = color_names.kanagawa.oniViolet
@ -146,9 +145,10 @@ wezterm.on("update-right-status", function(window, pane)
local key_table = window:active_key_table()
if key_table then
leader = leader_text
key_table = "󰌌 " .. key_table:gsub("_", " "):gsub("(%l)(%w*)", function (a,b)
return string.upper(a)..b
end)
key_table = "󰌌 "
.. key_table:gsub("_", " "):gsub("(%l)(%w*)", function(a, b)
return string.upper(a) .. b
end)
end
-- Color palette for the backgrounds of each cell
@ -157,8 +157,8 @@ wezterm.on("update-right-status", function(window, pane)
{ bg = color_names.kanagawa.carpYellow, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.springGreen, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.crystalBlue, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.oniViolet, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.waveRed, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.oniViolet, fg = color_names.kanagawa.sumiInk0 },
{ bg = color_names.kanagawa.waveRed, fg = color_names.kanagawa.sumiInk0 },
}
-- The elements to be formatted
local elements = {}

View File

@ -1,49 +1,49 @@
{
"aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/sam/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"version": "12.1.0",
"requestsplitn": 150,
"completionrefreshtime": 7,
"maxconcurrentdownloads": 0,
"bottomup": true,
"sudoloop": false,
"timeupdate": false,
"devel": true,
"cleanAfter": false,
"provides": false,
"pgpfetch": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": false,
"combinedupgrade": false,
"useask": false,
"batchinstall": false,
"singlelineresults": false,
"separatesources": true,
"debug": false,
"rpc": true,
"doubleconfirm": true,
"rebuild": "no"
"aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/sam/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"version": "12.1.0",
"requestsplitn": 150,
"completionrefreshtime": 7,
"maxconcurrentdownloads": 0,
"bottomup": true,
"sudoloop": false,
"timeupdate": false,
"devel": true,
"cleanAfter": false,
"provides": false,
"pgpfetch": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": false,
"combinedupgrade": false,
"useask": false,
"batchinstall": false,
"singlelineresults": false,
"separatesources": true,
"debug": false,
"rpc": true,
"doubleconfirm": true,
"rebuild": "no"
}

View File

@ -1,6 +0,0 @@
#compdef aws
_aws () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/aws_zsh_completer.sh
if [[ -f $e ]]; then source $e; fi
}

View File

@ -1,60 +0,0 @@
# Source this file to activate auto completion for zsh using the bash
# compatibility helper. Make sure to run `compinit` before, which should be
# given usually.
#
# % source /path/to/zsh_complete.sh
#
# Typically that would be called somewhere in your .zshrc.
#
# Note, the overwrite of _bash_complete() is to export COMP_LINE and COMP_POINT
# That is only required for zsh <= edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
#
# https://github.com/zsh-users/zsh/commit/edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570
#
# zsh relases prior to that version do not export the required env variables!
autoload -Uz bashcompinit
bashcompinit -i
_bash_complete() {
local ret=1
local -a suf matches
local -x COMP_POINT COMP_CWORD
local -a COMP_WORDS COMPREPLY BASH_VERSINFO
local -x COMP_LINE="$words"
local -A savejobstates savejobtexts
(( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
(( COMP_CWORD = CURRENT - 1))
COMP_WORDS=( $words )
BASH_VERSINFO=( 2 05b 0 1 release )
savejobstates=( ${(kv)jobstates} )
savejobtexts=( ${(kv)jobtexts} )
[[ ${argv[${argv[(I)nospace]:-0}-1]} = -o ]] && suf=( -S '' )
matches=( ${(f)"$(compgen $@ -- ${words[CURRENT]})"} )
if [[ -n $matches ]]; then
if [[ ${argv[${argv[(I)filenames]:-0}-1]} = -o ]]; then
compset -P '*/' && matches=( ${matches##*/} )
compset -S '/*' && matches=( ${matches%%/*} )
compadd -Q -f "${suf[@]}" -a matches && ret=0
else
compadd -Q "${suf[@]}" -a matches && ret=0
fi
fi
if (( ret )); then
if [[ ${argv[${argv[(I)default]:-0}-1]} = -o ]]; then
_default "${suf[@]}" && ret=0
elif [[ ${argv[${argv[(I)dirnames]:-0}-1]} = -o ]]; then
_directories "${suf[@]}" && ret=0
fi
fi
return ret
}
complete -C aws_completer aws

View File

@ -4,8 +4,12 @@ init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/completions"
FPATH="${FPATH}:${wkdir}/completions"
autoload -Uz compinit
compinit
autoload bashcompinit && bashcompinit
autoload -Uz compinit && compinit
if command -v aws_completer >/dev/null 2>&1; then
complete -C "$(command -v aws_completer)" aws
fi
}
init

View File

@ -1,5 +1,5 @@
{
"RoslynExtensionsOptions": {
"enableDecompilationSupport": true
}
"RoslynExtensionsOptions": {
"enableDecompilationSupport": true
}
}

View File

@ -1,31 +1,22 @@
# Some of these functions were taken from https://github.com/NixOS/nixpkgs/blob/master/lib/
{ lib ? (import <nixpkgs> { }).lib }:
rec {
hasSuffix =
suffix:
string:
{ lib ? (import <nixpkgs> { }).lib }: rec {
hasSuffix = suffix: string:
let
lenSuffix = builtins.stringLength suffix;
lenString = builtins.stringLength string;
in
(
lenString >= lenSuffix && (builtins.substring (lenString - lenSuffix) lenString string) == suffix
);
in (lenString >= lenSuffix
&& (builtins.substring (lenString - lenSuffix) lenString string)
== suffix);
recurseDir = dir:
let
dirContents = builtins.readDir dir;
in
(builtins.concatMap
(dirItem:
let
itemType = builtins.getAttr dirItem dirContents;
itemPath = dir + "/${dirItem}";
in
if itemType == "directory" then
(recurseDir itemPath)
else
[ itemPath ])
(builtins.attrNames dirContents));
let dirContents = builtins.readDir dir;
in (builtins.concatMap (dirItem:
let
itemType = builtins.getAttr dirItem dirContents;
itemPath = dir + "/${dirItem}";
in if itemType == "directory" then
(recurseDir itemPath)
else
[ itemPath ]) (builtins.attrNames dirContents));
recurseFilesInDir = dir: suffix:
(builtins.filter (file: hasSuffix "${suffix}" file) (recurseDir dir));
recurseFilesInDirs = dirs: suffix:
@ -35,14 +26,13 @@ rec {
let
f = attrPath:
lib.zipAttrsWith (n: values:
if lib.tail values == [ ]
then lib.head values
else if lib.all builtins.isList values
then lib.unique (lib.concatLists values)
else if lib.all builtins.isAttrs values
then f (attrPath ++ [ n ]) values
else lib.last values
);
in
f [ ] attrList;
if lib.tail values == [ ] then
lib.head values
else if lib.all builtins.isList values then
lib.unique (lib.concatLists values)
else if lib.all builtins.isAttrs values then
f (attrPath ++ [ n ]) values
else
lib.last values);
in f [ ] attrList;
}

View File

@ -4,9 +4,7 @@ let
"age1yubikey1qfnj0k4mkzrn8ef5llwh2sv6hd7ckr0qml3n9hzdpz9c59ypvryhyst87k0"
"age1ur2lr3z6d2eftgxcalc6s5x9840ew9x43upl9k23wg0ugacrn5as4zl6sj"
];
secrets = let dir = "files";
in {
};
secrets = let dir = "files"; in { };
in if agenix then
(builtins.listToAttrs (builtins.concatMap (secretName: [{
name = builtins.toString secretName;