74 lines
2.5 KiB
Nix
74 lines
2.5 KiB
Nix
{ inputs, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
inputs.nixos-hardware.nixosModules.framework-12-13th-gen-intel
|
|
./hardware-configuration.nix
|
|
../../configs/desktop-light.nix
|
|
../../configs/qemu.nix
|
|
../../configs/mcpkg.nix
|
|
];
|
|
|
|
# Power optimization for Framework 12 laptop
|
|
|
|
# Thermald works alongside TLP (from nixos-hardware) for better thermal/power management
|
|
services.thermald.enable = true;
|
|
|
|
# WiFi power saving - enables 802.11 power save mode
|
|
networking.networkmanager.wifi.powersave = true;
|
|
|
|
# Bluetooth power optimization - don't power on at boot, disable fast connect
|
|
hardware.bluetooth = {
|
|
powerOnBoot = false;
|
|
settings.General.FastConnectable = false;
|
|
};
|
|
|
|
# Audio power saving - Intel HDA codec powers down after 1 second of silence
|
|
boot.extraModprobeConfig = ''
|
|
options snd_hda_intel power_save=1
|
|
'';
|
|
|
|
# ILITEK USI stylus/touchscreen support
|
|
# The stylus device is misclassified as a keyboard by the default evdev
|
|
# catchall. Force it to use libinput as a tablet device.
|
|
services.xserver.inputClassSections = [
|
|
''
|
|
Identifier "ILITEK stylus tablet"
|
|
MatchProduct "ILIT2901:00 222A:5539 Stylus"
|
|
MatchDevicePath "/dev/input/event*"
|
|
Driver "libinput"
|
|
''
|
|
];
|
|
|
|
# Route internal Metacircular zones to rift's CoreDNS (MCNS precursor).
|
|
# Tailscale sets ~. (catch-all) on tailscale0, which overrides global
|
|
# domain routing. We need a per-link override that takes priority.
|
|
# This systemd service runs after tailscale and adds the routing domain
|
|
# to a virtual interface that points at rift's CoreDNS.
|
|
networking.nameservers = [
|
|
"192.168.88.181"
|
|
"100.95.252.120"
|
|
];
|
|
|
|
systemd.services.mcp-dns-route = {
|
|
description = "Route mcp.metacircular.net DNS to rift CoreDNS";
|
|
after = [ "network-online.target" "tailscaled.service" ];
|
|
wants = [ "network-online.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
# Tailscale sets ~. (catch-all) on tailscale0, overriding all other
|
|
# DNS routing. We replace it with specific routes: Tailscale names
|
|
# stay on Tailscale DNS, and mcp.metacircular.net goes to rift's
|
|
# CoreDNS (via the Tailscale overlay).
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
RemainAfterExit = true;
|
|
};
|
|
script = ''
|
|
# Add rift's CoreDNS alongside Tailscale's DNS on the tailscale0 link
|
|
${pkgs.systemd}/bin/resolvectl dns tailscale0 100.100.100.100 100.95.252.120
|
|
# Replace ~. with specific routing domains
|
|
${pkgs.systemd}/bin/resolvectl domain tailscale0 ~scylla-hammerhead.ts.net ~mcp.metacircular.net
|
|
'';
|
|
};
|
|
}
|