From 56992b8c945d497a623fe693847c91235be1ae02 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 28 Dec 2021 01:11:25 +0900 Subject: initial commit --- lib/home_configurations_as_packages.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/home_configurations_as_packages.nix (limited to 'lib/home_configurations_as_packages.nix') diff --git a/lib/home_configurations_as_packages.nix b/lib/home_configurations_as_packages.nix new file mode 100644 index 0000000..41fd7b4 --- /dev/null +++ b/lib/home_configurations_as_packages.nix @@ -0,0 +1,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; } -- cgit 1.4.1