Switch to new nix-rice version

This commit is contained in:
Filippo Berto 2021-09-06 12:36:08 +02:00
parent b25d9b68f8
commit bd6b04c6a4
7 changed files with 65 additions and 52 deletions

View file

@ -5,7 +5,6 @@ let
url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.1.2.tar.gz"; url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.1.2.tar.gz";
sha256 = "15f97nwwvk828vnx6kk325zzjn4q37hrpp9aiqiz2qhfs06mr147"; sha256 = "15f97nwwvk828vnx6kk325zzjn4q37hrpp9aiqiz2qhfs06mr147";
}; };
callPackage = pkgs.lib.callPackageWith pkgs;
nord = import ./themes/nord.nix; nord = import ./themes/nord.nix;
onedark = import ./themes/onedark.nix; onedark = import ./themes/onedark.nix;
in in

View file

@ -1,6 +1,31 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
strPalette = with pkgs.rice; palette.toRgbHex colorPalette; strPalette = with pkgs.rice; palette.toRgbHex rec {
inherit (colorPalette) normal bright;
dim = colorPalette.dark;
primary = {
background = normal.black;
foreground = normal.white;
dim_foreground = dim.white;
};
cursor = {
cursor = normal.white;
text = normal.black;
};
vi_mode_cursor = {
cursor = normal.white;
text = normal.black;
};
selection.background = dim.blue;
search = {
matches.background = dim.cyan;
bar = {
foreground = dim.cyan;
background = dim.yellow;
};
};
};
in in
{ {
# Include fonts packages # Include fonts packages
@ -20,22 +45,9 @@ in
# hide_when_typing = true; # hide_when_typing = true;
hints.modifiers = "Control"; hints.modifiers = "Control";
}; };
colors = with pkgs.rice; strPalette // { colors = with pkgs.rice; strPalette // {
selection = { selection.text = "CellForeground";
text = "CellForeground"; search.matches.foreground = "CellForeground";
background = strPalette.dim.blue;
};
search = {
matches = {
foreground = "CellForeground";
background = strPalette.dim.cyan;
};
bar = {
foreground = strPalette.dim.cyan;
background = strPalette.dim.yellow;
};
};
}; };
}; };
}; };

View file

@ -61,18 +61,18 @@ in
mouse_right_click = "close_all"; mouse_right_click = "close_all";
}; };
urgency_low = { urgency_low = {
background = palette.primary.background; background = palette.normal.black;
foreground = palette.primary.foreground; foreground = palette.normal.white;
timeout = 10; timeout = 10;
}; };
urgency_normal = { urgency_normal = {
background = palette.primary.background; background = palette.normal.black;
foreground = palette.primary.foreground; foreground = palette.normal.white;
timeout = 10; timeout = 10;
}; };
urgency_critical = { urgency_critical = {
background = palette.primary.background; background = palette.normal.black;
foreground = palette.primary.foreground; foreground = palette.normal.white;
frame_color = palette.bright.red; frame_color = palette.bright.red;
timeout = 0; timeout = 0;
}; };

View file

@ -13,17 +13,17 @@ let
colors = with pkgs.rice; palette.toARGBHex rec { colors = with pkgs.rice; palette.toARGBHex rec {
normal = { normal = {
foreground = colorPalette.primary.foreground; foreground = colorPalette.normal.white;
background = colorPalette.primary.background; background = colorPalette.normal.black;
underline = colorPalette.normal.blue; underline = colorPalette.normal.blue;
}; };
active = palette.tPalette (c: color.brighten c "50%") normal; active = palette.brighten "50%" normal;
selected = { selected = {
foreground = colorPalette.bright.white; foreground = colorPalette.bright.white;
background = color.tAlphaRgba (v: 240) colorPalette.dim.blue; background = color.tAlphaRgba (v: 240) colorPalette.dark.blue;
underline = colorPalette.dim.white; underline = colorPalette.dark.white;
}; };
alert = colorPalette.bright.red; alert = colorPalette.bright.red;
@ -168,7 +168,7 @@ in
focused = colors.selected // common; focused = colors.selected // common;
occupied = colors.active // common; occupied = colors.active // common;
urgent = colors.active // common // { background = colors.alert; }; urgent = colors.active // common // { background = colors.alert; };
empty = colors.normal // common // { text = "󰧟"; padding = 0 ; }; empty = colors.normal // common // { text = "󰧟"; padding = 0; };
}; };
}; };

