summaryrefslogtreecommitdiff
path: root/users/root.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/root.nix')
-rw-r--r--users/root.nix29
1 files changed, 26 insertions, 3 deletions
diff --git a/users/root.nix b/users/root.nix
index 95fe37c4..c6e7d712 100644
--- a/users/root.nix
+++ b/users/root.nix
@@ -1,7 +1,30 @@
1{ flake, lib, config, hostName, ... }: 1{ flake, lib, config, hostName, userName, pkgs, ... }:
2{ 2let
3 users.users.root = lib.mkIf (flake.nixosModules.accounts ? "gkleen@${hostName}") { 3 haveGKleen = flake.nixosModules.accounts ? "gkleen@${hostName}";
4in {
5 imports = with flake.nixosModules.userProfiles.${userName}; [
6 zsh tmux utils
7 ];
8
9 users.users.${userName} = lib.mkIf haveGKleen {
4 inherit (config.users.users."gkleen") hashedPassword shell; 10 inherit (config.users.users."gkleen") hashedPassword shell;
5 openssh.authorizedKeys.keyFiles = config.users.users."gkleen".openssh.authorizedKeys.keyFiles; 11 openssh.authorizedKeys.keyFiles = config.users.users."gkleen".openssh.authorizedKeys.keyFiles;
6 }; 12 };
13
14 home-manager.users.${userName} = {
15 programs = lib.mkIf haveGKleen {
16 inherit (config.home-manager.users.gkleen.programs) git ssh gpg;
17 };
18
19 services = {
20 gpg-agent = {
21 enable = true;
22 enableSshSupport = true;
23 extraConfig = ''
24 pinentry-program ${pkgs.pinentry-curses}/bin/pinentry
25 grab
26 '';
27 };
28 };
29 };
7} 30}