nixos-conf/flake.nix

40 lines
967 B
Nix
Raw Normal View History

2025-05-31 21:27:53 +03:00
{
description = "All system configurations for Vili Sinervä";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
2025-06-01 16:57:37 +03:00
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-05-31 21:27:53 +03:00
};
outputs =
{ nixpkgs, nixvim, ... }:
2025-05-31 21:27:53 +03:00
{
2025-06-01 13:34:34 +03:00
nixosConfigurations = (
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
2025-06-01 13:34:34 +03:00
in
builtins.listToAttrs (
map (
host:
nixpkgs.lib.nameValuePair host (
nixpkgs.lib.nixosSystem {
specialArgs = {
2025-06-01 16:57:37 +03:00
nixpkgs-flake = nixpkgs;
inherit nixvim;
};
2025-06-01 13:34:34 +03:00
system = "x86_64-linux";
modules = [
./hosts/${host}/configuration.nix
./hosts/${host}/hardware-configuration.nix
];
2025-06-01 13:34:34 +03:00
}
)
) hosts
)
);
2025-05-31 21:27:53 +03:00
};
}