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;
|
2022-02-27 19:32:48 +00:00
|
|
|
porcorosso-wsl = nixos/lib/home-manager/porcorosso-wsl.nix;
|
2021-04-09 18:14:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configModules = lib.mapAttrs cfg configs;
|
|
|
|
|
|
|
|
builtModules = lib.mapAttrs (name: value: (import ../third_party/home-manager/modules {
|
|
|
|
inherit pkgs;
|
|
|
|
|
2022-02-27 19:32:48 +00:00
|
|
|
configuration = {
|
|
|
|
imports = [ value ];
|
|
|
|
config.nixpkgs.config = pkgs.config;
|
|
|
|
config.home.sessionVariablesExtra = ''
|
|
|
|
export PATH="$HOME/.nix-profile/bin''${PATH:+:}$PATH"
|
|
|
|
'';
|
|
|
|
};
|
2021-04-09 18:14:31 +00:00
|
|
|
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
|
|
|
}
|