home: move hmActivationPackages to own output
Fixes `nix flake check` failure.
This commit is contained in:
parent
e7d9abfdcd
commit
8d0119d8e4
3 changed files with 16 additions and 18 deletions
15
flake.nix
15
flake.nix
|
@ -97,19 +97,16 @@
|
||||||
pkgImport nixos overlays system;
|
pkgImport nixos overlays system;
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
let
|
flattenTreeSystem system
|
||||||
packages' = flattenTreeSystem system
|
(genPackages {
|
||||||
(genPackages {
|
inherit self pkgs;
|
||||||
inherit self pkgs;
|
});
|
||||||
});
|
|
||||||
|
|
||||||
homeActivationPackages = genHomeActivationPackages
|
|
||||||
self.homeConfigurations;
|
|
||||||
in
|
|
||||||
recursiveUpdate packages' homeActivationPackages;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit packages;
|
inherit packages;
|
||||||
|
hmActivationPackages = genHomeActivationPackages
|
||||||
|
self.homeConfigurations;
|
||||||
|
|
||||||
devShell = import ./shell {
|
devShell = import ./shell {
|
||||||
inherit pkgs nixos;
|
inherit pkgs nixos;
|
||||||
|
|
|
@ -73,14 +73,12 @@ in
|
||||||
(recursiveUpdate cachixAttrs modulesAttrs)
|
(recursiveUpdate cachixAttrs modulesAttrs)
|
||||||
profilesAttrs;
|
profilesAttrs;
|
||||||
|
|
||||||
genHomeActivationPackages = hmConfigs: {
|
genHomeActivationPackages = hmConfigs:
|
||||||
hmActivationPackages =
|
mapAttrs
|
||||||
builtins.mapAttrs
|
(_: x: mapAttrs
|
||||||
(_: x: builtins.mapAttrs
|
(_: cfg: cfg.home.activationPackage)
|
||||||
(_: cfg: cfg.home.activationPackage)
|
x)
|
||||||
x)
|
hmConfigs;
|
||||||
hmConfigs;
|
|
||||||
};
|
|
||||||
|
|
||||||
genPackages = { self, pkgs }:
|
genPackages = { self, pkgs }:
|
||||||
let
|
let
|
||||||
|
|
|
@ -11,6 +11,9 @@ let
|
||||||
}).config.system.build;
|
}).config.system.build;
|
||||||
|
|
||||||
flk = pkgs.writeShellScriptBin "flk" ''
|
flk = pkgs.writeShellScriptBin "flk" ''
|
||||||
|
system=$(nix eval --impure --expr "builtins.currentSystem")
|
||||||
|
system=${"\${system//\\\"/"}}
|
||||||
|
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] | home {host} {user} [switch] ]"
|
echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] | home {host} {user} [switch] ]"
|
||||||
elif [[ "$1" == "up" ]]; then
|
elif [[ "$1" == "up" ]]; then
|
||||||
|
@ -28,7 +31,7 @@ let
|
||||||
elif [[ "$1" == "install" ]]; then
|
elif [[ "$1" == "install" ]]; then
|
||||||
sudo nixos-install --flake "$DEVSHELL_ROOT#$2" "${"\${@:3}"}"
|
sudo nixos-install --flake "$DEVSHELL_ROOT#$2" "${"\${@:3}"}"
|
||||||
elif [[ "$1" == "home" ]]; then
|
elif [[ "$1" == "home" ]]; then
|
||||||
nix build ./#hmActivationPackages.$2.$3
|
nix build ./#hmActivationPackages."$system".$2.$3 "${"\${@:4}"}"
|
||||||
if [[ "$4" == "switch" ]]; then
|
if [[ "$4" == "switch" ]]; then
|
||||||
./result/activate && unlink result
|
./result/activate && unlink result
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue