2025-04-16 10:31:45 +02:00
|
|
|
{
|
|
|
|
|
inputs,
|
|
|
|
|
pkgs,
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2024-04-13 13:43:59 +02:00
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./../../modules/core
|
2024-12-23 22:39:47 +01:00
|
|
|
./../../modules/core/virtualization.nix
|
2025-05-20 16:46:19 +02:00
|
|
|
./../../modules/services/tailscale.nix
|
2024-10-21 15:40:49 +02:00
|
|
|
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
2024-04-13 13:43:59 +02:00
|
|
|
];
|
2025-01-10 16:18:17 +01:00
|
|
|
|
2025-05-27 19:24:57 +02:00
|
|
|
# install some system-utilities; set hosts to be editable by the user.
|
|
|
|
|
environment = {
|
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
|
fwupd
|
|
|
|
|
fw-ectool
|
|
|
|
|
];
|
|
|
|
|
etc.hosts.mode = "0700";
|
|
|
|
|
};
|
2025-05-26 23:30:34 +02:00
|
|
|
|
2025-04-16 10:31:45 +02:00
|
|
|
liv = {
|
2024-12-23 22:39:47 +01:00
|
|
|
laptop.enable = true;
|
2025-04-16 10:31:45 +02:00
|
|
|
desktop.enable = false;
|
2024-12-23 22:39:47 +01:00
|
|
|
creative.enable = true;
|
2025-03-24 09:23:16 +01:00
|
|
|
amdgpu.enable = true;
|
2025-04-24 11:17:44 +02:00
|
|
|
gui.enable = true;
|
2024-12-23 22:39:47 +01:00
|
|
|
};
|
2024-04-13 15:30:03 +02:00
|
|
|
|
2025-06-08 14:52:07 +02:00
|
|
|
services = {
|
|
|
|
|
vnstat.enable = true;
|
|
|
|
|
hardware.bolt.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2025-05-06 14:41:26 +02:00
|
|
|
hardware.framework = {
|
|
|
|
|
amd-7040.preventWakeOnAC = true;
|
|
|
|
|
laptop13.audioEnhancement.enable = true;
|
|
|
|
|
};
|
2024-11-27 11:23:02 +01:00
|
|
|
|
2025-06-15 14:08:48 +02:00
|
|
|
# Disable light sensors and accelerometers as they are not used and consume extra battery
|
|
|
|
|
hardware.sensor.iio.enable = lib.mkForce false;
|
|
|
|
|
|
2024-07-15 07:54:38 +02:00
|
|
|
networking.hostName = "sakura";
|
|
|
|
|
|
2025-05-06 14:41:26 +02:00
|
|
|
powerManagement = {
|
|
|
|
|
enable = true;
|
|
|
|
|
# powertop.enable = true;
|
|
|
|
|
cpuFreqGovernor = lib.mkDefault "ondemand";
|
|
|
|
|
};
|
2025-05-27 19:21:17 +02:00
|
|
|
# change battery led to blue on suspend to indicate device is in suspend mode
|
|
|
|
|
systemd.services."suspend-led-set" = {
|
|
|
|
|
description = "blue led for sleep";
|
|
|
|
|
wantedBy = [ "suspend.target" ];
|
|
|
|
|
before = [ "systemd-suspend.service" ];
|
|
|
|
|
serviceConfig.type = "simple";
|
|
|
|
|
script = ''
|
|
|
|
|
${pkgs.fw-ectool}/bin/ectool led battery blue
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
systemd.services."suspend-led-unset" = {
|
|
|
|
|
description = "auto led after sleep";
|
|
|
|
|
wantedBy = [ "suspend.target" ];
|
|
|
|
|
after = [ "systemd-suspend.service" ];
|
|
|
|
|
serviceConfig.type = "simple";
|
|
|
|
|
script = ''
|
|
|
|
|
${pkgs.fw-ectool}/bin/ectool led battery auto
|
|
|
|
|
'';
|
|
|
|
|
};
|
2024-10-21 22:58:12 +02:00
|
|
|
boot = {
|
2025-05-06 14:41:26 +02:00
|
|
|
plymouth.enable = true;
|
2025-04-16 10:31:45 +02:00
|
|
|
kernelParams = [
|
|
|
|
|
"mem_sleep_default=deep"
|
2025-05-27 19:21:17 +02:00
|
|
|
"acpi_osi=\"!Windows 2020\"" # otherwise GPU does weird shit that makes the computer look like the RAM is broken
|
2025-04-16 10:31:45 +02:00
|
|
|
];
|
|
|
|
|
kernelModules = [ "acpi_call" ];
|
2025-02-13 11:24:33 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
loader = {
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
systemd-boot.configurationLimit = 10;
|
|
|
|
|
};
|
2025-04-16 10:31:45 +02:00
|
|
|
extraModulePackages =
|
|
|
|
|
with config.boot.kernelPackages;
|
2024-10-21 22:58:12 +02:00
|
|
|
[
|
|
|
|
|
acpi_call
|
|
|
|
|
cpupower
|
|
|
|
|
]
|
2025-04-16 10:31:45 +02:00
|
|
|
++ [ pkgs.cpupower-gui ];
|
2024-04-13 15:30:03 +02:00
|
|
|
};
|
2024-04-13 15:38:53 +02:00
|
|
|
}
|