nix/nixos/foxtrot/default.nix

99 lines
2.3 KiB
Nix
Raw Normal View History

2023-10-09 15:09:02 -05:00
{
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
])
++ [
2023-11-13 09:10:04 -06:00
inputs.hardware.nixosModules.framework-13-7040-amd
2023-10-09 15:09:02 -05:00
];
# TODO: hibernation? does sleep suffice?
2023-11-21 10:14:58 -06:00
services.fwupd.enable = true;
services.fwupd.extraRemotes = ["lvfs-testing"];
hardware.opengl.extraPackages = [
pkgs.rocmPackages.clr.icd
pkgs.amdvlk
# encoding/decoding acceleration
pkgs.libvdpau-va-gl
pkgs.vaapiVdpau
];
2023-11-17 05:32:47 -06:00
hardware.wirelessRegulatoryDatabase = true;
2023-10-09 15:09:02 -05:00
boot = {
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
kernelPackages = pkgs.linuxPackages_6_5;
2023-11-13 09:10:04 -06:00
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
2023-11-13 17:24:52 -06:00
kernelParams = [
"amdgpu.sg_display=0"
"acpi_osi=\"!Windows 2020\""
2023-11-21 10:14:58 -06:00
# "nvme.noacpi=1" # maybe causing crashes upon waking?
# "rtc_cmos.use_acpi_alarm=1" # maybe causing excessive battery drain while sleeping -- perhaps due to waking?
2023-11-13 17:24:52 -06:00
];
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
kernelModules = ["kvm-amd"];
2023-11-17 05:32:47 -06:00
extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="US"
'';
2023-10-09 15:09:02 -05:00
};
hardware.bluetooth.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
services.printing.enable = true;
2023-10-26 13:55:08 -05:00
services.fprintd = {
2023-11-13 09:10:04 -06:00
enable = false;
2023-10-26 14:58:03 -05:00
# tod.enable = true;
2023-10-26 13:55:08 -05:00
# tod.driver = pkgs.libfprint-2-tod1-goodix;
};
2023-11-17 05:36:19 -06:00
services.power-profiles-daemon = {
enable = true;
};
services.tlp = {
2023-11-13 09:10:04 -06:00
enable = false;
settings = {
2023-10-26 13:55:08 -05:00
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
2023-10-26 13:55:08 -05:00
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 60;
2023-10-09 15:09:02 -05:00
2023-10-26 13:55:08 -05:00
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;
2023-10-17 23:37:05 -05:00
2023-10-09 15:09:02 -05:00
networking = {
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [22];
allowedUDPPorts = [];
};
};
system.stateVersion = "23.11";
}