refactor: major structural changes

git updates

update tmux conf

add ansible tools

squash me

squash

fix: get git aliases from plugin

virt stuff

add devenv

some virt updates

kubernetes
This commit is contained in:
Glen Goodwin 2023-11-22 16:33:30 -05:00
parent 2e8c1eec90
commit 2220c4e917
87 changed files with 1963 additions and 2261 deletions

View file

@ -0,0 +1,45 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.programs.discord;
discordPatcherBin = pkgs.writers.writePython3Bin "discord-krisp-patcher" {
libraries = with pkgs.python3Packages; [pyelftools capstone];
flakeIgnore = [
"E265" # from nix-shell shebang
"E501" # line too long (82 > 79 characters)
"F403" # 'from module import *' used; unable to detect undefined names
"F405" # name may be undefined, or defined from star imports: module
];
} (builtins.readFile ./krisp-patcher.py);
wrapDiscordBinary = pkgs.writeShellScriptBin "discord" ''
${pkgs.findutils}/bin/find -L $HOME/.config/discord -name 'discord_krisp.node' -exec ${discordPatcherBin}/bin/discord-krisp-patcher {} +
${pkgs.discord}/bin/discord "$@"
'';
discord = pkgs.discord.override {
# Performance mod
withOpenASAR = true;
# link fix
nss = pkgs.nss_latest;
};
in {
options.programs.discord = {
enable = lib.mkEnableOption "Discord";
wrapDiscord = lib.mkEnableOption "wrap the Discord binary with a patching each time";
};
config = lib.mkIf cfg.enable {
home.packages =
[discordPatcherBin]
++ (
if cfg.wrapDiscord
then [wrapDiscordBinary]
else [pkgs.discord]
);
};
}