config/shared/home/default.nix

135 lines
2.7 KiB
Nix
Raw Normal View History

{
2023-10-09 17:17:24 +03:00
lib,
pkgs,
2023-10-06 11:32:22 +03:00
stateVersion,
2023-10-06 14:32:52 +03:00
email,
2023-12-11 20:05:32 +02:00
fullDesktop,
2023-10-27 10:31:00 +03:00
hmOnly,
...
}: {
home = {
2023-10-06 11:32:22 +03:00
inherit stateVersion;
username = "motiejus";
homeDirectory = "/home/motiejus";
};
2023-10-23 09:48:14 +03:00
home.packages = with pkgs;
2023-10-27 10:31:00 +03:00
(
2023-12-11 20:05:32 +02:00
if fullDesktop
2023-10-27 10:31:00 +03:00
then [
go
zigpkgs."0.11.0"
]
else []
)
++ (
if hmOnly
then [
ncdu
tokei
2023-12-07 10:24:58 +02:00
scrcpy
yt-dlp
2023-10-27 10:31:00 +03:00
vimv-rs
hyperfine
]
else []
);
2023-11-27 18:17:27 +02:00
programs = {
direnv.enable = true;
2023-12-11 20:05:32 +02:00
firefox = lib.mkIf fullDesktop {
enable = true;
profiles = {
xdefault = {
isDefault = true;
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.contentblocking.category" = "strict";
"browser.urlbar.showSearchSuggestionsFirst" = false;
"layout.css.prefers-color-scheme.content-override" = 0;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
ublock-origin
consent-o-matic
joplin-web-clipper
multi-account-containers
];
};
};
};
2023-11-27 18:17:27 +02:00
neovim = lib.mkMerge [
{
enable = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins;
[
fugitive
2023-10-09 17:17:24 +03:00
]
2023-11-27 18:17:27 +02:00
++ (
2023-12-11 20:05:32 +02:00
if fullDesktop
2023-11-27 18:17:27 +02:00
then [
vim-go
zig-vim
]
else []
);
extraConfig = builtins.readFile ./vimrc;
}
2023-12-11 20:05:32 +02:00
(lib.mkIf fullDesktop {
2023-11-27 18:17:27 +02:00
extraLuaConfig =
builtins.readFile
(pkgs.substituteAll {
src = ./dev.lua;
inherit (pkgs) gotools;
})
.outPath;
})
];
2023-10-06 14:52:44 +03:00
2023-11-27 18:17:27 +02:00
git = {
enable = true;
userEmail = email;
userName = "Motiejus Jakštys";
aliases.yolo = "commit --amend --no-edit -a";
extraConfig = {
rerere.enabled = true;
pull.ff = "only";
merge.conflictstyle = "diff3";
init.defaultBranch = "main";
};
};
gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
{
source = ./motiejus-gpg.txt;
trust = "ultimate";
}
];
};
tmux = {
enable = true;
keyMode = "vi";
historyLimit = 1000000;
extraConfig = ''
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
'';
};
2023-10-06 14:52:44 +03:00
};
}