Compare commits

..
2 Commits
Author SHA1 Message Date
ahtlon 63ed818794 [initssh] document new option
Hydra callback / on_push (pull_request) Skipped
Hydra callback / on_pr (pull_request) Successful in 4m26s
Check flake syntax / flake-check (push) Successful in 23m8s
2026-10-27 13:02:08 +01:00
ahtlon d01b140ae0 [initssh] set static ip 2026-10-27 13:02:08 +01:00
11 changed files with 28 additions and 141 deletions
+11 -1
View File
@@ -26,4 +26,14 @@ Run ` lspci -k | grep -iA4 ethernet `
` [ ] `
*Example:*
`[ "r8169" ]`
`[ "r8169" ]`
## cfg.ip
I hate DHCP! Set static ip or ip = hosts.malobeo.hosts.${hostname}.network.address;
*Default:*
`Null` - Will error when not set
*Example:*
`hosts.malobeo.hosts.fanny.network.address;`
Generated
+4 -59
View File
@@ -278,27 +278,6 @@
"type": "github"
}
},
"portal": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_3"
},
"locked": {
"lastModified": 1793647408,
"narHash": "sha256-ZalqgFM/8QAa9oNh1lPgYU5AEwJBoyu1NsFMsD+1GYo=",
"ref": "refs/heads/master",
"rev": "c7d697186796fcca2af5cd08b2d4714e1a9ddb3e",
"revCount": 14,
"type": "git",
"url": "https://git.dynamicdiscord.de/malobeo/portal"
},
"original": {
"type": "git",
"url": "https://git.dynamicdiscord.de/malobeo/portal"
}
},
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
@@ -362,10 +341,9 @@
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"portal": "portal",
"sops-nix": "sops-nix",
"tasklist": "tasklist",
"utils": "utils_4",
"utils": "utils_3",
"zineshop": "zineshop"
}
},
@@ -465,21 +443,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": [
@@ -540,24 +503,6 @@
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1791914995,
"narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
@@ -572,9 +517,9 @@
"type": "github"
}
},
"utils_5": {
"utils_4": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@@ -620,7 +565,7 @@
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_5"
"utils": "utils_4"
},
"locked": {
"lastModified": 1792488750,
-5
View File
@@ -32,11 +32,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
portal = {
url = "git+https://git.dynamicdiscord.de/malobeo/portal";
inputs.nixpkgs.follows = "nixpkgs";
};
ep3-bs = {
url = "git+https://git.dynamicdiscord.de/kalipso/ep3-bs.nix";
inputs.nixpkgs.follows = "nixpkgs";
+1
View File
@@ -72,6 +72,7 @@ in
enable = true;
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["e1000e"];
ip = hosts.malobeo.hosts.albert.network.address;
};
services.malobeo.vpn = {
+3
View File
@@ -2,6 +2,8 @@
let
sshKeys = import ../ssh_keys.nix;
hosts = import ../hosts.nix {};
in
{
imports =
@@ -35,6 +37,7 @@ in
enable = true;
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"];
ip = hosts.malobeo.hosts.bakunin.network.address;
};
malobeo.users.malobeo = true;
+1 -17
View File
@@ -90,6 +90,7 @@ in
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"];
zfsExtraPools = [ "storage" ];
ip = hosts.malobeo.hosts.fanny.network.address;
};
boot.initrd = {
@@ -149,7 +150,6 @@ in
"antamap"
"ns1"
"wordpress"
"portal"
];
networking = {
@@ -185,22 +185,6 @@ in
};
};
virtualHosts."portal.hq.malobeo.org" = {
forceSSL = true;
enableACME = true;
acmeRoot = null;
locations."/" = {
proxyPass = "http://${hosts.malobeo.hosts.portal.network.address}:8080";
extraConfig = ''
proxy_set_header Host $host;
client_max_body_size ${inputs.self.nixosConfigurations.nextcloud.config.services.nextcloud.maxUploadSize};
client_body_timeout 3600s;
send_timeout 3600s;
fastcgi_buffers 64 4K;
'';
};
};
virtualHosts."cloud.hq.malobeo.org" = {
forceSSL = true;
enableACME = true;
+2 -7
View File
@@ -146,15 +146,10 @@ in
wordpress = {
type = "microvm";
network = createMaloNet "21" "52:DA:0D:F9:EF:F7";
network = createMaloNet "21" "52:DA:0D:F9:EF:F6";
};
portal = {
type = "microvm";
network = createMaloNet "22" "52:DA:0D:F9:EF:F8";
};
# last host id: 22
# last host id: 21
};
};
}
+5 -1
View File
@@ -27,6 +27,10 @@ in
default = [ ];
description = "Name or GUID of extra ZFS pools that you wish to import during boot.";
};
ip = lib.mkOption {
type = lib.types.str;
description = "The requested static ip for the machine";
};
};
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
@@ -73,7 +77,7 @@ in
"/etc/ssh/initrd" = "/etc/ssh/initrd";
};
};
kernelParams = [ "ip=::::${hostName}-initrd::dhcp" ];
kernelParams = [ "ip=${cfg.ip}::::${hostName}::" ];
};
};
}
+1 -2
View File
@@ -6,7 +6,6 @@ let
hosts = import ../hosts.nix {};
in
{
microvm.vcpu = 2;
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
nextcloudAdminPass = {
@@ -40,7 +39,7 @@ in
services.nextcloud = {
enable = true;
package = pkgs.nextcloud35;
package = pkgs.nextcloud34;
hostName = "cloud.malobeo.org";
config.adminpassFile = config.sops.secrets.nextcloudAdminPass.path;
maxUploadSize = "10G";
-6
View File
@@ -270,12 +270,6 @@ in
targets = [ "${hosts.malobeo.hosts.wordpress.network.address}:9002" ];
}];
}
{
job_name = "portal";
static_configs = [{
targets = [ "${hosts.malobeo.hosts.zineshop.network.address}:9002" ];
}];
}
# add vpn - check how to reach it first. most probably 10.100.0.1
];
};
-43
View File
@@ -1,43 +0,0 @@
{ self, config, lib, pkgs, inputs, ... }:
with lib;
{
networking = {
hostName = mkDefault "portal";
useDHCP = false;
};
imports = [
inputs.malobeo.nixosModules.malobeo.metrics
inputs.malobeo.nixosModules.malobeo.printing
inputs.portal.nixosModules.portal
inputs.self.nixosModules.malobeo.users
../modules/sshd.nix
];
malobeo.metrics = {
enable = true;
enablePromtail = true;
logNginx = true;
};
malobeo.users = {
admin = true;
backup = true;
};
services.printing.enable = true;
services.malobeo.printing.enable = true;
services.portal = {
enable = true;
#TODO: we should use FQDN like gatekeeper.hq.malobeo.org
gatekeeperHost = "${hosts.malobeo.hosts.goldman.network.address}";
gatekeeperScheme = "http";
};
networking.firewall.allowedTCPPorts = [ 8080 ];
system.stateVersion = "22.11"; # Did you read the comment?
}