added starship to sma user
This commit is contained in:
parent
2a25c42063
commit
2276dd59cd
1 changed files with 46 additions and 27 deletions
|
@ -1,23 +1,25 @@
|
||||||
# Admin User Configuration - sma
|
# Admin User Configuration - sma
|
||||||
# Named after Diziet Sma, pragmatic Special Circumstances agent
|
# Named after Diziet Sma, pragmatic Special Circumstances agent
|
||||||
# Role: System administration, security oversight, maintenance
|
# Role: System administration, security oversight, maintenance
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
users.users.sma = {
|
users.users.sma = {
|
||||||
description = "Diziet Sma - System Administrator";
|
description = "Diziet Sma - System Administrator";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1001; # Fixed UID for consistency across machines
|
uid = 1001; # Fixed UID for consistency across machines
|
||||||
group = "sma"; # Primary group
|
group = "sma"; # Primary group
|
||||||
|
|
||||||
# Admin privileges
|
# Admin privileges
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel" # sudo access
|
"wheel" # sudo access
|
||||||
"networkmanager" # network management
|
"networkmanager" # network management
|
||||||
"libvirt" # virtualization management
|
"libvirt" # virtualization management
|
||||||
"incus-admin" # container management
|
"incus-admin" # container management
|
||||||
"podman" # container runtime
|
"podman" # container runtime
|
||||||
"docker" # docker compatibility (if needed)
|
"docker" # docker compatibility (if needed)
|
||||||
];
|
];
|
||||||
|
|
||||||
# Security-focused shell setup
|
# Security-focused shell setup
|
||||||
|
@ -97,16 +99,33 @@
|
||||||
"audit-users" = "cat /etc/passwd | grep -E '/bin/(bash|zsh|fish)'";
|
"audit-users" = "cat /etc/passwd | grep -E '/bin/(bash|zsh|fish)'";
|
||||||
"audit-sudo" = "cat /etc/sudoers.d/*";
|
"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
|
# Sudo configuration for admin user
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = [ "sma" ];
|
users = ["sma"];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
command = "ALL";
|
command = "ALL";
|
||||||
options = [ "NOPASSWD" ]; # Allow passwordless sudo for admin tasks
|
options = ["NOPASSWD"]; # Allow passwordless sudo for admin tasks
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -120,6 +139,6 @@
|
||||||
|
|
||||||
# Create the sma group
|
# Create the sma group
|
||||||
users.groups.sma = {
|
users.groups.sma = {
|
||||||
gid = 992; # Fixed GID for consistency across machines
|
gid = 992; # Fixed GID for consistency across machines
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue