2021-03-20 20:46:56 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-04-09 18:14:31 +00:00
|
|
|
{ depot, lib, pkgs, ... }@args:
|
2020-11-23 15:22:00 +00:00
|
|
|
let
|
|
|
|
cfg = configName: configPath: { ... }: {
|
|
|
|
_module.args = args // {
|
|
|
|
inherit configName;
|
|
|
|
};
|
|
|
|
imports = [ configPath ];
|
|
|
|
};
|
2021-04-09 18:14:31 +00:00
|
|
|
|
|
|
|
configs = {
|
|
|
|
base = nixos/lib/home-manager/common.nix;
|
|
|
|
client = nixos/lib/home-manager/client.nix;
|
|
|
|
};
|
|
|
|
|
|
|
|
configModules = lib.mapAttrs cfg configs;
|
|
|
|
|
|
|
|
builtModules = lib.mapAttrs (name: value: (import ../third_party/home-manager/modules {
|
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
configuration = value;
|
|
|
|
check = true;
|
2021-04-09 18:31:58 +00:00
|
|
|
}).activationPackage) configModules;
|
2020-11-23 15:22:00 +00:00
|
|
|
in
|
2021-04-09 18:14:31 +00:00
|
|
|
configModules // {
|
|
|
|
built = builtModules;
|
2020-11-23 15:22:00 +00:00
|
|
|
}
|