From 8dc44d61522a9d949ab73c8fd9834e4f62d618ea Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 19 Sep 2021 14:43:10 +0200 Subject: output homeConfigurations --- flake.nix | 3 ++- user-profiles/core.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 021146ea..bb3c45c5 100644 --- a/flake.nix +++ b/flake.nix @@ -141,7 +141,8 @@ in modulesAttrs // { inherit systemProfiles users userProfiles accounts; }; nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; - homeManagerModules = nixImport rec { dir = ./home-modules; }; + homeModules = nixImport rec { dir = ./home-modules; }; + homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); overlay = final: prev: composeManyExtensions (attrValues self.overlays) final prev; overlays = mapAttrs (_name: path: import path) overlayPaths; diff --git a/user-profiles/core.nix b/user-profiles/core.nix index ff8cb9f9..cb2c400e 100644 --- a/user-profiles/core.nix +++ b/user-profiles/core.nix @@ -3,7 +3,7 @@ users.users.${userName} = {}; # Just make sure the user is created home-manager.users.${userName} = { - imports = lib.attrValues flake.homeManagerModules; + imports = lib.attrValues flake.homeModules; config = { manual.manpages.enable = true; -- cgit v1.2.3