nix/nixos/thablet.nix

81 lines
1.9 KiB
Nix
Raw Permalink Normal View History

2024-01-04 13:40:14 -06:00
{
lib,
config,
...
}: {
2024-01-04 22:15:55 -06:00
networking.hostName = "thablet";
2024-01-04 13:40:14 -06:00
boot.loader.systemd-boot.enable = true;
services.fprintd = {
2024-01-04 22:15:55 -06:00
# TODO: am I missing a driver? see arch wiki for this h/w
2024-03-24 17:48:02 -05:00
enable = false;
2024-01-04 13:40:14 -06:00
# tod.enable = true;
# tod.driver = pkgs.libfprint-2-tod1-goodix;
};
environment.systemPackages =
#with pkgs;
[];
2024-01-04 14:45:10 -06:00
# https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Using_acpi_call
systemd.services.activate-touch-hack = {
2024-01-04 22:15:55 -06:00
enable = true;
description = "Touch wake Thinkpad X1 Yoga 3rd gen hack";
2024-01-04 14:45:10 -06:00
unitConfig = {
After = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"];
};
serviceConfig = {
ExecStart = ''
/bin/sh -c "echo '\\_SB.PCI0.LPCB.EC._Q2A' > /proc/acpi/call"
'';
};
wantedBy = ["suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target"];
};
2024-01-04 13:40:14 -06:00
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel" "acpi_call"];
2024-01-04 14:45:10 -06:00
boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call];
2024-01-04 13:40:14 -06:00
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2024-06-02 14:26:51 -05:00
hardware.bluetooth = {
enable = true;
2024-09-22 20:20:15 -05:00
powerOnBoot = false;
};
services.power-profiles-daemon = {
enable = true;
2024-06-02 14:26:51 -05:00
};
2024-06-28 21:36:19 -05:00
networking = {
firewall = let
terraria = 7777;
stardew-valley = 24642;
in {
allowedTCPPorts = [terraria stardew-valley];
allowedUDPPorts = [terraria stardew-valley];
};
};
2024-09-22 20:20:15 -05:00
home-manager.users.daniel = {
wayland.windowManager.sway = {
config = {
output = {
"AU Optronics 0x2236 Unknown" = {
mode = "2560x1440@60Hz";
position = "0,0";
scale = toString 1.25;
};
};
};
};
};
2024-06-28 21:36:19 -05:00
system.stateVersion = "24.05";
2024-01-04 13:40:14 -06:00
}