2022-07-13 12:57:03 +00:00
|
|
|
{ pkgs, lib, ... }:
|
2022-07-13 11:18:43 +00:00
|
|
|
let
|
|
|
|
jsonData = builtins.fromJSON (builtins.readFile ./userdata/userdata.json);
|
|
|
|
in
|
2021-11-15 10:02:05 +00:00
|
|
|
{
|
2022-07-13 11:18:43 +00:00
|
|
|
services.userdata = {
|
2022-07-13 12:57:03 +00:00
|
|
|
hostname = lib.attrsets.attrByPath [ "hostname" ] null jsonData;
|
|
|
|
domain = lib.attrsets.attrByPath [ "domain" ] null jsonData;
|
|
|
|
timezone = lib.attrsets.attrByPath [ "timezone" ] "Europe/Uzhgorod" jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
autoUpgrade = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "autoUpgrade" "enable" ] true jsonData;
|
|
|
|
allowReboot = lib.attrsets.attrByPath [ "autoUpgrade" "allowReboot" ] true jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
2022-07-13 12:57:03 +00:00
|
|
|
username = lib.attrsets.attrByPath [ "username" ] null jsonData;
|
|
|
|
hashedMasterPassword = lib.attrsets.attrByPath [ "hashedMasterPassword" ] null jsonData;
|
2022-07-15 12:27:32 +00:00
|
|
|
sshKeys = lib.attrsets.attrByPath [ "sshKeys" ] [ ] jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
api = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enableSwagger = lib.attrsets.attrByPath [ "api" "enableSwagger" ] false jsonData;
|
2022-07-15 12:27:32 +00:00
|
|
|
skippedMigrations = lib.attrsets.attrByPath [ "api" "skippedMigrations" ] [ ] jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
backblaze = {
|
2022-07-13 12:57:03 +00:00
|
|
|
bucket = lib.attrsets.attrByPath [ "backblaze" "bucket" ] "" jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
bitwarden = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "bitwarden" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
gitea = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "gitea" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
nextcloud = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "nextcloud" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
pleroma = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "pleroma" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
jitsi = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "jitsi" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
ocserv = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "ocserv" "enable" ] false jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
|
|
|
ssh = {
|
2022-07-13 12:57:03 +00:00
|
|
|
enable = lib.attrsets.attrByPath [ "ssh" "enable" ] true jsonData;
|
|
|
|
rootKeys = lib.attrsets.attrByPath [ "ssh" "rootKeys" ] [ "" ] jsonData;
|
|
|
|
passwordAuthentication = lib.attrsets.attrByPath [ "ssh" "passwordAuthentication" ] true jsonData;
|
2022-07-13 11:18:43 +00:00
|
|
|
};
|
2022-07-15 12:27:32 +00:00
|
|
|
users = lib.attrsets.attrByPath [ "users" ] [ ] jsonData;
|
2021-11-15 10:02:05 +00:00
|
|
|
};
|
|
|
|
}
|