sam: Add home-manager

This also imports most of the home-manager config from oscar.
This commit is contained in:
Chandler Swift 2025-07-09 16:01:49 -05:00
parent b2f44b7d17
commit 41de43403a
No known key found for this signature in database
GPG key ID: B123483B24A4D579

View file

@ -4,6 +4,7 @@
imports =
[
./hardware-configuration.nix
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz}/nixos")
];
# https://discourse.nixos.org/t/github-strategies-for-configuration-nix/1983/14
@ -64,16 +65,86 @@
isNormalUser = true;
description = "Chandler Swift";
extraGroups = [ "networkmanager" "wheel" "docker"];
packages = with pkgs; [
};
home-manager.users.chandler = { pkgs, ... }: {
home.packages = with pkgs; [
kdePackages.kate
];
programs.bash = {
enable = true;
historyControl = [ "ignoredups" "ignorespace" ];
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userEmail = "chandler@chandlerswift.com";
userName = "Chandler Swift";
lfs.enable = true;
# TODO: delta or diff-so-fancy or difftastic
extraConfig = {
init.defaultBranch = "main";
pull.ff = "only";
url."https://aur.archlinux.org/".insteadOf = "aur:";
url."ssh://aur@aur.archlinux.org/".pushInsteadOf = "aur:";
url."ssh://git@github.com/ChandlerSwift/".insteadOf = "gh:";
url."ssh://forgejo@bert/chandlerswift/".insteadOf = "forgejo:";
push.autoSetupRemote = true;
rebase.autosquash = true;
rebase.autostash = true;
fetch.parallel = 0; # "some reasonable default"
};
ignores = [
"*.kate-swp"
"*.swp"
"*~"
"\\#*\\#"
"venv"
".direnv"
];
hooks = {
pre-commit = ../git-pre-commit-hook;
};
signing.signByDefault = true;
signing.key = null; # "let GnuPG decide what signing key to use depending on commit's author"
};
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
includes = [
"config.d/*"
];
};
programs.firefox.enable = true;
programs.chromium = {
enable = true;
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin
];
};
programs.atuin = {
enable = true;
flags = [
"--disable-up-arrow"
];
};
home.stateVersion = "25.05";
};
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "chandler";
programs.firefox.enable = true;
virtualisation.docker.enable = true;
environment.systemPackages = with pkgs; [