Skip to content

Instantly share code, notes, and snippets.

@mikedilger
mikedilger / Cargo.toml
Last active May 10, 2022 01:49
Using hyper and rustls
[package]
name = "example"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = { version = "1.0", features = [ "backtrace" ] }
futures = "0.3"
@mattdenner
mattdenner / README.markdown
Last active April 30, 2025 01:10
Suspend and then hibernate after 60 minutes

I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before and after service. I just include this in my /etc/nixos/configuration.nix file and nixos-rebuild; then a systemctl suspend or a close of the lid will cause the hibernate timer to be set.