Compare commits

..

No commits in common. "2e2e16378a10f3b9016d1d04e089c68b38529f9e" and "65ef3a12171c2fe08d6feb13ff753ef3ca0d9e1a" have entirely different histories.

6 changed files with 3 additions and 97 deletions

View File

@ -4,6 +4,5 @@
./wm ./wm
./nodm.nix ./nodm.nix
./nix.nix ./nix.nix
./theme.nix
]; ];
} }

View File

@ -1,87 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.nixfiles.theming;
toCaps = s: with lib.strings; with builtins;
(toUpper (substring 0 1 s)) + toLower (substring 1 ((stringLength s)-1) s);
inherit (lib.strings) toUpper toLower;
mkCtp = flavor: accent: with pkgs; {
names = {
cursors = "Catppuccin-${toCaps flavor}-${toCaps accent}-Cursors";
icons = "Papirus-Dark";
gtk = let
base = "Catppuccin-${toCaps flavor}-Standard-${toCaps accent}-Dark";
in {
normal = "${base}";
hdpi = "${base}-hdpi";
xhdpi = "${base}-xhdpi";
};
};
packages = {
cursors = catppuccin-cursors."${toLower flavor}${toCaps accent}";
kvantum = catppuccin-kvantum.override { variant = toCaps flavor; accent = toCaps accent; };
icons = catppuccin-papirus-folders.override { flavor = toLower flavor; accent = toLower accent; };
gtk = catppuccin-gtk.override { variant = toLower flavor; accents = [ (toLower accent) ]; };
};
};
ctp = with cfg.catppuccin; mkCtp flavor accent;
in {
options.nixfiles.theming = {
enable = lib.mkEnableOption "nixfiles theming options";
catppuccin = {
themeDPI = lib.mkOption {
description = "Catppuccin theme DPI preset";
type = with lib.types; oneOf (mapAttrsToList (k: v: k) ctp.names.gtk);
default = "normal";
};
flavor = lib.mkOption {
description = "Catppuccin flavor";
type = lib.types.str;
default = "mocha";
};
accent = lib.mkOption {
description = "Catppuccin accent";
type = lib.types.str;
default = "mauve";
};
};
};
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = lib.mkDefault true;
home.packages = with pkgs; [
ubuntu_font_family
] ++ lib.mapAttrsToList (k: v: v) ctp.packages;
gtk = {
enable = true;
font = lib.mkDefault {
name = "Ubuntu";
package = pkgs.ubuntu_font_family;
size = 12;
};
theme = lib.mkDefault {
package = ctp.packages.gtk;
name = ctp.names.gtk.normal;
};
iconTheme = lib.mkDefault {
name = ctp.names.icons;
package = ctp.packages.icons;
};
};
home.pointerCursor = {
package = lib.mkDefault ctp.packages.cursors;
name = lib.mkDefault ctp.names.cursors;
size = lib.mkDefault 24;
x11.enable = lib.mkDefault true;
gtk.enable = lib.mkDefault true;
};
};
}

View File

@ -22,8 +22,6 @@ in
# Common options for standalone window managers; many of these (or # Common options for standalone window managers; many of these (or
# alternatives thereof) are pulled in by desktop environments. # alternatives thereof) are pulled in by desktop environments.
nixfiles.theming.enable = lib.mkDefault true;
qt.enable = true; qt.enable = true;
qt.platformTheme.name = "qtct"; qt.platformTheme.name = "qtct";
qt.style.name = "kvantum"; qt.style.name = "kvantum";

View File

@ -84,9 +84,8 @@ in
}; };
# this fixes a lot of theme weirdness # this fixes a lot of theme weirdness
# this actually breaks home-manager's icon/theme management home.file.".icons".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.dataHome}/icons";
# home.file.".icons".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.dataHome}/icons"; home.file.".themes".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.dataHome}/themes";
# home.file.".themes".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.dataHome}/themes";
# some packages defined here may be redundant with packages on a non-NixOS # some packages defined here may be redundant with packages on a non-NixOS
# home-manager setup, but it's better to have a consistent environment at # home-manager setup, but it's better to have a consistent environment at

View File

@ -150,7 +150,7 @@ in
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
# Some default env vars. # Some default env vars.
# env = mkd "XCURSOR_SIZE,24"; env = mkd "XCURSOR_SIZE,24";
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/

View File

@ -16,9 +16,6 @@
}; };
home.stateVersion = "23.11"; home.stateVersion = "23.11";
home.pointerCursor = lib.mkIf config.nixfiles.theming.enable { size = 32; };
nixfiles.theming.catppuccin.themeDPI = "hdpi";
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
monitor = ",preferred,auto,1.25"; monitor = ",preferred,auto,1.25";
}; };