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

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

  inherit (pkgs.lib) genAttrs mapAttrs';

  hostNames = __attrNames self.homeConfigurations;
  attrHostNames = genAttrs hostNames (name: "home/config/${name}");
  configs = mapAttrs' (name: pname: { name = pname; value = self.homeConfigurations.${name}.activationPackage; }) attrHostNames;
in
{ x86_64-linux = configs; }