mailserver module
This commit is contained in:
parent
eac0e79ca3
commit
a10568d5ac
@ -6,13 +6,6 @@
|
|||||||
options = [ "nofail" ];
|
options = [ "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
|
||||||
acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "security@idimitrov.dev";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [ "127.0.0.1" "::1" ];
|
nameservers = [ "127.0.0.1" "::1" ];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
@ -102,26 +95,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
dovecot2.sieve.extensions = [ "fileinto" ];
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PermitRootLogin = "prohibit-password";
|
PermitRootLogin = "prohibit-password";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
roundcube = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
|
|
||||||
plugins = [
|
|
||||||
"persistent_login"
|
|
||||||
];
|
|
||||||
hostName = "${config.mailserver.fqdn}";
|
|
||||||
extraConfig = ''
|
|
||||||
$config['smtp_host'] = "tls://${config.mailserver.fqdn}";
|
|
||||||
$config['smtp_user'] = "%u";
|
|
||||||
$config['smtp_pass'] = "%p";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
@ -267,21 +246,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mailserver = {
|
|
||||||
enable = true;
|
|
||||||
localDnsResolver = false;
|
|
||||||
fqdn = "mail.idimitrov.dev";
|
|
||||||
domains = [ "idimitrov.dev" "mail.idimitrov.dev" ];
|
|
||||||
loginAccounts = {
|
|
||||||
"ivan@idimitrov.dev" = {
|
|
||||||
hashedPassword = "$2b$05$rTVIQD98ogXeCBKdk/YufulWHqpMCAlb7SHDPlh5y8Xbukoa/uQLm";
|
|
||||||
aliases = [ "admin@idimitrov.dev" ];
|
|
||||||
};
|
|
||||||
"security@idimitrov.dev" = {
|
|
||||||
hashedPassword = "$2b$05$rTVIQD98ogXeCBKdk/YufulWHqpMCAlb7SHDPlh5y8Xbukoa/uQLm";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
certificateScheme = "acme-nginx";
|
|
||||||
hierarchySeparator = "/";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ in
|
|||||||
nova-nonya = novaConfig (with mods; [ ivand anon cryptocurrency ]);
|
nova-nonya = novaConfig (with mods; [ ivand anon cryptocurrency ]);
|
||||||
nova-ai = novaConfig (with mods; [ ivand ai ]);
|
nova-ai = novaConfig (with mods; [ ivand ai ]);
|
||||||
install-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); };
|
install-iso = configWithModules { modules = (with mods; [ grub base shell wireless ]); };
|
||||||
vps = configWithModules { modules = (with mods; [ base shell security vps ]); };
|
vps = configWithModules { modules = (with mods; [ base shell security vps mailserver ]); };
|
||||||
stara-miner = configWithModules { modules = (essential ++ [ mods.monero-miner ]); };
|
stara-miner = configWithModules { modules = (essential ++ [ mods.monero-miner ]); };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -252,9 +252,53 @@ top@{ inputs, moduleWithSystem, ... }: {
|
|||||||
vps = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
vps = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.vpsadminos.nixosConfigurations.container
|
inputs.vpsadminos.nixosConfigurations.container
|
||||||
inputs.simple-nixos-mailserver.nixosModule
|
|
||||||
../../hosts/vps/mailserver
|
../../hosts/vps/mailserver
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
mailserver = moduleWithSystem (toplevel@{ ... }: perSystem@{ config, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.simple-nixos-mailserver.nixosModule
|
||||||
|
];
|
||||||
|
mailserver = {
|
||||||
|
enable = true;
|
||||||
|
localDnsResolver = false;
|
||||||
|
fqdn = "mail.idimitrov.dev";
|
||||||
|
domains = [ "idimitrov.dev" "mail.idimitrov.dev" ];
|
||||||
|
loginAccounts = {
|
||||||
|
"ivan@idimitrov.dev" = {
|
||||||
|
hashedPassword = "$2b$05$rTVIQD98ogXeCBKdk/YufulWHqpMCAlb7SHDPlh5y8Xbukoa/uQLm";
|
||||||
|
aliases = [ "admin@idimitrov.dev" ];
|
||||||
|
};
|
||||||
|
"security@idimitrov.dev" = {
|
||||||
|
hashedPassword = "$2b$05$rTVIQD98ogXeCBKdk/YufulWHqpMCAlb7SHDPlh5y8Xbukoa/uQLm";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
certificateScheme = "acme-nginx";
|
||||||
|
hierarchySeparator = "/";
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
dovecot2.sieve.extensions = [ "fileinto" ];
|
||||||
|
roundcube = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
|
||||||
|
plugins = [
|
||||||
|
"persistent_login"
|
||||||
|
];
|
||||||
|
hostName = "${config.mailserver.fqdn}";
|
||||||
|
extraConfig = ''
|
||||||
|
$config['smtp_host'] = "tls://${config.mailserver.fqdn}";
|
||||||
|
$config['smtp_user'] = "%u";
|
||||||
|
$config['smtp_pass'] = "%p";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
postgresql.enable = true;
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "security@idimitrov.dev";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user