lio config in new style

This commit is contained in:
RingOfStorms (Joshua Bell) 2024-12-30 13:21:26 -06:00
parent 230c1182e1
commit 03465ab505
9 changed files with 1738 additions and 41 deletions

View file

@ -53,6 +53,7 @@
};
docker = mkEnableOption (lib.mdDoc "Enable docker");
zsh = mkEnableOption (lib.mdDoc "Enable zsh");
enableSleep = mkEnableOption (lib.mdDoc "Enable auto sleeping");
users = mkOption {
type = types.attrsOf types.attrs;
default = { };
@ -181,6 +182,15 @@
DefaultTimeoutStopSec=8s
'';
# Turn off sleep
systemd.sleep.extraConfig = mkIf (!cfg.enableSleep) ''
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
'';
# Some basics
nixpkgs.config.allowUnfree = cfg.allowUnfree;
nixpkgs.config.allowUnfreePredicate = (pkg: true);