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

View file

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

View file

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