1{
2 lib,
3 config,
4 pkgs,
5 self,
6 ...
7}: {
8 imports = [
9 ./ayla
10 ./options.nix
11 ];
12
13 config = lib.mkIf (config.myUsers.root.enable or config.myUsers.ayla) {
14 programs.fish.enable = true;
15
16 users = {
17 defaultUserShell = pkgs.fish;
18 mutableUsers = false;
19
20 users.root.openssh.authorizedKeys.keyFiles =
21 lib.map (file: "${self.inputs.secrets}/publicKeys/${file}")
22 # 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
23 (lib.filter (file:
24 if config.networking.hostName == "morgana"
25 then "ayla_m23.pub" == file
26 else (lib.elem file ["ayla_morgana.pub" "ayla_23.pub"]))
27 (builtins.attrNames (builtins.readDir "${self.inputs.secrets}/publicKeys")));
28 };
29 };
30}