feat: Convert to a multi-host flake

This commit is contained in:
matthew.binning 2026-02-11 05:13:20 -08:00
parent c20fd46f9f
commit b717ea973a
14 changed files with 416 additions and 27 deletions

View file

@ -1,23 +1,32 @@
# /etc/nixos/flake.nix
{
description = "Framework Desktop with Strix Halo";
description = "NixOS configurations for crossbox and anvil";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
strix-halo.url = "github:hellas-ai/nix-strix-halo";
};
outputs = { self, nixpkgs, strix-halo, ... }: {
nixosConfigurations.crossbox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
({ pkgs, ... }: {
# Apply Strix Halo overlay
nixpkgs.overlays = [ strix-halo.overlays.default ];
})
];
outputs = { self, nixpkgs, strix-halo, ... }:
let
mkHost = { hostDir, extraModules ? [], overlays ? [] }:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
hostDir
({ ... }: { nixpkgs.overlays = overlays; })
] ++ extraModules;
};
in {
nixosConfigurations.crossbox = mkHost {
hostDir = ./hosts/crossbox;
overlays = [ strix-halo.overlays.default ];
extraModules = [ ./sdr.nix ./syncthing.nix ];
};
nixosConfigurations.anvil = mkHost {
hostDir = ./hosts/anvil;
extraModules = [ ./sdr.nix ./syncthing.nix ];
};
};
}
}