Import Home Manager modules when enabled at system level 🚸

`stylix.home-manager.enable = true` causes an error unless the Home
Manager modules are imported. It makes sense to add them automatically.
This commit is contained in:
Daniel Thwaites 2023-01-31 18:00:03 +00:00
parent fbad7b1b0c
commit 02f0297038
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D
2 changed files with 3 additions and 1 deletions

View file

@ -62,6 +62,7 @@
(import ./stylix/nixos {
inherit (self.packages.${pkgs.system}) palette-generator;
base16 = base16.lib args;
homeManagerModule = self.homeManagerModules.stylix;
})
];
};

View file

@ -1,4 +1,4 @@
{ palette-generator, base16 }:
{ palette-generator, base16, homeManagerModule }:
{ config, lib, ... }:
let
@ -19,6 +19,7 @@ in {
config = lib.mkIf cfg.enable {
home-manager.sharedModules = [
homeManagerModule
{ stylix.useSystemTheme = lib.mkOverride 99 cfg.useSystemTheme; }
];
};