Compare commits

..

35 Commits

Author SHA1 Message Date
Joshua Yuen 0bffd9b81c
Adjust low battery icon threshold to 20% 2026-10-06 20:22:12 -04:00
Joshua Yuen 9631148ed8
Tighten slider spacing and lift section outlines in dropdown 2026-10-06 20:22:12 -04:00
Joshua Yuen 06659df98e
Restyle Bluetooth device rows to match wifi menu 2026-10-06 20:22:12 -04:00
Joshua Yuen d19e300982
Revert "Adjust AGS color palette to fit better"
This reverts commit c3384bd25cd64d8d4014363d0564534138497cc5.
2026-10-06 20:22:12 -04:00
Joshua Yuen 76ed841922
Adjust AGS color palette to fit better 2026-10-06 20:22:12 -04:00
Joshua Yuen c2be4aaabf
Switch to the colored Nix snowflake 2026-10-06 20:22:11 -04:00
Joshua Yuen 15c2ab76df
Use string-form mkEnableOption for AGS option 2026-10-06 20:22:11 -04:00
Joshua Yuen eb4f3d655f
Show friendly app names and make dictation notifications toast-only 2026-10-06 20:22:11 -04:00
Joshua Yuen c9a0df6f62
Keep notifications in dropdown after toast timeout and polish toasts 2026-10-06 20:22:11 -04:00
Joshua Yuen c1de6da8d3
Port AlfheimOS quicksettings styling with scrollable popup 2026-10-06 20:22:11 -04:00
Joshua Yuen e9d9d31b33
Add do not disturb toggle and bar indicator 2026-10-06 20:22:10 -04:00
Joshua Yuen 1ad7a8501e
Make notifications always visible with plain header 2026-10-06 20:22:10 -04:00
Joshua Yuen 67f251d959
Add media player card and bar center track button 2026-10-06 20:22:10 -04:00
Joshua Yuen f95ee4d35c
Add popup header with avatar and system actions 2026-10-06 20:22:10 -04:00
Joshua Yuen 33cc7c7b12
Add brightness slider polled from brightnessctl 2026-10-06 20:22:10 -04:00
Joshua Yuen c8e3d61d6b
Add bluetooth toggle with device list and discovery 2026-10-06 20:22:09 -04:00
Joshua Yuen 4dda5b3fde
Fix clock layout shift with tabular digits and fixed width 2026-10-06 20:22:09 -04:00
Joshua Yuen 3b873cba7d
Polish bar spacing and clock module with custom clock icon 2026-10-06 20:22:09 -04:00
Joshua Yuen f6ddf3d4b7
Add battery and notifications to QuickSettings popup 2026-10-06 20:22:09 -04:00
Joshua Yuen 578797498e
Move wifi into QuickSettings popup with collapsible network list 2026-10-06 20:22:09 -04:00
Joshua Yuen aabe5b15db
Add QuickSettings popup with power actions and volume/mic sliders 2026-10-06 20:22:09 -04:00
Joshua Yuen 560db85f6d
Add nix logo, clock format, and curved module separators 2026-10-06 20:22:08 -04:00
Joshua Yuen e9f5c62d77
Restyle AGS bar as filled full-width bar with inverse corners 2026-10-06 20:22:08 -04:00
Joshua Yuen e3fcfc6812
Add AGS notification support 2026-10-06 20:22:08 -04:00
Joshua Yuen bb48892e75
Fix nix fmt 2026-10-06 20:22:08 -04:00
Joshua Yuen b5d2a1a87b
Add AGS power controls and locking 2026-10-06 20:22:08 -04:00
Joshua Yuen 31786db83d
Add AGS battery widget 2026-10-06 20:22:07 -04:00
Joshua Yuen 60397bc527
Add AGS WiFi widget 2026-10-06 20:22:07 -04:00
Joshua Yuen 4217f4f701
Add AGS volume widget 2026-10-06 20:22:07 -04:00
Joshua Yuen b6fbe0da48
Added AGS workspaces and clock 2026-10-06 20:22:07 -04:00
Joshua Yuen eee0d5b4ec
Build AGS scaffolding 2026-10-06 20:22:07 -04:00
Joshua Yuen 5364812171
Configure pipewire so that hotplugging into an external display/speaker is recognized properly 2026-10-06 20:21:22 -04:00
Joshua Yuen eb480a205c
Automate Battle.net client tweaks via home activation 2026-10-06 19:42:36 -04:00
Joshua Yuen 79ba19161f
Add Battle.net module enabling Lutris, wine, and winetricks 2026-10-06 19:31:32 -04:00
Joshua Yuen 0a34d3f062
Add gaming profile and make host profile selection explicit 2026-10-06 19:29:25 -04:00
13 changed files with 135 additions and 9 deletions

View File

