updates / experimental TC setup
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
};
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
|
||||
m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs";
|
||||
m3ta-home = {
|
||||
@@ -68,14 +68,36 @@
|
||||
"x86_64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
allOverlays = import ./overlays {inherit inputs;};
|
||||
hostEntries = builtins.readDir ./hosts;
|
||||
thinClientNames = builtins.filter (
|
||||
name: hostEntries.${name} == "directory" && builtins.match "AZ-TC-[0-9]+" name != null
|
||||
) (builtins.attrNames hostEntries);
|
||||
mkThinClient = name:
|
||||
inputs.nixpkgs-stable.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
(./hosts + "/${name}")
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages =
|
||||
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
overlays = let
|
||||
all = import ./overlays {inherit inputs;};
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
localPackages = import ./pkgs {inherit pkgs;};
|
||||
in
|
||||
removeAttrs all ["mkLlmAgentsOverlay"];
|
||||
lib.mkLlmAgentsOverlay = (import ./overlays {inherit inputs;}).mkLlmAgentsOverlay;
|
||||
localPackages
|
||||
// nixpkgs.lib.optionalAttrs (system == "x86_64-linux") {
|
||||
deploy = pkgs.callPackage ./pkgs/deploy-thin-client.nix {
|
||||
nixos-anywhere = inputs.nixos-anywhere.packages.${system}.default;
|
||||
};
|
||||
default = self.packages.${system}.deploy;
|
||||
});
|
||||
overlays = allOverlays;
|
||||
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = import nixpkgs {
|
||||
@@ -95,50 +117,25 @@
|
||||
};
|
||||
});
|
||||
|
||||
nixosConfigurations = {
|
||||
AZ-LT-NIX = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
nixosConfigurations =
|
||||
{
|
||||
AZ-LT-NIX = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/AZ-LT-NIX
|
||||
agenix.nixosModules.default
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
m3ta-nixpkgs.nixosModules.default
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
./hosts/AZ-LT-NIX
|
||||
agenix.nixosModules.default
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
m3ta-nixpkgs.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# ── Thin Client fleet (AZ-TC-NN) ──────────────────────────────
|
||||
# Each host is a minimal wrapper around the thin-client role.
|
||||
# Add new hosts by:
|
||||
# 1. Create hosts/AZ-TC-NN/default.nix (copy from AZ-TC-01).
|
||||
# 2. Add an entry here.
|
||||
# 3. Run `agenix -e secrets/AZ-TC-NN-*.age` to provision secrets.
|
||||
AZ-TC-01 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs; system = "x86_64-linux";};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./hosts/AZ-TC-01
|
||||
];
|
||||
};
|
||||
AZ-TC-02 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs; system = "x86_64-linux";};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./hosts/AZ-TC-02
|
||||
];
|
||||
};
|
||||
AZ-TC-03 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs; system = "x86_64-linux";};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
agenix.nixosModules.default
|
||||
./hosts/AZ-TC-03
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
// builtins.listToAttrs (map (name: {
|
||||
inherit name;
|
||||
value = mkThinClient name;
|
||||
})
|
||||
thinClientNames);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user