Foot : Use nix color.

This commit is contained in:
Dmitry Voronin 2024-04-02 22:24:45 +03:00
parent 79459a6fbb
commit b9c4b2e3b9
6 changed files with 19 additions and 23 deletions

View file

@ -1,3 +1,4 @@
{ lib, ... }: { { lib, pkgs, color, ... }: {
environment.variables.FOOT_CONFIG = lib.mkForce ./foot/Foot.ini; # Foot fontSize override.
environment.variables.FOOT_CONFIG = lib.mkForce (import ../../module/foot/Init.nix { pkgs = pkgs; fontSize = 12; color = color; }).config;
} }

View file

@ -1,9 +0,0 @@
font=Terminess Nerd Font Mono:size=12
# font-bold=Terminess Nerd Font Mono:size=12:weight=bold
font-italic=Terminess Nerd Font Mono:size=12
font-bold-italic=Terminess Nerd Font Mono:weight=bold:size=12
dpi-aware=yes
[colors]
background=1d2021
foreground=ebdbb2

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { { pkgs, lib, color, ... }: {
imports = [ imports = [
./desktop/App.nix ./desktop/App.nix
./desktop/Bluetooth.nix ./desktop/Bluetooth.nix
@ -33,7 +33,7 @@
environment = { environment = {
variables = { variables = {
FOOT_CONFIG = ./foot/Foot.ini; FOOT_CONFIG = (import ./foot/Init.nix { pkgs = pkgs; fontSize = 14; color = color; }).config;
SWAY_CONFIG = ./sway/module; SWAY_CONFIG = ./sway/module;
SWAY_IWT_PATH = "${pkgs.sway-contrib.inactive-windows-transparency}/bin/inactive-windows-transparency.py"; SWAY_IWT_PATH = "${pkgs.sway-contrib.inactive-windows-transparency}/bin/inactive-windows-transparency.py";
# PATH = [ "/etc/swaybin" ]; # NOTE: Kept as an example on PATH modification. # PATH = [ "/etc/swaybin" ]; # NOTE: Kept as an example on PATH modification.

View file

@ -1,9 +0,0 @@
font=Terminess Nerd Font Mono:size=14
# font-bold=Terminess Nerd Font Mono:size=12:weight=bold
font-italic=Terminess Nerd Font Mono:size=14
font-bold-italic=Terminess Nerd Font Mono:weight=bold:size=14
dpi-aware=yes
[colors]
background=1d2021
foreground=ebdbb2

13
module/foot/Init.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, fontSize, color, ... }: {
config = pkgs.writeText "foot_config" ''
font=Terminess Nerd Font Mono:size=${toString(fontSize)}
# font-bold=Terminess Nerd Font Mono:size=${toString(fontSize)}:weight=bold
font-italic=Terminess Nerd Font Mono:size=${toString(fontSize)}
font-bold-italic=Terminess Nerd Font Mono:weight=bold:size=${toString(fontSize)}
dpi-aware=yes
[colors]
background=${color.bg}
foreground=${color.fg}
'';
}

View file

@ -1,4 +1,4 @@
{ const, username, homeDir, ... }: { { const, username, homeDir, ... }: {
home-manager.backupFileExtension = "old"; home-manager.backupFileExtension = "old";
home-manager.users.${username} = { home-manager.users.${username} = {