Refactor colorscheme generation
This commit is contained in:
parent
4d6cca2a92
commit
13021eb2b1
|
@ -1,8 +1,4 @@
|
|||
{ lib, pkgs, config, ... }@attrs:
|
||||
let
|
||||
utils = import ./colors.nix attrs;
|
||||
colorscheme = utils.colorscheme "purple" ../../../external/6.png;
|
||||
in {
|
||||
{ lib, pkgs, config, ... }: {
|
||||
home-manager.users.agatha = {
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
|
@ -14,7 +10,9 @@ in {
|
|||
extraConfig = lib.strings.concatStringsSep "\n"
|
||||
[ "nitrogen --set-zoom-fill ${../../../external/6.png}" ];
|
||||
monitors = { eDP-1 = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" ]; };
|
||||
settings = let color = n: colorscheme.colors."${builtins.toString n}";
|
||||
settings = let
|
||||
color = n:
|
||||
config.environment.graphical.colors.purple."${builtins.toString n}";
|
||||
in {
|
||||
border_width = 3;
|
||||
window_gap = 15;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
colorscheme = name: image: rec {
|
||||
generate = pkgs.callPackage ({ runCommand, colorpickle }:
|
||||
runCommand "colors-${name}" { nativeBuildInputs = [ colorpickle ]; } ''
|
||||
colorpickle ${image} --lighten 0.05 --bold-delta 0.1 > $out
|
||||
'') { };
|
||||
|
||||
colors = builtins.listToAttrs (lib.lists.imap0 (i: v: {
|
||||
name = builtins.toString i;
|
||||
value = v;
|
||||
}) (lib.strings.splitString "\n" (builtins.readFile generate)));
|
||||
};
|
||||
}
|
|
@ -45,6 +45,7 @@
|
|||
xdotool
|
||||
prismlauncher
|
||||
obs-studio
|
||||
nil
|
||||
];
|
||||
|
||||
# Brightness/volume keys
|
||||
|
@ -148,6 +149,11 @@
|
|||
home.sessionVariables = { "DIRENV_LOG_FORMAT" = ""; };
|
||||
};
|
||||
|
||||
environment.graphical.colorschemes.purple = {
|
||||
image = ../../../external/6.png;
|
||||
params = [ "--lighten" "0.05" "--bold-delta" "0.1" ];
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
security.polkit.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ lib, pkgs, config, ... }@attrs:
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
utils = import ./colors.nix attrs;
|
||||
colorscheme = utils.colorscheme "purple" ../../../external/6.png;
|
||||
color = n: colorscheme.colors."${builtins.toString n}";
|
||||
color = n:
|
||||
config.environment.graphical.colors.purple."${builtins.toString n}";
|
||||
in {
|
||||
home-manager.users.agatha = {
|
||||
services.dunst = {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ pkgs, config, ... }@attrs:
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
utils = import ./colors.nix attrs;
|
||||
colorscheme = utils.colorscheme "purple" ../../../external/6.png;
|
||||
color = n: colorscheme.colors."${builtins.toString n}";
|
||||
color = n:
|
||||
config.environment.graphical.colors.purple."${builtins.toString n}";
|
||||
in {
|
||||
home-manager.users.agatha = {
|
||||
programs.kitty = {
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ lib, pkgs, config, ... }@attrs:
|
||||
let
|
||||
utils = import ./colors.nix attrs;
|
||||
colorscheme = utils.colorscheme "purple" ../../../external/6.png;
|
||||
in {
|
||||
{ lib, pkgs, config, ... }: {
|
||||
home-manager.users.agatha = {
|
||||
|
||||
systemd.user.services.polybar = {
|
||||
|
@ -29,7 +25,9 @@ in {
|
|||
|
||||
script = "polybar right &";
|
||||
|
||||
settings = let color = n: colorscheme.colors."${builtins.toString n}";
|
||||
settings = let
|
||||
color = n:
|
||||
config.environment.graphical.colors.purple."${builtins.toString n}";
|
||||
in {
|
||||
"colors" = {
|
||||
background = color 0;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ lib, pkgs, config, ... }@attrs:
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
utils = import ./colors.nix attrs;
|
||||
colorscheme = utils.colorscheme "purple" ../../../external/6.png;
|
||||
color = n: colorscheme.colors."${builtins.toString n}";
|
||||
color = n:
|
||||
config.environment.graphical.colors.purple."${builtins.toString n}";
|
||||
in {
|
||||
home-manager.users.agatha = {
|
||||
programs.rofi = {
|
||||
|
|
24
flake.lock
24
flake.lock
|
@ -28,11 +28,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681058620,
|
||||
"narHash": "sha256-dethIZN9+Tcu/FbcyQnS4e8Ly+S50tnjBdLQBscxcF4=",
|
||||
"lastModified": 1682020898,
|
||||
"narHash": "sha256-XYSSFmqIjsvmgusWaOSD/WeaTyH8o83i+qma1BQgARU=",
|
||||
"owner": "AgathaSorceress",
|
||||
"repo": "colorpickle",
|
||||
"rev": "06b6ae85e8a141ccee67f3597ccf37ca61f8dcc3",
|
||||
"rev": "2574b83cb0454a146a0346bf0d6a134d62241e60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -284,11 +284,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681780219,
|
||||
"narHash": "sha256-whY/Ae5/szGGvZV9db7OQm30Z646HIjkL7bOLNiR0Go=",
|
||||
"lastModified": 1681970018,
|
||||
"narHash": "sha256-V/OeOVRJGOqQHKSG1RgZuLOMGclRgxfoYBN8zCzKxCE=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "ca65d312e715413cd5675cafd599d74534900d3f",
|
||||
"rev": "b336cd76a740eea6ea41baa1028233ccf6e12ee5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -304,11 +304,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681799488,
|
||||
"narHash": "sha256-aAK/Mzf2yZ20stXkmPmtvtDQFy2XaEjAyZ3Fo56FbQc=",
|
||||
"lastModified": 1681971090,
|
||||
"narHash": "sha256-3j0M63GkG6GGny9e+C//GyuDCx1IwrurD27S0YI+GQY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2dcb61d396b45f10d9e0621a7358b361f94323ff",
|
||||
"rev": "5160039edca28a7e66bad0cfc72a07c91d6768ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -652,11 +652,11 @@
|
|||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1681696129,
|
||||
"narHash": "sha256-Ba2y1lmsWmmAOAoTD5G9UnTS/UqV0ZFyzysgdfu7qag=",
|
||||
"lastModified": 1681932375,
|
||||
"narHash": "sha256-tSXbYmpnKSSWpzOrs27ie8X3I0yqKA6AuCzCYNtwbCU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "de66115c552acc4e0c0f92c5a5efb32e37dfa216",
|
||||
"rev": "3d302c67ab8647327dba84fbdb443cdbf0e82744",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
overlays = [
|
||||
(final: prev: {
|
||||
helix = helix.packages.${final.system}.default;
|
||||
colorpickle = colorpickle.defaultPackage.${final.system};
|
||||
colorpickle = colorpickle.packages.${final.system}.default;
|
||||
frq-friend = frq-friend.defaultPackage.${final.system};
|
||||
})
|
||||
colmena.overlay
|
||||
|
@ -79,6 +79,7 @@
|
|||
./hosts/ritual/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
url-eater.nixosModule
|
||||
colorpickle.nixosModules.default
|
||||
];
|
||||
|
||||
deployment = {
|
||||
|
|
Loading…
Reference in New Issue