Moved desktop config
This commit is contained in:
parent
a68f032fee
commit
77fc328c84
|
@ -50,14 +50,14 @@ in
|
|||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
tridactyl # TODO: Add toggle for this extension?
|
||||
# tridactyl # TODO: Add toggle for this extension?
|
||||
];
|
||||
|
||||
# Theming
|
||||
userChrome = readFile (
|
||||
pkgs.substituteAll {
|
||||
src = ./userChrome.css;
|
||||
colors = config.theming.colorsCSS;
|
||||
colors = config.desktop.theming.colorsCSS;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.qutebrowser;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
in
|
||||
{
|
||||
options.modules.qutebrowser = {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.btop;
|
||||
colors = config.theming.schemeColors;
|
||||
colors = config.desktop.theming.schemeColors;
|
||||
in
|
||||
{
|
||||
options.modules.btop = {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
./spotify/default.nix
|
||||
./terminal/default.nix
|
||||
./terminal/foot/default.nix
|
||||
./theming/default.nix
|
||||
./vscode/default.nix
|
||||
./whatsapp/default.nix
|
||||
./winbox/default.nix
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.waybar;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
colors = theme.colors;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ in
|
|||
settings =
|
||||
let
|
||||
layout = "filtile";
|
||||
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding} -main-ratio 0.5";
|
||||
layoutOptions = "-outer-padding ${toString config.desktop.theming.layout.windowPadding} -view-padding ${toString config.desktop.theming.layout.windowPadding} -main-ratio 0.5";
|
||||
modes = [
|
||||
"normal"
|
||||
"locked"
|
||||
|
@ -83,7 +83,7 @@ in
|
|||
];
|
||||
waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.border-focused} -fail-color 0x${colors.bg}";
|
||||
|
||||
colors = config.theming.colors;
|
||||
colors = config.desktop.theming.colors;
|
||||
|
||||
# Quick pow function
|
||||
pow2 = power: if power != 0 then 2 * (pow2 (power - 1)) else 1;
|
||||
|
@ -103,7 +103,7 @@ in
|
|||
xcursor-theme = "BreezeX-RosePine-Linux 24";
|
||||
keyboard-layout = "-options \"caps:escape\" us";
|
||||
|
||||
border-width = toString config.theming.layout.borderSize;
|
||||
border-width = toString config.desktop.theming.layout.borderSize;
|
||||
background-color = "0x${colors.bg}";
|
||||
border-color-focused = "0x${colors.fg}";
|
||||
border-color-unfocused = "0x${colors.border-unfocused}"; # TODO: Change to use named color;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming;
|
||||
cfg = config.desktop.theming;
|
||||
|
||||
# Font module type
|
||||
fontModule = types.submodule {
|
||||
|
@ -101,11 +101,9 @@ in
|
|||
|
||||
options.desktop.theming =
|
||||
let
|
||||
colors = config.theming.schemeColors;
|
||||
colors = config.desktop.theming.schemeColors;
|
||||
in
|
||||
{
|
||||
enable = mkEnableOption "theming";
|
||||
|
||||
darkMode = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -250,7 +248,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf config.modules.theming.enable {
|
||||
config = {
|
||||
# Enable fontconfig
|
||||
modules.fontconfig.enable = true;
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.catppuccin;
|
||||
cfg = config.desktop.theming.themes.catppuccin;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.catppuccin = {
|
||||
desktop.theming.themes.catppuccin = {
|
||||
enable = mkEnableOption "catppuccin";
|
||||
flavor = mkOption {
|
||||
type = types.enum [
|
||||
|
@ -26,7 +26,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = (cfg.flavor != "latte");
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/catppuccin-${cfg.flavor}.yaml";
|
||||
};
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.gruvbox;
|
||||
cfg = config.desktop.theming.themes.gruvbox;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.gruvbox = {
|
||||
desktop.theming.themes.gruvbox = {
|
||||
enable = mkEnableOption "gruvbox-hard";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
contrast = mkOption {
|
||||
|
@ -27,7 +27,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/gruvbox-${mode}-${cfg.contrast}.yaml";
|
||||
};
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.nord;
|
||||
cfg = config.desktop.theming.themes.nord;
|
||||
mode = if cfg.darkMode then "" else "-light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.nord = {
|
||||
desktop.theming.themes.nord = {
|
||||
enable = mkEnableOption "nord";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/nord${mode}.yaml";
|
||||
};
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.oxocarbon;
|
||||
cfg = config.desktop.theming.themes.oxocarbon;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.oxocarbon = {
|
||||
desktop.theming.themes.oxocarbon = {
|
||||
enable = mkEnableOption "oxocarbon";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/oxocarbon-${mode}.yaml";
|
||||
};
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.papercolor;
|
||||
cfg = config.desktop.theming.themes.papercolor;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.papercolor = {
|
||||
desktop.theming.themes.papercolor = {
|
||||
enable = mkEnableOption "papercolor";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/papercolor-${mode}.yaml";
|
||||
};
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.theming.themes.sakura;
|
||||
cfg = config.desktop.theming.themes.sakura;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
theming.themes.sakura = {
|
||||
desktop.theming.themes.sakura = {
|
||||
enable = mkEnableOption "sakura";
|
||||
};
|
||||
};
|
||||
|
||||
config.theming = mkIf cfg.enable {
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = false;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/sakura.yaml";
|
||||
};
|
||||
|
|
|
@ -21,7 +21,9 @@ let
|
|||
'';
|
||||
|
||||
configContent = concatStrings (
|
||||
map (font: aliasConfig config.theming.fonts.pkgs.${font}) config.theming.fonts.installed
|
||||
map (
|
||||
font: aliasConfig config.desktop.theming.fonts.pkgs.${font}
|
||||
) config.desktop.theming.fonts.installed
|
||||
);
|
||||
in
|
||||
{
|
||||
|
@ -34,10 +36,10 @@ in
|
|||
enable = true;
|
||||
|
||||
defaultFonts = {
|
||||
serif = [ config.theming.fonts.serif.name ];
|
||||
sansSerif = [ config.theming.fonts.sansSerif.name ];
|
||||
monospace = [ config.theming.fonts.monospace.name ];
|
||||
emoji = [ config.theming.fonts.emoji.name ];
|
||||
serif = [ config.desktop.theming.fonts.serif.name ];
|
||||
sansSerif = [ config.desktop.theming.fonts.sansSerif.name ];
|
||||
monospace = [ config.desktop.theming.fonts.monospace.name ];
|
||||
emoji = [ config.desktop.theming.fonts.emoji.name ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.mako;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
colors = theme.colors;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.neovim;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
colors = theme.colors;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.rofi;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
colors = theme.colors;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@ in
|
|||
settings = {
|
||||
main =
|
||||
let
|
||||
font = config.theming.fonts.monospace.name;
|
||||
size = toString config.theming.fonts.monospace.recommendedSize;
|
||||
font = config.desktop.theming.fonts.monospace.name;
|
||||
size = toString config.desktop.theming.fonts.monospace.recommendedSize;
|
||||
in
|
||||
{
|
||||
font = mkForce "${font}:style=Regular:size=${size}";
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.vscode;
|
||||
theme = config.theming;
|
||||
theme = config.desktop.theming;
|
||||
in
|
||||
{
|
||||
options.modules.vscode = {
|
||||
|
@ -31,7 +31,7 @@ in
|
|||
"vscode-extension-ms-vsliveshare-vsliveshare"
|
||||
];
|
||||
|
||||
theming.fonts.extraFonts = [ cfg.codeFont ];
|
||||
desktop.theming.fonts.extraFonts = [ cfg.codeFont ];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
let
|
||||
cfg = config.modules.zathura;
|
||||
colors = config.theming.colors;
|
||||
colors = config.desktop.theming.colors;
|
||||
in
|
||||
{
|
||||
options.modules.zathura.enable = lib.mkEnableOption "zathura";
|
||||
|
|
|
@ -25,17 +25,17 @@
|
|||
];
|
||||
|
||||
# Desktop environments
|
||||
desktops =
|
||||
let
|
||||
in
|
||||
{
|
||||
"River Dark" = {
|
||||
type = "custom";
|
||||
theming = { };
|
||||
config = { };
|
||||
extraConfig = { };
|
||||
};
|
||||
};
|
||||
# desktops =
|
||||
# let
|
||||
# in
|
||||
# {
|
||||
# "River Dark" = {
|
||||
# type = "custom";
|
||||
# theming = { };
|
||||
# config = { };
|
||||
# extraConfig = { };
|
||||
# };
|
||||
# };
|
||||
|
||||
# Enabled modules
|
||||
modules = {
|
||||
|
@ -121,11 +121,9 @@
|
|||
# Theme configuration
|
||||
desktop.theming =
|
||||
let
|
||||
fontpkgs = config.theming.fonts.pkgs;
|
||||
fontpkgs = config.desktop.theming.fonts.pkgs;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
||||
# Fonts
|
||||
fonts.serif = fontpkgs."DejaVu Serif";
|
||||
fonts.sansSerif = fontpkgs."DejaVu Sans";
|
||||
|
|
Loading…
Reference in New Issue