diff --git a/packages/hosts/default.nix b/packages/hosts/default.nix index 79a46ce..9648dc1 100644 --- a/packages/hosts/default.nix +++ b/packages/hosts/default.nix @@ -11,6 +11,8 @@ in router = stableHost ./router.nix { }; bigtower = stableHost ./bigtower.nix { }; rascal = stableHost ./rascal.nix { }; + flipflop = host ./flipflop.nix { }; + thablet = host ./thablet.nix { }; generic-headless = stableHost ./generic-headless.nix { }; generic = stableHost ./generic.nix { }; diff --git a/packages/hosts/flipflop.nix b/packages/hosts/flipflop.nix new file mode 100644 index 0000000..1898ec4 --- /dev/null +++ b/packages/hosts/flipflop.nix @@ -0,0 +1,113 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + system.stateVersion = "24.11"; + networking.hostName = "flipflop"; + + boot.loader.systemd-boot.enable = true; + + services.fprintd = { + # TODO: am I missing a driver? see arch wiki for this h/w + enable = false; + # tod.enable = true; + # tod.driver = pkgs.libfprint-2-tod1-goodix; + }; + + environment.systemPackages = + #with pkgs; + [ ]; + + # https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Yoga_(Gen_3)#Using_acpi_call + systemd.services.activate-touch-hack = { + enable = true; + description = "Touch wake Thinkpad X1 Yoga 3rd gen hack"; + + 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" + ]; + }; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ + "kvm-intel" + "acpi_call" + ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; + + hardware = { + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + intel-media-driver + intel-ocl + intel-vaapi-driver + ]; + }; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + }; + + services.power-profiles-daemon = { + enable = true; + }; + + networking = { + firewall = + let + terraria = 7777; + stardew-valley = 24642; + in + { + allowedTCPPorts = [ + terraria + stardew-valley + ]; + allowedUDPPorts = [ + terraria + stardew-valley + ]; + }; + }; + + home-manager.users.daniel = { + home = { + pointerCursor = { + size = 40; + }; + }; + }; + +}