diff --git a/flake.nix b/flake.nix index a996ff0..fd4664c 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,14 @@ description = "NixOS system configuration"; nixConfig = { - substituters = [ - "https://cache.nixos.org/" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + # substituters = [ + # "https://cache.nixos.org/" + # "https://nix-community.cachix.org" + # ]; + # trusted-public-keys = [ + # "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + # "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + # ]; }; inputs = { diff --git a/home/programs/polybar/config.ini b/home/programs/polybar/config.ini index 7cb03c7..41e5060 100644 --- a/home/programs/polybar/config.ini +++ b/home/programs/polybar/config.ini @@ -29,13 +29,14 @@ module-margin-right = 0 tray-position = right tray-detached = false -background = ${colors.background} -foreground = ${colors.foreground} - font-0 = "NotoSans-Regular:size=11;2.5" font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5" font-2 = "Noto Sans Symbols:size=13;1" +background = ${colors.background} +foreground = ${colors.foreground} + + ; noto -> text font ; jetbrains -> icons diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 8bfe10f..d1dcec7 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -37,6 +37,39 @@ # ${ip} route | ${grep} default | ${awk} '{print $5}' > $out # ''; + res = builtins.getEnv "RES"; + + hd = '' + [bar/mybar] + height = 20 + font-0 = "NotoSans-Regular:size=11;2.5" + font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5" + font-2 = "Noto Sans Symbols:size=11;1" + ''; + + fhd = '' + [bar/mybar] + height = 20 + font-0 = "NotoSans-Regular:size=11;2.5" + font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5" + font-2 = "Noto Sans Symbols:size=11;1" + ''; + + qhd = '' + [bar/mybar] + height = 25 + font-0 = "NotoSans-Regular:size=11;2.5" + font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5" + font-2 = "Noto Sans Symbols:size=13;1" + ''; + + mon = + if res == "1366x768" + then hd + else if res == "2560x1440" + then qhd + else fhd; + internets = '' [module/network] type = internal/network @@ -61,7 +94,7 @@ in { enable = true; package = mypolybar; config = ./config.ini; - extraConfig = bctl + internets; + extraConfig = bctl + internets + mon; # my savior: https://www.reddit.com/r/NixOS/comments/v8ikwq/polybar_doesnt_start_at_launch/ script = '' # echo "none" diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index b6e11cd..c1c5e45 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -14,7 +14,7 @@ if git --git-dir /home/synchronous/nix-cfg/.git diff-index --quiet HEAD; then exit 0 fi -/run/current-system/sw/bin/nix flake check /home/synchronous/nix-cfg/ || { echo "Flake check failed. Exiting."; exit 1; } +# /run/current-system/sw/bin/nix flake check /home/synchronous/nix-cfg/ || { echo "Flake check failed. Exiting."; exit 1; } # Autoformat your nix files alejandra . &>/dev/null \ diff --git a/home/test.tex b/home/test.tex deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/thonkpad/configuration.nix b/hosts/thonkpad/configuration.nix index 3f067ae..995ff1c 100644 --- a/hosts/thonkpad/configuration.nix +++ b/hosts/thonkpad/configuration.nix @@ -25,6 +25,10 @@ in { users.synchronous = import ../../home/home.nix; }; + environment.variables = { + RES = "1366x768"; + }; + # Bootloader. # boot.loader.grub.enable = true; # boot.loader.grub.device = "/dev/sda";