added starship to sma user
This commit is contained in:
parent
2a25c42063
commit
2276dd59cd
1 changed files with 46 additions and 27 deletions
|
@ -1,9 +1,11 @@
|
|||
# Admin User Configuration - sma
|
||||
# Named after Diziet Sma, pragmatic Special Circumstances agent
|
||||
# Role: System administration, security oversight, maintenance
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
users.users.sma = {
|
||||
description = "Diziet Sma - System Administrator";
|
||||
isNormalUser = true;
|
||||
|
@ -97,16 +99,33 @@
|
|||
"audit-users" = "cat /etc/passwd | grep -E '/bin/(bash|zsh|fish)'";
|
||||
"audit-sudo" = "cat /etc/sudoers.d/*";
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
# Emacs-style keybindings
|
||||
bindkey -e
|
||||
|
||||
# Disable annoying shell options
|
||||
unsetopt beep nomatch
|
||||
|
||||
# Completion configuration
|
||||
zstyle ':completion:*' completer _expand _complete _ignored
|
||||
zstyle ':completion:*' matcher-list ""
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# Initialize shell enhancements
|
||||
eval "$(starship init zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
};
|
||||
|
||||
# Sudo configuration for admin user
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "sma" ];
|
||||
users = ["sma"];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ]; # Allow passwordless sudo for admin tasks
|
||||
options = ["NOPASSWD"]; # Allow passwordless sudo for admin tasks
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue