about summary refs log tree commit diff
path: root/lib/nixos_configurations_as_packages.nix
blob: 356b09b6c2169b19b58aa6b07e3fd8a15b58d5d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{ self, ... } @ inputs:

let
  pkgs = import inputs.unstable { system = "x86_64-linux"; };

  inherit (pkgs.lib) genAttrs mapAttrs';

  hostNames = __attrNames self.nixosConfigurations;
  attrHostNames = genAttrs hostNames (name: "nixos/config/${name}");
  configs = mapAttrs' (name: pname: { name = pname; value = self.nixosConfigurations.${name}.config.system.build.toplevel; }) attrHostNames;
in
{ x86_64-linux = configs; }