feat(a1d1): init
Co-Authored-By: Samuel Shuert <coded@clicks.codes>
Change-Id: Iaf1499b8cde6d3f6bdb024374f6830d582006aeb
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/720
Tested-by: Samuel Shuert <coded@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/nixos/clicks/users/minion/default.nix b/modules/nixos/clicks/users/minion/default.nix
new file mode 100644
index 0000000..7b3c2ee
--- /dev/null
+++ b/modules/nixos/clicks/users/minion/default.nix
@@ -0,0 +1,31 @@
+# SPDX-FileCopyrightText: 2024 Clicks Codes
+#
+# SPDX-License-Identifier: GPL-3.0-only
+
+{ lib, config, ... }:
+{
+ options = {
+ clicks.users.minion.enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf config.clicks.users.minion.enable {
+ nix.settings.trusted-users = [ "minion" ];
+ clicks.users.deployers = [ "minion" ];
+
+ users.users.minion = {
+ isNormalUser = true;
+ group = "minion";
+
+ openssh.authorizedKeys.keys = [
+ "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIIteIdlZv52nUDxW2SUsoJ2NZi/w9j1NZwuHanQ/o/DuAAAAHnNzaDpjb2xsYWJvcmFfeXViaWtleV9yZXNpZGVudA== collabora_yubikey_resident"
+ "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJRzQbQjXFpHKtt8lpNKmoNx57+EJ/z3wnKOn3/LjM6cAAAAFXNzaDppeXViaWtleV9yZXNpZGVudA== iyubikey_resident"
+ "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIOhzJ0p9bFRSURUjV05rrt5jCbxPXke7juNbEC9ZJXS/AAAAGXNzaDp0aW55X3l1YmlrZXlfcmVzaWRlbnQ= tiny_yubikey_resident"
+ ];
+ };
+
+ users.groups.minion = { };
+ };
+}