40 lines
1,000 B
Nix
40 lines
1,000 B
Nix
{
|
|
description = "All system configurations for Vili Sinervä";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ nixpkgs, nixvim, ... }:
|
|
{
|
|
nixosConfigurations = (
|
|
let
|
|
hosts = builtins.attrNames (builtins.readDir ./hosts);
|
|
in
|
|
builtins.listToAttrs (
|
|
map (
|
|
host:
|
|
nixpkgs.lib.nameValuePair host (
|
|
nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
nixpkgs-flake = nixpkgs;
|
|
inherit nixvim;
|
|
};
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
{ networking.hostName = host; }
|
|
./hosts/${host}/configuration.nix
|
|
./hosts/${host}/state.nix
|
|
];
|
|
}
|
|
)
|
|
) hosts
|
|
)
|
|
);
|
|
};
|
|
}
|