Compare commits
1 commit
90440c5d95
...
0ec9c63058
Author | SHA1 | Date | |
---|---|---|---|
0ec9c63058 |
5 changed files with 11 additions and 35 deletions
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
cyprianspitz-vms-nat = {
|
cyprianspitz-vms-nat = {
|
||||||
v4 = {
|
v4 = {
|
||||||
id = "10.248.0.0";
|
id = "10.247.0.0";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
};
|
};
|
||||||
domain = "cyprianspitz-vms-nat.net.qo.is";
|
domain = "cyprianspitz-vms-nat.net.qo.is";
|
||||||
|
|
|
@ -54,14 +54,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Assign the static address to cyprianspitz (required for ssh luks unlock at this time)
|
|
||||||
services.dnsmasq.settings.dhcp-host =
|
|
||||||
let
|
|
||||||
cyprianspitzEnp0s31f6Mac = "9c:6b:00:58:6e:90";
|
|
||||||
inherit (plessur-lan-net.hosts.cyprianspitz.v4) ip;
|
|
||||||
in
|
|
||||||
"${cyprianspitzEnp0s31f6Mac},${ip}";
|
|
||||||
|
|
||||||
# DMZ
|
# DMZ
|
||||||
services.unbound.settings.server = {
|
services.unbound.settings.server = {
|
||||||
interface = [ plessur-dmz-net.hosts.calanda.v4.ip ];
|
interface = [ plessur-dmz-net.hosts.calanda.v4.ip ];
|
||||||
|
|
|
@ -11,13 +11,6 @@ sops decrypt --extract '["system"]["hdd"]' private/nixos-configurations/cyprians
|
||||||
ssh -p 8223 root@calanda.plessur-ext.net.qo.is
|
ssh -p 8223 root@calanda.plessur-ext.net.qo.is
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Direct remote ssh access:
|
|
||||||
|
|
||||||
```
|
|
||||||
ssh -p 8222 root@calanda.plessur-ext.net.qo.is
|
|
||||||
```
|
|
||||||
|
|
||||||
## Hardware
|
## Hardware
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
@ -36,4 +29,4 @@ TODO
|
||||||
|
|
||||||
### HDD Bay
|
### HDD Bay
|
||||||
|
|
||||||
Note that the slot in the middle of the SATA bay is not connected due to the mainboard only having 4 SATA plugs.
|
Note that slot 5 (the leftmost) SATA bay is not connected due to the mainboard only having 4 SATA plugs.
|
||||||
|
|
|
@ -6,30 +6,21 @@ let
|
||||||
address = net.hosts.cyprianspitz.v4.ip;
|
address = net.hosts.cyprianspitz.v4.ip;
|
||||||
prefixLength = net.v4.prefixLength;
|
prefixLength = net.v4.prefixLength;
|
||||||
};
|
};
|
||||||
calandaIp = meta.network.physical.plessur-lan.hosts.calanda.v4.ip;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.enableIPv6 = false;
|
|
||||||
networking.hostName = meta.hosts.cyprianspitz.hostName;
|
networking.hostName = meta.hosts.cyprianspitz.hostName;
|
||||||
|
|
||||||
networking.nameservers = [ calandaIp ];
|
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.enp0s31f6.ipv4.addresses = [
|
networking.interfaces.enp0s31f6.ipv4.addresses = [
|
||||||
(getNetV4Ip meta.network.physical.plessur-lan)
|
(getNetV4Ip meta.network.physical.plessur-lan)
|
||||||
];
|
];
|
||||||
|
networking.interfaces.enp2s0.useDHCP = true;
|
||||||
networking.defaultGateway = {
|
|
||||||
address = calandaIp;
|
|
||||||
interface = "enp0s31f6";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Virtualization
|
# Virtualization
|
||||||
networking.interfaces.vms-nat = {
|
networking.interfaces.vms-nat.useDHCP = false;
|
||||||
useDHCP = false;
|
networking.interfaces.vms-nat.ipv4.addresses = [
|
||||||
ipv4.addresses = [
|
(getNetV4Ip meta.network.virtual.cyprianspitz-vms-nat)
|
||||||
(getNetV4Ip meta.network.virtual.cyprianspitz-vms-nat)
|
];
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.bridges.vms-nat.interfaces = [ ];
|
networking.bridges.vms-nat.interfaces = [ ];
|
||||||
networking.nat = {
|
networking.nat = {
|
||||||
|
@ -48,7 +39,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
resolveLocalQueries = true;
|
resolveLocalQueries = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = [ calandaIp ];
|
|
||||||
interface = "vms-nat";
|
interface = "vms-nat";
|
||||||
bind-interfaces = true;
|
bind-interfaces = true;
|
||||||
|
|
||||||
|
@ -73,10 +63,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# Boot
|
# Boot
|
||||||
|
boot.initrd.network.udhcpc.enable = true;
|
||||||
|
|
||||||
services.qois.luks-ssh = {
|
services.qois.luks-ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interface = "eth0";
|
interface = "eth0";
|
||||||
|
|
||||||
sshPort = 2222;
|
sshPort = 2222;
|
||||||
sshHostKey = "/secrets/system/initrd-ssh-key";
|
sshHostKey = "/secrets/system/initrd-ssh-key";
|
||||||
# TODO Solve sops dependency porblem: config.sops.secrets."system/initrd-ssh-key".path;
|
# TODO Solve sops dependency porblem: config.sops.secrets."system/initrd-ssh-key".path;
|
||||||
|
|
|
@ -80,9 +80,9 @@ in
|
||||||
dns = {
|
dns = {
|
||||||
base_domain = vpnNet.domain;
|
base_domain = vpnNet.domain;
|
||||||
magic_dns = true;
|
magic_dns = true;
|
||||||
nameservers.global = [ "127.0.0.1" ];
|
nameservers.global = [ vnet.backplane.hosts.calanda.v4.ip ];
|
||||||
search_domains = [
|
search_domains = [
|
||||||
# First is base_domain by default with magic_dns
|
# vpnNet.domain # First by default with magic_dns
|
||||||
vnet.backplane.domain
|
vnet.backplane.domain
|
||||||
];
|
];
|
||||||
extra_records = pipe cfg.dnsRecords [
|
extra_records = pipe cfg.dnsRecords [
|
||||||
|
|
Loading…
Add table
Reference in a new issue