nix-config/users/common/default.nix

103 lines
1.7 KiB
Nix

{
config,
pkgs,
...
}: {
imports = [
./zsh.nix
];
home.packages = with pkgs; [
sqlite
bat
ripgrep
killall
fzf
];
programs.gpg = {
enable = true;
settings = import ../../data/gpg/gpg.conf.nix;
scdaemonSettings.disable-ccid = true;
publicKeys = [
{
source = ../../data/gpg/pubkey.gpg;
trust = 5;
}
{
source = ../../data/gpg/newpubkey.gpg;
trust = 5;
}
];
};
home.file.".ssh/1.pub".text = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDZixkix0KfKuq7Q19whS5FQQg51/AJGB5BiNF/7h/LM cardno:15 489 049
'';
home.file.".ssh/2.pub".text = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxD4GOrwrBTG4/qQhm5hoSB2CP7W9g1LPWP11oLGOjQ cardno:23 010 997
'';
programs.ssh = {
enable = true;
matchBlocks =
let
identityFile = [ "~/.ssh/1" "~/.ssh/2" ];
in
{
"elisabeth" = {
hostname = "lel.lol";
user = "root";
inherit identityFile;
};
"valhalla" = {
hostname = "valhalla.fs.tum.de";
user = "grossmann";
inherit identityFile;
};
"elisabethprivate" = {
hostname = "lel.lol";
user = "patrick";
inherit identityFile;
};
"*" = {
identitiesOnly = true;
};
};
};
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
withNodeJs = true;
};
xdg.configFile.nvim = {
recursive = true;
source = ../../data/nvim;
};
programs.git.enable = true;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
programs.git = {
aliases = {
cs = "commit -v -S";
s = "status";
a = "add";
p = "push";
};
extraConfig.init.defaultBranch = "main";
extraConfig.pull.ff = "only";
signing = {
key = null;
signByDefault = true;
};
};
}