mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-19 01:21:39 +01:00
set up hibernate
This commit is contained in:
parent
d2b548cac2
commit
89604624c9
3 changed files with 25 additions and 8 deletions
17
README.md
17
README.md
|
@ -25,13 +25,16 @@ A ThinkPad L15 that I use for almost everything that one needs a monitor to.
|
||||||
NAME MOUNTPOINT COMMENT
|
NAME MOUNTPOINT COMMENT
|
||||||
nvme0n1
|
nvme0n1
|
||||||
├─nvme0n1p1 /boot
|
├─nvme0n1p1 /boot
|
||||||
└─nvme0n1p2 # LUKS-encrypted partition
|
├─nvme0n1p2 # LUKS-encrypted partition
|
||||||
└─luksroot # btrfs with some subvolumes
|
│ └─luksroot # btrfs with some subvolumes
|
||||||
└─root /
|
│ └─root /
|
||||||
└─home /home
|
│ └─home /home
|
||||||
└─lib /var/lib
|
│ └─lib /var/lib
|
||||||
└─log /var/log
|
│ └─log /var/log
|
||||||
└─store /nix/store
|
│ └─store /nix/store
|
||||||
|
└─nvme0n1p
|
||||||
|
└─luksswap # encrypted swap partition
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### nuc
|
### nuc
|
||||||
|
|
|
@ -108,6 +108,15 @@
|
||||||
user = "libvirtd";
|
user = "libvirtd";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend-then-hibernate";
|
||||||
|
lidSwitchDocked = "hybrid-sleep";
|
||||||
|
lidSwitchExternalPower = "suspend";
|
||||||
|
};
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
HibernateDelaySec=1h
|
||||||
|
'';
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
device = "/dev/disk/by-uuid/6b89181c-71e0-4e84-8523-2456d3e28400";
|
device = "/dev/disk/by-uuid/6b89181c-71e0-4e84-8523-2456d3e28400";
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
|
boot.initrd.luks.devices."luksswap" = {
|
||||||
|
device = "/dev/disk/by-uuid/4a5fd2d9-1b37-4895-a24b-835a9cd4063e";
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{
|
{
|
||||||
|
@ -61,7 +64,9 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices =
|
||||||
|
[{ device = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927"; }];
|
||||||
|
boot.resumeDevice = "/dev/disk/by-uuid/1dd20f07-877c-4ee5-bef5-5e8c6ebe7927";
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
Loading…
Reference in a new issue