Compare commits
6
Commits
6bf0bcc0ef
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7243c7b1c0 | ||
|
|
e89b5ca5d1 | ||
|
|
076df9f924 | ||
|
|
fcb5a89727 | ||
|
|
c9671121dd | ||
|
|
a00773c97a |
@@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
metadata,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# Then build nixosConfiguration.<host>.config.system.build.images.proxmox
|
|
||||||
# SCP that to /var/lib/vz/dumps on the Proxmox host
|
|
||||||
imports = [ "${modulesPath}/virtualisation/proxmox-image.nix" ];
|
|
||||||
greg = {
|
|
||||||
home = true;
|
|
||||||
nebula.enable = true;
|
|
||||||
};
|
|
||||||
networking = {
|
|
||||||
defaultGateway = metadata.infra.gw;
|
|
||||||
nameservers = [ metadata.infra.dns ];
|
|
||||||
interfaces.ens18 = {
|
|
||||||
useDHCP = false;
|
|
||||||
ipv4.addresses = [
|
|
||||||
{
|
|
||||||
address = metadata.hosts."${config.networking.hostName}".ip;
|
|
||||||
prefixLength = 16;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
virtualisation.diskSize = 20480; # Size in mebbibytes for the base disk image
|
|
||||||
# Use these instead of the above to run an LXC image
|
|
||||||
# The main reason I wouldn't use these is because Proxmox LXC does
|
|
||||||
# not seem to be well supported by either Nebula VPN or Tailscale,
|
|
||||||
# both of which I use for my mesh networking. If there isn't a need
|
|
||||||
# for the service to run on those networks, then by all means go ahead
|
|
||||||
# and use LXC!
|
|
||||||
# imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ];
|
|
||||||
# proxmoxLXC = {
|
|
||||||
# manageNetwork = false;
|
|
||||||
# privileged = true;
|
|
||||||
# };
|
|
||||||
# systemd.suppressedSystemUnits = [
|
|
||||||
# "dev-mqueue.mount"
|
|
||||||
# "sys-kernel-debug.mount"
|
|
||||||
# "sys-fs-fuse-connections.mount"
|
|
||||||
# ];
|
|
||||||
nix.settings = {
|
|
||||||
sandbox = false;
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
fstrim.enable = false; # Let Proxmox host handle fstrim
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
PasswordAuthentication = true;
|
|
||||||
PermitEmptyPasswords = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
# Local hosts
|
# Local hosts
|
||||||
10.42.0.1 switch switch.thehellings.lan # Core switch for the network
|
10.42.0.1 switch switch.thehellings.lan # Core switch for the network
|
||||||
10.42.0.3 ap ap.thehellings.lan # OpenWRT access point (static IP)
|
10.42.0.3 ap ap.thehellings.lan # OpenWRT access point (static IP)
|
||||||
10.42.0.4 joel.thehellings.lan # Proxmox
|
10.42.0.4 pve1.thehellings.lan # Proxmox
|
||||||
10.42.0.5 sanswitch.thehellings.lan # Core switch for the SAN
|
10.42.0.5 sanswitch.thehellings.lan # Core switch for the SAN
|
||||||
|
|
||||||
# Home servers
|
# Home servers
|
||||||
10.42.1.1 pve1.thehellings.lan
|
10.42.1.1 udm router udm.thehellings.lan router.thehellings.lan # Ubiquiti UDM gateway
|
||||||
10.42.1.2 opnsense router opnsense.thehellings.lan router.thehellings.lan
|
|
||||||
10.42.1.3 printer.thehellings.lan
|
10.42.1.3 printer.thehellings.lan
|
||||||
10.42.1.4 chronicles chronicles.thehellings.lan nas.thehellings.lan s3.thehellings.lan
|
10.42.1.4 chronicles chronicles.thehellings.lan nas.thehellings.lan s3.thehellings.lan
|
||||||
10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan gitcache.thehellings.lan
|
10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan gitcache.thehellings.lan
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
reservations = [
|
reservations = [
|
||||||
# Static IPs for personal work
|
# Static IPs for personal work
|
||||||
{
|
{
|
||||||
hw-address = "00:23:24:72:64:32"; # Joel
|
hw-address = "00:23:24:72:64:32"; # PVE1
|
||||||
ip-address = "10.42.0.4";
|
ip-address = "10.42.0.4";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -76,10 +76,6 @@
|
|||||||
#ip-address = "10.42.2.253";
|
#ip-address = "10.42.2.253";
|
||||||
ip-address = "10.42.100.6";
|
ip-address = "10.42.100.6";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
hw-address = "7c:83:34:b9:ee:ec"; # PVE1
|
|
||||||
ip-address = "10.42.1.1";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
hw-address = "74:ee:2a:66:b3:51"; # printer
|
hw-address = "74:ee:2a:66:b3:51"; # printer
|
||||||
ip-address = "10.42.1.3";
|
ip-address = "10.42.1.3";
|
||||||
|
|||||||
@@ -11,6 +11,21 @@ let
|
|||||||
homepage = "127.0.0.1:30080";
|
homepage = "127.0.0.1:30080";
|
||||||
nextcloudPort = 8080;
|
nextcloudPort = 8080;
|
||||||
sshPort = 2222;
|
sshPort = 2222;
|
||||||
|
matrixServer = pkgs.writeText "matrix_server" (
|
||||||
|
builtins.toJSON {
|
||||||
|
"m.server" = "matrix.thehellings.com:443";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
matrixClient = pkgs.writeText "matrix_client" (
|
||||||
|
builtins.toJSON {
|
||||||
|
"m.homeserver" = {
|
||||||
|
base_url = "https://matrix.thehellings.com";
|
||||||
|
};
|
||||||
|
"m.identity_server" = {
|
||||||
|
base_url = "https://vector.im";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -224,6 +239,8 @@ in
|
|||||||
option accept-unsafe-violations-in-http-response
|
option accept-unsafe-violations-in-http-response
|
||||||
retries 3
|
retries 3
|
||||||
option forwardfor
|
option forwardfor
|
||||||
|
http-request return status 200 content-type "application/json" file ${matrixClient} hdr "cache-control" "no-cache" if { path /.well-known/matrix/client }
|
||||||
|
http-request return status 200 content-type "application/json" file ${matrixServer} hdr "cache-control" "no-cache" if { path /.well-known/matrix/server }
|
||||||
server web-container ${homepage}
|
server web-container ${homepage}
|
||||||
|
|
||||||
backend next
|
backend next
|
||||||
@@ -263,7 +280,7 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud33;
|
package = pkgs.nextcloud33;
|
||||||
appstoreEnable = true;
|
appstoreEnable = true;
|
||||||
hostName = "localhost";
|
hostName = "127.0.0.1";
|
||||||
https = false;
|
https = false;
|
||||||
config = {
|
config = {
|
||||||
adminpassFile = config.age.secrets.nextcloudadmin.path;
|
adminpassFile = config.age.secrets.nextcloudadmin.path;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ spec:
|
|||||||
RUN_MODE: dev
|
RUN_MODE: dev
|
||||||
server:
|
server:
|
||||||
DOMAIN: "shire-zebra.ts.net"
|
DOMAIN: "shire-zebra.ts.net"
|
||||||
ROOT_URL: "https://gitea.shire-zebra.ts.net"
|
ROOT_URL: "https://git.k3s.thehellings.lan"
|
||||||
SSH_PORT: "2222"
|
SSH_PORT: "2222"
|
||||||
database:
|
database:
|
||||||
DB_TYPE: postgres
|
DB_TYPE: postgres
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ data:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
- "10.42.0.3" # OpenWRT access point
|
- "10.42.0.3" # OpenWRT access point
|
||||||
- "10.42.0.4" # Joel (Proxmox)
|
- "10.42.0.4" # pve1 (Proxmox)
|
||||||
- "10.42.1.1" # pve1 (Proxmox)
|
- "10.42.1.1" # UDM gateway (Ubiquiti)
|
||||||
- "10.42.1.4" # chronicles (Synology NAS)
|
- "10.42.1.4" # chronicles (Synology NAS)
|
||||||
- "10.42.1.14" # nas1 (TrueNAS)
|
- "10.42.1.14" # nas1 (TrueNAS)
|
||||||
- "10.42.2.57" # odoo
|
- "10.42.2.57" # odoo
|
||||||
|
|||||||
@@ -230,7 +230,7 @@
|
|||||||
bookmarks = [
|
bookmarks = [
|
||||||
{
|
{
|
||||||
name = "PVE1";
|
name = "PVE1";
|
||||||
url = "https://10.42.1.1:8006/";
|
url = "https://10.42.0.4:8006/";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "Jeremiah";
|
name = "Jeremiah";
|
||||||
|
|||||||
+3
-3
@@ -135,9 +135,6 @@
|
|||||||
"pubkey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILFYyzz/9i5rXprCQj9IL1ulrbQ6E9BOSeOcvf4D/b0G",
|
"pubkey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILFYyzz/9i5rXprCQj9IL1ulrbQ6E9BOSeOcvf4D/b0G",
|
||||||
"tags": ["server"]
|
"tags": ["server"]
|
||||||
},
|
},
|
||||||
"joel": {
|
|
||||||
"ip": "10.42.0.4"
|
|
||||||
},
|
|
||||||
"k3s": {
|
"k3s": {
|
||||||
"aliases": ["*.k3s"],
|
"aliases": ["*.k3s"],
|
||||||
"ip": "10.42.5.1",
|
"ip": "10.42.5.1",
|
||||||
@@ -151,6 +148,9 @@
|
|||||||
"printer": {
|
"printer": {
|
||||||
"ip": "10.42.1.3"
|
"ip": "10.42.1.3"
|
||||||
},
|
},
|
||||||
|
"pve1": {
|
||||||
|
"ip": "10.42.0.4"
|
||||||
|
},
|
||||||
"pve2": {
|
"pve2": {
|
||||||
"ip": "10.42.1.15"
|
"ip": "10.42.1.15"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user