refactor in style of synaptic standard

This commit is contained in:
atagen 2025-07-20 23:35:43 +10:00
parent ce295da1c1
commit 2fa2ecce0c
119 changed files with 1099 additions and 3109 deletions

View file

@ -1,126 +0,0 @@
{
pkgs,
lib,
rice,
...
}:
let
getPkgs = builtins.attrValues;
in
{
# imports = [
# ../programs/vscode.nix
# ];
home.packages =
getPkgs {
inherit (pkgs)
direnv
;
}
++ [
# from https://gist.github.com/mikeboiko/58ab730afd65bca0a125bc12b6f4670d
(pkgs.writeTextFile {
name = "rbw-helper";
text = ''
declare -A params
if [ "x$1" == "xget" ]; then
read line
while [ -n "$line" ]; do
key=$\{line%%=*}
value=$\{line#*=}
params[$key]=$value
read line
done
if [ "x$\{params['protocol']}" != "xhttps" ]; then
exit
fi
if [ -z "$\{params["host"]}" ]; then
exit
fi
rbw ls > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Please login to rbw to use git credential helper" > /dev/stderr
exit
fi
user=`rbw get --full $\{params["host"]} | grep "Username:" | cut -d' ' -f2-`
pass=`rbw get $\{params["host"]}`
if [ "x$user" == "x" ] || [ "x$pass" == "x" ]; then
echo "Couldn't find host in rbw DB." > /dev/stderr
exit
fi
echo username=$user
echo password=$pass
fi
'';
executable = true;
destination = "/bin/git-credential-rw";
})
];
programs.zed-editor = {
enable = false;
extensions = [
"nix"
"rust"
"ocaml"
"kanagawa-themes"
];
userSettings = {
features = {
copilot = false;
};
buffer_font_family = rice.fonts.monospace.name;
buffer_font_size = rice.fonts.monospace.size;
theme = {
mode = "dark";
dark = "Kanagawa Dragon";
};
telemetry = {
metrics = false;
diagnostics = false;
};
vim_mode = true;
assistant = {
default_model = {
provider = "ollama";
model = "llama3.2";
};
inline_alternatives = {
provider = "ollama";
model = "starcoder2:3b";
};
};
language_models = {
ollama = {
api_url = "http://localhost:11434";
};
};
};
};
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
enableFishIntegration = true;
};
programs.git = {
enable = true;
userName = "atagen";
userEmail = "boss@atagen.co";
extraConfig = {
credential.helper = "rbw";
};
};
}