Skyler Grey | eebf2d2 | 2024-06-06 21:24:07 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2024 Clicks Codes |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-3.0-only |
| 4 | |
| 5 | { lib, config, ... }: |
| 6 | { |
| 7 | options = { |
| 8 | clicks.users.coded.enable = lib.mkOption { |
| 9 | type = lib.types.bool; |
Skyler Grey | 4bf2de5 | 2024-07-29 17:55:05 +0000 | [diff] [blame^] | 10 | default = config.clicks.defaults.enable; |
Skyler Grey | eebf2d2 | 2024-06-06 21:24:07 +0000 | [diff] [blame] | 11 | }; |
| 12 | }; |
| 13 | |
| 14 | config = lib.mkIf config.clicks.users.coded.enable { |
| 15 | nix.settings.trusted-users = [ "coded" ]; |
| 16 | clicks.users.deployers = [ "coded" ]; |
| 17 | |
| 18 | users.users.coded = { |
| 19 | isNormalUser = true; |
| 20 | group = "coded"; |
| 21 | |
| 22 | openssh.authorizedKeys.keys = [ |
| 23 | "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAILrwKN4dJQ0BiLmjsA/66QHhu06+JyokWtHkLcjhWU79AAAABHNzaDo= coded@5CNFC" |
| 24 | "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIOMSUqXuH1bQZJc9rLV0H7/UY0c2BlkzAKWkwrXFWbQ7AAAABHNzaDo= coded@5CNano" |
| 25 | ]; |
| 26 | }; |
| 27 | |
| 28 | users.groups.coded = { }; |
| 29 | }; |
| 30 | } |