diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2023-05-10 23:42:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-10 23:42:22 +0200 |
| commit | 252541bd05a7f55f3704a3d014ad1badc1e3360d (patch) | |
| tree | ab2766c492e94aece8fc8d432085e1d26848c957 /modules/system | |
| parent | 25e28feddab8923376b9ed2620f817d9d282cd6c (diff) | |
| parent | 2303eed571946c367d134dd39d017e3bb3517241 (diff) | |
Merge pull request #638 from aerialls/screensaver
feat(screensaver): add support of askForPassword and askForPasswordDelay
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/defaults-write.nix | 3 | ||||
| -rw-r--r-- | modules/system/defaults/screensaver.nix | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index 8d8f57e..ac9b024 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -34,6 +34,7 @@ let magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse; magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse; screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture; + screensaver = defaultsToList "com.apple.screensaver" cfg.screensaver; spaces = defaultsToList "com.apple.spaces" cfg.spaces; trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad; trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad; @@ -84,6 +85,7 @@ in magicmouse magicmouseBluetooth screencapture + screensaver spaces trackpad trackpadBluetooth @@ -104,6 +106,7 @@ in ${concatStringsSep "\n" magicmouse} ${concatStringsSep "\n" magicmouseBluetooth} ${concatStringsSep "\n" screencapture} + ${concatStringsSep "\n" screensaver} ${concatStringsSep "\n" spaces} ${concatStringsSep "\n" trackpad} ${concatStringsSep "\n" trackpadBluetooth} diff --git a/modules/system/defaults/screensaver.nix b/modules/system/defaults/screensaver.nix new file mode 100644 index 0000000..3e5032b --- /dev/null +++ b/modules/system/defaults/screensaver.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: + +with lib; + +{ + options = { + + system.defaults.screensaver.askForPassword = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + If true, the user is prompted for a password when the screen saver is unlocked or stopped. The default is false. + ''; + }; + + system.defaults.screensaver.askForPasswordDelay = mkOption { + type = types.nullOr types.int; + default = null; + description = '' + The number of seconds to delay before the password will be required to unlock or stop the screen saver (the grace period). + ''; + }; + }; +} |
