From c65e8b8a54707b4d42965be6823c6f5672363419 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 9 Apr 2021 18:14:31 +0000 Subject: [PATCH] ops/home-manager-ext: add built attribute This is so we can more easily build these things on CI. --- ops/home-manager-ext.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/ops/home-manager-ext.nix b/ops/home-manager-ext.nix index 96d3cc8c22..615f03898e 100644 --- a/ops/home-manager-ext.nix +++ b/ops/home-manager-ext.nix @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -{ depot, ... }@args: +{ depot, lib, pkgs, ... }@args: let cfg = configName: configPath: { ... }: { _module.args = args // { @@ -10,8 +10,21 @@ let }; 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 -{ - base = cfg "base" nixos/lib/home-manager/common.nix; - client = cfg "client" nixos/lib/home-manager/client.nix; +configModules // { + built = builtModules; }