Some prep for suspend and swap
This commit is contained in:
parent
47ae9d93be
commit
9260c068ab
|
@ -202,6 +202,21 @@
|
|||
|
||||
services.dbus.packages = with pkgs; [ gcr ];
|
||||
|
||||
# Power Management
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
powerDownCommands = ''
|
||||
/run/current-system/sw/bin/rmmod brcmfmac # Disable wifi
|
||||
/run/current-system/sw/bin/rmmod hci_bcm4377 # Disable bluetooth
|
||||
'';
|
||||
resumeCommands = ''
|
||||
/run/current-system/sw/bin/modprobe brcmfmac # Enable wifi
|
||||
/run/current-system/sw/bin/modprobe hci_bcm4377 # Enable bluetooth
|
||||
/run/current-system/sw/bin/systemctl restart iwd
|
||||
/run/current-system/sw/bin/systemctl restart bluetooth
|
||||
'';
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [
|
||||
{ device = "/swap"; size = 16 * 1024; }
|
||||
];
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue