diff options
Diffstat (limited to 'users/root.nix')
-rw-r--r-- | users/root.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/users/root.nix b/users/root.nix new file mode 100644 index 00000000..be331141 --- /dev/null +++ b/users/root.nix | |||
@@ -0,0 +1,52 @@ | |||
1 | { flake, lib, config, hostName, userName, pkgs, ... }: | ||
2 | let | ||
3 | haveGKleen = flake.nixosModules.accounts ? "gkleen@${hostName}"; | ||
4 | in { | ||
5 | imports = with flake.nixosModules.userProfiles.${userName}; [ | ||
6 | zsh tmux direnv utils | ||
7 | ]; | ||
8 | |||
9 | users.users.${userName} = lib.mkIf haveGKleen { | ||
10 | inherit (config.users.users."gkleen") hashedPassword shell; | ||
11 | openssh.authorizedKeys.keyFiles = config.users.users."gkleen".openssh.authorizedKeys.keyFiles; | ||
12 | }; | ||
13 | |||
14 | home-manager.users.${userName} = { | ||
15 | programs = { | ||
16 | git = { | ||
17 | enable = true; | ||
18 | userEmail = "gkleen@yggdrasil.li"; | ||
19 | userName = "Gregor Kleen"; | ||
20 | delta.enable = true; | ||
21 | extraConfig = { | ||
22 | pull.rebase = false; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | ssh = { | ||
27 | enable = true; | ||
28 | controlMaster = "auto"; | ||
29 | controlPersist = "30m"; | ||
30 | serverAliveInterval = 6; | ||
31 | hashKnownHosts = true; | ||
32 | extraConfig = '' | ||
33 | IdentitiesOnly true | ||
34 | ServerAliveCountMax 10 | ||
35 | ''; | ||
36 | }; | ||
37 | |||
38 | gpg.enable = true; | ||
39 | }; | ||
40 | |||
41 | services = { | ||
42 | gpg-agent = { | ||
43 | enable = true; | ||
44 | enableSshSupport = true; | ||
45 | extraConfig = '' | ||
46 | pinentry-program ${pkgs.pinentry-curses}/bin/pinentry | ||
47 | grab | ||
48 | ''; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
52 | } | ||