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.
This commit is contained in:
Bruno BELANYI 2024-01-03 16:51:34 +00:00
parent 9e6bbc2d64
commit 9828579eb9

View file

@ -1,5 +1,5 @@
# Configuration that spans accross system and home, or are almagations of modules
{ ... }:
# Configuration that spans across system and home, or are almagations of modules
{ config, lib, type, ... }:
{
imports = [
./bluetooth
@ -9,4 +9,17 @@
./wm
./x
];
config = lib.mkMerge [
# Transparently enable home-manager profiles as well
(lib.optionalAttrs (type != "home") {
home-manager.users.${config.my.user.name} = {
config = {
my = {
inherit (config.my) profiles;
};
};
};
})
];
}