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, ... }:
|
||||
{
|
||||
imports = [
|
||||
|
@ -12,13 +14,13 @@
|
|||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "ilchub.net";
|
||||
domains = [ "ilchub.net" ];
|
||||
fqdn = "";
|
||||
domains = [ "" ];
|
||||
|
||||
# A list of all login accounts. To create the password hashes, use
|
||||
# mkpasswd -m sha-512 "super secret password"
|
||||
loginAccounts = {
|
||||
"test@ilchub.net" = {
|
||||
"@" = {
|
||||
hashedPassword = "";
|
||||
|
||||
#aliases = [
|
||||
|
@ -28,7 +30,7 @@
|
|||
# Make this user the catchAll address for domains blah.com and
|
||||
# example2.com
|
||||
catchAll = [
|
||||
"ilchub.net"
|
||||
""
|
||||
];
|
||||
sieveScript = ''
|
||||
require ["fileinto", "mailbox"];
|
||||
|
@ -45,7 +47,7 @@
|
|||
# loginAccounts addresses.
|
||||
extraVirtualAliases = {
|
||||
# address = forward address;
|
||||
"admin@ilchub.net" = "test@ilchub.net";
|
||||
"" = "";
|
||||
};
|
||||
|
||||
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
|
||||
|
@ -67,6 +69,6 @@
|
|||
security.acme = {
|
||||
acceptTerms = true;
|
||||
# Replace the email here!
|
||||
email = "test@ilchub.net";
|
||||
email = "";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -61,14 +61,13 @@ AddSSHKey()
|
|||
MakeConfig()
|
||||
{
|
||||
# Mailserver
|
||||
sed -i '15s/.*/ fqdn = "'$DOMAIN'";/' mailserver.nix
|
||||
sed -i '16s/.*/ domains = [ "'"$DOMAIN"'" ];/' mailserver.nix
|
||||
sed -i '21s/.*/\t"'$USER'@'$DOMAIN'" = {/' mailserver.nix
|
||||
#sed -i '22s/.*/\t hashedPassword = "'"$PASSWORD"'";/' mailserver.nix
|
||||
sed -i "22s,.*,\t\ hashedPassword = \"${PASSWORD}\";," mailserver.nix
|
||||
sed -i '31s/.*/\t\t"'"$DOMAIN"'"/' mailserver.nix
|
||||
sed -i '48s/.*/\t "admin@'"$DOMAIN"'" = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||
sed -i '70s/.*/ email = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||
sed -i '17s/.*/ fqdn = "'$DOMAIN'";/' mailserver.nix
|
||||
sed -i '18s/.*/ domains = [ "'"$DOMAIN"'" ];/' mailserver.nix
|
||||
sed -i '23s/.*/\t"'$USER'@'$DOMAIN'" = {/' mailserver.nix
|
||||
sed -i "24s,.*,\t\ hashedPassword = \"${PASSWORD}\";," mailserver.nix
|
||||
sed -i '33s/.*/\t\t"'"$DOMAIN"'"/' mailserver.nix
|
||||
sed -i '50s/.*/\t "admin@'"$DOMAIN"'" = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||
sed -i '72s/.*/ email = "'"$USER"'@'"$DOMAIN"'";/' mailserver.nix
|
||||
|
||||
# System Configuration
|
||||
sed -i "16s,.*,\t\"${sshKey}\"," configuration.nix
|
||||
|
|
Loading…
Reference in New Issue