mirror of
https://github.com/divnix/digga.git
synced 2024-12-23 16:11:51 +03:00
fix: checks for portableHomeConfigurations
Without this modification to the initial implementation, we this error: ```console error: attribute 'activationPackage' missing at /nix/store/2ja93yb8276wk794zkgnaf0m5rghp5mw-source/src/mkFlake/default.nix:145:37: 144| ) then 145| lib.mapAttrs (n: v: v.activationPackage) self.homeConfigurations | ^ 146| else { } ```
This commit is contained in:
parent
01c9e74a05
commit
e07825ca4e
@ -49,7 +49,7 @@ let
|
||||
"externalModules"
|
||||
];
|
||||
|
||||
portableHomeManagerConfiguration =
|
||||
mkPortableHomeManagerConfiguration =
|
||||
{ username
|
||||
, configuration
|
||||
, pkgs
|
||||
@ -126,16 +126,18 @@ lib.systemFlake (lib.mergeAny
|
||||
pkgs = channels.${cfg.nixos.hostDefaults.channelName};
|
||||
system = pkgs.system;
|
||||
|
||||
homeConfigurationsPortable =
|
||||
builtins.mapAttrs
|
||||
(n: v: mkPortableHomeManagerConfiguration {
|
||||
username = n;
|
||||
configuration = v;
|
||||
inherit pkgs system;
|
||||
})
|
||||
cfg.home.users;
|
||||
|
||||
defaultOutputsBuilder = {
|
||||
|
||||
homeConfigurations =
|
||||
builtins.mapAttrs
|
||||
(n: v: portableHomeManagerConfiguration {
|
||||
username = n;
|
||||
configuration = v;
|
||||
inherit pkgs system;
|
||||
})
|
||||
cfg.home.users;
|
||||
inherit homeConfigurationsPortable;
|
||||
|
||||
packages = lib.exporters.fromOverlays self.overlays channels;
|
||||
|
||||
@ -149,6 +151,14 @@ lib.systemFlake (lib.mergeAny
|
||||
} else { }
|
||||
)
|
||||
//
|
||||
( # for portableHomeConfigurations if present & non empty
|
||||
if (
|
||||
(homeConfigurationsPortable != { })
|
||||
) then
|
||||
lib.mapAttrs (n: v: v.activationPackage) homeConfigurationsPortable
|
||||
else { }
|
||||
)
|
||||
//
|
||||
( # for self.deploy if present & non-empty
|
||||
if (
|
||||
(builtins.hasAttr "deploy" self) &&
|
||||
|
Loading…
Reference in New Issue
Block a user