ditch nix-colors

This commit is contained in:
Noa Aarts 2025-05-04 15:25:41 +02:00
parent 45766f2057
commit 2e58acb9e7
Signed by: noa
GPG key ID: 1850932741EFF672
22 changed files with 57 additions and 162 deletions

View file

@ -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";
};
};
}

View file

@ -1,8 +1,6 @@
{ {
config,
pkgs, pkgs,
inputs, inputs,
nix-colors,
... ...
}: }:
{ {
@ -85,7 +83,6 @@
home-manager = { home-manager = {
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
inherit nix-colors;
}; };
}; };

View file

@ -289,9 +289,18 @@ in
let let
display_config = display_config =
let 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 { display-shader = pkgs.replaceVars ../../modules/automapaper/display-with_vars.glsl {
background = inputs.nix-colors.lib.conversions.hexToGLSLVec config.lib.stylix.colors.base00; background = hexToGLSLVec "base00";
foreground = inputs.nix-colors.lib.conversions.hexToGLSLVec config.lib.stylix.colors.base0E; foreground = hexToGLSLVec "base0E";
}; };
state-shader = ../../modules/automapaper/state-game_of_life.glsl; state-shader = ../../modules/automapaper/state-game_of_life.glsl;
init-shader = ../../modules/automapaper/init.glsl; init-shader = ../../modules/automapaper/init.glsl;

51
flake.lock generated
View file

@ -155,22 +155,6 @@
"type": "github" "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": { "base16-vim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1089,25 +1073,6 @@
"type": "github" "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": { "nix-filter": {
"locked": { "locked": {
"lastModified": 1731533336, "lastModified": 1731533336,
@ -1209,21 +1174,6 @@
"type": "indirect" "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": { "nixpkgs-regression": {
"locked": { "locked": {
"lastModified": 1643052045, "lastModified": 1643052045,
@ -1469,7 +1419,6 @@
"lix-module": "lix-module", "lix-module": "lix-module",
"mailserver": "mailserver", "mailserver": "mailserver",
"niri": "niri", "niri": "niri",
"nix-colors": "nix-colors",
"nixcord": "nixcord", "nixcord": "nixcord",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"oxalica": "oxalica", "oxalica": "oxalica",

View file

@ -5,10 +5,6 @@
nixpkgs.url = "github:nixos/nixpkgs/master"; nixpkgs.url = "github:nixos/nixpkgs/master";
# nixpkgs.url = "/home/noa/Documents/programming/nixpkgs"; # nixpkgs.url = "/home/noa/Documents/programming/nixpkgs";
nix-colors = {
url = "github:itepastra/nix-colors";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -75,6 +71,7 @@
nixcord = { nixcord = {
url = "github:kaylorben/nixcord"; url = "github:kaylorben/nixcord";
}; };
disqalculate = { disqalculate = {
url = "github:itepastra/disqalculate"; url = "github:itepastra/disqalculate";
}; };

View file

@ -5,8 +5,6 @@
{ {
config, config,
pkgs, pkgs,
inputs,
nix-colors,
... ...
}: }:
{ {

View file

@ -7,7 +7,6 @@
pkgs, pkgs,
inputs, inputs,
lib, lib,
nix-colors,
config, config,
... ...
}: }:
@ -92,7 +91,6 @@ in
home-manager = { home-manager = {
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
inherit nix-colors;
}; };
users = { users = {
"noa" = (import ../../common/home) { "noa" = (import ../../common/home) {

View file

@ -15,12 +15,6 @@
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
gamescopeSession.enable = true; gamescopeSession.enable = true;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
extraPkgs =
pkgs: with pkgs; [
pango
libthai
harfbuzz
];
}; };
alvr = { alvr = {

View file

@ -37,20 +37,20 @@ in
}; };
style = '' style = ''
#battery { #battery {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 2px; margin: 5px 2px;
padding: 0 12px; padding: 0 12px;
border-radius: 999px; border-radius: 999px;
min-width: 40px; min-width: 40px;
transition: all 0.3s; transition: all 0.3s;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
#battery.charging, #battery.charging,
#battery.plugged, #battery.plugged,
#battery.full { #battery.full {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
box-shadow: none; box-shadow: none;
} }
@ -61,16 +61,16 @@ in
@keyframes batteryCritical { @keyframes batteryCritical {
0% { 0% {
background-color: #${config.colorScheme.palette.base08}; background-color: #${config.lib.stylix.colors.base08};
color: #${config.colorScheme.palette.base06}; color: #${config.lib.stylix.colors.base06};
} }
50% { 50% {
background-color: #${config.colorScheme.palette.base02}; background-color: #${config.lib.stylix.colors.base02};
color: #${config.colorScheme.palette.base08}; color: #${config.lib.stylix.colors.base08};
} }
100% { 100% {
background-color: #${config.colorScheme.palette.base08}; background-color: #${config.lib.stylix.colors.base08};
color: #${config.colorScheme.palette.base06}; color: #${config.lib.stylix.colors.base06};
} }
} }
''; '';

View file

@ -22,10 +22,10 @@ in
}; };
style = '' style = ''
#custom-bluetooth { #custom-bluetooth {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
border-radius: 999px 0 0 999px; border-radius: 999px 0 0 999px;
} }
''; '';

View file

@ -23,15 +23,15 @@ in
calendar = { calendar = {
weeks-pos = "left"; weeks-pos = "left";
format = { format = {
today = "<span color='#${config.colorScheme.palette.base17}'><u>{}</u></span>"; # TODO: use nix-colors today = "<span color='#${config.lib.stylix.colors.base17}'><u>{}</u></span>";
weeks = "<span color='#${config.colorScheme.palette.base17}'>{}</span>"; # TODO: use nix-colors weeks = "<span color='#${config.lib.stylix.colors.base17}'>{}</span>";
}; };
}; };
}; };
style = '' style = ''
#clock { #clock {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
margin: 5px 0px; margin: 5px 0px;
padding: 0 12px; padding: 0 12px;
border-radius: 999px 0 0 999px; border-radius: 999px 0 0 999px;

View file

@ -17,10 +17,10 @@ in
}; };
style = '' style = ''
#cpu { #cpu {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
''; '';
}; };

