From 3a2d061875e2ee91002a46049a9b2e0f1937bcd9 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 9 Jan 2023 13:00:09 +0100 Subject: [PATCH] started to configure colors --- flake.lock | 63 ++++++++++++++++-- flake.nix | 9 ++- users/rouven/modules/alacritty/default.nix | 76 ++++++++-------------- 3 files changed, 90 insertions(+), 58 deletions(-) diff --git a/flake.lock b/flake.lock index cb0dc81..ede7369 100644 --- a/flake.lock +++ b/flake.lock @@ -15,6 +15,22 @@ "type": "github" } }, + "base16-schemes": { + "flake": false, + "locked": { + "lastModified": 1665690101, + "narHash": "sha256-J2ZvNaVFkqaTXzYO5L+jyRORfIOavFPKvWItP6UTMKs=", + "owner": "tinted-theming", + "repo": "base16-schemes", + "rev": "a3dc916cf90471a422c0bfe1bb4b1bdd12185ced", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-schemes", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -23,11 +39,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1673089714, - "narHash": "sha256-D58SGNOVe+s7r2iewnCA8q68gyrfQcOnD1TdJo1wFLY=", + "lastModified": 1673211936, + "narHash": "sha256-ba7jhl5BhLtpSooDHllgC0Y29vc0AiYWWsxQVtjlc7o=", "owner": "nix-community", "repo": "home-manager", - "rev": "9e565f0d9d41c19a94f55af205c328ec5177fc0a", + "rev": "684bdb386cec7d4f16e0da9f694c8ab50ad2cf2a", "type": "github" }, "original": { @@ -36,13 +52,32 @@ "type": "github" } }, + "nix-colors": { + "inputs": { + "base16-schemes": "base16-schemes", + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1672236234, + "narHash": "sha256-dpBIuxcDEvJbLD8fTipE0A0JbQD1lZB94zYFPoh01PI=", + "owner": "Misterio77", + "repo": "nix-colors", + "rev": "7e459f1d88ac54fc2f4b308adb5064863006e4b1", + "type": "github" + }, + "original": { + "owner": "Misterio77", + "repo": "nix-colors", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1672968032, - "narHash": "sha256-26Jns3GmHem44a06UN5Rj/KOD9qNJThyQrom02Ijur8=", + "lastModified": 1673163619, + "narHash": "sha256-B33PFBL64ZgTWgMnhFL3jgheAN/DjHPsZ1Ih3z0VE5I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2dea8991d89b9f1e78d874945f78ca15f6954289", + "rev": "8c54d842d9544361aac5f5b212ba04e4089e8efe", "type": "github" }, "original": { @@ -52,6 +87,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1655599917, + "narHash": "sha256-kjZbt5WdTrnjMxL79okg9TCoRUdADG50x/TWozbyTsE=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "5fb55578aa2f1a502d636a8ac71aece57cb730bb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1673100377, @@ -72,6 +122,7 @@ "inputs": { "awesome-config": "awesome-config", "home-manager": "home-manager", + "nix-colors": "nix-colors", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index 70cf509..e9032fe 100644 --- a/flake.nix +++ b/flake.nix @@ -7,9 +7,10 @@ sops-nix.url = github:Mic92/sops-nix; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; awesome-config.url=github:therealr5/awesome-config; + nix-colors.url=github:Misterio77/nix-colors; }; - outputs = { self, nixpkgs, home-manager, sops-nix, awesome-config }: { + outputs = { self, nixpkgs, home-manager, sops-nix, awesome-config, nix-colors }: { nixosConfigurations = { thinkpad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -20,7 +21,11 @@ sops-nix.nixosModules.sops { home-manager.users.rouven = { - imports = [ awesome-config.nixosModules.awesome ]; + imports = [ + awesome-config.nixosModules.awesome + nix-colors.homeManagerModule + ]; + config.colorScheme = nix-colors.colorSchemes.dracula; }; } ]; diff --git a/users/rouven/modules/alacritty/default.nix b/users/rouven/modules/alacritty/default.nix index 1d755f0..c06f452 100644 --- a/users/rouven/modules/alacritty/default.nix +++ b/users/rouven/modules/alacritty/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, nix-colors, ... }: { programs.alacritty = { enable = true; @@ -14,8 +14,8 @@ colors = { primary = { - background = "#282a36"; - foreground = "#f8f8f2"; + background = "#${config.colorScheme.colors.base00}"; + foreground = "#${config.colorScheme.colors.base05}"; }; cursor = { text = "CellBackground"; @@ -25,57 +25,33 @@ text = "CellBackground"; cursor = "CellForeground"; }; - search = { - matches = { - foreground = "#44475a"; - background = "#50fa7b"; - }; - focused_match = { - foreground = "#44475a"; - background = "#ffb86c"; - }; - footer_bar = { - background = "#282a36"; - foreground = "#f8f8f2"; - }; - }; - line_indicator = { - foreground = null; - background = null; - }; + #search = { + #matches = { + #foreground = "#44475a"; + #background = "#50fa7b"; + #}; + #focused_match = { + #foreground = "#44475a"; + #background = "#ffb86c"; + #}; + #footer_bar = { + #background = "#282a36"; + #foreground = "#f8f8f2"; + #}; + #}; selection = { text = "CellForeground"; - background = "#44475a"; + background = "#${config.colorScheme.colors.base03}"; }; normal = { - black = "#21222c"; - red = "#ff5555"; - green = "#50fa7b"; - yellow = "#f1fa8c"; - blue = "#bd93f9"; - magenta = "#ff79c6"; - cyan = "#8be9fd"; - white = "#bfbfbf"; - }; - bright = { - black = "#4d4d4d"; - red = "#ff6e67"; - green = "#5af78e"; - yellow = "#f4f99d"; - blue = "#caa9fa"; - magenta = "#ff92d0"; - cyan = "#9aedfe"; - white = "#e6e6e6"; - }; - dim = { - black = "#14151b"; - red = "#ff2222"; - green = "#1ef956"; - yellow = "#ebf85b"; - blue = "#4d5b86"; - magenta = "#ff46b0"; - cyan = "#59dffc"; - white = "#e6e6d1"; + black = "#${config.colorScheme.colors.base01}"; + red = "#${config.colorScheme.colors.base08}"; + green = "#${config.colorScheme.colors.base0A}"; + yellow = "#${config.colorScheme.colors.base0B}"; + blue = "#${config.colorScheme.colors.base0D}"; + magenta = "#${config.colorScheme.colors.base0E}"; + cyan = "#${config.colorScheme.colors.base0C}"; + white = "#${config.colorScheme.colors.base05}"; }; }; };