nixConfig/nixos/flake-module.nix

16 lines
499 B
Nix

# copied and adopted from maralorns config
{ withSystem, lib, inputs, ... }: {
flake = {
nixosConfigurations = withSystem "x86_64-linux" ({ pkgs, ... }:
let
machines = builtins.attrNames (builtins.readDir ./machines);
makeSystem = name:
pkgs.nixos {
imports = [
(import (./. + "/machines/${name}/configuration.nix") inputs)
# inputs.secrets.nixosModules.default
];
};
in lib.genAttrs machines makeSystem);
};
}