2022-07-19 12:18:46 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
jsonData = builtins.fromJSON (builtins.readFile ./userdata/userdata.json);
|
|
|
|
in
|
2021-11-15 10:02:05 +00:00
|
|
|
{
|
2022-07-19 12:18:46 +00:00
|
|
|
services.userdata = {
|
|
|
|
hostname = lib.attrsets.attrByPath [ "hostname" ] null jsonData;
|
|
|
|
domain = lib.attrsets.attrByPath [ "domain" ] null jsonData;
|
|
|
|
timezone = lib.attrsets.attrByPath [ "timezone" ] "Europe/Uzhgorod" jsonData;
|
2023-03-17 11:50:54 +00:00
|
|
|
stateVersion = lib.attrsets.attrByPath [ "stateVersion" ] "22.05" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
autoUpgrade = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "autoUpgrade" "enable" ] true jsonData;
|
|
|
|
allowReboot = lib.attrsets.attrByPath [ "autoUpgrade" "allowReboot" ] true jsonData;
|
|
|
|
};
|
|
|
|
username = lib.attrsets.attrByPath [ "username" ] null jsonData;
|
|
|
|
hashedMasterPassword = lib.attrsets.attrByPath [ "hashedMasterPassword" ] null jsonData;
|
|
|
|
sshKeys = lib.attrsets.attrByPath [ "sshKeys" ] [ ] jsonData;
|
|
|
|
api = {
|
|
|
|
enableSwagger = lib.attrsets.attrByPath [ "api" "enableSwagger" ] false jsonData;
|
|
|
|
skippedMigrations = lib.attrsets.attrByPath [ "api" "skippedMigrations" ] [ ] jsonData;
|
|
|
|
};
|
2022-11-07 22:44:09 +00:00
|
|
|
dns = {
|
|
|
|
provider = lib.attrsets.attrByPath [ "dns" "provider" ] "CLOUDFLARE" jsonData;
|
2022-11-16 08:02:20 +00:00
|
|
|
useStagingACME = lib.attrsets.attrByPath [ "dns" "useStagingACME" ] false jsonData;
|
2022-11-07 22:44:09 +00:00
|
|
|
};
|
|
|
|
backup = {
|
|
|
|
bucket = lib.attrsets.attrByPath [ "backup" "bucket" ] (lib.attrsets.attrByPath [ "backblaze" "bucket" ] "" jsonData) jsonData;
|
|
|
|
};
|
|
|
|
server = {
|
|
|
|
provider = lib.attrsets.attrByPath [ "server" "provider" ] "HETZNER" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
};
|
|
|
|
bitwarden = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "bitwarden" "enable" ] false jsonData;
|
2022-08-26 10:21:05 +00:00
|
|
|
location = lib.attrsets.attrByPath [ "bitwarden" "location" ] "sda1" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
};
|
|
|
|
gitea = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "gitea" "enable" ] false jsonData;
|
2022-08-26 10:21:05 +00:00
|
|
|
location = lib.attrsets.attrByPath [ "gitea" "location" ] "sda1" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
};
|
|
|
|
nextcloud = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "nextcloud" "enable" ] false jsonData;
|
2022-08-26 10:21:05 +00:00
|
|
|
location = lib.attrsets.attrByPath [ "nextcloud" "location" ] "sda1" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
};
|
|
|
|
pleroma = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "pleroma" "enable" ] false jsonData;
|
2022-08-26 10:21:05 +00:00
|
|
|
location = lib.attrsets.attrByPath [ "pleroma" "location" ] "sda1" jsonData;
|
2022-07-19 12:18:46 +00:00
|
|
|
};
|
|
|
|
jitsi = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "jitsi" "enable" ] false jsonData;
|
|
|
|
};
|
|
|
|
ocserv = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "ocserv" "enable" ] false jsonData;
|
|
|
|
};
|
|
|
|
ssh = {
|
|
|
|
enable = lib.attrsets.attrByPath [ "ssh" "enable" ] true jsonData;
|
|
|
|
rootKeys = lib.attrsets.attrByPath [ "ssh" "rootKeys" ] [ "" ] jsonData;
|
|
|
|
passwordAuthentication = lib.attrsets.attrByPath [ "ssh" "passwordAuthentication" ] true jsonData;
|
|
|
|
};
|
2022-08-26 10:21:05 +00:00
|
|
|
email = {
|
|
|
|
location = lib.attrsets.attrByPath [ "email" "location" ] "sda1" jsonData;
|
|
|
|
};
|
2022-07-19 12:18:46 +00:00
|
|
|
users = lib.attrsets.attrByPath [ "users" ] [ ] jsonData;
|
2022-08-26 10:21:05 +00:00
|
|
|
volumes = lib.attrsets.attrByPath [ "volumes" ] [ ] jsonData;
|
|
|
|
useBinds = lib.attrsets.attrByPath [ "useBinds" ] false jsonData;
|
2021-11-15 10:02:05 +00:00
|
|
|
};
|
|
|
|
}
|