mirror of
https://github.com/divnix/digga.git
synced 2024-12-24 00:21:47 +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"
|
"externalModules"
|
||||||
];
|
];
|
||||||
|
|
||||||
portableHomeManagerConfiguration =
|
mkPortableHomeManagerConfiguration =
|
||||||
{ username
|
{ username
|
||||||
, configuration
|
, configuration
|
||||||
, pkgs
|
, pkgs
|
||||||
@ -126,16 +126,18 @@ lib.systemFlake (lib.mergeAny
|
|||||||
pkgs = channels.${cfg.nixos.hostDefaults.channelName};
|
pkgs = channels.${cfg.nixos.hostDefaults.channelName};
|
||||||
system = pkgs.system;
|
system = pkgs.system;
|
||||||
|
|
||||||
|
homeConfigurationsPortable =
|
||||||
|
builtins.mapAttrs
|
||||||
|
(n: v: mkPortableHomeManagerConfiguration {
|
||||||
|
username = n;
|
||||||
|
configuration = v;
|
||||||
|
inherit pkgs system;
|
||||||
|
})
|
||||||
|
cfg.home.users;
|
||||||
|
|
||||||
defaultOutputsBuilder = {
|
defaultOutputsBuilder = {
|
||||||
|
|
||||||
homeConfigurations =
|
inherit homeConfigurationsPortable;
|
||||||
builtins.mapAttrs
|
|
||||||
(n: v: portableHomeManagerConfiguration {
|
|
||||||
username = n;
|
|
||||||
configuration = v;
|
|
||||||
inherit pkgs system;
|
|
||||||
})
|
|
||||||
cfg.home.users;
|
|
||||||
|
|
||||||
packages = lib.exporters.fromOverlays self.overlays channels;
|
packages = lib.exporters.fromOverlays self.overlays channels;
|
||||||
|
|
||||||
@ -149,6 +151,14 @@ lib.systemFlake (lib.mergeAny
|
|||||||
} else { }
|
} 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
|
( # for self.deploy if present & non-empty
|
||||||
if (
|
if (
|
||||||
(builtins.hasAttr "deploy" self) &&
|
(builtins.hasAttr "deploy" self) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user