@@ -37,8 +37,6 @@ with lib;
37
37
38
38
# headfull main user is essentially an admin, reflect that by giving it the
39
39
# wheel group
40
- # TODO, XXX, TOFIX: the shadows are probably written in the nix store, do we
41
- # care about that?
42
40
users . users . ${ config . navi . username } = {
43
41
extraGroups = [ "wheel" ] ;
44
42
hashedPassword = fileContents ./../secrets/headfull/assets/shadow/main ;
@@ -58,11 +56,37 @@ with lib;
58
56
jack . enable = true ;
59
57
} ;
60
58
59
+
60
+ age . secrets . gpg-key = {
61
+ path = "/home/${ config . navi . username } /.config/gnupg/key.gpg" ;
62
+ owner = config . navi . username ;
63
+ } ;
64
+
65
+ # store our distbuild key so we can login to our infra
66
+ age . secrets . ssh-distbuild = {
67
+ path = "/etc/distbuild_ssh" ;
68
+ owner = "0" ;
69
+ group = "0" ;
70
+ mode = "0400" ;
71
+ } ;
72
+
73
+ age . secrets . ssh-navi = {
74
+ path = "/etc/navi_ssh" ;
75
+ owner = "0" ;
76
+ group = "0" ;
77
+ mode = "0400" ;
78
+ } ;
79
+
80
+ age . secrets . ssh-navi-2 = {
81
+ path = "/home/${ config . navi . username } /.ssh/id_ed25519" ;
82
+ owner = config . navi . username ;
83
+ mode = "0400" ;
84
+ } ;
85
+
86
+
61
87
# we setup the personal ssh and gpg key of our headfull user
62
88
home-manager . users . ${ config . navi . username } = {
63
- home . file . ".config/gnupg/key.gpg" . source = ./../secrets/headfull/assets/gpg/key.gpg ;
64
89
home . file . ".config/gnupg/trust.txt" . source = ./../secrets/headfull/assets/gpg/gpg-trust.txt ;
65
- home . file . ".ssh/id_ed25519" . source = ./../secrets/headfull/assets/ssh/navi ;
66
90
home . file . ".ssh/id_ed25519.pub" . source = ./../secrets/common/assets/ssh/navi.pub ;
67
91
68
92
home . file . ".config/gnupg/gpg.conf" . text = ''
@@ -71,21 +95,6 @@ with lib;
71
95
'' ;
72
96
} ;
73
97
74
- environment . etc . "navi_ssh" = {
75
- text = builtins . readFile ./../secrets/headfull/assets/ssh/navi ;
76
- mode = "0400" ;
77
- uid = 0 ;
78
- gid = 0 ;
79
- } ;
80
-
81
- # store our distbuild key so we can login to our infra
82
- environment . etc . "distbuild_ssh" = {
83
- text = builtins . readFile ./../secrets/headfull/assets/ssh/distbuild ;
84
- mode = "0400" ;
85
- uid = 0 ;
86
- gid = 0 ;
87
- } ;
88
-
89
98
# setup the distbuild account; while this might look like a backdoor for
90
99
# lesser privilege devices the distbuild access key is only given to at
91
100
# least headfull devices, thus headless devices cannot ssh into headfull.
0 commit comments