View file

@ -13,7 +13,7 @@ in
inputbar-bg = strPalette.bright.black; inputbar-bg = strPalette.bright.black;
inputbar-fg = strPalette.normal.cyan; inputbar-fg = strPalette.normal.cyan;
page-padding = 10; page-padding = 10;
recolor-lightcolor = strPalette.dim.cyan; recolor-lightcolor = strPalette.dark.cyan;
statusbar-bg = strPalette.bright.black; statusbar-bg = strPalette.bright.black;
selection-clipboard = "clipboard"; selection-clipboard = "clipboard";
}; };

View file

@ -13,6 +13,7 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.checkJournalingFS = true; boot.initrd.checkJournalingFS = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
# # Cross-build arm # # Cross-build arm
boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
@ -67,7 +68,7 @@
# nvidiaWayland = true; # nvidiaWayland = true;
# }; # };
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
windowManager.bspwm.enable = true; # windowManager.bspwm.enable = true;
# Configure keymap in X11 # Configure keymap in X11
layout = "it"; layout = "it";
@ -114,6 +115,7 @@
"libvirtd" "libvirtd"
"network" "network"
"usb" "usb"
"video"
"wheel" "wheel"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
@ -202,7 +204,7 @@
services.dbus.packages = with pkgs; [ gnome.dconf ]; services.dbus.packages = with pkgs; [ gnome.dconf ];
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; # services.blueman.enable = true;
services.zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; }; services.zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; };
services.gvfs = { services.gvfs = {
enable = true; enable = true;

View file

@ -1,10 +1,9 @@
final: prev: final: prev:
let let
callPackage = final.lib.callPackageWith final; nix-rice = final.callPackage (
nix-rice = callPackage (
fetchTarball { fetchTarball {
url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.1.2.tar.gz"; url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.2.1.tar.gz";
sha256 = "15f97nwwvk828vnx6kk325zzjn4q37hrpp9aiqiz2qhfs06mr147"; sha256 = "1is70gjf59sxccwhz1hl9hdxsd4z8vqsr2rdk3imnmxj9n3jf6j8";
} }
) {}; ) {};
nord = import ../themes/nord.nix; nord = import ../themes/nord.nix;
@ -12,8 +11,9 @@ let
in in
( (
rec { rec {
rice = nix-rice // rec { rice = nix-rice // {
colorPalette = with nix-rice; palette.palette rec { colorPalette = with nix-rice; rec {
normal = {
black = color.hexToRgba nord.n0; black = color.hexToRgba nord.n0;
red = color.hexToRgba nord.n11; red = color.hexToRgba nord.n11;
green = color.hexToRgba nord.n14; green = color.hexToRgba nord.n14;
@ -22,12 +22,12 @@ in
magenta = color.hexToRgba nord.n15; magenta = color.hexToRgba nord.n15;
cyan = color.hexToRgba nord.n8; cyan = color.hexToRgba nord.n8;
white = color.hexToRgba nord.n4; white = color.hexToRgba nord.n4;
};
bright-white = color.hexToRgba nord.n6; bright = palette.brighten 10 normal // {
bright-red = color.hexToRgba nord.n12; white = color.hexToRgba nord.n6;
cursor-cursor = color.hexToRgba nord.n4; red = color.hexToRgba nord.n12;
};
primary-background = color.tAlphaRgba (v: 255 * opacity) black; dark = palette.darken 10 normal;
}; };
font = { font = {
normal = { normal = {