diff options
author | sefidel <contact@sefidel.net> | 2021-12-28 01:11:25 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2021-12-28 01:12:48 +0900 |
commit | 56992b8c945d497a623fe693847c91235be1ae02 (patch) | |
tree | 102ff8c8872d7e14ce3e3dba69bf16685374504e /lib/home_configurations_as_packages.nix | |
download | nixrc-56992b8c945d497a623fe693847c91235be1ae02.tar.gz nixrc-56992b8c945d497a623fe693847c91235be1ae02.zip |
initial commit
Diffstat (limited to 'lib/home_configurations_as_packages.nix')
-rw-r--r-- | lib/home_configurations_as_packages.nix | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |