mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-03 00:15:35 +02:00
meta: Move stylix out of desktop
Makes it easier to use stylix without depending on other parts of the desktop. Mainly useful for using stylix with the phone module without including desktop-related stuff.
This commit is contained in:
parent
5465e572f4
commit
065c987dff
@ -10,7 +10,6 @@ let
|
|||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
inherit (config.boot) isContainer;
|
inherit (config.boot) isContainer;
|
||||||
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
||||||
inherit (builtins) attrValues;
|
|
||||||
|
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
@ -20,20 +19,9 @@ let
|
|||||||
|
|
||||||
inherit (cfg) bloat;
|
inherit (cfg) bloat;
|
||||||
|
|
||||||
stylix-background = nix-config.packages.${pkgs.system}.stylix-background.override {
|
|
||||||
color = config.lib.stylix.colors.base00;
|
|
||||||
};
|
|
||||||
|
|
||||||
opacity = 0.95;
|
|
||||||
fontSize = 11;
|
|
||||||
|
|
||||||
cfg = config.modules.desktop;
|
cfg = config.modules.desktop;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = attrValues {
|
|
||||||
inherit (nix-config.inputs.stylix.nixosModules) stylix;
|
|
||||||
};
|
|
||||||
|
|
||||||
options.modules.desktop = {
|
options.modules.desktop = {
|
||||||
bloat = mkEnableOption "GUI applications";
|
bloat = mkEnableOption "GUI applications";
|
||||||
};
|
};
|
||||||
@ -195,77 +183,5 @@ in
|
|||||||
allowBitmaps = false;
|
allowBitmaps = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
image = "${stylix-background}/wallpaper.png";
|
|
||||||
polarity = "dark";
|
|
||||||
|
|
||||||
base16Scheme = {
|
|
||||||
system = "base16";
|
|
||||||
name = "selenized-black";
|
|
||||||
author = "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali";
|
|
||||||
variant = "dark";
|
|
||||||
|
|
||||||
palette = {
|
|
||||||
base00 = "181818";
|
|
||||||
base01 = "252525";
|
|
||||||
base02 = "3b3b3b";
|
|
||||||
base03 = "777777";
|
|
||||||
base04 = "777777";
|
|
||||||
base05 = "b9b9b9";
|
|
||||||
base06 = "dedede";
|
|
||||||
base07 = "dedede";
|
|
||||||
base08 = "ed4a46";
|
|
||||||
base09 = "e67f43";
|
|
||||||
base0A = "dbb32d";
|
|
||||||
base0B = "70b433";
|
|
||||||
base0C = "3fc5b7";
|
|
||||||
base0D = "368aeb";
|
|
||||||
base0E = "a580e2";
|
|
||||||
base0F = "eb6eb7";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
opacity = {
|
|
||||||
terminal = opacity;
|
|
||||||
popups = opacity;
|
|
||||||
};
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.phinger-cursors;
|
|
||||||
name = "phinger-cursors";
|
|
||||||
size = 24;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
serif = {
|
|
||||||
package = aleo-fonts;
|
|
||||||
name = "Aleo";
|
|
||||||
};
|
|
||||||
|
|
||||||
sansSerif = {
|
|
||||||
package = pkgs.noto-fonts-cjk-sans;
|
|
||||||
name = "Noto Sans CJK JP";
|
|
||||||
};
|
|
||||||
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.maple-mono;
|
|
||||||
name = "Maple Mono";
|
|
||||||
};
|
|
||||||
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
|
|
||||||
sizes = {
|
|
||||||
applications = fontSize;
|
|
||||||
desktop = fontSize;
|
|
||||||
popups = fontSize;
|
|
||||||
terminal = fontSize;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
92
modules/stylix.nix
Normal file
92
modules/stylix.nix
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
nix-config,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
||||||
|
|
||||||
|
stylix-background = nix-config.packages.${pkgs.system}.stylix-background.override {
|
||||||
|
color = config.lib.stylix.colors.base00;
|
||||||
|
};
|
||||||
|
|
||||||
|
opacity = 0.95;
|
||||||
|
fontSize = 11;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = with nix-config.inputs.stylix.nixosModules; [ stylix ];
|
||||||
|
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
image = "${stylix-background}/wallpaper.png";
|
||||||
|
polarity = "dark";
|
||||||
|
|
||||||
|
base16Scheme = {
|
||||||
|
system = "base16";
|
||||||
|
name = "selenized-black";
|
||||||
|
author = "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali";
|
||||||
|
variant = "dark";
|
||||||
|
|
||||||
|
palette = {
|
||||||
|
base00 = "181818";
|
||||||
|
base01 = "252525";
|
||||||
|
base02 = "3b3b3b";
|
||||||
|
base03 = "777777";
|
||||||
|
base04 = "777777";
|
||||||
|
base05 = "b9b9b9";
|
||||||
|
base06 = "dedede";
|
||||||
|
base07 = "dedede";
|
||||||
|
base08 = "ed4a46";
|
||||||
|
base09 = "e67f43";
|
||||||
|
base0A = "dbb32d";
|
||||||
|
base0B = "70b433";
|
||||||
|
base0C = "3fc5b7";
|
||||||
|
base0D = "368aeb";
|
||||||
|
base0E = "a580e2";
|
||||||
|
base0F = "eb6eb7";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
opacity = {
|
||||||
|
terminal = opacity;
|
||||||
|
popups = opacity;
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.phinger-cursors;
|
||||||
|
name = "phinger-cursors";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
serif = {
|
||||||
|
package = aleo-fonts;
|
||||||
|
name = "Aleo";
|
||||||
|
};
|
||||||
|
|
||||||
|
sansSerif = {
|
||||||
|
package = pkgs.noto-fonts-cjk-sans;
|
||||||
|
name = "Noto Sans CJK JP";
|
||||||
|
};
|
||||||
|
|
||||||
|
monospace = {
|
||||||
|
package = pkgs.maple-mono;
|
||||||
|
name = "Maple Mono";
|
||||||
|
};
|
||||||
|
|
||||||
|
emoji = {
|
||||||
|
package = pkgs.noto-fonts-emoji;
|
||||||
|
name = "Noto Color Emoji";
|
||||||
|
};
|
||||||
|
|
||||||
|
sizes = {
|
||||||
|
applications = fontSize;
|
||||||
|
desktop = fontSize;
|
||||||
|
popups = fontSize;
|
||||||
|
terminal = fontSize;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user