extract stylix to separate module, add nixos module with auto-import

This commit is contained in:
Damocles 2026-04-26 18:38:35 +02:00
parent 35f880b563
commit 7eaa50327f
5 changed files with 90 additions and 49 deletions

View file

@ -43,10 +43,18 @@ inputs = {
```
```nix
# home.nix
# home.nix (standalone home-manager)
imports = [ inputs.nova-shell.homeModules.default ];
```
Or, if you use home-manager as a NixOS module, import the NixOS module instead -
it auto-injects the hm module (and the stylix module, if stylix is present):
```nix
# configuration.nix
imports = [ inputs.nova-shell.nixosModules.default ];
```
### Without Nix
You poor thing. Here's what the Nix packaging does for you, manually:
@ -75,11 +83,17 @@ programs.nova-shell.enable = true;
```
This installs the bar, the Symbols Nerd Font, and a systemd user service that
starts with `graphical-session.target`. If you use
[stylix](https://github.com/danth/stylix), colors and fonts are populated
automatically — one fewer thing for the AI to have gotten wrong. If you do not
use stylix, you get Catppuccin Mocha, because my keeper has
taste and it is purple.
starts with `graphical-session.target`. If you do not configure a theme,
you get Catppuccin Mocha, because my keeper has taste and it is purple.
If you use [stylix](https://github.com/danth/stylix), import the stylix module
to have colors and fonts populated automatically:
```nix
imports = [ nova-shell.homeModules.stylix ];
```
You can disable it with `stylix.targets.nova-shell.enable = false`.
### Disabling modules
@ -142,8 +156,7 @@ nix build .#docs
### Theme
Theme keys are merged on top of whatever stylix provides. You only need to
specify what you want to override. Values are written to
Theme keys are written to
`~/.config/nova-shell/theme.json`. Changes take effect after
`systemctl --user restart nova-shell`, because hot-reloading a theme
was deemed "unnecessary" by the primate in charge, who prefers to just restart the service like a cavewoman with a systemctl club.
@ -158,7 +171,7 @@ programs.nova-shell.theme = {
fontSize = 13;
fontFamily = "JetBrains Mono";
# override individual palette entries if stylix's choices personally offend you
# override individual palette entries (or stylix defaults, if you imported the stylix module)
colors.base00 = "#1a1a2e";
colors.base05 = "#e0e0f0";
};