feat: better modules aragement.
This commit is contained in:
parent
de11ee0676
commit
6e967a751f
49 changed files with 27 additions and 19 deletions
30
modules/linux/nixos/disable-hibernation.nix
Normal file
30
modules/linux/nixos/disable-hibernation.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
crony.hibernation.disable = lib.mkEnableOption "disable hibernation and friends";
|
||||
};
|
||||
config = lib.mkIf config.crony.hibernation.disable {
|
||||
# Disable hibernation, sleep and other friends
|
||||
systemd.targets = {
|
||||
sleep = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
suspend = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
hibernate = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
"hybrid-sleep" = {
|
||||
enable = false;
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue