feat: Convert to a multi-host flake
This commit is contained in:
parent
c20fd46f9f
commit
b717ea973a
14 changed files with 416 additions and 27 deletions
37
flake.nix
37
flake.nix
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue