1{
2 pkgs,
3 lib,
4 config,
5 self,
6 ...
7}: {
8 config = lib.mkIf config.myUsers.ayla.enable {
9 users.users.ayla = {
10 description = "Ayla";
11 isNormalUser = true;
12 extraGroups = config.myUsers.defaultGroups;
13 hashedPasswordFile = config.myUsers.ayla.passwordFile;
14
15 openssh.authorizedKeys.keyFiles =
16 lib.map (file: "${self.inputs.secrets}/publicKeys/${file}")
17 # right now this config is fine but if i ever get another machine i daily drive or a build server i need to do something else here
18 (lib.filter (file:
19 if config.networking.hostName == "morgana"
20 then "ayla_m23.pub" == file
21 else (lib.elem file ["ayla_morgana.pub" "ayla_23.pub"]))
22 (builtins.attrNames (builtins.readDir "${self.inputs.secrets}/publicKeys")));
23
24 uid = 1000;
25 shell = pkgs.fish;
26 };
27 };
28}