feat(167.233.1.14): migrate all containers here
This commit is contained in:
parent
855c463a93
commit
7a10782170
28 changed files with 310 additions and 1022 deletions
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
keys = import ../../../variables/keys.nix;
|
||||
passwords = import ../../../variables/passwords.crypt.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
# TASK: new device
|
||||
networking.hostName = "vmd102066"; # Define your hostname.
|
||||
networking.domain = "contaboserver.net";
|
||||
|
@ -40,7 +41,7 @@ in {
|
|||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = ["ve-+"];
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
externalInterface = "eth0";
|
||||
};
|
||||
|
||||
|
@ -48,7 +49,7 @@ in {
|
|||
# services.kubernetes.roles = ["master" "node"];
|
||||
|
||||
# virtualization
|
||||
virtualisation = {docker.enable = true;};
|
||||
virtualisation = { docker.enable = true; };
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
@ -56,18 +57,18 @@ in {
|
|||
systemd.services."sshd-status" = {
|
||||
enable = true;
|
||||
description = "sshd-status service";
|
||||
path = [pkgs.systemd];
|
||||
path = [ pkgs.systemd ];
|
||||
script = ''
|
||||
systemctl status sshd | grep -i tasks
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.sshd.serviceConfig = {TasksMax = 32;};
|
||||
systemd.services.sshd.serviceConfig = { TasksMax = 32; };
|
||||
|
||||
systemd.timers."sshd-status" = {
|
||||
description = "Timer to trigger sshd-status periodically";
|
||||
enable = true;
|
||||
wantedBy = ["timer.target" "multi-user.target"];
|
||||
wantedBy = [ "timer.target" "multi-user.target" ];
|
||||
timerConfig = {
|
||||
OnActiveSec = "5s";
|
||||
OnUnitActiveSec = "5s";
|
||||
|
@ -76,11 +77,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.gc = {automatic = true;};
|
||||
nix.gc = { automatic = true; };
|
||||
|
||||
boot.initrd.network = {
|
||||
enable = true;
|
||||
udhcpc.extraArgs = ["-x hostname:${config.networking.hostName}"];
|
||||
udhcpc.extraArgs = [ "-x hostname:${config.networking.hostName}" ];
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
|
@ -103,42 +104,13 @@ in {
|
|||
# networking.useHostResolvConf = true;
|
||||
|
||||
containers = {
|
||||
mailserver = import ../../containers/mailserver.nix {
|
||||
autoStart = true;
|
||||
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.11";
|
||||
|
||||
imapsPort = 993;
|
||||
sievePort = 4190;
|
||||
};
|
||||
|
||||
webserver = import ../../containers/webserver.nix {
|
||||
autoStart = true;
|
||||
|
||||
hostAddress = "192.168.100.12";
|
||||
localAddress = "192.168.100.13";
|
||||
|
||||
httpPort = 80;
|
||||
httpsPort = 443;
|
||||
};
|
||||
|
||||
syncthing = import ../../containers/syncthing.nix {
|
||||
autoStart = true;
|
||||
|
||||
hostAddress = "192.168.100.14";
|
||||
localAddress = "192.168.100.15";
|
||||
|
||||
syncthingPort = 22000;
|
||||
};
|
||||
|
||||
backup = import ../../containers/backup.nix {
|
||||
autoStart = false;
|
||||
|
||||
inherit config;
|
||||
hostAddress = "192.168.100.16";
|
||||
localAddress = "192.168.100.17";
|
||||
subvolumes = ["mailserver" "webserver" "backup" "syncthing"];
|
||||
subvolumes = [ "mailserver" "webserver" "backup" "syncthing" ];
|
||||
};
|
||||
|
||||
bkpTarget = import ../../containers/backup-target.nix {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue