Updates thinkpad host for new Hyprland config and WiFi

This commit is contained in:
willemml 2024-02-06 15:56:42 -08:00
parent 440b84f9e7
commit 550d37ad66
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
3 changed files with 32 additions and 7 deletions

View file

@ -3,8 +3,11 @@
pkgs, pkgs,
lib, lib,
globals, globals,
osConfig,
... ...
}: { }: let
host = osConfig.networking.hostName;
in {
imports = [ imports = [
./fonts.nix ./fonts.nix
./swaylock.nix ./swaylock.nix
@ -47,9 +50,16 @@
gaps_out = 10; gaps_out = 10;
}; };
monitor = [ monitor =
"eDP-1, 3456x2160, 0x0, 1.2" if host == "voyager"
]; then [
"eDP-1, 3456x2160, 0x0, 1.2"
]
else if host == "thinkpad"
then [
"eDP-1, 1920x1080, 0x0, 1.0"
]
else [];
exec = [ exec = [
"${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill" "${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"
@ -152,7 +162,9 @@
accel_profile = "adaptive"; accel_profile = "adaptive";
touchpad = { touchpad = {
natural_scroll = true; natural_scroll = true;
clickfinger_behavior = true;
scroll_factor = 0.45; scroll_factor = 0.45;
drag_lock = true;
tap-and-drag = true; tap-and-drag = true;
}; };
}; };

View file

@ -5,12 +5,18 @@
osConfig, osConfig,
... ...
}: let }: let
networkInterface.eth = networkInterface =
if osConfig.networking.hostName == "voyager" if osConfig.networking.hostName == "voyager"
then "wlan0" then "wlan0"
else if osConfig.networking.hostName == "nixbox" else if osConfig.networking.hostName == "nixbox"
then "enp6s0" then "enp6s0"
else if osConfig.networking.hostName == "thinkpad"
then "wlan0"
else ""; else "";
battery =
if osConfig.networking.hostName == "voyager"
then "macsmc-battery"
else "BAT0";
colors = config.lib.stylix.colors.withHashtag; colors = config.lib.stylix.colors.withHashtag;
primaryColor = colors.base04; primaryColor = colors.base04;
altColor = colors.base0C; altColor = colors.base0C;
@ -79,7 +85,7 @@ in {
}; };
"battery" = { "battery" = {
"bat" = "macsmc-battery"; "bat" = battery;
"format" = "<span color='${primaryColor}'>Battery: {capacity}% (P)</span>"; "format" = "<span color='${primaryColor}'>Battery: {capacity}% (P)</span>";
"format-charging" = "<span color='${primaryColor}'>Battery: {capacity}% (C)</span>"; "format-charging" = "<span color='${primaryColor}'>Battery: {capacity}% (C)</span>";
"format-discharging" = "<span color='${primaryColor}'>Battery: {capacity}% (D)</span>"; "format-discharging" = "<span color='${primaryColor}'>Battery: {capacity}% (D)</span>";
@ -96,7 +102,7 @@ in {
}; };
"network" = { "network" = {
"interface" = "${networkInterface.eth}"; "interface" = "${networkInterface}";
"interval" = 2; "interval" = 2;
"format-ethernet" = "<span color='${primaryColor}'>Ether: Up: {bandwidthUpBits} Down: {bandwidthDownBits} </span>"; "format-ethernet" = "<span color='${primaryColor}'>Ether: Up: {bandwidthUpBits} Down: {bandwidthDownBits} </span>";
"tooltip-format-ethernet" = "<span color='${primaryColor}'>{ifname}</span>"; "tooltip-format-ethernet" = "<span color='${primaryColor}'>{ifname}</span>";

View file

@ -35,6 +35,13 @@
{device = "/dev/disk/by-uuid/aed88966-e44e-4d2f-99ba-1fe6fb57cf89";} {device = "/dev/disk/by-uuid/aed88966-e44e-4d2f-99ba-1fe6fb57cf89";}
]; ];
hardware.opengl.enable = true;
networking.wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
networking.hostName = "thinkpad"; networking.hostName = "thinkpad";