Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ your existing configuration, so you don't need to run any extra commands when
you rebuild, and the theme you set in NixOS will automatically be used for Home
Manager too.

When Stylix is installed to a NixOS configuration, it will automatically set up
its Home Manager modules if it detects that Home Manager is available. You can
theoretically use it without installing Home Manager, however most features will
be unavailable.
When Stylix is installed and enabled in a NixOS configuration, it will
automatically set up its Home Manager modules if it detects that Home Manager
is available. You can theoretically use it without installing Home Manager,
however most features will be unavailable.

## nix-darwin

Expand Down
32 changes: 17 additions & 15 deletions stylix/home-manager-integration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,22 @@ in
};
};

config = lib.optionalAttrs (options ? home-manager) (
lib.mkMerge [
(lib.mkIf config.stylix.homeManagerIntegration.autoImport {
home-manager.sharedModules =
[
config.stylix.homeManagerIntegration.module
]
++ (lib.optionals config.stylix.homeManagerIntegration.followSystem copyModules);
})
(lib.mkIf config.home-manager.useGlobalPkgs {
home-manager.sharedModules = lib.singleton {
config.stylix.overlays.enable = false;
};
})
]
config = lib.mkIf config.stylix.enable (
lib.optionalAttrs (options ? home-manager) (
lib.mkMerge [
(lib.mkIf config.stylix.homeManagerIntegration.autoImport {
home-manager.sharedModules =
[
config.stylix.homeManagerIntegration.module
]
++ (lib.optionals config.stylix.homeManagerIntegration.followSystem copyModules);
})
(lib.mkIf config.home-manager.useGlobalPkgs {
home-manager.sharedModules = lib.singleton {
config.stylix.overlays.enable = false;
};
})
]
)
);
}