2024-12-27 21:02:32 -08:00
|
|
|
{ config, pkgs, ... }:
|
2024-12-25 19:47:59 -08:00
|
|
|
{
|
2024-12-27 19:26:51 -08:00
|
|
|
|
|
|
|
imports = [
|
|
|
|
./secrets
|
|
|
|
./neomutt.nix
|
|
|
|
];
|
|
|
|
|
2024-12-25 19:47:59 -08:00
|
|
|
home = {
|
|
|
|
username = "youwen";
|
|
|
|
homeDirectory = "/home/youwen";
|
|
|
|
};
|
|
|
|
|
|
|
|
liminalOS = {
|
|
|
|
utils.easyeffects.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
userName = "Youwen Wu";
|
|
|
|
userEmail = "youwenw@gmail.com";
|
|
|
|
signing = {
|
|
|
|
signByDefault = true;
|
2024-12-27 19:26:51 -08:00
|
|
|
key = "8F5E6C1AF90976CA7102917A865658ED1FE61EC3";
|
2024-12-27 18:03:08 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-28 01:17:48 -08:00
|
|
|
# must set identitiesOnly since we are adding a ton of SSH keys to ssh-agent and it tries all of them
|
2024-12-27 19:26:51 -08:00
|
|
|
programs.ssh = {
|
2024-12-27 18:03:08 -08:00
|
|
|
enable = true;
|
2024-12-27 19:26:51 -08:00
|
|
|
matchBlocks = {
|
|
|
|
"code.youwen.dev" = {
|
|
|
|
host = "code.youwen.dev";
|
2024-12-27 20:41:02 -08:00
|
|
|
# port = 222;
|
2024-12-27 19:34:38 -08:00
|
|
|
identityFile = config.age.secrets.youwen_dev_ssh_priv_key.path;
|
2024-12-28 01:17:48 -08:00
|
|
|
identitiesOnly = true;
|
2024-12-27 18:03:08 -08:00
|
|
|
};
|
2024-12-27 19:26:51 -08:00
|
|
|
"github" = {
|
|
|
|
host = "github.com";
|
|
|
|
identityFile = config.age.secrets.github_ssh_priv_key.path;
|
2024-12-28 01:17:48 -08:00
|
|
|
identitiesOnly = true;
|
2024-12-27 18:03:08 -08:00
|
|
|
};
|
2024-12-27 20:41:02 -08:00
|
|
|
"gallium" = {
|
|
|
|
host = "gallium";
|
|
|
|
port = 222;
|
|
|
|
identityFile = config.age.secrets.gallium_server_ssh.path;
|
2024-12-28 01:17:48 -08:00
|
|
|
identitiesOnly = true;
|
2024-12-27 20:41:02 -08:00
|
|
|
};
|
2024-12-27 21:20:34 -08:00
|
|
|
"truth.youwen.dev" = {
|
|
|
|
host = "truth.youwen.dev";
|
|
|
|
port = 222;
|
2024-12-28 01:17:48 -08:00
|
|
|
identitiesOnly = true;
|
2024-12-27 21:20:34 -08:00
|
|
|
identityFile = config.age.secrets.gallium_server_ssh.path;
|
|
|
|
};
|
2024-12-25 19:47:59 -08:00
|
|
|
};
|
2024-12-27 20:50:24 -08:00
|
|
|
addKeysToAgent = "yes";
|
2024-12-25 19:47:59 -08:00
|
|
|
};
|
2024-12-27 21:02:32 -08:00
|
|
|
|
|
|
|
# text/html; ~/.mutt/view_attachment.sh %s html; test=test -n "$DISPLAY"
|
|
|
|
home.file.".mailcap".text = ''
|
|
|
|
text/html; ${pkgs.w3m}/bin/w3m %s; nametemplate=%s.html; needsterminal
|
|
|
|
text/html; ${pkgs.w3m}/bin/w3m -v -F -T text/html -dump %s; copiousoutput
|
|
|
|
'';
|
2024-12-28 23:56:09 -08:00
|
|
|
|
|
|
|
programs.fish.functions = {
|
|
|
|
vault = ''
|
|
|
|
set vault_dir $HOME/Documents/vaults/vault
|
|
|
|
|
|
|
|
if test -d $vault_dir
|
|
|
|
cd $vault_dir
|
|
|
|
git pull
|
|
|
|
vim
|
|
|
|
else
|
|
|
|
echo "Vault is not yet cloned. Cloning repository now."
|
|
|
|
mkdir -p $HOME/Documents/vaults
|
|
|
|
cd $HOME/Documents/vaults
|
|
|
|
git clone git@code.youwen.dev:youwen5/vault.git
|
|
|
|
cd $vault_dir
|
|
|
|
vim
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
};
|
2024-12-25 19:47:59 -08:00
|
|
|
}
|