forked from pub-solar/os
Benjamin Bädorf
6d1d683b23
The swayidle command in the service was straight up broken, this commit fixes that. Environment Variables set in the `session-variables` file are now correctly imported across the system. This fixes `EDITOR` defaulting to `nano`.
26 lines
625 B
Nix
26 lines
625 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
let
|
|
psCfg = config.pub-solar;
|
|
cfg = config.pub-solar.paranoia;
|
|
in
|
|
{
|
|
options.pub-solar.paranoia = {
|
|
enable = mkOption {
|
|
description = ''
|
|
Only offer hibernation instead of screen locking and sleeping. This only makes sense
|
|
if your hard drive is encrypted, and ensures that the contents of your drive are
|
|
encrypted if you are not actively using the device.
|
|
'';
|
|
default = false;
|
|
type = types.bool;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
pub-solar.core.hibernation.enable = true;
|
|
services.logind.lidSwitch = "hibernate";
|
|
};
|
|
}
|