80 lines
1.9 KiB
Nix
80 lines
1.9 KiB
Nix
{
|
|
flake,
|
|
inputs,
|
|
outputs,
|
|
lib,
|
|
# config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
networking.hostName = "foxtrot";
|
|
|
|
imports =
|
|
[
|
|
inputs.disko.nixosModules.disko
|
|
flake.diskoConfigurations.standard
|
|
]
|
|
++ (with outputs.nixosModules; [
|
|
desktop-usage
|
|
podman
|
|
postgres
|
|
wifi
|
|
])
|
|
++ [
|
|
inputs.hardware.nixosModules.framework-13-7040-amd
|
|
];
|
|
|
|
# TODO: hibernation? does sleep suffice?
|
|
|
|
hardware.wirelessRegulatoryDatabase = true;
|
|
|
|
boot = {
|
|
loader = {
|
|
efi.canTouchEfiVariables = true;
|
|
systemd-boot.enable = true;
|
|
};
|
|
kernelPackages = pkgs.linuxPackages_6_5;
|
|
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
|
|
kernelParams = ["amdgpu.sg_display=0" "acpi_osi=\"!Windows 2020\"" "nvme.noacpi=1" "rtc_cmos.use_acpi_alarm=1"];
|
|
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
|
|
kernelModules = ["kvm-amd"];
|
|
extraModprobeConfig = ''
|
|
options cfg80211 ieee80211_regdom="US"
|
|
'';
|
|
};
|
|
hardware.bluetooth.enable = true;
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
services.printing.enable = true;
|
|
services.fprintd = {
|
|
enable = false;
|
|
# tod.enable = true;
|
|
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
|
};
|
|
services.tlp = {
|
|
enable = false;
|
|
settings = {
|
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
|
CPU_MIN_PERF_ON_BAT = 0;
|
|
CPU_MAX_PERF_ON_BAT = 60;
|
|
|
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
|
CPU_MIN_PERF_ON_AC = 0;
|
|
CPU_MAX_PERF_ON_AC = 100;
|
|
};
|
|
};
|
|
powerManagement.powertop.enable = true;
|
|
|
|
networking = {
|
|
firewall = {
|
|
enable = true;
|
|
allowPing = true;
|
|
allowedTCPPorts = [22];
|
|
allowedUDPPorts = [];
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|