View file

@ -50,7 +50,6 @@ in
./spotify.nix ./spotify.nix
./battery.nix ./battery.nix
./bluetooth.nix ./bluetooth.nix
../../common/colors.nix
]; ];
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -101,7 +100,7 @@ in
window#waybar { window#waybar {
background-color: transparent; background-color: transparent;
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
} }
@ -131,11 +130,11 @@ in
} }
tooltip { tooltip {
background-color: #${config.colorScheme.palette.base00}; background-color: #${config.lib.stylix.colors.base00};
border: 1px solid; border: 1px solid;
border-color: #${config.colorScheme.palette.taskbarText}; border-color: #${config.lib.stylix.colors.base04};
border-radius: 10px; border-radius: 10px;
color: #${config.colorScheme.palette.base05}; color: #${config.lib.stylix.colors.base05};
} }
tooltip label { tooltip label {
padding: 5px; padding: 5px;

View file

@ -17,10 +17,10 @@ in
}; };
style = '' style = ''
#memory { #memory {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
''; '';
}; };

View file

@ -21,15 +21,15 @@ in
}; };
style = '' style = ''
#network { #network {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
#network.disconnected { #network.disconnected {
transition: all 0.2s; transition: all 0.2s;
color: #${config.colorScheme.palette.base02}; color: #${config.lib.stylix.colors.base02};
} }
''; '';
}; };

View file

@ -24,11 +24,11 @@ in
}; };
style = '' style = ''
#custom-poweroff { #custom-poweroff {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 0px 2px; margin: 0px 2px;
padding: 0 15px; padding: 0 15px;
border-radius: 999px; 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};
} }
''; '';
}; };

View file

@ -26,10 +26,10 @@ in
}; };
style = '' style = ''
#custom-spotify { #custom-spotify {
color: #${config.colorScheme.palette.base14}; color: #${config.lib.stylix.colors.base14};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
border-radius: 0 999px 999px 0; border-radius: 0 999px 999px 0;
} }
''; '';

View file

@ -24,15 +24,15 @@ in
}; };
style = '' style = ''
#temperature { #temperature {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
border-radius: 0 999px 999px 0; border-radius: 0 999px 999px 0;
} }
#temperature.critcal { #temperature.critcal {
color: #${config.colorScheme.palette.base08}; color: #${config.lib.stylix.colors.base08};
} }
''; '';
}; };

View file

@ -16,11 +16,11 @@ in
}; };
style = '' style = ''
#tray { #tray {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 4px 10px; padding: 4px 10px;
border-radius: 999px; border-radius: 999px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
#tray > * { #tray > * {
@ -32,7 +32,7 @@ in
} }
#tray > .needs-attention { #tray > .needs-attention {
background-color: #${config.colorScheme.palette.base08}; background-color: #${config.lib.stylix.colors.base08};
border-radius: 999px; border-radius: 999px;
} }
''; '';

View file

@ -18,7 +18,7 @@ in
window#waybar { window#waybar {
background-color: transparent; background-color: transparent;
border-radius: 999px; border-radius: 999px;
color: #${config.colorScheme.palette.base05}; color: #${config.lib.stylix.colors.base05};
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -37,7 +37,7 @@ in
#window { #window {
margin-left: 6px; margin-left: 6px;
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
} }
''; '';
}; };

View file

@ -28,10 +28,10 @@ in
}; };
style = '' style = ''
#wireplumber { #wireplumber {
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
margin: 5px 0px; margin: 5px 0px;
padding: 0 8px; padding: 0 8px;
background-color: #${config.colorScheme.palette.taskbarBackground}; background-color: #${config.lib.stylix.colors.base10};
} }
''; '';
}; };

View file

@ -24,21 +24,21 @@ in
min-width: 15px; min-width: 15px;
min-height: 15px; min-height: 15px;
background-color: transparent; background-color: transparent;
color: #${config.colorScheme.palette.taskbarText}; color: #${config.lib.stylix.colors.base04};
border-radius: 999px; border-radius: 999px;
} }
#workspaces button:hover { #workspaces button:hover {
background-color: #${config.colorScheme.palette.base17}; background-color: #${config.lib.stylix.colors.base17};
} }
#workspaces button.active { #workspaces button.active {
font-weight: bold; font-weight: bold;
background-color: #${config.colorScheme.palette.base0E}; background-color: #${config.lib.stylix.colors.base0E};
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #${config.colorScheme.palette.base08}; background-color: #${config.lib.stylix.colors.base08};
} }
#workspaces { #workspaces {