2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
...
|
2024-09-13 01:50:53 +00:00
|
|
|
}: let
|
2024-09-09 00:22:14 +00:00
|
|
|
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
2024-09-09 00:22:14 +00:00
|
|
|
imports = [
|
|
|
|
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
|
|
|
|
|
|
|
./disko.nix
|
|
|
|
./hardware-configuration.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
custom = {
|
|
|
|
hostname = "myork";
|
|
|
|
width = 2256;
|
|
|
|
height = 1504;
|
|
|
|
scale = 1.5;
|
2024-12-14 20:24:23 +00:00
|
|
|
|
|
|
|
# BUG: Phoenix support not currently functional
|
|
|
|
# https://github.com/Cryolitia/ryzen_smu/issues/1
|
|
|
|
#// programs.ryzenadj.enable = true;
|
|
|
|
|
2024-12-21 18:30:03 +00:00
|
|
|
services.fw-fanctrl.enable = true;
|
2024-12-11 23:12:41 +00:00
|
|
|
settings.storage.mnt = ["myve"];
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
services.keyd.keyboards.default.settings.main.rightcontrol = "layer(altgr)"; # No Ctrl_R
|
|
|
|
|
|
|
|
boot = {
|
2024-09-11 23:37:03 +00:00
|
|
|
# Enable hibernation with a swapfile on btrfs
|
|
|
|
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
|
|
|
#?? findmnt -no UUID -T /swap/swapfile
|
2024-09-09 00:22:14 +00:00
|
|
|
resumeDevice = "/dev/disk/by-uuid/f9416347-eff5-45d5-8dc3-93414c11ba6f";
|
|
|
|
|
|
|
|
kernelParams = [
|
2024-09-11 23:37:03 +00:00
|
|
|
#?? sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
|
2024-09-09 00:22:14 +00:00
|
|
|
"resume_offset=533760"
|
|
|
|
|
|
|
|
# Fix battery drain with suspend-then-hibernate
|
|
|
|
# https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend-then-hibernate_on_AMD_version
|
2024-12-21 18:30:03 +00:00
|
|
|
"rtc_cmos.use_acpi_alarm=1"
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-12-21 18:30:03 +00:00
|
|
|
# Force display power savings
|
2024-09-09 00:22:14 +00:00
|
|
|
# https://wiki.archlinux.org/title/Framework_Laptop_13#(AMD)_Washed-out_colors_when_using_power-profiles-daemon_in_power-saver_or_balanced_mode
|
2024-12-21 18:30:03 +00:00
|
|
|
"amdgpu.abmlevel=0"
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
# Disable AMD scaling driver
|
|
|
|
# https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate
|
|
|
|
#// "amd_pstate=disable"
|
|
|
|
];
|
|
|
|
};
|
2024-12-07 01:49:29 +00:00
|
|
|
|
|
|
|
home-manager.users.${config.custom.username} = {
|
2024-12-23 18:03:34 +00:00
|
|
|
programs.niri.settings.outputs = {
|
|
|
|
"eDP-1" = {
|
|
|
|
background-color = "#073642";
|
|
|
|
|
|
|
|
mode = with config.custom; {
|
|
|
|
inherit width height;
|
|
|
|
refresh = refresh + 0.0;
|
|
|
|
};
|
|
|
|
|
|
|
|
scale = config.custom.scale;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-07 01:49:29 +00:00
|
|
|
wayland.windowManager.hyprland.settings = {
|
|
|
|
device = [
|
|
|
|
{
|
|
|
|
name = "pixa3854:00-093a:0274-touchpad";
|
|
|
|
accel_profile = "adaptive";
|
|
|
|
sensitivity = 0.3;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-09-09 00:22:14 +00:00
|
|
|
}
|