Fix Forgejo SSH user configuration
- Set explicit git user for Forgejo service - Add SSH_USER configuration for proper SSH handling - Ensure compatibility with system SSH server
This commit is contained in:
parent
1fd6de2551
commit
f2c9eed794
4 changed files with 64 additions and 55 deletions
|
@ -1,13 +1,15 @@
|
|||
# Common User Configuration
|
||||
# Shared settings for all users in the home lab
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Common user settings
|
||||
users = {
|
||||
# Use mutable users for flexibility
|
||||
mutableUsers = true;
|
||||
|
||||
|
||||
# Default shell for all users
|
||||
defaultUserShell = pkgs.zsh;
|
||||
};
|
||||
|
@ -17,34 +19,35 @@
|
|||
enable = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
|
||||
# direnv integration
|
||||
interactiveShellInit = ''
|
||||
eval "$(starship init zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
|
||||
|
||||
# Common aliases for all users
|
||||
shellAliases = {
|
||||
# Modern CLI tool replacements (basic ones moved to base.nix)
|
||||
"ll" = "eza -l --color=auto --group-directories-first";
|
||||
"la" = "eza -la --color=auto --group-directories-first";
|
||||
"tree" = "eza --tree";
|
||||
|
||||
|
||||
# Git shortcuts (basic ones moved to base.nix)
|
||||
|
||||
|
||||
# System shortcuts (some moved to base.nix)
|
||||
"top" = "btop";
|
||||
|
||||
|
||||
# Network
|
||||
"ping" = "ping -c 5";
|
||||
"myip" = "curl -s ifconfig.me";
|
||||
|
||||
|
||||
# Safety
|
||||
"rm" = "rm -i";
|
||||
"mv" = "mv -i";
|
||||
"cp" = "cp -i";
|
||||
};
|
||||
|
||||
|
||||
# Common environment variables
|
||||
sessionVariables = {
|
||||
EDITOR = "emacs";
|
||||
|
@ -57,10 +60,10 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
# Essential CLI tools moved to base.nix
|
||||
# Adding user-specific tools here
|
||||
|
||||
|
||||
# Communication
|
||||
firefox
|
||||
|
||||
|
||||
# Development (basic tools moved to base.nix)
|
||||
# Additional utilities not in base.nix
|
||||
];
|
||||
|
@ -69,7 +72,7 @@
|
|||
security = {
|
||||
# Require password for sudo (can be overridden per user)
|
||||
sudo.wheelNeedsPassword = true;
|
||||
|
||||
|
||||
# Polkit for desktop users
|
||||
polkit.enable = true;
|
||||
};
|
||||
|
@ -81,12 +84,11 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false; # Key-based auth only
|
||||
PermitRootLogin = "no"; # No root login
|
||||
X11Forwarding = true; # For GUI applications over SSH
|
||||
PermitRootLogin = "no"; # No root login
|
||||
X11Forwarding = true; # For GUI applications over SSH
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Enable sound
|
||||
pipewire = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue