From 7b1f0f8316e6dd0c971ef2c93bbb32779edb2db6 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 14 Aug 2024 22:41:54 -0400 Subject: [PATCH] yank enough to make hosts build with stylix enabled --- flake.nix | 2 +- homeManagerModules/apps/alacritty/default.nix | 6 - homeManagerModules/apps/default.nix | 1 - homeManagerModules/apps/fuzzel/default.nix | 37 ----- homeManagerModules/apps/helix/default.nix | 1 - homeManagerModules/apps/kitty/default.nix | 8 - homeManagerModules/apps/rofi/default.nix | 153 ------------------ homeManagerModules/apps/swaylock/default.nix | 70 ++++---- homeManagerModules/apps/vsCodium/default.nix | 15 +- .../desktop/hyprland/settings.nix | 16 -- homeManagerModules/desktop/sway/settings.nix | 34 ---- homeManagerModules/services/mako/default.nix | 5 - homes/aly/default.nix | 18 --- homes/dustin/default.nix | 5 - hosts/common/default.nix | 6 + 15 files changed, 49 insertions(+), 328 deletions(-) delete mode 100644 homeManagerModules/apps/fuzzel/default.nix diff --git a/flake.nix b/flake.nix index 965e74c8..b49f5472 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ inputs.nixpkgs.follows = "nixpkgs"; url = "github:alyraffauf/raffauflabs"; }; - + stylix.url = "github:danth/stylix"; }; diff --git a/homeManagerModules/apps/alacritty/default.nix b/homeManagerModules/apps/alacritty/default.nix index f3474d21..f5f1e481 100644 --- a/homeManagerModules/apps/alacritty/default.nix +++ b/homeManagerModules/apps/alacritty/default.nix @@ -11,12 +11,6 @@ in { settings = { colors = { draw_bold_text_with_bright_colors = true; - - primary = { - background = "${cfg.theme.colors.background}"; - foreground = "${cfg.theme.colors.text}"; - }; - transparent_background_colors = true; }; diff --git a/homeManagerModules/apps/default.nix b/homeManagerModules/apps/default.nix index afeaf7d0..a235fa95 100644 --- a/homeManagerModules/apps/default.nix +++ b/homeManagerModules/apps/default.nix @@ -6,7 +6,6 @@ ./emacs ./fastfetch ./firefox - ./fuzzel ./helix ./keepassxc ./kitty diff --git a/homeManagerModules/apps/fuzzel/default.nix b/homeManagerModules/apps/fuzzel/default.nix deleted file mode 100644 index 92d3bb40..00000000 --- a/homeManagerModules/apps/fuzzel/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.ar.home; -in { - config = lib.mkIf cfg.apps.fuzzel.enable { - programs.fuzzel = { - enable = true; - settings = { - border = { - radius = 10; - width = 2; - }; - - main = { - font = "${cfg.theme.monospaceFont.name}:size=${toString cfg.theme.monospaceFont.size}"; - icon-theme = "${config.gtk.iconTheme.name}"; - layer = "overlay"; - lines = 3; - terminal = lib.getExe cfg.defaultApps.terminal; - width = 36; - }; - - colors = { - background = "${cfg.theme.colors.background}CC"; - border = "${cfg.theme.colors.primary}EE"; - selection = "${cfg.theme.colors.background}FF"; - selection-match = "${cfg.theme.colors.primary}FF"; - selection-text = "${cfg.theme.colors.secondary}FF"; - text = "${cfg.theme.colors.text}FF"; - }; - }; - }; - }; -} diff --git a/homeManagerModules/apps/helix/default.nix b/homeManagerModules/apps/helix/default.nix index af268565..35bb0c29 100644 --- a/homeManagerModules/apps/helix/default.nix +++ b/homeManagerModules/apps/helix/default.nix @@ -68,7 +68,6 @@ }; settings = { - theme = lib.mkDefault "adwaita-dark"; editor = { auto-completion = true; auto-format = true; diff --git a/homeManagerModules/apps/kitty/default.nix b/homeManagerModules/apps/kitty/default.nix index 55905574..8661c759 100644 --- a/homeManagerModules/apps/kitty/default.nix +++ b/homeManagerModules/apps/kitty/default.nix @@ -10,19 +10,11 @@ in { programs.kitty = { enable = true; - font = { - name = cfg.theme.monospaceFont.name; - size = cfg.theme.monospaceFont.size + 1; - }; - settings = { - background_opacity = "0.6"; confirm_os_window_close = "0"; notify_on_cmd_finish = "unfocused 10.0 command ${lib.getExe pkgs.libnotify} -i ${pkgs.kitty}/share/icons/hicolor/256x256/apps/kitty.png \"Job Finished\""; tab_bar_style = "powerline"; }; - - theme = lib.mkDefault "Adwaita dark"; }; }; } diff --git a/homeManagerModules/apps/rofi/default.nix b/homeManagerModules/apps/rofi/default.nix index 2e909f9b..0ef31dbd 100644 --- a/homeManagerModules/apps/rofi/default.nix +++ b/homeManagerModules/apps/rofi/default.nix @@ -15,7 +15,6 @@ in { programs.rofi = { enable = true; - font = "${cfg.theme.monospaceFont.name} ${toString cfg.theme.monospaceFont.size}"; location = "center"; package = pkgs.rofi-wayland; @@ -25,7 +24,6 @@ in { ]; terminal = lib.getExe cfg.defaultApps.terminal; - theme = "theme.rasi"; extraConfig = { case-sensitive = false; @@ -68,157 +66,6 @@ in { clear-after 60 ''; - "rofi/theme.rasi".text = '' - * { - selected-normal-foreground: ${cfg.theme.colors.secondary}; - foreground: ${cfg.theme.colors.text}; - normal-foreground: @foreground; - alternate-normal-background: transparent; - red: ${cfg.theme.colors.secondary}CC; - selected-urgent-foreground: ${cfg.theme.colors.secondary}CC; - blue: ${cfg.theme.colors.primary}CC; - urgent-foreground: ${cfg.theme.colors.primary}CC; - alternate-urgent-background: transparent; - active-foreground: ${cfg.theme.colors.primary}CC; - lightbg: rgba ( 238, 232, 213, 80 % ); - selected-active-foreground: ${cfg.theme.colors.secondary}; - alternate-active-background: transparent; - background: transparent; - bordercolor: ${cfg.theme.colors.background}99; - alternate-normal-foreground: @foreground; - normal-background: transparent; - lightfg: ${cfg.theme.colors.primary}CC; - selected-normal-background: ${cfg.theme.colors.background}; - border-color: ${cfg.theme.colors.primary}CC; - spacing: 2; - separatorcolor: ${cfg.theme.colors.primary}CC; - urgent-background: transparent; - selected-urgent-background: ${cfg.theme.colors.primary}CC; - alternate-urgent-foreground: @urgent-foreground; - background-color: transparent; - alternate-active-foreground: @active-foreground; - active-background: transparent; - selected-active-background: ${cfg.theme.colors.background}; - } - window { - background-color: ${cfg.theme.colors.background}CC; - border: 4; - border-color: @border-color; - border-radius: ${toString cfg.theme.borderRadius}px; - padding: 0; - } - mainbox { - border: 0; - padding: 0; - } - message { - border: 2px solid 0px 0px ; - border-color: @separatorcolor; - padding: 1px ; - } - textbox { - text-color: @foreground; - } - listview { - fixed-height: 0; - border: 2px solid 0px 0px ; - border-color: @separatorcolor; - spacing: 2px ; - scrollbar: false; - padding: 5px; - } - element { - border: 0; - padding: 5px; - border-radius: 10px; - } - element-text { - background-color: inherit; - text-color: inherit; - } - element.normal.normal { - background-color: @normal-background; - text-color: @normal-foreground; - } - element.normal.urgent { - background-color: @urgent-background; - text-color: @urgent-foreground; - } - element.normal.active { - background-color: @active-background; - text-color: @active-foreground; - } - element.selected.normal { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; - } - element.selected.urgent { - background-color: @selected-urgent-background; - text-color: @selected-urgent-foreground; - } - element.selected.active { - background-color: @selected-active-background; - text-color: @selected-active-foreground; - } - element.alternate.normal { - background-color: @alternate-normal-background; - text-color: @alternate-normal-foreground; - } - element.alternate.urgent { - background-color: @alternate-urgent-background; - text-color: @alternate-urgent-foreground; - } - element.alternate.active { - background-color: @alternate-active-background; - text-color: @alternate-active-foreground; - } - scrollbar { - width: 0px ; - border: 0; - handle-width: 0px ; - padding: 0; - } - mode-switcher { - border: 2px solid 0px 0px ; - border-color: @separatorcolor; - } - button.selected { - background-color: @selected-normal-background; - text-color: @selected-normal-foreground; - } - button { - background-color: @background; - text-color: @foreground; - } - inputbar { - spacing: 0; - text-color: @normal-foreground; - padding: 10px ; - } - case-indicator { - spacing: 0; - text-color: @normal-foreground; - } - entry { - spacing: 0; - text-color: @normal-foreground; - } - prompt { - spacing: 0; - text-color: @normal-foreground; - margin: 1px; - } - inputbar { - children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; - } - textbox-prompt-colon { - expand: false; - str: ":"; - margin: 0px 0.3em 0em 0em ; - text-color: @normal-foreground; - } - ''; - "networkmanager-dmenu/config.ini".text = '' [dmenu] dmenu_command = ${lib.getExe config.programs.rofi.package} diff --git a/homeManagerModules/apps/swaylock/default.nix b/homeManagerModules/apps/swaylock/default.nix index 44a387c7..4ef47705 100644 --- a/homeManagerModules/apps/swaylock/default.nix +++ b/homeManagerModules/apps/swaylock/default.nix @@ -11,40 +11,40 @@ in { programs.swaylock.enable = true; - xdg.configFile."swaylock/config".text = '' - bs-hl-color=e78284 - caps-lock-bs-hl-color=e78284 - caps-lock-key-hl-color=e78284 - color=303446 - daemonize - font="${cfg.theme.monospaceFont.name}" - image=${cfg.theme.wallpaper} - indicator-caps-lock - indicator-idle-visible - indicator-radius=120 - indicator-thickness=20 - inside-caps-lock-color=303446cc - inside-clear-color=303446cc - inside-color=303446cc - inside-ver-color=303446cc - inside-wrong-color=303446cc - key-hl-color=a6d189 - line-caps-lock-color=${cfg.theme.colors.background}CC - line-clear-color=${cfg.theme.colors.background}CC - line-color=${cfg.theme.colors.background}CC - line-ver-color=${cfg.theme.colors.background}CC - line-wrong-color=${cfg.theme.colors.background}CC - ring-caps-lock-color=e78284cc - ring-clear-color=85c1dccc - ring-color=${cfg.theme.colors.primary}CC - ring-ver-color=a6d189cc - ring-wrong-color=e78284cc - scaling=fill - separator-color=${cfg.theme.colors.background}CC - text-caps-lock-color=c6d0f5 - text-clear-color=c6d0f5 - text-ver-color=c6d0f5 - text-wrong-color=c6d0f5 - ''; + # xdg.configFile."swaylock/config".text = '' + # bs-hl-color=e78284 + # caps-lock-bs-hl-color=e78284 + # caps-lock-key-hl-color=e78284 + # color=303446 + # daemonize + # font="${cfg.theme.monospaceFont.name}" + # image=${cfg.theme.wallpaper} + # indicator-caps-lock + # indicator-idle-visible + # indicator-radius=120 + # indicator-thickness=20 + # inside-caps-lock-color=303446cc + # inside-clear-color=303446cc + # inside-color=303446cc + # inside-ver-color=303446cc + # inside-wrong-color=303446cc + # key-hl-color=a6d189 + # line-caps-lock-color=${cfg.theme.colors.background}CC + # line-clear-color=${cfg.theme.colors.background}CC + # line-color=${cfg.theme.colors.background}CC + # line-ver-color=${cfg.theme.colors.background}CC + # line-wrong-color=${cfg.theme.colors.background}CC + # ring-caps-lock-color=e78284cc + # ring-clear-color=85c1dccc + # ring-color=${cfg.theme.colors.primary}CC + # ring-ver-color=a6d189cc + # ring-wrong-color=e78284cc + # scaling=fill + # separator-color=${cfg.theme.colors.background}CC + # text-caps-lock-color=c6d0f5 + # text-clear-color=c6d0f5 + # text-ver-color=c6d0f5 + # text-wrong-color=c6d0f5 + # ''; }; } diff --git a/homeManagerModules/apps/vsCodium/default.nix b/homeManagerModules/apps/vsCodium/default.nix index ec923378..3f6c3e1c 100644 --- a/homeManagerModules/apps/vsCodium/default.nix +++ b/homeManagerModules/apps/vsCodium/default.nix @@ -34,7 +34,6 @@ in { userSettings = { "diffEditor.ignoreTrimWhitespace" = false; - "editor.fontFamily" = "'${cfg.theme.monospaceFont.name} ${toString cfg.theme.monospaceFont.size}', 'monospace', monospace"; "editor.fontSize" = cfg.theme.monospaceFont.size + 3; "editor.formatOnPaste" = true; "editor.formatOnSave" = true; @@ -83,13 +82,13 @@ in { "window.menuBarVisibility" = "hidden"; "window.titleBarStyle" = lib.mkDefault "native"; "window.zoomPerWindow" = false; - "workbench.colorTheme" = - if cfg.theme.darkMode - then "Adwaita Dark" - else "Adwaita Light"; - "workbench.iconTheme" = "vs-seti"; - "workbench.preferredDarkColorTheme" = "Adwaita Dark"; - "workbench.preferredLightColorTheme" = "Adwaita Light"; + # "workbench.colorTheme" = + # if cfg.theme.darkMode + # then "Adwaita Dark" + # else "Adwaita Light"; + # "workbench.iconTheme" = "vs-seti"; + # "workbench.preferredDarkColorTheme" = "Adwaita Dark"; + # "workbench.preferredLightColorTheme" = "Adwaita Light"; }; extensions = with pkgs.vscode-extensions; [ diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 48648377..3c0b44ad 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -100,7 +100,6 @@ in { size = 8; }; - "col.shadow" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)"; dim_special = 0.5; drop_shadow = true; @@ -149,8 +148,6 @@ in { }; general = { - "col.active_border" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}CC) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}CC) 45deg"; - "col.inactive_border" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}99)"; allow_tearing = false; border_size = 4; gaps_in = 5; @@ -164,20 +161,8 @@ in { }; group = { - "col.border_active" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}CC) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}CC) 45deg"; - "col.border_inactive" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}99)"; - "col.border_locked_active" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}CC) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}CC) 45deg"; - "col.border_locked_inactive" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}99)"; - groupbar = { - "col.active" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}CC)"; - "col.inactive" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}CC)"; - "col.locked_active" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}CC)"; - "col.locked_inactive" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}CC)"; - font_family = cfg.theme.sansFont.name; - font_size = cfg.theme.sansFont.size; height = 24; - text_color = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.text}FF)"; }; }; @@ -187,7 +172,6 @@ in { }; misc = { - background_color = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.background}FF)"; disable_hyprland_logo = true; disable_splash_rendering = true; focus_on_activate = true; diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 79a4afdc..02d0e2a1 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -29,34 +29,6 @@ in { bars = []; modifier = modifier; - colors = { - background = "${cfg.theme.colors.primary}CC"; - - focused = { - background = "${cfg.theme.colors.primary}CC"; - border = "${cfg.theme.colors.primary}CC"; - childBorder = "${cfg.theme.colors.primary}CC"; - indicator = "${cfg.theme.colors.primary}CC"; - text = "${cfg.theme.colors.text}"; - }; - - focusedInactive = { - background = "${cfg.theme.colors.inactive}99"; - border = "${cfg.theme.colors.inactive}99"; - childBorder = "${cfg.theme.colors.inactive}99"; - indicator = "${cfg.theme.colors.inactive}99"; - text = "${cfg.theme.colors.text}"; - }; - - unfocused = { - background = "${cfg.theme.colors.inactive}99"; - border = "${cfg.theme.colors.inactive}99"; - childBorder = "${cfg.theme.colors.inactive}99"; - indicator = "${cfg.theme.colors.inactive}99"; - text = "${cfg.theme.colors.text}"; - }; - }; - defaultWorkspace = "workspace number 1"; floating.criteria = [ @@ -79,12 +51,6 @@ in { newWindow = "focus"; }; - fonts = { - names = [cfg.theme.sansFont.name]; - style = "Bold"; - size = cfg.theme.sansFont.size + 0.0; - }; - gaps = { inner = 5; outer = 6; diff --git a/homeManagerModules/services/mako/default.nix b/homeManagerModules/services/mako/default.nix index 985f7e5e..d4ba3c93 100644 --- a/homeManagerModules/services/mako/default.nix +++ b/homeManagerModules/services/mako/default.nix @@ -10,13 +10,10 @@ in { services.mako = { actions = true; anchor = "bottom-right"; - backgroundColor = "${cfg.theme.colors.background}99"; - borderColor = "${cfg.theme.colors.primary}CC"; borderRadius = cfg.theme.borderRadius; borderSize = 4; defaultTimeout = 10000; enable = true; - font = "${cfg.theme.sansFont.name} ${toString cfg.theme.sansFont.size}"; groupBy = "app-name"; height = 300; iconPath = "${pkgs.papirus-icon-theme}/share/icons/Papirus/"; @@ -24,9 +21,7 @@ in { layer = "top"; margin = "20,0"; padding = "15"; - progressColor = "source ${cfg.theme.colors.secondary}"; sort = "+time"; - textColor = "${cfg.theme.colors.text}"; width = 400; extraConfig = '' diff --git a/homes/aly/default.nix b/homes/aly/default.nix index 37148c8c..0c182563 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -57,9 +57,7 @@ self: { }; gitui.enable = true; - helix.settings.theme = "rose-pine-moon"; home-manager.enable = true; - kitty.theme = "Rosé Pine Moon"; rbw = { enable = true; @@ -114,21 +112,5 @@ self: { gammastep.enable = true; randomWallpaper.enable = true; }; - - theme = { - enable = true; - borderRadius = 0; - - colors = { - text = "#e0def4"; - background = "#2a273f"; - primary = "#3e8fb0"; - secondary = "#f6c177"; - inactive = "#393552"; - shadow = "#232136"; - }; - - wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-6d7xmx.jpg"; - }; }; } diff --git a/homes/dustin/default.nix b/homes/dustin/default.nix index 9148e97a..dd244ece 100644 --- a/homes/dustin/default.nix +++ b/homes/dustin/default.nix @@ -92,10 +92,5 @@ self: { gammastep.enable = true; randomWallpaper.enable = false; }; - - theme = { - enable = true; - wallpaper = "${config.xdg.dataHome}/backgrounds/wallhaven-6d66dl.jpg"; - }; }; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 4341df1c..6d61ffe6 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -9,4 +9,10 @@ ]; environment.systemPackages = with pkgs; [git inxi python3]; + + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + image = ../../_img/hyprland.png; + }; }