2024-01-04 13:40:14 -06:00
|
|
|
{
|
|
|
|
flake,
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
modulesPath,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-04 22:15:55 -06:00
|
|
|
networking.hostName = "thablet";
|
|
|
|
|
2024-01-21 13:01:05 -06:00
|
|
|
imports = with outputs.nixosModules; [
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
flake.diskoConfigurations.standard
|
|
|
|
inputs.hardware.nixosModules.lenovo-thinkpad-x1-yoga
|
|
|
|
desktop-usage
|
|
|
|
fonts
|
|
|
|
gnome
|
|
|
|
wifi
|
|
|
|
flanfam
|
|
|
|
flanfamkiosk
|
|
|
|
];
|
2024-01-04 13:40:14 -06:00
|
|
|
|
2024-01-04 22:15:55 -06:00
|
|
|
home-manager.users.daniel = {
|
|
|
|
imports = with outputs.homeManagerModules; [
|
2024-01-21 13:01:05 -06:00
|
|
|
linux-desktop
|
2024-01-04 22:15:55 -06:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-01-04 13:40:14 -06:00
|
|
|
nixpkgs = {
|
|
|
|
overlays = [
|
|
|
|
outputs.overlays.additions
|
|
|
|
outputs.overlays.modifications
|
|
|
|
outputs.overlays.unstable-packages
|
|
|
|
];
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
|
|
|
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
experimental-features = "nix-command flakes";
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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-01-04 13:40:14 -06:00
|
|
|
enable = true;
|
|
|
|
# tod.enable = true;
|
|
|
|
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages =
|
|
|
|
#with pkgs;
|
|
|
|
[];
|
|
|
|
|
|
|
|
programs.steam.enable = true;
|
|
|
|
programs.steam.remotePlay.openFirewall = true;
|
|
|
|
|
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 = [];
|
2024-01-04 22:49:08 -06:00
|
|
|
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
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|