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 {
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
let
|
||||
nixpkgs = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-22.05";
|
||||
rev = "b3a8f7ed267e0a7ed100eb7d716c9137ff120fe3";
|
||||
ref = "nixos-22.11";
|
||||
rev = ''
|
||||
a7cc81913bb3cd1ef05ed0ece048b773e1839e51'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nixpkgs;
|
||||
"channels-nixos-stable" = nixpkgs;
|
||||
"nixpkgs-master" = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "master";
|
||||
rev = "6b10854c8194f1ebaa5bce623e71c6da1c008861";
|
||||
rev = ''
|
||||
3b12bfe6c4e11e91865f4d244d13fdc9860bd322'';
|
||||
};
|
||||
"home-manager-module" = {
|
||||
url = "https://github.com/nix-community/home-manager";
|
||||
ref = "release-22.05";
|
||||
rev = "f0ecd4b1db5e15103e955b18cb94bea4296e5c45";
|
||||
ref = "release-22.11";
|
||||
rev = ''
|
||||
b0be47978de5cfd729a79c3f57ace4c86364ff45'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
let
|
||||
nixpkgs = {
|
||||
url = "https://github.com/NixOS/nixpkgs/";
|
||||
ref = "nixos-22.05";
|
||||
ref = "nixos-22.11";
|
||||
rev = ''
|
||||
<% git ls-remote https://github.com/nixos/nixpkgs nixos-22.05 | awk '{ print $1 }' | tr -d '
|
||||
<% git ls-remote https://github.com/nixos/nixpkgs nixos-22.11 | awk '{ print $1 }' | tr -d '
|
||||
' -%>'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nixpkgs;
|
||||
"channels-nixos-stable" = nixpkgs;
|
||||
"nixpkgs-master" = {
|
||||
|
@ -18,9 +19,9 @@ in {
|
|||
};
|
||||
"home-manager-module" = {
|
||||
url = "https://github.com/nix-community/home-manager";
|
||||
ref = "release-22.05";
|
||||
ref = "release-22.11";
|
||||
rev = ''
|
||||
<% git ls-remote https://github.com/nix-community/home-manager.git release-22.05 | awk '{ print $1 }' | tr -d '
|
||||
<% git ls-remote https://github.com/nix-community/home-manager.git release-22.11 | awk '{ print $1 }' | tr -d '
|
||||
' -%>'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue