diff options
| author | Julien Brochet <julien@aerialls.eu> | 2023-04-23 14:11:44 +0200 |
|---|---|---|
| committer | Julien Brochet <julien@aerialls.eu> | 2023-04-30 14:11:40 +0200 |
| commit | 2303eed571946c367d134dd39d017e3bb3517241 (patch) | |
| tree | c78d3a4acfe75c04592e89a917efe2980e0be579 /modules/system | |
| parent | 379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8 (diff) | |
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). + ''; + }; + }; +} |
