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";
sha256 = "15f97nwwvk828vnx6kk325zzjn4q37hrpp9aiqiz2qhfs06mr147";
};
callPackage = pkgs.lib.callPackageWith pkgs;
nord = import ./themes/nord.nix;
onedark = import ./themes/onedark.nix;
in

View file

@ -1,6 +1,31 @@
{ pkgs, lib, ... }:
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
{
# Include fonts packages
@ -20,22 +45,9 @@ in
# hide_when_typing = true;
hints.modifiers = "Control";
};
colors = with pkgs.rice; strPalette // {
selection = {
text = "CellForeground";
background = strPalette.dim.blue;
};
search = {
matches = {
foreground = "CellForeground";
background = strPalette.dim.cyan;
};
bar = {
foreground = strPalette.dim.cyan;
background = strPalette.dim.yellow;
};
};
selection.text = "CellForeground";
search.matches.foreground = "CellForeground";
};
};
};

View file

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

View file

@ -13,17 +13,17 @@ let
colors = with pkgs.rice; palette.toARGBHex rec {
normal = {
foreground = colorPalette.primary.foreground;
background = colorPalette.primary.background;
foreground = colorPalette.normal.white;
background = colorPalette.normal.black;
underline = colorPalette.normal.blue;
};
active = palette.tPalette (c: color.brighten c "50%") normal;
active = palette.brighten "50%" normal;
selected = {
foreground = colorPalette.bright.white;
background = color.tAlphaRgba (v: 240) colorPalette.dim.blue;
underline = colorPalette.dim.white;
background = color.tAlphaRgba (v: 240) colorPalette.dark.blue;
underline = colorPalette.dark.white;
};
alert = colorPalette.bright.red;
@ -168,7 +168,7 @@ in
focused = colors.selected // common;
occupied = colors.active // common;
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-fg = strPalette.normal.cyan;
page-padding = 10;
recolor-lightcolor = strPalette.dim.cyan;
recolor-lightcolor = strPalette.dark.cyan;
statusbar-bg = strPalette.bright.black;
selection-clipboard = "clipboard";
};

View file

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

View file

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