Skip to content

Commit

Permalink
Set user shell correctly(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
lentil32 committed Aug 9, 2024
1 parent f271773 commit 4d92912
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion modules/host-users.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ username, hostname, ... }@args:
{
pkgs,
username,
hostname,
...
}@args:
#############################################################
#
# Host & Users configuration
Expand All @@ -13,6 +18,7 @@
users.users."${username}" = {
home = "/Users/${username}";
description = username;
shell = pkgs.zsh;
};

nix.settings.trusted-users = [ username ];
Expand Down
8 changes: 7 additions & 1 deletion modules/system.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, username, ... }:
###################################################################################
#
# macOS's System configuration
Expand All @@ -12,6 +12,12 @@
{
system = {
# activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`.
activationScripts.setFileLimit.text = ''
ulimit -Sn 10240
'';
activationScripts.setZshAsShell.text = ''
dscl . -create /Users/${username} UserShell /run/current-system/sw/bin/zsh
'';
activationScripts.postUserActivation.text = ''
# activateSettings -u will reload the settings from the database and apply them to the current session,
# so we do not need to logout and login again to make the changes take effect.
Expand Down

0 comments on commit 4d92912

Please sign in to comment.