Compare commits
5 Commits
kubernetes
...
003c3cc41a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
003c3cc41a | ||
|
|
d83652bb9c | ||
|
|
6fd09a712e | ||
|
|
d9c4f824d2 | ||
|
|
856e4daee6 |
@@ -14,6 +14,12 @@ let
|
|||||||
cleanup_temporary_files = (
|
cleanup_temporary_files = (
|
||||||
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
|
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
|
||||||
);
|
);
|
||||||
|
decode_jwt = (patchScriptBin "decode_jwt" (builtins.readFile ./files/decode_jwt.bash));
|
||||||
|
git_find_merged_branches = (
|
||||||
|
patchScriptBin "git_find_merged_branches" (builtins.readFile ./files/git_find_merged_branches.bash)
|
||||||
|
);
|
||||||
|
git_fix_author = (patchScriptBin "git_fix_author" (builtins.readFile ./files/git_fix_author.bash));
|
||||||
|
rsync_clone = (patchScriptBin "rsync_clone" (builtins.readFile ./files/rsync_clone.bash));
|
||||||
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
alias_rga = pkgs.writeShellScriptBin "rga" ''
|
||||||
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
exec ${pkgs.ripgrep}/bin/rg -uuu "''${@}"
|
||||||
'';
|
'';
|
||||||
@@ -59,8 +65,12 @@ in
|
|||||||
nix-output-monitor # For better view into nixos-rebuild
|
nix-output-monitor # For better view into nixos-rebuild
|
||||||
# nix-serve-ng # Serve nix store over http
|
# nix-serve-ng # Serve nix store over http
|
||||||
cleanup_temporary_files
|
cleanup_temporary_files
|
||||||
|
decode_jwt
|
||||||
jq
|
jq
|
||||||
inetutils # For whois
|
inetutils # For whois
|
||||||
|
git_find_merged_branches
|
||||||
|
git_fix_author
|
||||||
|
rsync_clone
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Delete temporary files on entire disk
|
# Delete temporary files on entire disk
|
||||||
find / -type f '(' -name '*.orig' -or -name '*~' -or -name '*.core' ')' -delete -print 2>/dev/null
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
exec find / -type f '(' -name '*.orig' -or -name '*~' -or -name '*.core' ')' -delete -print 2>/dev/null
|
||||||
|
|||||||
8
nix/configuration/roles/base/files/decode_jwt.bash
Normal file
8
nix/configuration/roles/base/files/decode_jwt.bash
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Decode the contents of a JWT
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
exec jq -R 'split(".") | .[0],.[1] | gsub("-"; "+") | gsub("_"; "/") | gsub("%3D"; "=")| @base64d | fromjson'
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Find local branches that have been merged
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
: ${MAIN_BRANCH:="main"}
|
||||||
|
|
||||||
|
git checkout -q ${MAIN_BRANCH} && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base ${MAIN_BRANCH} $branch) && [[ $(git cherry ${MAIN_BRANCH} $(git commit-tree $(git rev-parse "$branch^{tree}") -p $mergeBase -m _)) == "-"* ]] && echo "$branch"; done
|
||||||
22
nix/configuration/roles/base/files/git_fix_author.bash
Normal file
22
nix/configuration/roles/base/files/git_fix_author.bash
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
git filter-branch --env-filter '
|
||||||
|
WRONG_EMAIL="old@email.foo"
|
||||||
|
NEW_NAME="New Name"
|
||||||
|
NEW_EMAIL="new@email.bar"
|
||||||
|
|
||||||
|
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
|
||||||
|
then
|
||||||
|
export GIT_COMMITTER_NAME="$NEW_NAME"
|
||||||
|
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
|
||||||
|
fi
|
||||||
|
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
|
||||||
|
then
|
||||||
|
export GIT_AUTHOR_NAME="$NEW_NAME"
|
||||||
|
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
|
||||||
|
fi
|
||||||
|
' --tag-name-filter cat --commit-filter 'git commit-tree -S "$@";' -- --branches --tags
|
||||||
8
nix/configuration/roles/base/files/rsync_clone.bash
Normal file
8
nix/configuration/roles/base/files/rsync_clone.bash
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Wrapper to set rsync flags for cloning a folder preserving attributes
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
exec rsync -aHAXS "$@"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
# If you want to use JACK applications, uncomment this
|
# If you want to use JACK applications, uncomment this
|
||||||
#jack.enable = true;
|
#jack.enable = true;
|
||||||
|
|
||||||
extraLv2Packages = [ pkgs.rnnoise-plugin ];
|
extraLadspaPackages = [ pkgs.rnnoise-plugin.ladspa ];
|
||||||
configPackages = [
|
configPackages = [
|
||||||
(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/99-input-denoising.conf" ''
|
(pkgs.writeTextDir "share/pipewire/pipewire.conf.d/99-input-denoising.conf" ''
|
||||||
context.modules = [
|
context.modules = [
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
{
|
{
|
||||||
type = ladspa
|
type = ladspa
|
||||||
name = rnnoise
|
name = rnnoise
|
||||||
plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"
|
plugin = "librnnoise_ladspa"
|
||||||
label = noise_suppressor_mono
|
label = noise_suppressor_mono
|
||||||
control = {
|
control = {
|
||||||
"VAD Threshold (%)" = 50.0
|
"VAD Threshold (%)" = 50.0
|
||||||
|
|||||||
Reference in New Issue
Block a user