diff options
| author | Simon Holywell <simon@holywell.com.au> | 2019-11-04 14:35:56 +1000 |
|---|---|---|
| committer | Simon Holywell <simon@holywell.com.au> | 2019-11-04 14:35:56 +1000 |
| commit | 6100c826d40cd6b97ad8f3ddde4c2219c4ea637b (patch) | |
| tree | a1e30a95e5e59ecd35e4927cff24d91a6fda8005 /modules/system | |
| parent | 626a112ce3c7a2c6944252d28bda930302bd6cd5 (diff) | |
adds com.apple.loginwindow
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/defaults-write.nix | 4 | ||||
| -rw-r--r-- | modules/system/defaults/loginwindow.nix | 106 |
2 files changed, 109 insertions, 1 deletions
diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix index d413dc5..adbe939 100644 --- a/modules/system/defaults-write.nix +++ b/modules/system/defaults-write.nix @@ -27,6 +27,7 @@ let dock = defaultsToList "com.apple.dock" cfg.dock; finder = defaultsToList "com.apple.finder" cfg.finder; alf = defaultsToList "/Library/Preferences/com.apple.alf" cfg.alf; + loginwindow = defaultsToList "/Library/Preferences/com.apple.loginwindow" cfg.loginwindow; smb = defaultsToList "/Library/Preferences/SystemConfiguration/com.apple.smb.server" cfg.smb; screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture; spaces = defaultsToList "com.apple.spaces" cfg.spaces; @@ -39,11 +40,12 @@ in { config = { - system.activationScripts.defaults.text = mkIfAttrs [ alf smb ] + system.activationScripts.defaults.text = mkIfAttrs [ alf loginwindow smb ] '' # Set defaults echo >&2 "system defaults..." ${concatStringsSep "\n" alf} + ${concatStringsSep "\n" loginwindow} ${concatStringsSep "\n" smb} ''; diff --git a/modules/system/defaults/loginwindow.nix b/modules/system/defaults/loginwindow.nix new file mode 100644 index 0000000..f2400bd --- /dev/null +++ b/modules/system/defaults/loginwindow.nix @@ -0,0 +1,106 @@ +{ config, lib, ... }: + +with lib; + +{ + options = { + system.defaults.loginwindow.SHOWFULLNAME = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Displays login window as a name and password field instead of a list of users. + Default is false. + ''; + }; + + system.defaults.loginwindow.autoLoginUser = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Auto login the default user on boot. Default is false. + ''; + }; + + system.defaults.loginwindow.GuestEnabled = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Allow users to login to the machine as guests using the Guest account. Default is true. + ''; + }; + + system.defaults.loginwindow.LoginwindowText = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Text to be shown on the login window. Default "\\U03bb". + ''; + }; + + system.defaults.loginwindow.ShutDownDisabled = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Hides the Shut Down button on the login screen. Default is false. + ''; + }; + + system.defaults.loginwindow.SleepDisabled = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Hides the Sleep button on the login screen. Default is false. + ''; + }; + + system.defaults.loginwindow.RestartDisabled = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Hides the Restart button on the login screen. Default is false. + ''; + }; + + system.defaults.loginwindow.ShutDownDisabledWhileLoggedIn = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Disables the "Shutdown" option when users are logged in. Default is false. + ''; + }; + + system.defaults.loginwindow.PowerOffDisabledWhileLoggedIn = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + If set to true, the Power Off menu item will be disabled when the user is logged in. Default is false. + ''; + }; + + system.defaults.loginwindow.RestartDisabledWhileLoggedIn = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + # Apple menu > System Preferences > Users and Groups > Login Options + Disables the “Restart” option when users are logged in. Default is false. + ''; + }; + + system.defaults.loginwindow.DisableConsoleAccess = mkOption { + type = types.nullOr types.bool; + default = null; + description = '' + Disables the ability for a user to access the console by typing “>console” + for a username at the login window. Default is false. + ''; + }; + }; +} |
