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

let
  pkgs = import inputs.unstable-small { 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; }