Fix power button and suspend

This commit is contained in:
Artemis Tosini 2024-04-29 02:29:41 +00:00
parent e1177ce610
commit 562e0181e8
Signed by: artemist
SSH key fingerprint: SHA256:EsuWCwx6fjxxExxf65rX+ocQJJAdw4R1KarpFue6Uwc
3 changed files with 24 additions and 18 deletions

View file

@ -329,11 +329,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1714203603, "lastModified": 1714343445,
"narHash": "sha256-eT7DENhYy7EPLOqHI9zkIMD9RvMCXcqh6gGqOK5BWYQ=", "narHash": "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c1609d584a6b5e9e6a02010f51bd368cb4782f8e", "rev": "9fe79591c1005ce6f93084ae7f7dab0a2891440d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -395,11 +395,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1714208717, "lastModified": 1714353561,
"narHash": "sha256-oCL0iyitLrDPB2mqA7Oj8KIVCptOTNc/d7GnQkreD6U=", "narHash": "sha256-1OKjSB5kPw0Tnm/h4j1IZe6TfdX04QNbm1kn0q58Rls=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "4b6ba05d54e3c1c44989a3775d4798b6583e821e", "rev": "c0733f3cec9e5edd7fa3a4bf156b6ee065762fea",
"revCount": 15438, "revCount": 15448,
"type": "git", "type": "git",
"url": "ssh://git@lix.systems/lix-project/lix" "url": "ssh://git@lix.systems/lix-project/lix"
}, },
@ -443,11 +443,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713869268, "lastModified": 1714273701,
"narHash": "sha256-o3CMQeu/S8/4zU0pMtYg51rd1FWdJsI2Xohzng1Ysdg=", "narHash": "sha256-bmoeZ5zMSSO/e8P51yjrzaxA9uzA3SZAEFvih6S3LFo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "dcb6ac44922858ce3a5b46f77a36d6030181460c", "rev": "941c4973c824509e0356be455d89613611f76c8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -473,11 +473,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1714076141, "lastModified": 1714253743,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=", "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856", "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -520,11 +520,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1714142618, "lastModified": 1714319855,
"narHash": "sha256-0ijCe5k7Q569PO/hP/yryh9aB33zJyjs4NKbPQxVW8c=", "narHash": "sha256-xiHu7LVWEo7eixVPDEnmxntye/zQcsZjRlyhCQ2yNL4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "0fc190144f9acf72ae8705ea304577e90389da20", "rev": "e2e7258267ba4ec81bd6503e968b6cf52cbd3f2a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -7,8 +7,11 @@
security.polkit.enable = true; security.polkit.enable = true;
services = { services = {
accounts-daemon.enable = true; accounts-daemon.enable = true;
logind.lidSwitch = "suspend"; logind = {
logind.extraConfig = "HandlePowerKey=suspend"; lidSwitch = "suspend";
powerKey = "suspend";
powerKeyLongPress = "poweroff";
};
}; };
xdg.portal = { xdg.portal = {
enable = true; enable = true;

View file

@ -15,6 +15,9 @@ in
blacklistedKernelModules = [ "k10temp" ]; # conflicts with zenpower blacklistedKernelModules = [ "k10temp" ]; # conflicts with zenpower
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
# Buggy firmware reports absurd values after resume, just disable shutdown
kernelParams = [ "thermal.nocrt=1" ];
# Encrypted drives # Encrypted drives
initrd.luks = { initrd.luks = {
reusePassphrases = true; reusePassphrases = true;