nixos-framework-laptop-config/home/default.nix
2024-12-28 19:33:49 -05:00

103 lines
2.5 KiB
Nix

{
config,
pkgs,
inputs,
osConfig,
...
}: let
variables = {
# VISUAL = "emacs";
EDITOR = "nvim";
SSH_ASKPASS_REQUIRE = "prefer";
SSH_ASKPASS = "${pkgs.ksshaskpass}/bin/ksshaskpass";
};
in {
imports = [
./xdg.nix
./terminal.nix
./desktop.nix
# ./emacs.nix
./apps.nix
];
home.sessionVariables = variables;
systemd.user.sessionVariables = variables;
fonts.fontconfig.enable = true;
xdg.enable = true;
home.packages = with pkgs; [
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
];
programs.git = {
enable = true;
delta = {
enable = true;
options = {
side-by-side = true;
};
};
# WISH: Figure out difftastic
# difftastic.enable = true;
# https://difftastic.wilfred.me.uk/git.html
# https://tsdh.org/posts/2022-08-01-difftastic-diffing-with-magit.html
userEmail = "git@evar.dev";
userName = "Evar";
extraConfig = {
init.defaultBranch = "main";
# Consider https://jvns.ca/blog/2024/02/16/popular-git-config-options/#pull-ff-only-or-pull-rebase-true
# Make merge conflicts more readable
merge.conflictstyle = "zdiff3";
rebase.autosquash = true;
rebase.autostash = true;
# Consider https://jvns.ca/blog/2024/02/16/popular-git-config-options/#push-default-simple-push-default-current-push-autosetupremote-true
# Add whole commit diff in text editor when writing commit message
#commit.verbose = true;
# Remember how merge conflicts were resolved to restore later
rerere.enabled = true;
# Better diffs
diff.algorithm = "histogram";
status.submoduleSummary = true;
diff.submodule = "log";
submodule.recurse = true;
merge.keepbackup = false;
#merge.tool = "${pkgs.meld}/bin/meld";
};
};
# programs.ssh
programs.ssh = {
enable = true;
addKeysToAgent = "1h";
};
services.ssh-agent.enable = true;
programs.yt-dlp.enable = true;
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.11";
# Let Home Manager install and manage itself.
#programs.home-manager.enable = true;
}