mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
adds com.apple.loginwindow
This commit is contained in:
parent
626a112ce3
commit
6100c826d4
3 changed files with 110 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
./system/defaults/finder.nix
|
||||
./system/defaults/screencapture.nix
|
||||
./system/defaults/alf.nix
|
||||
./system/defaults/loginwindow.nix
|
||||
./system/defaults/smb.nix
|
||||
./system/defaults/spaces.nix
|
||||
./system/defaults/trackpad.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}
|
||||
'';
|
||||
|
||||
|
|
106
modules/system/defaults/loginwindow.nix
Normal file
106
modules/system/defaults/loginwindow.nix
Normal file
|
@ -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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue