diff --git a/hosts/common.nix b/hosts/common.nix index 7881b98..e2b3ab9 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -31,6 +31,7 @@ in { polkit ripgrep smartmontools + television trash-cli util-linux wireguard-tools diff --git a/hosts/hermit/configuration.nix b/hosts/hermit/configuration.nix index 3d660a7..40d98bd 100644 --- a/hosts/hermit/configuration.nix +++ b/hosts/hermit/configuration.nix @@ -59,9 +59,6 @@ sound.enable = true; }; usrEnv = { - theming = { - gtk.enable = true; - }; desktops.hyprland.enable = false; programs = { @@ -83,10 +80,6 @@ }; }; - style = { - gtk.enable = true; - qt.enable = true; - }; }; other = { system.username = "cr"; diff --git a/hosts/temperance/configuration.nix b/hosts/temperance/configuration.nix index e4e920c..9c9635b 100644 --- a/hosts/temperance/configuration.nix +++ b/hosts/temperance/configuration.nix @@ -33,7 +33,7 @@ in { programs.nix-ld.enable = true; services = { fstrim.enable = lib.mkDefault true; - + udisks2.enable = true; }; meta = { @@ -71,7 +71,6 @@ in { hardware.nvidia.enable = true; }; usrEnv = { - theming.gtk.enable = true; desktops.hyprland.enable = true; programs = { diff --git a/modules/options/style/colors.nix b/modules/options/style/colors.nix deleted file mode 100644 index ba2a272..0000000 --- a/modules/options/style/colors.nix +++ /dev/null @@ -1,105 +0,0 @@ -# NOTE: This module is entirely inspired by raf, -# most of the nix code is also taken from him, -# so please do check out his configuration! -# raf himself took it from misterio77 -# and adapted it for his personal use, -# so look there too. -# -{ - config, - lib, - ... -}: let - inherit (lib.options) mkOption literalExpression; - inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo; - inherit (lib.strings) toLower replaceStrings removePrefix hasPrefix isString; - # inherit (lib) serializeTheme; - - cfg = config.modules.style; - - hexColorType = mkOptionType { - name = "hex-color"; - descriptionClass = "noun"; - description = "RGB color in hex format"; - check = x: isString x && !(hasPrefix "#" x); - }; - colorType = attrsOf (coercedTo str (removePrefix "#") hexColorType); - - nameToSlug = name: toLower (replaceStrings [" "] ["-"] name); - getPaletteFromScheme = slug: - if builtins.pathExists ./palettes/${slug}.nix - then (import ./palettes/${slug}.nix).colorscheme.palette - else throw "The following colorscheme was imported but not found: ${slug}"; -in { - options.modules.style = { - colorScheme = { - name = mkOption { - type = nullOr (enum ["Catppuccin Mocha" "Zenburn" "Black Metal Venom" "Gruvbox"]); - description = "The colorscheme that should be used globally to theme your system."; - default = "Gruvbox"; - }; - - slug = mkOption { - type = str; - default = nameToSlug "${toString cfg.colorScheme.name}"; # toString to avoid type errors if null, returns "" - description = '' - The serialized slug for the colorScheme you are using. - - Defaults to a lowercased version of the theme name with spaces - replaced with hyphens. - - Must only be changed if the slug is expected to be different than - the serialized theme name." - ''; - }; - - colors = mkOption { - type = colorType; - default = getPaletteFromScheme cfg.colorScheme.slug; - description = '' - An attribute set containing active colors of the system. Follows base16 - scheme by default but can be expanded to base24 or anything "above" as - seen fit as the module option is actually not checked in any way - ''; - example = literalExpression '' - { - base00 = "#1e1e2e"; # Base - base01 = "#181825"; # Mantle - base02 = "#313244"; # Surface0 - base03 = "#45475a"; # Surface1 - base04 = "#585b70"; # Surface2 - base05 = "#cdd6f4"; # text - base06 = "#f5e0dc"; # rosewater - base07 = "#b4befe"; # lavender - base08 = "#f38ba8"; # red - base09 = "#fab387"; # peach - base0A = "#a6e3a1"; # yellow - base0B = "#94e2d5"; # green - base0C = "#94e2d5"; # teal - base0D = "#89b4fa"; # blue - base0E = "#cba6f7"; # mauve - base0F = "#f2cdcd"; # flamingo - } - ''; - }; - - variant = mkOption { - type = enum ["dark" "light"]; - default = - if builtins.substring 0 1 cfg.colorScheme.colors.base00 < "5" - then "dark" - else "light"; - description = '' - Whether the scheme is dark or light - ''; - }; - alpha = mkOption { - type = str; - default = 1.0; - description = '' - The alpha value for the colorscheme - ''; - }; - }; - }; -} diff --git a/modules/options/style/fonts.nix b/modules/options/style/fonts.nix deleted file mode 100644 index 65eb853..0000000 --- a/modules/options/style/fonts.nix +++ /dev/null @@ -1,12 +0,0 @@ -{lib, ...}: let - inherit (lib) mkOption; - inherit (lib.types) package listOf; -in { - options.modules.system.fonts = { - # This defines extra fonts to be installed on the system. - extraFonts = mkOption { - type = listOf package; - default = []; - }; - }; -} diff --git a/modules/options/style/gtk.nix b/modules/options/style/gtk.nix deleted file mode 100644 index 4a61f65..0000000 --- a/modules/options/style/gtk.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) mkOption mkEnableOption; - inherit (lib.types) str package; -in { - options.modules.usrEnv.style.gtk = { - enable = mkEnableOption "Wether to enable GTK theming"; - theme = { - name = mkOption { - description = "The GTK theme name"; - default = "Gruvbox-Dark-BL"; - type = str; - }; - package = mkOption { - description = "The GTK theme package"; - default = pkgs.gruvbox-gtk-theme; - type = package; - }; - }; - iconTheme = { - description = "The GTK icon theme"; - name = mkOption { - description = "The GTK icon theme name"; - default = "Papirus-Dark"; - type = str; - }; - package = mkOption { - description = "The GTK icon theme package"; - default = pkgs.catppuccin-papirus-folders; - type = package; - }; - }; - }; -} diff --git a/modules/options/style/module.nix b/modules/options/style/module.nix deleted file mode 100644 index 1800d2f..0000000 --- a/modules/options/style/module.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - inherit (lib) mkOption; - inherit (lib.types) package str int; -in { - imports = [ - ./qt.nix - ./gtk.nix - ./fonts.nix - ./colors.nix - ]; - - options.modules.style = { - cursor = { - package = mkOption { - type = package; - default = pkgs.bibata-cursors; - description = "Cursor package"; - }; - name = mkOption { - type = str; - default = "Bibata-Modern-Classic"; - description = "Cursor name"; - }; - size = mkOption { - type = int; - default = 32; - description = "Cursor size"; - }; - }; - }; -} diff --git a/modules/options/style/qt.nix b/modules/options/style/qt.nix deleted file mode 100644 index 58ce50c..0000000 --- a/modules/options/style/qt.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) mkEnableOption mkOption; - inherit (lib.types) str package; -in { - options.modules.usrEnv.style.qt = { - enable = mkEnableOption "qt theming"; - name = mkOption { - description = "qt theme name"; - default = "Catppuccin-Mocha-Dark"; - type = str; - }; - variant = mkOption { - description = "qt theme variant"; - default = "mocha"; - type = str; - }; - accentColor = mkOption { - description = "accent colour for qt theme"; - default = "green"; - type = str; - }; - package = mkOption { - description = "qt theme package"; - default = pkgs.catppuccin-kde; - type = package; - }; - }; -} diff --git a/modules/programs/gui/foot.nix b/modules/programs/gui/foot.nix index 0095f4d..4dbfce0 100644 --- a/modules/programs/gui/foot.nix +++ b/modules/programs/gui/foot.nix @@ -16,10 +16,10 @@ title = "foot"; locked-title = "no"; - # font = "Iosevka Custom:size=14"; - # font-bold = "Iosevka Custom:size=14"; - font = "Iosevka Nerd Font:size=14"; - font-bold = "Iosevka Nerd Font:size=14"; + font = "valiosevka:size=14"; + font-bold = "valiosevka:size=14"; + # font = "Iosevka Nerd Font:size=14"; + # font-bold = "Iosevka Nerd Font:size=14"; line-height = 20; letter-spacing = 0; diff --git a/modules/style/colors.nix b/modules/style/colors.nix index eed7124..ba2a272 100644 --- a/modules/style/colors.nix +++ b/modules/style/colors.nix @@ -1 +1,105 @@ -_: {} +# NOTE: This module is entirely inspired by raf, +# most of the nix code is also taken from him, +# so please do check out his configuration! +# raf himself took it from misterio77 +# and adapted it for his personal use, +# so look there too. +# +{ + config, + lib, + ... +}: let + inherit (lib.options) mkOption literalExpression; + inherit (lib.types) str nullOr enum mkOptionType attrsOf coercedTo; + inherit (lib.strings) toLower replaceStrings removePrefix hasPrefix isString; + # inherit (lib) serializeTheme; + + cfg = config.modules.style; + + hexColorType = mkOptionType { + name = "hex-color"; + descriptionClass = "noun"; + description = "RGB color in hex format"; + check = x: isString x && !(hasPrefix "#" x); + }; + colorType = attrsOf (coercedTo str (removePrefix "#") hexColorType); + + nameToSlug = name: toLower (replaceStrings [" "] ["-"] name); + getPaletteFromScheme = slug: + if builtins.pathExists ./palettes/${slug}.nix + then (import ./palettes/${slug}.nix).colorscheme.palette + else throw "The following colorscheme was imported but not found: ${slug}"; +in { + options.modules.style = { + colorScheme = { + name = mkOption { + type = nullOr (enum ["Catppuccin Mocha" "Zenburn" "Black Metal Venom" "Gruvbox"]); + description = "The colorscheme that should be used globally to theme your system."; + default = "Gruvbox"; + }; + + slug = mkOption { + type = str; + default = nameToSlug "${toString cfg.colorScheme.name}"; # toString to avoid type errors if null, returns "" + description = '' + The serialized slug for the colorScheme you are using. + + Defaults to a lowercased version of the theme name with spaces + replaced with hyphens. + + Must only be changed if the slug is expected to be different than + the serialized theme name." + ''; + }; + + colors = mkOption { + type = colorType; + default = getPaletteFromScheme cfg.colorScheme.slug; + description = '' + An attribute set containing active colors of the system. Follows base16 + scheme by default but can be expanded to base24 or anything "above" as + seen fit as the module option is actually not checked in any way + ''; + example = literalExpression '' + { + base00 = "#1e1e2e"; # Base + base01 = "#181825"; # Mantle + base02 = "#313244"; # Surface0 + base03 = "#45475a"; # Surface1 + base04 = "#585b70"; # Surface2 + base05 = "#cdd6f4"; # text + base06 = "#f5e0dc"; # rosewater + base07 = "#b4befe"; # lavender + base08 = "#f38ba8"; # red + base09 = "#fab387"; # peach + base0A = "#a6e3a1"; # yellow + base0B = "#94e2d5"; # green + base0C = "#94e2d5"; # teal + base0D = "#89b4fa"; # blue + base0E = "#cba6f7"; # mauve + base0F = "#f2cdcd"; # flamingo + } + ''; + }; + + variant = mkOption { + type = enum ["dark" "light"]; + default = + if builtins.substring 0 1 cfg.colorScheme.colors.base00 < "5" + then "dark" + else "light"; + description = '' + Whether the scheme is dark or light + ''; + }; + alpha = mkOption { + type = str; + default = 1.0; + description = '' + The alpha value for the colorscheme + ''; + }; + }; + }; +} diff --git a/modules/style/fonts.nix b/modules/style/fonts.nix index 694731a..4bd9a68 100644 --- a/modules/style/fonts.nix +++ b/modules/style/fonts.nix @@ -1,16 +1,21 @@ {pkgs, ...}: let inherit (builtins) mapAttrs; - - custom-iosevka = pkgs.iosevka.override { + valiosevka = pkgs.iosevka.override { privateBuildPlan = { - family = "Iosevka Custom"; + family = "valiosevka"; spacing = "normal"; serifs = "sans"; - noCvSs = true; exportGlyphNames = false; - variants.inherits = "ss15"; + ligations.inherits = "dlig"; + variants = { + inherits = "ss15"; + design = { + e = "flat-crossbar"; + f = "diagonal-tailed-crossbar-at-x-height"; + }; + }; }; set = "Fancy"; }; @@ -29,6 +34,7 @@ in { # Enable font hinting. Hinting aligns glyphs to pixel boundaries # to improve rendering sharpness at low resolution. hinting.enable = true; + # Set the defalt fonts. This was taken from raf, # many thanks. defaultFonts = let @@ -50,7 +56,6 @@ in { packages = builtins.attrValues { inherit (pkgs) - # custom-iosevka material-icons material-design-icons papirus-icon-theme @@ -69,6 +74,7 @@ in { comic-shanns-mono symbols-only ; + inherit valiosevka; }; fontDir = { # Whether to create a directory with links to all fonts in diff --git a/modules/style/gtk.nix b/modules/style/gtk.nix index eaaec5f..d079c06 100644 --- a/modules/style/gtk.nix +++ b/modules/style/gtk.nix @@ -1,12 +1,44 @@ { config, lib, + pkgs, ... -}: -with lib; let - cfg = config.modules.usrEnv.style.gtk; +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) str package; + inherit (lib.modules) mkIf; + cfg = config.modules.theme.gtk; in { + options.modules.theme.gtk = { + enable = mkEnableOption "Wether to enable GTK theming"; + theme = { + name = mkOption { + description = "The GTK theme name"; + default = "Gruvbox-Dark-BL"; + type = str; + }; + package = mkOption { + description = "The GTK theme package"; + default = pkgs.gruvbox-gtk-theme; + type = package; + }; + }; + iconTheme = { + description = "The GTK icon theme"; + name = mkOption { + description = "The GTK icon theme name"; + default = "Papirus-Dark"; + type = str; + }; + package = mkOption { + description = "The GTK icon theme package"; + default = pkgs.catppuccin-papirus-folders; + type = package; + }; + }; + }; config = mkIf cfg.enable { - programs.dconf.enable = true; # NOTE: we need this or gtk breaks + # NOTE: we need this or gtk breaks + programs.dconf.enable = true; }; } diff --git a/modules/options/style/palettes/black-metal-venom.nix b/modules/style/palettes/black-metal-venom.nix similarity index 100% rename from modules/options/style/palettes/black-metal-venom.nix rename to modules/style/palettes/black-metal-venom.nix diff --git a/modules/options/style/palettes/catppuccin-mocha.nix b/modules/style/palettes/catppuccin-mocha.nix similarity index 100% rename from modules/options/style/palettes/catppuccin-mocha.nix rename to modules/style/palettes/catppuccin-mocha.nix diff --git a/modules/options/style/palettes/gruvbox.nix b/modules/style/palettes/gruvbox.nix similarity index 100% rename from modules/options/style/palettes/gruvbox.nix rename to modules/style/palettes/gruvbox.nix diff --git a/modules/options/style/palettes/zenburn.nix b/modules/style/palettes/zenburn.nix similarity index 100% rename from modules/options/style/palettes/zenburn.nix rename to modules/style/palettes/zenburn.nix diff --git a/modules/style/qt.nix b/modules/style/qt.nix index 1c9ea18..f33872c 100644 --- a/modules/style/qt.nix +++ b/modules/style/qt.nix @@ -3,20 +3,37 @@ lib, pkgs, ... -}: -with lib; let - theme = { - package = pkgs.gruvbox-gtk-theme; - name = "Gruvbox-Dark-BL"; - }; +}: let + inherit (lib.modules) mkIf; + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) str package; cfg = config.modules.usrEnv.style.qt; in { - config = mkIf cfg.enable { - environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";}; - - environment.variables = { - QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; - GTK_THEME = theme.name; + options.modules.usrEnv.style.qt = { + enable = mkEnableOption "qt theming"; + name = mkOption { + description = "qt theme name"; + default = "Catppuccin-Mocha-Dark"; + type = str; + }; + variant = mkOption { + description = "qt theme variant"; + default = "mocha"; + type = str; + }; + accentColor = mkOption { + description = "accent colour for qt theme"; + default = "green"; + type = str; + }; + package = mkOption { + description = "qt theme package"; + default = pkgs.catppuccin-kde; + type = package; }; }; + + config = + mkIf cfg.enable { + }; } diff --git a/modules/wms/wayland/hyprland/binds.nix b/modules/wms/wayland/hyprland/binds.nix index 9d6c6cc..799bae6 100644 --- a/modules/wms/wayland/hyprland/binds.nix +++ b/modules/wms/wayland/hyprland/binds.nix @@ -54,20 +54,16 @@ in { binde = [ # window focus - "$mainMod, H, hy3:movefocus, l" - "$mainMod, J, hy3:movefocus, d" - "$mainMod, K, hy3:movefocus, u" - "$mainMod, L, hy3:movefocus, r" + "$mainMod, H, movefocus, l" + "$mainMod, J, movefocus, d" + "$mainMod, K, movefocus, u" + "$mainMod, L, movefocus, r" # Move Windows - "$mainMod SHIFT, H, hy3:movewindow, l" - "$mainMod SHIFT, J, hy3:movewindow, d" - "$mainMod SHIFT, K, hy3:movewindow, u" - "$mainMod SHIFT, L, hy3:movewindow, r" - - "$mainMod, T, hy3:makegroup, tab" - "$mainMod, M, hy3:makegroup, h" - "$mainMod, C, hy3:makegroup, v" + "$mainMod SHIFT, H, movewindow, l" + "$mainMod SHIFT, J, movewindow, d" + "$mainMod SHIFT, K, movewindow, u" + "$mainMod SHIFT, L, movewindow, r" ]; # Media controls diff --git a/modules/wms/wayland/hyprland/exec.nix b/modules/wms/wayland/hyprland/exec.nix index f427a93..76d925b 100644 --- a/modules/wms/wayland/hyprland/exec.nix +++ b/modules/wms/wayland/hyprland/exec.nix @@ -3,14 +3,14 @@ pkgs, ... }: let - inherit (config.modules.style) cursor; + # inherit (config.modules.style) cursor; inherit (builtins) toString; in { programs.hyprland.settings = { # Hyprland settings # Programs which get executed at Hyprland start. exec-once = [ - "hyprctl setcursor ${cursor.name} ${toString cursor.size}" + # "hyprctl setcursor ${cursor.name} ${toString cursor.size}" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol" diff --git a/modules/wms/wayland/hyprland/module.nix b/modules/wms/wayland/hyprland/module.nix index a6996b9..f9ba8b1 100644 --- a/modules/wms/wayland/hyprland/module.nix +++ b/modules/wms/wayland/hyprland/module.nix @@ -27,8 +27,6 @@ in { portalPackage = pkgs.xdg-desktop-portal-hyprland; plugins = [ pkgs.hyprlandPlugins.hyprsplit - pkgs.hyprlandPlugins.hy3 - # pkgs.hyprlandPlugins.hypr-dynamic-cursors ]; }; # xdg Portal diff --git a/modules/wms/wayland/hyprland/settings.nix b/modules/wms/wayland/hyprland/settings.nix index 2b832c8..fa515e9 100644 --- a/modules/wms/wayland/hyprland/settings.nix +++ b/modules/wms/wayland/hyprland/settings.nix @@ -47,7 +47,7 @@ in { }; general = { - layout = "hy3"; + layout = "dwindle"; gaps_in = 0; gaps_out = 0; border_size = 2; @@ -61,15 +61,6 @@ in { num_workspaces = 10; persistent_workspaces = true; }; - hy3 = { - tabs = { - height = 13; - padding = 0; - radius = 0; - border_width = 1; - blur = false; - }; - }; dynamic-cursors = { enabled = true;