pull/19/head
Inex Code 2022-07-13 14:47:13 +03:00
parent 3707937d1e
commit 31c0d4a5d5
2 changed files with 27 additions and 27 deletions

View File

@ -17,7 +17,7 @@ in
value = { value = {
isNormalUser = true; isNormalUser = true;
hashedPassword = user.hashedPassword; hashedPassword = user.hashedPassword;
openssh.authorizedKeys.keys = (if user ? sshKeys then user.sshKeys else []); openssh.authorizedKeys.keys = (if user ? sshKeys then user.sshKeys else [ ]);
}; };
}) })
cfg.users); cfg.users);

View File

@ -4,54 +4,54 @@ let
in in
{ {
services.userdata = { services.userdata = {
hostname = if jsonData ? "hostname" then jsonData.hostname else null; hostname = (if jsonData ? "hostname" then jsonData.hostname else null);
domain = if jsonData ? "domain" then jsonData.domain else null; domain = (if jsonData ? "domain" then jsonData.domain else null);
timezone = if jsonData ? "timezone" then jsonData.timezone else "Europe/Uzhgorod"; timezone = (if jsonData ? "timezone" then jsonData.timezone else "Europe/Uzhgorod");
autoUpgrade = { autoUpgrade = {
enable = if jsonData ? "autoUpgrade.enable" then jsonData.autoUpgrade.enable else true; enable = (if jsonData ? "autoUpgrade.enable" then jsonData.autoUpgrade.enable else true);
allowReboot = if jsonData ? "autoUpgrade.allowReboot" then jsonData.autoUpgrade.allowReboot else true; allowReboot = (if jsonData ? "autoUpgrade.allowReboot" then jsonData.autoUpgrade.allowReboot else true);
}; };
username = if jsonData ? "username" then jsonData.username else null; username = (if jsonData ? "username" then jsonData.username else null);
hashedMasterPassword = if jsonData ? "hashedMasterPassword" then jsonData.hashedMasterPassword else null; hashedMasterPassword = (if jsonData ? "hashedMasterPassword" then jsonData.hashedMasterPassword else null);
sshKeys = if jsonData ? "sshKeys" then jsonData.sshKeys else []; sshKeys = (if jsonData ? "sshKeys" then jsonData.sshKeys else [ ]);
api = { api = {
token = jsonData.api.token; token = jsonData.api.token;
enableSwagger = if jsonData ? "api.enableSwagger" then jsonData.api.enableSwagger else false; enableSwagger = (if jsonData ? "api.enableSwagger" then jsonData.api.enableSwagger else false);
skippedMigrations = if jsonData ? "api.skippedMigrations" then jsonData.api.skippedMigrations else []; skippedMigrations = (if jsonData ? "api.skippedMigrations" then jsonData.api.skippedMigrations else [ ]);
}; };
backblaze = { backblaze = {
bucket = if jsonData ? "backblaze.bucket" then jsonData.backblaze.bucket else null; bucket = (if jsonData ? "backblaze.bucket" then jsonData.backblaze.bucket else null);
accountId = if jsonData ? "backblaze.accountId" then jsonData.backblaze.accountId else null; accountId = (if jsonData ? "backblaze.accountId" then jsonData.backblaze.accountId else null);
accountKey = if jsonData ? "backblaze.accountKey" then jsonData.backblaze.accountKey else null; accountKey = (if jsonData ? "backblaze.accountKey" then jsonData.backblaze.accountKey else null);
}; };
cloudflare = { cloudflare = {
apiKey = if jsonData ? "cloudflare.apiKey" then jsonData.cloudflare.apiKey else null; apiKey = (if jsonData ? "cloudflare.apiKey" then jsonData.cloudflare.apiKey else null);
}; };
databasePassword = if jsonData ? "databasePassword" then jsonData.databasePassword else null; databasePassword = (if jsonData ? "databasePassword" then jsonData.databasePassword else null);
bitwarden = { bitwarden = {
enable = jsonData ? "bitwarden.enable" then jsonData.bitwarden.enable else false; enable = (jsonData ? "bitwarden.enable" then jsonData.bitwarden.enable else false);
}; };
gitea = { gitea = {
enable = jsonData ? "gitea.enable" then jsonData.gitea.enable else false; enable = (jsonData ? "gitea.enable" then jsonData.gitea.enable else false);
}; };
nextcloud = { nextcloud = {
enable = jsonData ? "nextcloud.enable" then jsonData.nextcloud.enable else false; enable = (jsonData ? "nextcloud.enable" then jsonData.nextcloud.enable else false);
adminPassword = jsonData ? "nextcloud.adminPassword" then jsonData.nextcloud.adminPassword else null; adminPassword = (jsonData ? "nextcloud.adminPassword" then jsonData.nextcloud.adminPassword else null);
}; };
pleroma = { pleroma = {
enable = jsonData ? "pleroma.enable" then jsonData.pleroma.enable else false; enable = (jsonData ? "pleroma.enable" then jsonData.pleroma.enable else false);
}; };
jitsi = { jitsi = {
enable = jsonData ? "jitsi.enable" then jsonData.jitsi.enable else false; enable = (jsonData ? "jitsi.enable" then jsonData.jitsi.enable else false);
}; };
ocserv = { ocserv = {
enable = jsonData ? "ocserv.enable" then jsonData.ocserv.enable else false; enable = (jsonData ? "ocserv.enable" then jsonData.ocserv.enable else false);
}; };
resticPassword = jsonData ? "resticPassword" then jsonData.resticPassword else null; resticPassword = (jsonData ? "resticPassword" then jsonData.resticPassword else null);
ssh = { ssh = {
enable = if jsonData ? "ssh.enable" then jsonData.ssh.enable else true; enable = (if jsonData ? "ssh.enable" then jsonData.ssh.enable else true);
rootKeys = jsonData.ssh.rootKeys; rootKeys = (if jsonData ? "ssh.rootKeys" then jsonData.ssh.rootKeys else [ ]);
passwordAuthentication = jsonData.ssh.passwordAuthentication; passwordAuthentication = (if jsonData ? "ssh.passwordAuthentication" then jsonData.ssh.passwordAuthentication else true);
}; };
users = (if jsonData ? "users" then jsonData.users else [ ]); users = (if jsonData ? "users" then jsonData.users else [ ]);
}; };