blob: 84446582ecb2410b736ea4e86d0ada966559f665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
{ flake, home-manager, userName, pkgs, customUtils, lib, ... }:
let
homeManagerRelease = lib.importJSON (home-manager + /release.json);
in {
imports = with flake.nixosModules.userProfiles.${userName}; [
utils direnv
];
users.users.${userName} = {
description = "Gregor Kleen";
extraGroups = [ "wheel" "networkmanager" "lp" "dialout" "audio" "video" "xmpp" "mail" "ssh" "vboxusers" "libvirtd" "wireshark" "games" "webdav"];
createHome = true;
home = "/home/${userName}";
shell = "${pkgs.zsh}/bin/zsh";
isNormalUser = true;
openssh.authorizedKeys.keyFiles = let dir = ./authorized-keys; in lib.mapAttrsToList (n: _: dir + "/${n}") (builtins.readDir dir);
hashedPassword = "$6$rounds=500000$dOMgCU7DAk$yQFYGOURTEt12387LIYBnFKSWmtwXMUk1LJWnV0m7OFt.y2TnxQn2abdGA5dhwG9EmMB5wZGXf4J5F71c746C/";
};
home-manager.users.${userName} = { config, ... }: lib.foldr lib.recursiveUpdate {} ([
{
home.keyboard = {
layout = "us";
variant = "dvp";
options = [ "ctl:nocaps" "compose:caps" ];
};
programs = {
git.enable = true;
ssh.enable = true;
gpg.enable = true;
};
}
] ++ (lib.optional (lib.versionAtLeast homeManagerRelease.release "25.11") {
programs = {
git.settings = {
user = {
email = "gkleen@yggdrasil.li";
name = "Gregor Kleen";
};
core.excludesfile = toString ./gitignore;
pull.rebase = true;
submodule.recurse = true;
init.defaultBranch = "main";
column.ui = "auto";
branch.sort = "-committerdate";
tag.sort = "version:refname";
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = true;
renames = true;
};
push = {
default = "simple";
autoSetupRemote = true;
followTags = true;
};
fetch = {
prune = true;
pruneTags = true;
all = true;
};
rerere = {
enabled = true;
autoupdate = true;
};
rebase = {
autoSquash = true;
autoStash = true;
updateRefs = true;
};
merge.conflictstyle = "zdiff3";
};
delta = {
enable = true;
enableGitIntegration = true;
};
ssh = {
enableDefaultConfig = false;
matchBlocks."*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlPath = "~/.ssh/master-%r@%n:%p";
controlMaster = "auto";
controlPersist = "30m";
serverAliveInterval = 6;
serverAliveCountMax = 10;
hashKnownHosts = true;
identitiesOnly = true;
};
};
};
}));
}
|