Fixed bad substitution

This commit is contained in:
Illia Chub 2021-02-23 11:51:02 +02:00
parent 4feae21eb4
commit bd06d78e55

View file

@ -41,21 +41,21 @@ makeConf() {
$network_import $network_import
$NIXOS_IMPORT $NIXOS_IMPORT
./files.nix ./files.nix
./mailserver/system/mailserver.nix ./mailserver/system/mailserver.nix
./vpn/ocserv.nix ./vpn/ocserv.nix
./api/api.nix ./api/api.nix
./api/api-service.nix ./api/api-module.nix
./social/pleroma-module.nix ./social/pleroma-module.nix
./social/pleroma.nix ./social/pleroma.nix
./letsencrypt/acme.nix ./letsencrypt/acme.nix
./backup/restic.nix ./backup/restic.nix
./passmgr/bitwarden.nix ./passmgr/bitwarden.nix
./webserver/nginx.nix ./webserver/nginx.nix
./webserver/memcached.nix ./webserver/memcached.nix
./nextcloud/nextcloud.nix ./nextcloud/nextcloud.nix
./resources/limits.nix ./resources/limits.nix
./videomeet/jitsi.nix ./videomeet/jitsi.nix
./git/gitea.nix ./git/gitea.nix
]; ];
boot.cleanTmpDir = true; boot.cleanTmpDir = true;
@ -196,17 +196,17 @@ EOF
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use
# mkpasswd -m sha-512 "super secret password" # mkpasswd -m sha-512 "super secret password"
loginAccounts = { loginAccounts = {
"$LUSER@$DOMAIN" = { "$LUSER@$DOMAIN" = {
hashedPassword = "$HASHED_PASSWORD"; hashedPassword = "$HASHED_PASSWORD";
catchAll = [ "$DOMAIN" ]; catchAll = [ "$DOMAIN" ];
sieveScript = '' sieveScript = ''
require ["fileinto", "mailbox"]; require ["fileinto", "mailbox"];
if header :contains "Chat-Version" "1.0" if header :contains "Chat-Version" "1.0"
{ {
fileinto :create "DeltaChat"; fileinto :create "DeltaChat";
stop; stop;
} }
''; '';
}; };
}; };
@ -325,7 +325,7 @@ EOF
"vpn.$DOMAIN" = { "vpn.$DOMAIN" = {
sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem"; sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem";
sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem"; sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem";
forceSSL = true; forceSSL = true;
}; };
"git.$DOMAIN" = { "git.$DOMAIN" = {
sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem"; sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem";
@ -334,18 +334,18 @@ EOF
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:3000"; proxyPass = "http://127.0.0.1:3000";
}; };
}; };
}; };
"cloud.$DOMAIN" = { "cloud.$DOMAIN" = {
sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem"; sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem";
sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem"; sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem";
forceSSL = true; forceSSL = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:80/"; proxyPass = "http://127.0.0.1:80/";
}; };
}; };
}; };
"meet.$DOMAIN" = { "meet.$DOMAIN" = {
forceSSL = true; forceSSL = true;
@ -385,12 +385,12 @@ EOF
"password.$DOMAIN" = { "password.$DOMAIN" = {
sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem"; sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem";
sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem"; sslCertificateKey = "/var/lib/acme/$DOMAIN/key.pem";
forceSSL = true; forceSSL = true;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:8222"; proxyPass = "http://127.0.0.1:8222";
}; };
}; };
}; };
"api.$DOMAIN" = { "api.$DOMAIN" = {
sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem"; sslCertificate = "/var/lib/acme/$DOMAIN/fullchain.pem";
@ -399,8 +399,8 @@ EOF
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:5050"; proxyPass = "http://127.0.0.1:5050";
}; };
}; };
}; };
"chat.$DOMAIN" = { "chat.$DOMAIN" = {
forceSSL = true; forceSSL = true;
@ -507,9 +507,9 @@ EOF
type = "sqlite3"; type = "sqlite3";
host = "127.0.0.1"; host = "127.0.0.1";
name = "gitea"; name = "gitea";
user = "gitea"; user = "gitea";
path = "/var/lib/gitea/data/gitea.db"; path = "/var/lib/gitea/data/gitea.db";
createDatabase = true; createDatabase = true;
}; };
ssh = { ssh = {
enable = true; enable = true;
@ -529,19 +529,19 @@ EOF
settings = { settings = {
mailer = { mailer = {
ENABLED = false; ENABLED = false;
}; };
ui = { ui = {
DEFAULT_THEME = "arc-green"; DEFAULT_THEME = "arc-green";
}; };
picture = { picture = {
DISABLE_GRAVATAR = true; DISABLE_GRAVATAR = true;
}; };
admin = { admin = {
ENABLE_KANBAN_BOARD = true; ENABLE_KANBAN_BOARD = true;
}; };
repository = { repository = {
FORCE_PRIVATE = false; FORCE_PRIVATE = false;
}; };
}; };
}; };
}; };
@ -555,33 +555,33 @@ EOF
dovecot2 = { dovecot2 = {
serviceConfig = { serviceConfig = {
cpuAccounting = true; cpuAccounting = true;
cpuQuota = "20%"; cpuQuota = "20%";
memoryAccounting = true; memoryAccounting = true;
memoryMax = "256M"; memoryMax = "256M";
startLimitIntervalSec = 500; startLimitIntervalSec = 500;
startLimitBurst = 5; startLimitBurst = 5;
blockIOWeigth = 25; blockIOWeigth = 25;
}; };
}; };
postfix = { postfix = {
serviceConfig = { serviceConfig = {
cpuAccounting = true; cpuAccounting = true;
cpuQuota = "20%"; cpuQuota = "20%";
memoryAccounting = true; memoryAccounting = true;
memoryMax = "256M"; memoryMax = "256M";
startLimitIntervalSec = 500; startLimitIntervalSec = 500;
startLimitBurst = 5; startLimitBurst = 5;
blockIOWeigth = 25; blockIOWeigth = 25;
}; };
}; };
ocserv = { ocserv = {
serviceConfig = { serviceConfig = {
cpuAccounting = true; cpuAccounting = true;
cpuQuota = "70%"; cpuQuota = "70%";
memoryAccounting = true; memoryAccounting = true;
memoryMax = "512M"; memoryMax = "512M";
startLimitIntervalSec = 500; startLimitIntervalSec = 500;
startLimitBurst = 5; startLimitBurst = 5;
}; };
}; };
nginx = { nginx = {
@ -592,7 +592,7 @@ EOF
memoryMax = "768M"; memoryMax = "768M";
startLimitIntervalSec = 500; startLimitIntervalSec = 500;
startLimitBurst = 5; startLimitBurst = 5;
blockIOWeigth = 10; blockIOWeigth = 10;
}; };
}; };
}; };
@ -658,7 +658,7 @@ in
if pkgs.lib.inNixShell then drv.env else drv if pkgs.lib.inNixShell then drv.env else drv
EOF EOF
cat > /etc/nixos/api/api-service.nix << EOF cat > /etc/nixos/api/api-module.nix << EOF
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib; with lib;
@ -967,7 +967,7 @@ in {
} }
EOF EOF
cat > /etc/nixos/social/pleroma-package.nix << EOF cat > /etc/nixos/social/pleroma-module.nix << EOF
{ pkgs, ... }: { pkgs, ... }:
{ {
nixpkgs.overlays = [(self: super: { nixpkgs.overlays = [(self: super: {