extract stylix to separate module, add nixos module with auto-import
This commit is contained in:
parent
35f880b563
commit
7eaa50327f
5 changed files with 90 additions and 49 deletions
40
nix/stylix.nix
Normal file
40
nix/stylix.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
_:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkDefault mkIf;
|
||||
c = config.lib.stylix.colors.withHashtag;
|
||||
f = config.stylix.fonts;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.nova-shell.enable = config.lib.stylix.mkEnableTarget "nova-shell" true;
|
||||
|
||||
config = mkIf (config.stylix.enable && config.stylix.targets.nova-shell.enable) {
|
||||
programs.nova-shell.theme = {
|
||||
colors = {
|
||||
base00 = mkDefault c.base00;
|
||||
base01 = mkDefault c.base01;
|
||||
base02 = mkDefault c.base02;
|
||||
base03 = mkDefault c.base03;
|
||||
base04 = mkDefault c.base04;
|
||||
base05 = mkDefault c.base05;
|
||||
base06 = mkDefault c.base06;
|
||||
base07 = mkDefault c.base07;
|
||||
base08 = mkDefault c.base08;
|
||||
base09 = mkDefault c.base09;
|
||||
base0A = mkDefault c.base0A;
|
||||
base0B = mkDefault c.base0B;
|
||||
base0C = mkDefault c.base0C;
|
||||
base0D = mkDefault c.base0D;
|
||||
base0E = mkDefault c.base0E;
|
||||
base0F = mkDefault c.base0F;
|
||||
};
|
||||
fontFamily = mkDefault f.sansSerif.name;
|
||||
fontSize = mkDefault f.sizes.desktop;
|
||||
barOpacity = mkDefault (1.0 - config.stylix.opacity.desktop);
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue