forked from pub-solar/os
home: move hmActivationPackages to own output
Fixes `nix flake check` failure.
This commit is contained in:
parent
e7d9abfdcd
commit
8d0119d8e4
15
flake.nix
15
flake.nix
|
@ -97,19 +97,16 @@
|
|||
pkgImport nixos overlays system;
|
||||
|
||||
packages =
|
||||
let
|
||||
packages' = flattenTreeSystem system
|
||||
(genPackages {
|
||||
inherit self pkgs;
|
||||
});
|
||||
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;
|
||||
|
|
|
@ -73,14 +73,12 @@ in
|
|||
(recursiveUpdate cachixAttrs modulesAttrs)
|
||||
profilesAttrs;
|
||||
|
||||
genHomeActivationPackages = hmConfigs: {
|
||||
hmActivationPackages =
|
||||
builtins.mapAttrs
|
||||
(_: x: builtins.mapAttrs
|
||||
(_: cfg: cfg.home.activationPackage)
|
||||
x)
|
||||
hmConfigs;
|
||||
};
|
||||
genHomeActivationPackages = hmConfigs:
|
||||
mapAttrs
|
||||
(_: x: mapAttrs
|
||||
(_: cfg: cfg.home.activationPackage)
|
||||
x)
|
||||
hmConfigs;
|
||||
|
||||
genPackages = { self, pkgs }:
|
||||
let
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue