Compare commits
12 Commits
debug_mode
...
83c11bb06e
| Author | SHA1 | Date | |
|---|---|---|---|
| 83c11bb06e | |||
| cd5db6a616 | |||
| e32e4d7774 | |||
| c3474f9c27 | |||
| e021f46b4d | |||
| ff340d69fb | |||
| 56c1ae5332 | |||
| bbf8decea1 | |||
| a1bfa0120c | |||
|
|
344eeb437b | ||
| d5767508ef | |||
| a07b8ffd68 |
80
flake.lock
generated
80
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746728054,
|
||||
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
|
||||
"lastModified": 1768920986,
|
||||
"narHash": "sha256-CNzzBsRhq7gg4BMBuTDObiWDH/rFYHEuDRVOwCcwXw4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "ff442f5d1425feb86344c028298548024f21256d",
|
||||
"rev": "de5708739256238fb912c62f03988815db89ec9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -78,24 +78,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -138,18 +120,17 @@
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764549796,
|
||||
"narHash": "sha256-Mswg665P92EoHkBwCwPr/7bdnj04g2Qfb+t02ZEYTHA=",
|
||||
"lastModified": 1772055583,
|
||||
"narHash": "sha256-iPIm1orqkhsxqju6EVODOrV1BmyA5HNTZ8a1o812bFM=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "030d055e877cc13d7525b39f434150226d5e4482",
|
||||
"rev": "f6dcfb7c16cc3775536c825dc0698d4ede13d063",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -181,11 +162,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764234087,
|
||||
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
|
||||
"lastModified": 1769813415,
|
||||
"narHash": "sha256-nnVmNNKBi1YiBNPhKclNYDORoHkuKipoz7EtVnXO50A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
|
||||
"rev": "8946737ff703382fda7623b9fab071d037e897d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -196,11 +177,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1764440730,
|
||||
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
||||
"lastModified": 1771969195,
|
||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -228,11 +209,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1764517877,
|
||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -244,11 +225,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"lastModified": 1771903837,
|
||||
"narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -283,11 +264,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764483358,
|
||||
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
||||
"lastModified": 1772048434,
|
||||
"narHash": "sha256-/wA0OaH6kZ/pFA+nXR/tvg5oupOmEDmMS5us79JT60o=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
||||
"rev": "334daa7c273dd8bf7a0cd370e4e16022b64e55e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -372,21 +353,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tasklist": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -445,7 +411,7 @@
|
||||
},
|
||||
"utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -463,7 +429,7 @@
|
||||
},
|
||||
"utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
|
||||
@@ -63,6 +63,16 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."talks.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."tasklist.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ inputs, config, lib, ... }:
|
||||
{ inputs, config, ... }:
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
peers = import ../modules/malobeo/peers.nix;
|
||||
@@ -47,10 +47,6 @@ in
|
||||
jobset = "infrastructure";
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
specialisation."NOAUTOUPDATE".configuration = {
|
||||
system.nixos.tags = [ "NOAUTOUPDATE" ];
|
||||
malobeo.autoUpdate.enable = lib.mkForce false;
|
||||
};
|
||||
|
||||
malobeo.backup = {
|
||||
enable = true;
|
||||
@@ -149,6 +145,7 @@ in
|
||||
"durruti"
|
||||
"zineshop"
|
||||
"vaultwarden"
|
||||
"pretalx"
|
||||
];
|
||||
|
||||
networking = {
|
||||
@@ -233,6 +230,15 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."talks.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://${hosts.malobeo.hosts.pretalx.network.address}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."tasklist.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://${hosts.malobeo.hosts.durruti.network.address}:8080";
|
||||
|
||||
@@ -103,6 +103,11 @@ in
|
||||
type = "microvm";
|
||||
network = createMaloNet "17" "52:DA:0D:F9:EF:F3";
|
||||
};
|
||||
|
||||
pretalx = {
|
||||
type = "microvm";
|
||||
network = createMaloNet "18" "52:DA:0D:F9:EF:F4";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
mpv
|
||||
vlc
|
||||
simple-scan
|
||||
bitwarden-desktop
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ in
|
||||
description = lib.mdDoc "Setup bridge device for microvms.";
|
||||
};
|
||||
|
||||
testHost = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Enable when the host is used for development and testing using run-vm";
|
||||
};
|
||||
|
||||
interface = mkOption {
|
||||
default = "eno1";
|
||||
type = types.str;
|
||||
@@ -68,7 +74,7 @@ in
|
||||
systemd.network = mkIf (cfg.enableHostBridge || cfg.enableHostBridgeUnstable) {
|
||||
enable = true;
|
||||
networks."10-lan" = {
|
||||
matchConfig.Name = [ "${cfg.interface}" "vm-*"];
|
||||
matchConfig.Name = ["vm-*"] ++ (if !cfg.testHost then [ "${cfg.interface}" ] else [ ]);
|
||||
networkConfig = {
|
||||
Bridge = "malobeo0";
|
||||
};
|
||||
@@ -81,7 +87,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
networks."10-lan-bridge" = {
|
||||
networks."10-lan-bridge" = if !cfg.testHost then {
|
||||
matchConfig.Name = "malobeo0";
|
||||
networkConfig = {
|
||||
Address = [ "${cfg.address}" ];
|
||||
@@ -90,6 +96,17 @@ in
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
} else {
|
||||
matchConfig.Name = "malobeo0";
|
||||
networkConfig = {
|
||||
DHCPServer = true;
|
||||
IPv6SendRA = true;
|
||||
};
|
||||
addresses = if cfg.enableHostBridgeUnstable then [
|
||||
{ Address = "10.0.0.1/24"; }
|
||||
] else [
|
||||
{ Address = "10.0.0.1/24"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -144,6 +144,18 @@ in
|
||||
targets = [ "${hosts.malobeo.hosts.zineshop.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "vaultwarden";
|
||||
static_configs = [{
|
||||
targets = [ "${hosts.malobeo.hosts.vaultwarden.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "pretalx";
|
||||
static_configs = [{
|
||||
targets = [ "${hosts.malobeo.hosts.pretalx.network.address}:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "fanny";
|
||||
static_configs = [{
|
||||
|
||||
79
machines/pretalx/configuration.nix
Normal file
79
machines/pretalx/configuration.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
{ config, self, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
hosts = import ../hosts.nix {};
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "pretalx";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
self.nixosModules.malobeo.metrics
|
||||
self.nixosModules.malobeo.users
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
];
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
};
|
||||
|
||||
malobeo.users = {
|
||||
admin = true;
|
||||
};
|
||||
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
commonHttpConfig = /* nginx */ ''
|
||||
proxy_headers_hash_bucket_size 64;
|
||||
'';
|
||||
virtualHosts = {
|
||||
"talks.malobeo.org" = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.pretalx = {
|
||||
enable = true;
|
||||
celery.extraArgs = [
|
||||
"--concurrency=${toString config.microvm.vcpu}"
|
||||
];
|
||||
gunicorn.extraArgs = [
|
||||
# https://docs.pretalx.org/administrator/installation/#step-6-starting-pretalx-as-a-service
|
||||
"--log-level=info"
|
||||
"--max-requests-jitter=50"
|
||||
"--max-requests=1200"
|
||||
"--workers=${toString config.microvm.vcpu}"
|
||||
|
||||
# TODO: 25.11 upstream
|
||||
"--name=pretalx"
|
||||
"--preload"
|
||||
];
|
||||
nginx.domain = "talks.malobeo.org";
|
||||
settings = {
|
||||
locale = {
|
||||
language_code = "de";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -18,10 +18,17 @@ with lib;
|
||||
imports = [
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
inputs.self.nixosModules.malobeo.metrics
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."keys.malobeo.org" = {
|
||||
|
||||
@@ -58,6 +58,15 @@ with lib;
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."talks.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."tasklist.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
|
||||
Reference in New Issue
Block a user