feat: create backups module
We currently have backups via a shell script on the machine
vermilion.bravo. Unfortunately, we can't activate these backups without
setting up a user, and that wasn't done yet for teal.
This commit adds backups, and also enforces their activation by failing
to evaluate if a backups key has not been provided and backups have not
been explicitly disabled.
Change-Id: Ia37bd13cb8de6e20cc77e735630a59cb0c5d0fb4
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/756
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/nixos/clicks/users/default.nix b/modules/nixos/clicks/users/default.nix
index 4e169ce..798d98b 100644
--- a/modules/nixos/clicks/users/default.nix
+++ b/modules/nixos/clicks/users/default.nix
@@ -10,10 +10,17 @@
}:
{
options = {
- clicks.users.deployers = lib.mkOption {
- type = lib.types.listOf lib.types.str;
- default = [ ];
- description = "Users who should be allowed to deploy to this server. They will be given passwordless access to run commands as root";
+ clicks.users = {
+ deployers = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default = [ ];
+ description = "Users who should be allowed to deploy to this server. They will be given passwordless access to run commands as root";
+ };
+ backups = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default = [ ];
+ description = "Accounts used to create snapshots to backup this server. They will be given passwordless access to run commands as root";
+ };
};
};
}