@ -48,7 +48,6 @@
let
system = "x86_64-linux";
username = "josh";
profile = "desktop";
homePath = ./. + "/users/${username}/home.nix";
pkgs = import nixpkgs {
@ -60,6 +59,7 @@
mkHost =
{
host,
profile,
extraModules ? [ ],
}:
nixpkgs.lib.nixosSystem {
@ -79,12 +79,19 @@
in
{
nixosConfigurations = {
laptop = mkHost { host = "laptop"; };
laptop = mkHost {
host = "laptop";
profile = "gaming";
};
vm = mkHost { host = "vm"; };
vm = mkHost {
host = "vm";
profile = "desktop";
};
live = mkHost {
host = "installation-iso";
profile = "desktop";
extraModules = [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
{ environment.systemPackages = [ install-system.packages.${system}.default ]; }
@ -94,7 +101,8 @@
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = {
inherit inputs profile username;
inherit inputs username;
profile = "desktop";
};
inherit pkgs;
modules = [

View File

@ -1,9 +1,10 @@
{
profile,
...
}:
{
imports = [
../../profiles/desktop
../../profiles/${profile}
../../modules/nixos
../../modules/drivers

View File

@ -1,9 +1,10 @@
{
profile,
...
}:
{
imports = [
../../profiles/desktop
../../profiles/${profile}
../../modules/nixos
../../modules/drivers

View File

@ -1,9 +1,10 @@
{
profile,
...
}:
{
imports = [
../../profiles/desktop
../../profiles/${profile}
../../modules/nixos
../../modules/drivers

View File

@ -0,0 +1,48 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.battlenet;
yq = "${pkgs.yq}/bin/yq";
jq = "${pkgs.jq}/bin/jq";
in
{
config = mkIf cfg.enable {
# Battle.net is installed manually through Lutris, which creates the game
# config and wine prefix outside of Home Manager's control. The Lutris
# installer script writes HardwareAcceleration "false" (software rendering,
# which breaks Battle.net's CEF UI repainting under XWayland), so patch it
# and the game env after every rebuild. Re-run the rebuild after installing
# Battle.net for these tweaks to land.
home.activation.battlenetClientTweaks = hm.dag.entryAfter [ "writeBoundary" ] ''
shopt -s nullglob
for game in "$HOME"/.local/share/lutris/games/battlenet*.yml; do
prefix=$(${yq} -r '.game.prefix // ""' "$game" 2>/dev/null) || continue
for configFile in "$prefix"/drive_c/users/*/AppData/Roaming/Battle.net/Battle.net.config; do
[ -e "$configFile" ] || continue
if [ "$(${jq} -r '.Client.HardwareAcceleration // ""' "$configFile" 2>/dev/null)" != "true" ]; then
${jq} '.Client.HardwareAcceleration = "true"' "$configFile" > "$configFile.tmp" && mv "$configFile.tmp" "$configFile"
fi
done
# GE-Proton's Wayland driver breaks Battle.net's CEF window sizing and
# painting, and Xalia misrenders the client, so pin both off.
if [ "$(${yq} -r '.system.env.PROTON_USE_XALIA // ""' "$game" 2>/dev/null)" != "0" ]; then
${yq} --in-place --yaml-output '.system.env.PROTON_USE_XALIA = "0"' "$game"
fi
if [ "$(${yq} -r '.system.env.WINE_SIMULATE_WRITECOPY // ""' "$game" 2>/dev/null)" != "1" ]; then
${yq} --in-place --yaml-output '.system.env.WINE_SIMULATE_WRITECOPY = "1"' "$game"
fi
if [ -n "$(${yq} -r '.system.env.PROTON_ENABLE_WAYLAND // ""' "$game" 2>/dev/null)" ]; then
${yq} --in-place --yaml-output 'del(.system.env.PROTON_ENABLE_WAYLAND)' "$game"
fi
done
shopt -u nullglob
'';
};
}

View File

@ -4,6 +4,7 @@
{
imports = [
./ags
./battlenet.nix
./direnv.nix
./discord.nix
./dictation.nix

View File

@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.battlenet;
in
{
config = mkIf cfg.enable {
# Battle.net games rely on 32-bit graphics libraries; Steam would
# normally force this on, but enable it independently as a fallback.
hardware.graphics.enable32Bit = mkDefault true;
environment.systemPackages = with pkgs; [
lutris
wineWow64Packages.staging
winetricks
];
};
}

View File

@ -3,6 +3,7 @@
}:
{
imports = [
./battlenet.nix
./boot.nix
./dev.nix
./fonts.nix

View File

@ -19,6 +19,27 @@ in
jack.enable = true;
};
# Re-enable PulseAudio-style auto profile switching (ACP), since
# WirePlumber 0.5 disables it and never reacts to HDMI hotplug events,
# leaving audio stuck on analog when a dock/TV is connected.
services.pipewire.wireplumber.extraConfig."99-acp-auto-profile" = {
"monitor.alsa.rules" = [
{
matches = [
{
"device.name" = "~alsa_card.*";
}
];
actions = {
update-props = {
"api.acp.auto-profile" = true;
"api.acp.auto-port" = true;
};
};
}
];
};
# Allows Pipewire to use the realtime scheduler for increased performance
security.rtkit.enable = true;
};

View File

@ -0,0 +1,10 @@
{
lib,
...
}:
with lib;
{
options.modules.battlenet = {
enable = mkEnableOption "Battle.net via Lutris/Wine";
};
}

View File

@ -4,6 +4,7 @@
{
imports = [
./ags.nix
./battlenet.nix
./discord.nix
./dictation.nix
./dev.nix

View File

@ -30,6 +30,4 @@
modules.screenshot.enable = true;
modules.tailscale.enable = true;
modules.steam.enable = true;
}

View File

@ -0,0 +1,12 @@
{
...
}:
{
imports = [
../desktop
];
modules.steam.enable = true;
modules.battlenet.enable = true;
}