mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-09 19:03:36 +02:00
refactor: username
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{username, ...}: {
|
||||
{username, userfullname, ...}: {
|
||||
users.users.${username} = {
|
||||
description = userfullname;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDiipi59EnVbi6bK1bGrcbfEM263wgdNfbrt6VBC1rHx ryan@ai-idols"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMSfp/hvegbK04HykWvoY1EbDW+vXu1AlCjVivWE2ZeR ryan@shoukei"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
../base.nix
|
||||
./nix-core.nix
|
||||
|
||||
./apps.nix
|
||||
./system.nix
|
||||
];
|
||||
{mylib, ...}: {
|
||||
imports =
|
||||
(mylib.scanPaths ./.)
|
||||
++ [
|
||||
../base.nix
|
||||
];
|
||||
}
|
||||
|
||||
11
modules/darwin/users.nix
Normal file
11
modules/darwin/users.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{username, ...}: {
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."${username}" = {
|
||||
home = "/Users/${username}";
|
||||
|
||||
# set user's default shell back to zsh
|
||||
# `chsh -s /bin/zsh`
|
||||
# DO NOT change the system's default shell to nushell! it will break some apps!
|
||||
# It's better to change only starship/alacritty/vscode's shell to nushell!
|
||||
};
|
||||
}
|
||||
@@ -25,7 +25,6 @@
|
||||
initialHashedPassword = "$7$CU..../....Sdl/JRH..9eIvZ6mE/52r.$xeR6lyvTcVVKt28Owcoc/vPOOECcYSiq1xjw/QCz2t0";
|
||||
home = "/home/${username}";
|
||||
isNormalUser = true;
|
||||
description = username;
|
||||
extraGroups = [
|
||||
username
|
||||
"users"
|
||||
|
||||
Reference in New Issue
Block a user