Reorganized
This commit is contained in:
1 parent
c3c61ce654
commit
760815da50
145 files changed
-1444
No files matched your search
@@ -0,0 +1,133 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.background;
|
||||
in
|
||||
{
|
||||
options.desktop.theming.background = {
|
||||
image = {
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
default = "https://raw.githubusercontent.com/dharmx/walls/refs/heads/main/digital/a_drawing_of_a_spider_on_a_white_surface.png";
|
||||
description = "URL to the background image.";
|
||||
};
|
||||
hash = mkOption {
|
||||
type = types.str;
|
||||
default = "sha256-eCEjM7R9yeHNhZZtvHjrgkfwT25JA7FeMoVwnQ887CQ=";
|
||||
description = "SHA256 hash of the background image.";
|
||||
};
|
||||
};
|
||||
themed = mkEnableOption "themed background";
|
||||
inverted = mkEnableOption "invert background";
|
||||
};
|
||||
|
||||
config =
|
||||
with pkgs;
|
||||
let
|
||||
src = pkgs.fetchurl {
|
||||
url = cfg.image.url;
|
||||
hash = cfg.image.hash;
|
||||
};
|
||||
|
||||
theme = writeTextFile {
|
||||
name = "gowall-theme";
|
||||
text = builtins.toJSON {
|
||||
name = "NixOS";
|
||||
colors =
|
||||
let
|
||||
colors = config.desktop.theming.schemeColors;
|
||||
in
|
||||
[
|
||||
"#${colors.base00}"
|
||||
"#${colors.base01}"
|
||||
"#${colors.base02}"
|
||||
"#${colors.base03}"
|
||||
"#${colors.base04}"
|
||||
"#${colors.base05}"
|
||||
"#${colors.base06}"
|
||||
"#${colors.base07}"
|
||||
"#${colors.base08}"
|
||||
"#${colors.base09}"
|
||||
"#${colors.base0A}"
|
||||
"#${colors.base0B}"
|
||||
"#${colors.base0C}"
|
||||
"#${colors.base0D}"
|
||||
"#${colors.base0E}"
|
||||
"#${colors.base0F}"
|
||||
];
|
||||
};
|
||||
executable = true;
|
||||
};
|
||||
|
||||
fileExtension =
|
||||
name:
|
||||
let
|
||||
parts = splitString "." name;
|
||||
in
|
||||
if length parts > 1 then lists.last parts else "";
|
||||
|
||||
fileName =
|
||||
name:
|
||||
let
|
||||
parts = splitString "/" name;
|
||||
in
|
||||
if length parts > 1 then lists.last parts else name;
|
||||
|
||||
image = fileName cfg.image.url;
|
||||
|
||||
background-themed = stdenv.mkDerivation {
|
||||
name = "background-themed-1.0.0";
|
||||
src = src;
|
||||
|
||||
buildInputs = [
|
||||
gowall
|
||||
imagemagick
|
||||
(writeShellScriptBin "xdg-open" "")
|
||||
tree
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
cp ${src} ./${image}
|
||||
chmod u+w ./${image}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
${optionalString cfg.inverted ''
|
||||
convert ./${image} -channel RGB -negate ./${image}
|
||||
''}
|
||||
${optionalString cfg.themed ''
|
||||
cp ${theme} ./theme.json
|
||||
|
||||
export HOME=$PWD
|
||||
|
||||
gowall convert ./${image} --output themed -t ./theme.json
|
||||
tree
|
||||
mv ./themed/*.* ./
|
||||
''}
|
||||
mv ./${image} themed.${fileExtension image}
|
||||
${optionalString (fileExtension image != "png") ''
|
||||
mogrify -format png themed.*
|
||||
''}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 -t $out themed.png
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
services.wpaperd = {
|
||||
enable = true;
|
||||
settings.default = {
|
||||
path = "${background-themed}/";
|
||||
mode = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Import all themes
|
||||
./themes/catppuccin.nix
|
||||
./themes/gruvbox.nix
|
||||
./themes/oxocarbon.nix
|
||||
./themes/papercolor.nix
|
||||
./themes/sakura.nix
|
||||
./themes/nord.nix
|
||||
];
|
||||
|
||||
options.desktop.theming =
|
||||
let
|
||||
colors = config.desktop.theming.schemeColors;
|
||||
in
|
||||
{
|
||||
darkMode = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether the app should use dark mode.";
|
||||
};
|
||||
|
||||
colorScheme = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
description = "Base 16 color scheme to use for styling. See stylix documentation for more information.";
|
||||
};
|
||||
|
||||
schemeColors = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = config.lib.stylix.colors;
|
||||
description = "Generated colors from scheme";
|
||||
};
|
||||
|
||||
colors = {
|
||||
bg = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base00;
|
||||
};
|
||||
fg = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base05;
|
||||
};
|
||||
bg-status = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base01;
|
||||
};
|
||||
fg-status = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base04;
|
||||
};
|
||||
bg-selection = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base02;
|
||||
};
|
||||
bg-highlight = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base03;
|
||||
};
|
||||
fg-search = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base0A;
|
||||
};
|
||||
accent = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base0E;
|
||||
};
|
||||
border-focused = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.colors.fg;
|
||||
};
|
||||
border-unfocused = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.colors.bg-selection;
|
||||
};
|
||||
};
|
||||
|
||||
colorsCSS = mkOption {
|
||||
type = types.lines;
|
||||
default =
|
||||
":root {\n"
|
||||
+ concatStrings (
|
||||
map (color: " --nix-color-${color.name}: #${color.value};\n") (attrsToList cfg.colors)
|
||||
)
|
||||
+ "}\n\n";
|
||||
description = "Colors as css variables";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# Configure gnome theme
|
||||
dconf.settings = mkIf config.desktop.enable {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = if cfg.darkMode then "prefer-dark" else "prefer-light";
|
||||
};
|
||||
};
|
||||
|
||||
# Configure qt theme
|
||||
qt = mkIf config.desktop.enable {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style = {
|
||||
name = if cfg.darkMode then "adwaita-dark" else "adwaita-light";
|
||||
package = pkgs.adwaita-qt;
|
||||
};
|
||||
};
|
||||
|
||||
# Configure gtk theme
|
||||
gtk = mkIf config.desktop.enable {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = if cfg.darkMode then "Adwaita-dark" else "Adwaita-light";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: This should just straight up not be here
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
modules.git.ignores = [
|
||||
".direnv"
|
||||
];
|
||||
|
||||
# Enable stylix
|
||||
# TODO: Move to own module
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = false;
|
||||
|
||||
targets = {
|
||||
foot.enable = true;
|
||||
nixvim.enable = true;
|
||||
qutebrowser.enable = true;
|
||||
vscode = {
|
||||
enable = true;
|
||||
profileNames = [ "default" ];
|
||||
};
|
||||
zathura.enable = true;
|
||||
};
|
||||
|
||||
base16Scheme = cfg.colorScheme;
|
||||
polarity = if cfg.darkMode then "dark" else "light";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming;
|
||||
|
||||
# Font module type
|
||||
fontModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = "Font family name.";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.anything;
|
||||
description = "Font package";
|
||||
};
|
||||
recommendedSize = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = null;
|
||||
description = "Recommended size for displaying this font.";
|
||||
};
|
||||
fallbackFonts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "Fallback fonts for specified font.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fontModules = [
|
||||
# Import all fonts
|
||||
./fonts/adwaita-mono.nix
|
||||
./fonts/adwaita-sans.nix
|
||||
./fonts/cozette-vector.nix
|
||||
./fonts/cozette.nix
|
||||
./fonts/dejavu-sans.nix
|
||||
./fonts/dejavu-serif.nix
|
||||
./fonts/dina.nix
|
||||
./fonts/fira-code.nix
|
||||
./fonts/nerd-fonts-symbols.nix
|
||||
./fonts/noto-color-emoji.nix
|
||||
./fonts/wqy-bitmapsong.nix
|
||||
./fonts/wqy-microhei-mono.nix
|
||||
./fonts/wqy-microhei.nix
|
||||
./fonts/wqy-zenhei-mono.nix
|
||||
./fonts/wqy-zenhei-sharp.nix
|
||||
./fonts/wqy-zenhei.nix
|
||||
];
|
||||
|
||||
# Gather enabled fonts.
|
||||
enabledFonts = [
|
||||
cfg.fonts.serif.name
|
||||
cfg.fonts.sansSerif.name
|
||||
cfg.fonts.monospace.name
|
||||
cfg.fonts.emoji.name
|
||||
] ++ map (font: font.name) cfg.fonts.extraFonts;
|
||||
|
||||
# Flatten dependencies of fonts
|
||||
fontPackages =
|
||||
converge
|
||||
(
|
||||
fonts:
|
||||
listToAttrs (
|
||||
map
|
||||
(font: {
|
||||
name = font;
|
||||
value = true;
|
||||
})
|
||||
(
|
||||
flatten (map (font: [ font.name ] ++ cfg.fonts.pkgs.${font.name}.fallbackFonts) (attrsToList fonts))
|
||||
)
|
||||
)
|
||||
)
|
||||
(
|
||||
listToAttrs (
|
||||
map (font: {
|
||||
name = font;
|
||||
value = true;
|
||||
}) enabledFonts
|
||||
)
|
||||
);
|
||||
|
||||
# Convert set of fonts to list of packages
|
||||
fontNameList = map (font: font.name) (attrsToList fontPackages);
|
||||
fontPackageList = map (font: cfg.fonts.pkgs.${font}.package) fontNameList;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./background.nix
|
||||
./colors.nix
|
||||
];
|
||||
|
||||
options.desktop.theming = {
|
||||
layout = {
|
||||
borderRadius = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = "Border radius of windows.";
|
||||
};
|
||||
|
||||
borderSize = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = "Size of borders used throughout UI.";
|
||||
};
|
||||
|
||||
windowPadding = mkOption {
|
||||
type = types.int;
|
||||
default = 2;
|
||||
description = "Margin of each window, actual space between windows will be twice this number.";
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
pkgs = mkOption {
|
||||
type = types.attrsOf fontModule;
|
||||
default = builtins.listToAttrs (
|
||||
map (module: {
|
||||
name = module.name;
|
||||
value = module;
|
||||
}) (map (module: (import module) { inherit lib config pkgs; }) fontModules)
|
||||
);
|
||||
description = "All available font modules.";
|
||||
};
|
||||
|
||||
installed = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = fontNameList;
|
||||
description = "List of installed fonts.";
|
||||
};
|
||||
|
||||
serif = mkOption {
|
||||
type = fontModule;
|
||||
description = "Default serif font";
|
||||
};
|
||||
|
||||
sansSerif = mkOption {
|
||||
type = fontModule;
|
||||
description = "Default sansSerif font.";
|
||||
};
|
||||
|
||||
monospace = mkOption {
|
||||
type = fontModule;
|
||||
description = "Default monospace font.";
|
||||
};
|
||||
|
||||
emoji = mkOption {
|
||||
type = fontModule;
|
||||
description = "Default emoji font.";
|
||||
};
|
||||
|
||||
interface = mkOption {
|
||||
type = fontModule;
|
||||
description = "Default emoji font.";
|
||||
};
|
||||
|
||||
extraFonts = mkOption {
|
||||
type = types.listOf fontModule;
|
||||
default = [ ];
|
||||
description = "Additional fonts to install.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.desktop.enable {
|
||||
# Enable fontconfig
|
||||
modules.fontconfig.enable = true;
|
||||
|
||||
# Install configured fonts
|
||||
home.packages = fontPackageList;
|
||||
|
||||
# Configure gtk theme
|
||||
gtk =
|
||||
let
|
||||
disableCSD = ''
|
||||
headerbar.default-decoration {
|
||||
margin-bottom: 50px;
|
||||
margin-top: -100px;
|
||||
}
|
||||
window.csd,
|
||||
window.csd decoration {
|
||||
box-shadow: none;
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
# TODO: Toggles
|
||||
gtk3.extraCss = mkIf config.modules.river.enable disableCSD;
|
||||
gtk4.extraCss = mkIf config.modules.river.enable disableCSD;
|
||||
};
|
||||
|
||||
# TODO: Make cursors configurable using modules.
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
package = lib.mkForce pkgs.rose-pine-cursor;
|
||||
size = lib.mkForce 24;
|
||||
x11 = {
|
||||
defaultCursor = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable stylix
|
||||
# TODO: Move to own module
|
||||
stylix = {
|
||||
fonts = {
|
||||
serif = getAttrs [
|
||||
"name"
|
||||
"package"
|
||||
] cfg.fonts.serif;
|
||||
sansSerif = getAttrs [
|
||||
"name"
|
||||
"package"
|
||||
] cfg.fonts.sansSerif;
|
||||
monospace = getAttrs [
|
||||
"name"
|
||||
"package"
|
||||
] cfg.fonts.monospace;
|
||||
emoji = getAttrs [
|
||||
"name"
|
||||
"package"
|
||||
] cfg.fonts.emoji;
|
||||
|
||||
sizes = {
|
||||
applications = mkDefault cfg.fonts.serif.recommendedSize;
|
||||
desktop = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: See below
|
||||
popups = mkDefault cfg.fonts.monospace.recommendedSize; # TODO: Add dedicated UI font
|
||||
terminal = mkDefault cfg.fonts.monospace.recommendedSize;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Adwaita Mono";
|
||||
package = pkgs.adwaita-fonts;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Adwaita Sans";
|
||||
package = pkgs.adwaita-fonts;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Cozette Vector";
|
||||
package = pkgs.cozette;
|
||||
recommendedSize = 9;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Cozette";
|
||||
package = pkgs.cozette;
|
||||
recommendedSize = 9;
|
||||
fallbackFonts = [ "Cozette Vector" ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "DejaVu Sans";
|
||||
package = pkgs.dejavu_fonts;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "DejaVu Serif";
|
||||
package = pkgs.dejavu_fonts;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Dina";
|
||||
package = pkgs.dina-font;
|
||||
recommendedSize = 9;
|
||||
fallbackFonts = [
|
||||
"Cozette"
|
||||
"wenquanyi bitmap song"
|
||||
"Symbols Nerd Font Mono"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Fira Code";
|
||||
package = pkgs.fira-code;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ "Symbols Nerd Font Mono" ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Symbols Nerd Font Mono";
|
||||
package = pkgs.nerd-fonts.symbols-only;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "Noto Color Emoji";
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "wenquanyi bitmap song";
|
||||
package = pkgs.wqy-bitmapsong;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "WenQuanYi Micro Hei Mono";
|
||||
package = pkgs.wqy-microhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "WenQuanYi Micro Hei";
|
||||
package = pkgs.wqy-microhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "WenQuanYi Zen Hei Mono";
|
||||
package = pkgs.wqy-zenhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "WenQuanYi Zen Hei Sharp";
|
||||
package = pkgs.wqy-zenhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "WenQuanYi Zen Hei";
|
||||
package = pkgs.wqy-zenhei;
|
||||
recommendedSize = 12;
|
||||
fallbackFonts = [ ];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.catppuccin;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.catppuccin = {
|
||||
enable = mkEnableOption "catppuccin";
|
||||
flavor = mkOption {
|
||||
type = types.enum [
|
||||
"latte"
|
||||
"frappe"
|
||||
"macchiato"
|
||||
"mocha"
|
||||
];
|
||||
default = "mocha";
|
||||
description = "The flavor of catppuccin theme.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = (cfg.flavor != "latte");
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/catppuccin-${cfg.flavor}.yaml";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.gruvbox;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.gruvbox = {
|
||||
enable = mkEnableOption "gruvbox-hard";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
contrast = mkOption {
|
||||
type = types.enum [
|
||||
"hard"
|
||||
"medium"
|
||||
"soft"
|
||||
];
|
||||
default = "hard";
|
||||
description = "The contrast level of the theme.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/gruvbox-${mode}-${cfg.contrast}.yaml";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.nord;
|
||||
mode = if cfg.darkMode then "" else "-light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.nord = {
|
||||
enable = mkEnableOption "nord";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/nord${mode}.yaml";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.oxocarbon;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.oxocarbon = {
|
||||
enable = mkEnableOption "oxocarbon";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/oxocarbon-${mode}.yaml";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.papercolor;
|
||||
mode = if cfg.darkMode then "dark" else "light";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.papercolor = {
|
||||
enable = mkEnableOption "papercolor";
|
||||
darkMode = mkEnableOption "dark mode";
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = cfg.darkMode;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/papercolor-${mode}.yaml";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.desktop.theming.themes.sakura;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
desktop.theming.themes.sakura = {
|
||||
enable = mkEnableOption "sakura";
|
||||
};
|
||||
};
|
||||
|
||||
config.desktop.theming = mkIf cfg.enable {
|
||||
darkMode = false;
|
||||
colorScheme = "${pkgs.base16-schemes}/share/themes/sakura.yaml";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user