home: move hmActivationPackages to own output

Fixes `nix flake check` failure.
This commit is contained in:
Timothy DeHerrera 2021-02-01 19:48:59 -07:00
parent e7d9abfdcd
commit 8d0119d8e4
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
3 changed files with 16 additions and 18 deletions

View File

@ -97,19 +97,16 @@
pkgImport nixos overlays system;
packages =
let
packages' = flattenTreeSystem system
flattenTreeSystem system
(genPackages {
inherit self pkgs;
});
homeActivationPackages = genHomeActivationPackages
self.homeConfigurations;
in
recursiveUpdate packages' homeActivationPackages;
in
{
inherit packages;
hmActivationPackages = genHomeActivationPackages
self.homeConfigurations;
devShell = import ./shell {
inherit pkgs nixos;

View File

@ -73,14 +73,12 @@ in
(recursiveUpdate cachixAttrs modulesAttrs)
profilesAttrs;
genHomeActivationPackages = hmConfigs: {
hmActivationPackages =
builtins.mapAttrs
(_: x: builtins.mapAttrs
genHomeActivationPackages = hmConfigs:
mapAttrs
(_: x: mapAttrs
(_: cfg: cfg.home.activationPackage)
x)
hmConfigs;
};
genPackages = { self, pkgs }:
let

View File

@ -11,6 +11,9 @@ let
}).config.system.build;
flk = pkgs.writeShellScriptBin "flk" ''
system=$(nix eval --impure --expr "builtins.currentSystem")
system=${"\${system//\\\"/"}}
if [[ -z "$1" ]]; then
echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] | home {host} {user} [switch] ]"
elif [[ "$1" == "up" ]]; then
@ -28,7 +31,7 @@ let
elif [[ "$1" == "install" ]]; then
sudo nixos-install --flake "$DEVSHELL_ROOT#$2" "${"\${@:3}"}"
elif [[ "$1" == "home" ]]; then
nix build ./#hmActivationPackages.$2.$3
nix build ./#hmActivationPackages."$system".$2.$3 "${"\${@:4}"}"
if [[ "$4" == "switch" ]]; then
./result/activate && unlink result
fi