+ AZ-PLT-1
This commit is contained in:
@@ -40,6 +40,11 @@
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
|
||||
colmena = {
|
||||
url = "github:zhaofengli/colmena/v0.5.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-anywhere = {
|
||||
url = "github:nix-community/nixos-anywhere";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -95,6 +100,31 @@
|
||||
"x86_64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
# Single source of truth for the module list of every host. Both
|
||||
# nixosConfigurations and the colmena hive import these 1:1 so both
|
||||
# outputs evaluate identical systems (AZ-NIX-9aj).
|
||||
hostModules = {
|
||||
"AZ-CLD-1" = [
|
||||
./hosts/AZ-CLD-1
|
||||
agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
"AZ-PRM-1" = [
|
||||
./hosts/AZ-PRM-1
|
||||
agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.azion-scheduler.nixosModules.default
|
||||
inputs.zugferd-service.nixosModules.default
|
||||
inputs.azess.nixosModules.default
|
||||
inputs.phishboard.nixosModules.default
|
||||
];
|
||||
"AZ-PLT-1" = [
|
||||
./hosts/AZ-PLT-1
|
||||
agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages = forAllSystems (system:
|
||||
import ./pkgs {
|
||||
@@ -125,6 +155,7 @@
|
||||
opencode
|
||||
# pi-coding-agent
|
||||
inputs.agenix.packages.${system}.default
|
||||
inputs.colmena.packages.${system}.colmena
|
||||
outputs.packages.${system}.atropim-tools
|
||||
];
|
||||
|
||||
@@ -177,26 +208,75 @@
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/AZ-CLD-1
|
||||
agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
modules = hostModules."AZ-CLD-1";
|
||||
};
|
||||
AZ-PRM-1 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/AZ-PRM-1
|
||||
agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.azion-scheduler.nixosModules.default
|
||||
inputs.zugferd-service.nixosModules.default
|
||||
inputs.azess.nixosModules.default
|
||||
inputs.phishboard.nixosModules.default
|
||||
];
|
||||
modules = hostModules."AZ-PRM-1";
|
||||
};
|
||||
# AZ-PLT-1: Erstinstallation per nixos-anywhere (AZ-NIX-g2r),
|
||||
# danach Colmena-Deploy. Keine Extra-Module — Basis-System.
|
||||
AZ-PLT-1 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = hostModules."AZ-PLT-1";
|
||||
};
|
||||
};
|
||||
|
||||
# Colmena hive (AZ-NIX-9aj). Existing hosts are mapped 1:1 from
|
||||
# hostModules — no behavior change, only deployment metadata.
|
||||
# nixos-anywhere stays responsible for initial installs of new hosts
|
||||
# (AZ-PLT-1, AZ-EDGE-1); agenix keeps managing secrets.
|
||||
# Note: sshd runs on port 2022 with PermitRootLogin=no, so deploys go
|
||||
# through the deploy user — colmena activation needs passwordless sudo
|
||||
# on the targets for that user (decided at first deploy).
|
||||
colmenaHive = inputs.colmena.lib.makeHive {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
"AZ-CLD-1" = {
|
||||
deployment = {
|
||||
targetHost = "100.91.203.184"; # NetBird (wt0)
|
||||
targetPort = 2022;
|
||||
targetUser = "sascha.koenig";
|
||||
tags = ["cld"];
|
||||
};
|
||||
imports = hostModules."AZ-CLD-1";
|
||||
};
|
||||
|
||||
"AZ-PRM-1" = {
|
||||
deployment = {
|
||||
targetHost = "100.91.49.26"; # NetBird (wt0)
|
||||
targetPort = 2022;
|
||||
targetUser = "sascha.koenig";
|
||||
tags = ["prm"];
|
||||
};
|
||||
imports = hostModules."AZ-PRM-1";
|
||||
};
|
||||
|
||||
# AZ-PLT-1 (AZ-NIX-g2r): Erstinstall per nixos-anywhere erfolgt,
|
||||
# Deployment laeuft ueber NetBird wie bei den Bestandshosts.
|
||||
"AZ-PLT-1" = {
|
||||
deployment = {
|
||||
targetHost = "100.91.216.253"; # NetBird (wt0)
|
||||
targetPort = 2022;
|
||||
targetUser = "sascha.koenig";
|
||||
tags = ["plt"];
|
||||
};
|
||||
imports = hostModules."AZ-PLT-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user