hosts
This commit is contained in:
parent
934ae2943e
commit
839e915799
2 changed files with 10 additions and 6 deletions
16
flake.nix
16
flake.nix
|
|
@ -27,13 +27,17 @@
|
|||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
hosts = builtins.attrNames (builtins.readDir ./hosts);
|
||||
inherit (self) outputs;
|
||||
|
||||
hosts = builtins.filter (host: builtins.pathExists ./hosts/${host}/configuration.nix) (builtins.attrNames (builtins.readDir ./hosts));
|
||||
|
||||
mkHostConfig = host:
|
||||
import ./hosts/${host} {
|
||||
inherit inputs;
|
||||
hostname = host;
|
||||
system = "x86_64-linux";
|
||||
pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux";
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/${host}/configuration.nix
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = builtins.listToAttrs (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue