system/laptop: split logind and auto-cpufreq config
This commit is contained in:
parent
4deded9963
commit
b6b98a126e
4 changed files with 20 additions and 9 deletions
8
modules/nixos/system/laptop.nix → modules/nixos/system/laptop/auto-cpufreq.nix
Normal file → Executable file
8
modules/nixos/system/laptop.nix → modules/nixos/system/laptop/auto-cpufreq.nix
Normal file → Executable file
|
|
@ -1,12 +1,6 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.logind.settings.Login = {
|
||||
HandleLidSwitch = "suspend";
|
||||
HandleLidSwitchExternalPower = "lock";
|
||||
HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
|
||||
services = {
|
||||
tlp.enable = false;
|
||||
power-profiles-daemon.enable = false;
|
||||
|
|
@ -33,4 +27,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
8
modules/nixos/system/laptop/default.nix
Normal file
8
modules/nixos/system/laptop/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./auto-cpufreq.nix
|
||||
./logind.nix
|
||||
];
|
||||
}
|
||||
9
modules/nixos/system/laptop/logind.nix
Normal file
9
modules/nixos/system/laptop/logind.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.logind.settings.Login = {
|
||||
HandleLidSwitch = "suspend";
|
||||
HandleLidSwitchExternalPower = "lock";
|
||||
HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue