From 2e58acb9e7cbf54d479a1a127ce34707a89ae888 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Sun, 4 May 2025 15:25:41 +0200 Subject: [PATCH] ditch nix-colors --- common/colors.nix | 46 ---------------------------- common/configuration.nix | 3 -- common/home/default.nix | 13 ++++++-- flake.lock | 51 -------------------------------- flake.nix | 5 +--- hosts/lambdaos/configuration.nix | 2 -- hosts/nuos/configuration.nix | 2 -- modules/games/steam.nix | 6 ---- modules/waybar/battery.nix | 20 ++++++------- modules/waybar/bluetooth.nix | 4 +-- modules/waybar/clock.nix | 8 ++--- modules/waybar/cpu.nix | 4 +-- modules/waybar/default.nix | 9 +++--- modules/waybar/memory.nix | 4 +-- modules/waybar/network.nix | 6 ++-- modules/waybar/power.nix | 4 +-- modules/waybar/spotify.nix | 4 +-- modules/waybar/temperature.nix | 6 ++-- modules/waybar/tray.nix | 6 ++-- modules/waybar/window.nix | 4 +-- modules/waybar/wireplumber.nix | 4 +-- modules/waybar/workspaces.nix | 8 ++--- 22 files changed, 57 insertions(+), 162 deletions(-) delete mode 100644 common/colors.nix diff --git a/common/colors.nix b/common/colors.nix deleted file mode 100644 index ca0eecc..0000000 --- a/common/colors.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs, - ... -}: -{ - imports = [ - inputs.nix-colors.homeManagerModules.default - ]; - - colorScheme = { - slug = "dracumod"; - name = "ModifiedDracula"; - author = "Noa"; - palette = rec { - base00 = "#26052e"; # background222c" - base01 = "#950fad"; # lighter background" - base02 = "#3A3C4E"; # selection background - base03 = "#4D4F68"; # comments, invisibles, line highlighting - base04 = "#626483"; # dark foreground - base05 = "#E9E9F4"; # foreground - base06 = "#f8f8f2"; # light foreground - base07 = "#ffffff"; # lightest foreground - base08 = "#ff5555"; # red - base09 = "#f1fa8c"; # yellow - base0A = "#EBFF87"; # classes, markup, search text highlight - base0B = "#50fa7b"; # green - base0C = "#8be9fd"; # cyan - base0D = "#bd93f9"; # blue - base0E = "#ff79c6"; # purple - base0F = "#00F769"; # deprecated - base10 = "#1D1D26"; # darker background - base11 = "#1B1B23"; # darkest background - base12 = "#ff6e6e"; # bright red - base13 = "#ffffa5"; # bright yellow - base14 = "#69ff94"; # bright green - base15 = "#a4ffff"; # bright cyan - base16 = "#d6acff"; # bright blue - base17 = "#ff92df"; # bright purple - taskbarText = base04; - taskbarBackground = base10; - background_paper = "#000000"; - foreground_paper = "#26052e"; - }; - }; - -} diff --git a/common/configuration.nix b/common/configuration.nix index 5f569f7..92d516f 100644 --- a/common/configuration.nix +++ b/common/configuration.nix @@ -1,8 +1,6 @@ { - config, pkgs, inputs, - nix-colors, ... }: { @@ -85,7 +83,6 @@ home-manager = { extraSpecialArgs = { inherit inputs; - inherit nix-colors; }; }; diff --git a/common/home/default.nix b/common/home/default.nix index 79177e1..93ad49c 100644 --- a/common/home/default.nix +++ b/common/home/default.nix @@ -289,9 +289,18 @@ in let display_config = let + hexToGLSLVec = + color: + let + cs = config.lib.stylix.colors; + red = cs."${color}-dec-r"; + green = cs."${color}-dec-g"; + blue = cs."${color}-dec-b"; + in + "vec4(${red}, ${green}, ${blue}, 1.0);"; display-shader = pkgs.replaceVars ../../modules/automapaper/display-with_vars.glsl { - background = inputs.nix-colors.lib.conversions.hexToGLSLVec config.lib.stylix.colors.base00; - foreground = inputs.nix-colors.lib.conversions.hexToGLSLVec config.lib.stylix.colors.base0E; + background = hexToGLSLVec "base00"; + foreground = hexToGLSLVec "base0E"; }; state-shader = ../../modules/automapaper/state-game_of_life.glsl; init-shader = ../../modules/automapaper/init.glsl; diff --git a/flake.lock b/flake.lock index bb0651e..0d6d58e 100644 --- a/flake.lock +++ b/flake.lock @@ -155,22 +155,6 @@ "type": "github" } }, - "base16-schemes": { - "flake": false, - "locked": { - "lastModified": 1696158499, - "narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=", - "owner": "tinted-theming", - "repo": "base16-schemes", - "rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-schemes", - "type": "github" - } - }, "base16-vim": { "flake": false, "locked": { @@ -1089,25 +1073,6 @@ "type": "github" } }, - "nix-colors": { - "inputs": { - "base16-schemes": "base16-schemes", - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1718718715, - "narHash": "sha256-NS95zWZfv/IZvqoAouUW8RJIiBf+HFTKNRlay0GxLzI=", - "owner": "itepastra", - "repo": "nix-colors", - "rev": "5020bfccdad81ca4b0827d3b49ad72353ba1694c", - "type": "github" - }, - "original": { - "owner": "itepastra", - "repo": "nix-colors", - "type": "github" - } - }, "nix-filter": { "locked": { "lastModified": 1731533336, @@ -1209,21 +1174,6 @@ "type": "indirect" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1697935651, - "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -1469,7 +1419,6 @@ "lix-module": "lix-module", "mailserver": "mailserver", "niri": "niri", - "nix-colors": "nix-colors", "nixcord": "nixcord", "nixpkgs": "nixpkgs_8", "oxalica": "oxalica", diff --git a/flake.nix b/flake.nix index f64dd55..a1d3f97 100644 --- a/flake.nix +++ b/flake.nix @@ -5,10 +5,6 @@ nixpkgs.url = "github:nixos/nixpkgs/master"; # nixpkgs.url = "/home/noa/Documents/programming/nixpkgs"; - nix-colors = { - url = "github:itepastra/nix-colors"; - }; - home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -75,6 +71,7 @@ nixcord = { url = "github:kaylorben/nixcord"; }; + disqalculate = { url = "github:itepastra/disqalculate"; }; diff --git a/hosts/lambdaos/configuration.nix b/hosts/lambdaos/configuration.nix index c4d6738..8d3cdfc 100644 --- a/hosts/lambdaos/configuration.nix +++ b/hosts/lambdaos/configuration.nix @@ -5,8 +5,6 @@ { config, pkgs, - inputs, - nix-colors, ... }: { diff --git a/hosts/nuos/configuration.nix b/hosts/nuos/configuration.nix index c776a69..6656682 100644 --- a/hosts/nuos/configuration.nix +++ b/hosts/nuos/configuration.nix @@ -7,7 +7,6 @@ pkgs, inputs, lib, - nix-colors, config, ... }: @@ -92,7 +91,6 @@ in home-manager = { extraSpecialArgs = { inherit inputs; - inherit nix-colors; }; users = { "noa" = (import ../../common/home) { diff --git a/modules/games/steam.nix b/modules/games/steam.nix index 6899cb4..98de4bf 100644 --- a/modules/games/steam.nix +++ b/modules/games/steam.nix @@ -15,12 +15,6 @@ remotePlay.openFirewall = true; gamescopeSession.enable = true; dedicatedServer.openFirewall = true; - extraPkgs = - pkgs: with pkgs; [ - pango - libthai - harfbuzz - ]; }; alvr = { diff --git a/modules/waybar/battery.nix b/modules/waybar/battery.nix index 69bb000..8aa0af9 100644 --- a/modules/waybar/battery.nix +++ b/modules/waybar/battery.nix @@ -37,20 +37,20 @@ in }; style = '' #battery { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 2px; padding: 0 12px; border-radius: 999px; min-width: 40px; transition: all 0.3s; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } #battery.charging, #battery.plugged, #battery.full { - color: #${config.colorScheme.palette.taskbarText}; - background-color: #${config.colorScheme.palette.taskbarBackground}; + color: #${config.lib.stylix.colors.base04}; + background-color: #${config.lib.stylix.colors.base10}; box-shadow: none; } @@ -61,16 +61,16 @@ in @keyframes batteryCritical { 0% { - background-color: #${config.colorScheme.palette.base08}; - color: #${config.colorScheme.palette.base06}; + background-color: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base06}; } 50% { - background-color: #${config.colorScheme.palette.base02}; - color: #${config.colorScheme.palette.base08}; + background-color: #${config.lib.stylix.colors.base02}; + color: #${config.lib.stylix.colors.base08}; } 100% { - background-color: #${config.colorScheme.palette.base08}; - color: #${config.colorScheme.palette.base06}; + background-color: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base06}; } } ''; diff --git a/modules/waybar/bluetooth.nix b/modules/waybar/bluetooth.nix index 87a6534..dacdf3a 100644 --- a/modules/waybar/bluetooth.nix +++ b/modules/waybar/bluetooth.nix @@ -22,10 +22,10 @@ in }; style = '' #custom-bluetooth { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; border-radius: 999px 0 0 999px; } ''; diff --git a/modules/waybar/clock.nix b/modules/waybar/clock.nix index f2aabad..9db08b0 100644 --- a/modules/waybar/clock.nix +++ b/modules/waybar/clock.nix @@ -23,15 +23,15 @@ in calendar = { weeks-pos = "left"; format = { - today = "{}"; # TODO: use nix-colors - weeks = "{}"; # TODO: use nix-colors + today = "{}"; + weeks = "{}"; }; }; }; style = '' #clock { - color: #${config.colorScheme.palette.taskbarText}; - background-color: #${config.colorScheme.palette.taskbarBackground}; + color: #${config.lib.stylix.colors.base04}; + background-color: #${config.lib.stylix.colors.base10}; margin: 5px 0px; padding: 0 12px; border-radius: 999px 0 0 999px; diff --git a/modules/waybar/cpu.nix b/modules/waybar/cpu.nix index 9dee631..ec14b8e 100644 --- a/modules/waybar/cpu.nix +++ b/modules/waybar/cpu.nix @@ -17,10 +17,10 @@ in }; style = '' #cpu { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } ''; }; diff --git a/modules/waybar/default.nix b/modules/waybar/default.nix index cbb833d..38988bf 100644 --- a/modules/waybar/default.nix +++ b/modules/waybar/default.nix @@ -50,7 +50,6 @@ in ./spotify.nix ./battery.nix ./bluetooth.nix - ../../common/colors.nix ]; config = lib.mkIf cfg.enable { @@ -101,7 +100,7 @@ in window#waybar { background-color: transparent; - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; transition-property: background-color; transition-duration: 0.5s; } @@ -131,11 +130,11 @@ in } tooltip { - background-color: #${config.colorScheme.palette.base00}; + background-color: #${config.lib.stylix.colors.base00}; border: 1px solid; - border-color: #${config.colorScheme.palette.taskbarText}; + border-color: #${config.lib.stylix.colors.base04}; border-radius: 10px; - color: #${config.colorScheme.palette.base05}; + color: #${config.lib.stylix.colors.base05}; } tooltip label { padding: 5px; diff --git a/modules/waybar/memory.nix b/modules/waybar/memory.nix index d709b36..8c029b3 100644 --- a/modules/waybar/memory.nix +++ b/modules/waybar/memory.nix @@ -17,10 +17,10 @@ in }; style = '' #memory { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } ''; }; diff --git a/modules/waybar/network.nix b/modules/waybar/network.nix index ed01334..6d8b4f9 100644 --- a/modules/waybar/network.nix +++ b/modules/waybar/network.nix @@ -21,15 +21,15 @@ in }; style = '' #network { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } #network.disconnected { transition: all 0.2s; - color: #${config.colorScheme.palette.base02}; + color: #${config.lib.stylix.colors.base02}; } ''; }; diff --git a/modules/waybar/power.nix b/modules/waybar/power.nix index 6e121f5..a1ed166 100644 --- a/modules/waybar/power.nix +++ b/modules/waybar/power.nix @@ -24,11 +24,11 @@ in }; style = '' #custom-poweroff { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 0px 2px; padding: 0 15px; border-radius: 999px; - box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01}; + box-shadow: inset 0 0 0 1px #${config.lib.stylix.colors.base01}; } ''; }; diff --git a/modules/waybar/spotify.nix b/modules/waybar/spotify.nix index dc8a901..cde8dbf 100644 --- a/modules/waybar/spotify.nix +++ b/modules/waybar/spotify.nix @@ -26,10 +26,10 @@ in }; style = '' #custom-spotify { - color: #${config.colorScheme.palette.base14}; + color: #${config.lib.stylix.colors.base14}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; border-radius: 0 999px 999px 0; } ''; diff --git a/modules/waybar/temperature.nix b/modules/waybar/temperature.nix index b87fe63..644087f 100644 --- a/modules/waybar/temperature.nix +++ b/modules/waybar/temperature.nix @@ -24,15 +24,15 @@ in }; style = '' #temperature { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; border-radius: 0 999px 999px 0; } #temperature.critcal { - color: #${config.colorScheme.palette.base08}; + color: #${config.lib.stylix.colors.base08}; } ''; }; diff --git a/modules/waybar/tray.nix b/modules/waybar/tray.nix index cdd916e..ffdb5ce 100644 --- a/modules/waybar/tray.nix +++ b/modules/waybar/tray.nix @@ -16,11 +16,11 @@ in }; style = '' #tray { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 4px 10px; border-radius: 999px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } #tray > * { @@ -32,7 +32,7 @@ in } #tray > .needs-attention { - background-color: #${config.colorScheme.palette.base08}; + background-color: #${config.lib.stylix.colors.base08}; border-radius: 999px; } ''; diff --git a/modules/waybar/window.nix b/modules/waybar/window.nix index e1db6d7..0165bd9 100644 --- a/modules/waybar/window.nix +++ b/modules/waybar/window.nix @@ -18,7 +18,7 @@ in window#waybar { background-color: transparent; border-radius: 999px; - color: #${config.colorScheme.palette.base05}; + color: #${config.lib.stylix.colors.base05}; transition-property: background-color; transition-duration: .5s; } @@ -37,7 +37,7 @@ in #window { margin-left: 6px; - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; } ''; }; diff --git a/modules/waybar/wireplumber.nix b/modules/waybar/wireplumber.nix index f7b6248..3ac75f0 100644 --- a/modules/waybar/wireplumber.nix +++ b/modules/waybar/wireplumber.nix @@ -28,10 +28,10 @@ in }; style = '' #wireplumber { - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; margin: 5px 0px; padding: 0 8px; - background-color: #${config.colorScheme.palette.taskbarBackground}; + background-color: #${config.lib.stylix.colors.base10}; } ''; }; diff --git a/modules/waybar/workspaces.nix b/modules/waybar/workspaces.nix index a89670e..b56cdfe 100644 --- a/modules/waybar/workspaces.nix +++ b/modules/waybar/workspaces.nix @@ -24,21 +24,21 @@ in min-width: 15px; min-height: 15px; background-color: transparent; - color: #${config.colorScheme.palette.taskbarText}; + color: #${config.lib.stylix.colors.base04}; border-radius: 999px; } #workspaces button:hover { - background-color: #${config.colorScheme.palette.base17}; + background-color: #${config.lib.stylix.colors.base17}; } #workspaces button.active { font-weight: bold; - background-color: #${config.colorScheme.palette.base0E}; + background-color: #${config.lib.stylix.colors.base0E}; } #workspaces button.urgent { - background-color: #${config.colorScheme.palette.base08}; + background-color: #${config.lib.stylix.colors.base08}; } #workspaces {