diff --git a/home.nix b/home.nix index 3592eff..29a6e9c 100644 --- a/home.nix +++ b/home.nix @@ -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 diff --git a/modules/alacritty.nix b/modules/alacritty.nix index 3545144..3b97c19 100644 --- a/modules/alacritty.nix +++ b/modules/alacritty.nix @@ -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"; }; }; }; diff --git a/modules/dunst.nix b/modules/dunst.nix index ae48965..23c8371 100644 --- a/modules/dunst.nix +++ b/modules/dunst.nix @@ -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; }; diff --git a/modules/polybar.nix b/modules/polybar.nix index 5f7b232..2a072b8 100644 --- a/modules/polybar.nix +++ b/modules/polybar.nix @@ -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; }; }; }; diff --git a/modules/zathura.nix b/modules/zathura.nix index 860bba4..4d2b946 100644 --- a/modules/zathura.nix +++ b/modules/zathura.nix @@ -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"; }; diff --git a/nixos/base.nix b/nixos/base.nix index 0c51cd4..329d06f 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -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; diff --git a/overlays/rice.nix b/overlays/rice.nix index 135e061..b2518d7 100644 --- a/overlays/rice.nix +++ b/overlays/rice.nix @@ -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 = {