Power Management: Difference between revisions
Clarified that solutions may vary when troubleshooting a blocked pre-sleep.service |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 30: | Line 30: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
systemd.services.your-service-name = { | |||
description = "Service description here"; | |||
wantedBy = [ "post-resume.target" ]; | |||
after = [ "post-resume.target" ]; | |||
script = '' | |||
echo "This should show up in the journal after resuming." | echo "This should show up in the journal after resuming." | ||
''; | |||
serviceConfig.Type = "oneshot"; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 48: | Line 48: | ||
Therefore, an example configuration could look like this:<syntaxhighlight lang="nix"> | Therefore, an example configuration could look like this:<syntaxhighlight lang="nix"> | ||
/ | // I'm hibernating into a logical volume that's also under LUKS. Pretty cool, right? | ||
swapDevices = [ | swapDevices = [ | ||