nix-config/users/common/default.nix

114 lines
2.2 KiB
Nix
Raw Normal View History

2023-01-21 17:30:50 +01:00
{
2023-01-21 17:46:50 +01:00
config,
pkgs,
...
}: {
imports = [
2023-02-07 21:37:02 +01:00
#./zsh.nix
2023-02-10 18:44:07 +01:00
./shells/fish.nix
./programs/htop.nix
./shells/alias.nix
];
2023-01-21 17:30:50 +01:00
2023-01-21 17:46:50 +01:00
home.packages = with pkgs; [
sqlite
bat
ripgrep
killall
2023-01-21 17:46:50 +01:00
];
2023-01-21 17:30:50 +01:00
2023-01-22 14:17:51 +01:00
# has to be enabled to support zsh reverse search
programs.fzf.enable = true;
2023-01-21 17:46:50 +01:00
programs.gpg = {
enable = true;
settings = import ../../data/gpg/gpg.conf.nix;
2023-01-21 17:46:50 +01:00
scdaemonSettings.disable-ccid = true;
publicKeys = [
{
2023-01-21 21:56:47 +01:00
source = ../../data/gpg/pubkey.gpg;
2023-01-21 17:46:50 +01:00
trust = 5;
}
{
2023-01-21 21:56:47 +01:00
source = ../../data/gpg/newpubkey.gpg;
2023-01-21 17:46:50 +01:00
trust = 5;
}
];
};
2023-01-21 23:17:48 +01:00
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
'';
2023-01-21 23:17:48 +01:00
programs.ssh = {
enable = true;
matchBlocks = let
identityFile = ["~/.ssh/1.pub" "~/.ssh/2.pub"];
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;
};
"*.lel.lol" = {
inherit identityFile;
};
"localhost" = {
inherit identityFile;
};
2023-02-04 21:23:43 +01:00
"gitlab.lrz.de" = {
inherit identityFile;
};
"*" = {
identitiesOnly = true;
};
};
2023-01-21 23:17:48 +01:00
};
2023-01-21 17:46:50 +01:00
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
withNodeJs = true;
};
xdg.configFile.nvim = {
recursive = true;
source = ../../data/nvim;
};
2023-01-22 14:17:51 +01:00
2023-01-21 17:46:50 +01:00
programs.git.enable = true;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
2023-01-21 17:30:50 +01:00
2023-01-21 18:14:41 +01:00
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;
};
2023-01-21 17:46:50 +01:00
};
2023-01-21 17:30:50 +01:00
}