nixConfig/nixos/flake-module.nix

17 lines
499 B
Nix
Raw Normal View History

2023-06-12 06:34:47 +00:00
# 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);
};
}