2026-06-04 13:57:44 +00:00
|
|
|
# Portable NixOS hosts (X1, MBP-Asahi). Imported from the host table in
|
|
|
|
|
# flake.nix. Shared graphical-workstation settings live in ./workstation.nix;
|
|
|
|
|
# the only laptop-specific bit is the Wi-Fi backend. Mobile home-manager
|
|
|
|
|
# components (battery block, brightness keys) are gated by the `portable` flag
|
|
|
|
|
# threaded through mkHost -- see lyrathorpe/home/sway.nix.
|
2026-06-04 13:34:44 +00:00
|
|
|
{ ... }:
|
|
|
|
|
{
|
2026-06-04 13:57:44 +00:00
|
|
|
imports = [ ./workstation.nix ];
|
2026-06-04 13:34:44 +00:00
|
|
|
|
|
|
|
|
# Wi-Fi via iwd with its built-in DHCP/network configuration.
|
|
|
|
|
networking.wireless.iwd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings.General.EnableNetworkConfiguration = true;
|
|
|
|
|
};
|
2026-06-10 16:26:44 +01:00
|
|
|
|
2026-06-10 16:34:06 +01:00
|
|
|
# Lid behaviour: suspend on battery, lock on external power (swayidle's
|
|
|
|
|
# before-sleep hook locks before the suspend completes either way).
|
|
|
|
|
services.logind.settings.Login = {
|
|
|
|
|
HandleLidSwitch = "suspend";
|
|
|
|
|
HandleLidSwitchExternalPower = "lock";
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-10 16:26:44 +01:00
|
|
|
# Bluetooth. The Asahi MBP loads Apple's BT firmware (see its host config) and
|
|
|
|
|
# the T400 has an optional BT module; enable bluez on both, with blueman as the
|
|
|
|
|
# GUI/tray manager for the Sway session.
|
|
|
|
|
hardware.bluetooth = {
|
|
|
|
|
enable = true;
|
|
|
|
|
powerOnBoot = true;
|
|
|
|
|
};
|
|
|
|
|
services.blueman.enable = true;
|
2026-06-04 13:34:44 +00:00
|
|
|
}
|