config/shared/home/default.nix

94 lines
1.5 KiB
Nix
Raw Normal View History

{
pkgs,
2023-10-06 11:32:22 +03:00
stateVersion,
2023-10-06 14:32:52 +03:00
email,
2023-10-08 23:00:39 +03:00
devEnvironment,
...
}: {
home = {
2023-10-06 11:32:22 +03:00
inherit stateVersion;
username = "motiejus";
homeDirectory = "/home/motiejus";
};
2023-10-08 23:00:39 +03:00
home.packages =
if devEnvironment
then
(with pkgs; [
go
2023-10-09 12:15:07 +03:00
zigpkgs."0.11.0"
2023-10-08 23:00:39 +03:00
scala_2_12
2023-10-09 16:05:48 +03:00
metals
2023-10-08 23:00:39 +03:00
coursier
])
else [];
programs.direnv.enable = true;
programs.neovim = {
enable = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
2023-10-08 23:00:39 +03:00
plugins = with pkgs.vimPlugins;
[
fugitive
]
++ (
if devEnvironment
then [
vim-go
zig-vim
2023-10-09 16:05:48 +03:00
cmp-nvim-lsp
nvim-cmp
2023-10-08 23:00:39 +03:00
nvim-metals
plenary-nvim
]
else []
);
2023-10-09 16:05:48 +03:00
extraLuaConfig =
builtins.readFile
(pkgs.substituteAll {
src = ./init.lua;
inherit (pkgs) metals;
2023-10-09 16:30:46 +03:00
javaHome = pkgs.jdk.home;
2023-10-09 16:05:48 +03:00
})
.outPath;
};
programs.git = {
enable = true;
2023-10-06 14:32:52 +03:00
userEmail = email;
userName = "Motiejus Jakštys";
aliases.yolo = "commit --amend --no-edit -a";
extraConfig = {
rerere.enabled = true;
pull.ff = "only";
merge.conflictstyle = "diff3";
};
};
programs.gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
{
source = ./motiejus-gpg.txt;
trust = "ultimate";
}
];
};
2023-10-06 14:52:44 +03:00
programs.tmux = {
enable = true;
keyMode = "vi";
2023-10-09 09:42:11 +03:00
historyLimit = 1000000;
2023-10-06 14:52:44 +03:00
};
}