depot/ops/home-manager-ext.nix

31 lines
669 B
Nix
Raw Normal View History

2021-03-20 20:46:56 +00:00
# SPDX-FileCopyrightText: 2021 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ depot, lib, pkgs, ... }@args:
let
cfg = configName: configPath: { ... }: {
_module.args = args // {
inherit configName;
};
imports = [ configPath ];
};
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;
})) configModules;
in
configModules // {
built = builtModules;
}