Installation script enchansements
parent
6dea538b2f
commit
e31c7ae8cd
|
@ -1,3 +1,5 @@
|
||||||
|
# CONFIG IS READY TO USE. IF NO SPECIFIC SETUP IS REQUIRED, THEN, JUST EXIT NANO
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -12,13 +14,13 @@
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fqdn = "ilchub.net";
|
fqdn = "";
|
||||||
domains = [ "ilchub.net" ];
|
domains = [ "" ];
|
||||||
|
|
||||||
# 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 = {
|
||||||
"test@ilchub.net" = {
|
"@" = {
|
||||||
hashedPassword = "";
|
hashedPassword = "";
|
||||||
|
|
||||||
#aliases = [
|
#aliases = [
|
||||||
|
@ -28,7 +30,7 @@
|
||||||
# Make this user the catchAll address for domains blah.com and
|
# Make this user the catchAll address for domains blah.com and
|
||||||
# example2.com
|
# example2.com
|
||||||
catchAll = [
|
catchAll = [
|
||||||
"ilchub.net"
|
""
|
||||||
];
|
];
|
||||||
sieveScript = ''
|
sieveScript = ''
|
||||||
require ["fileinto", "mailbox"];
|
require ["fileinto", "mailbox"];
|
||||||
|
@ -45,7 +47,7 @@
|
||||||
# loginAccounts addresses.
|
# loginAccounts addresses.
|
||||||
extraVirtualAliases = {
|
extraVirtualAliases = {
|
||||||
# address = forward address;
|
# address = forward address;
|
||||||
"admin@ilchub.net" = "test@ilchub.net";
|
"" = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
|
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
|
||||||
|
@ -67,6 +69,6 @@
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
# Replace the email here!
|
# Replace the email here!
|
||||||
email = "test@ilchub.net";
|
email = "";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,14 +61,13 @@ AddSSHKey()
|
||||||
MakeConfig()
|
MakeConfig()
|
||||||
{
|
{
|
||||||
# Mailserver
|
# Mailserver
|
||||||
sed -i '15s/.*/ fqdn = "'$DOMAIN'";/' mailserver.nix
|
sed -i '17s/.*/ fqdn = "'$DOMAIN'";/' mailserver.nix
|
||||||
sed -i '16s/.*/ domains = [ "'"$DOMAIN"'" ];/' mailserver.nix
|
sed -i '18s/.*/ domains = [ "'"$DOMAIN"'" ];/' mailserver.nix
|
||||||
sed -i '21s/.*/\t"'$USER'@'$DOMAIN'" = {/' mailserver.nix
|
sed -i '23s/.*/\t"'$USER'@'$DOMAIN'" = {/' mailserver.nix
|
||||||
#sed -i '22s/.*/\t hashedPassword = "'"$PASSWORD"'";/' mailserver.nix
|
sed -i "24s,.*,\t\ hashedPassword = \"${PASSWORD}\";," mailserver.nix
|
||||||
sed -i "22s,.*,\t\ hashedPassword = \"${PASSWORD}\";," mailserver.nix
|
sed -i '33s/.*/\t\t"'"$DOMAIN"'"/' mailserver.nix
|
||||||
sed -i '31s/.*/\t\t"'"$DOMAIN"'"/' mailserver.nix
|
sed -i '50s/.*/\t "admin@'"$DOMAIN"'" = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||||
sed -i '48s/.*/\t "admin@'"$DOMAIN"'" = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
sed -i '72s/.*/ email = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||||
sed -i '70s/.*/ email = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
|
||||||
|
|
||||||
# System Configuration
|
# System Configuration
|
||||||
sed -i "16s,.*,\t\"${sshKey}\"," configuration.nix
|
sed -i "16s,.*,\t\"${sshKey}\"," configuration.nix
|
||||||
|
|
Loading…
Reference in New Issue