Use suspend patches

This commit is contained in:
Natsu Kagami 2022-11-25 14:04:03 +01:00
parent dd270a0de0
commit 165f438935
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
3 changed files with 17 additions and 8 deletions

View file

@ -273,15 +273,16 @@
"nixos-m1": { "nixos-m1": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1669316732, "lastModified": 1669380419,
"narHash": "sha256-T98mWoyOgOkasvkYVKqM+LD2hwg84ChMb3wfB2XQDJw=", "narHash": "sha256-YKtdevoz3nDuoAbE9hoowX/Aizwb6ukCoF2zhld3Gpg=",
"owner": "tpwrules", "owner": "natsukagami",
"repo": "nixos-m1", "repo": "nixos-m1",
"rev": "3531027b101fb9e87dfc928b952596e4839f8eb7", "rev": "a6fccba573b2a21373858181516ed1d1777d29b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "tpwrules", "owner": "natsukagami",
"ref": "custom-kernel-patches",
"repo": "nixos-m1", "repo": "nixos-m1",
"type": "github" "type": "github"
} }

View file

@ -31,7 +31,7 @@
kakoune.flake = false; kakoune.flake = false;
kak-lsp.url = github:kak-lsp/kak-lsp; kak-lsp.url = github:kak-lsp/kak-lsp;
kak-lsp.flake = false; kak-lsp.flake = false;
nixos-m1.url = github:tpwrules/nixos-m1; nixos-m1.url = github:natsukagami/nixos-m1/custom-kernel-patches;
nixos-m1.flake = false; nixos-m1.flake = false;
# --- # ---

View file

@ -19,6 +19,15 @@
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
boot.kernelPatches = [
{
name = "enable-suspend";
patch = null;
extraConig = ''
SUSPEND y
'';
}
];
# Asahi kernel configuration # Asahi kernel configuration
hardware.asahi.peripheralFirmwareDirectory = ./firmware; hardware.asahi.peripheralFirmwareDirectory = ./firmware;
@ -28,13 +37,12 @@
services.upower = { services.upower = {
enable = true; enable = true;
criticalPowerAction = "PowerOff"; criticalPowerAction = "PowerOff";
ignoreLid = true;
usePercentageForPolicy = true; usePercentageForPolicy = true;
percentageCritical = 3; percentageCritical = 3;
percentageLow = 10; percentageLow = 10;
}; };
services.logind.lidSwitch = "ignore"; services.logind.lidSwitch = "suspend";
networking.hostName = "kagami-air-m1"; # Define your hostname. networking.hostName = "kagami-air-m1"; # Define your hostname.