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,20 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
keys = import ../../../variables/keys.nix;
|
||||
in {
|
||||
nix.binaryCaches = ["https://cache.holo.host"];
|
||||
|
||||
nix.binaryCachePublicKeys = [
|
||||
"cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE="
|
||||
"cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ="
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
# TASK: new device
|
||||
networking.hostName = "sj-pvehtz-0"; # Define your hostname.
|
||||
networking.hostName = "sj-pvehtz0"; # Define your hostname.
|
||||
# networking.domain = "";
|
||||
|
||||
networking.firewall.enable = true;
|
||||
|
@ -26,6 +20,8 @@ in {
|
|||
|
||||
networking.usePredictableInterfaceNames = false;
|
||||
|
||||
networking.dhcpcd.enable = false;
|
||||
|
||||
networking.interfaces.eth0 = {
|
||||
mtu = 1400;
|
||||
useDHCP = false;
|
||||
|
@ -35,7 +31,7 @@ in {
|
|||
"prefixLength" = 29;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [];
|
||||
ipv6.addresses = [ ];
|
||||
};
|
||||
|
||||
networking.defaultGateway = {
|
||||
|
@ -48,11 +44,11 @@ in {
|
|||
interface = "eth0";
|
||||
};
|
||||
|
||||
networking.nameservers = ["1.1.1.1"];
|
||||
networking.nameservers = [ "1.1.1.1" ];
|
||||
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = ["ve-+"];
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
externalInterface = "eth0";
|
||||
};
|
||||
|
||||
|
@ -60,45 +56,54 @@ in {
|
|||
# services.kubernetes.roles = ["master" "node"];
|
||||
|
||||
# virtualization
|
||||
virtualisation = {docker.enable = true;};
|
||||
virtualisation = { docker.enable = true; };
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
systemd.services."sshd-status" = {
|
||||
enable = true;
|
||||
description = "sshd-status service";
|
||||
path = [pkgs.systemd];
|
||||
script = ''
|
||||
systemctl status sshd | grep -i tasks
|
||||
'';
|
||||
};
|
||||
nix.gc = { automatic = true; };
|
||||
|
||||
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"];
|
||||
timerConfig = {
|
||||
OnActiveSec = "360s";
|
||||
OnUnitActiveSec = "360s";
|
||||
AccuracySec = "1s";
|
||||
Unit = "sshd-status.service";
|
||||
};
|
||||
};
|
||||
|
||||
nix.gc = {automatic = true;};
|
||||
|
||||
networking.useHostResolvConf = true;
|
||||
# networking.useHostResolvConf = true;
|
||||
|
||||
services.openssh.forwardX11 = 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;
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue