From d181f3a71903c5bb5a8b0f89c3fe84023492e76e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Jan 2024 16:51:34 +0000 Subject: [PATCH] common: profiles: forward profiles to home-manager We can only do this now that every profile has been migrated, otherwise we would get errors about undeclared modules... It's not perfect, but it's good enough. --- modules/common/profiles/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/common/profiles/default.nix b/modules/common/profiles/default.nix index dbd4be3..8ce5a3c 100644 --- a/modules/common/profiles/default.nix +++ b/modules/common/profiles/default.nix @@ -1,5 +1,5 @@ # Configuration that spans across system and home, or are almagations of modules -{ ... }: +{ config, lib, _class, ... }: { imports = [ ./bluetooth @@ -9,4 +9,17 @@ ./wm ./x ]; + + config = lib.mkMerge [ + # Transparently enable home-manager profiles as well + (lib.optionalAttrs (_class != "homeManager") { + home-manager.users.${config.my.user.name} = { + config = { + my = { + inherit (config.my) profiles; + }; + }; + }; + }) + ]; }