nix-config/home/server.nix
mikl 411a8ba689 heather/common: passwordless sudo for mikl + fix deprecated options
- common/default.nix: add mikl to wheel + security.sudo.wheelNeedsPassword=false.
  Without this, root is unreachable on a fresh NixOS-yc image (no root password,
  no rescue channel) — nixos-rebuild switch is impossible. Mirrors the
  NOPASSWD:ALL that old YC boxes got via cloud-config user-data.
- home/server.nix: programs.git.extraConfig -> .settings, programs.git.delta
  -> programs.delta with enableGitIntegration=true (deprecated warnings).
- image.nix: boot.loader.grub.timeout -> boot.loader.timeout (renamed option).
2026-07-11 22:55:00 +03:00

111 lines
2.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Минимальный home-manager для headless NixOS-серверов (heather и будущие).
# Не тянет десктопный мусор: ollama (~GB), texliveFull (~4GB), kitty, syncthing,
# pass-with-extensions, duti (macOS), pnpm, gita и т.д.
# Цель — лёгкий образ и быстрый rebuild. Только то, что нужно админу на сервере.
{ config, pkgs, ... }:
{
home.stateVersion = "25.11";
# --- Пакеты: минимальный админский набор ---
home.packages = with pkgs; [
# Навигация/поиск
eza
bat
ripgrep
fd
fzf
tree
# Системное
htop
tmux
# Редактор
vim
# Git
git
# Nix
alejandra # форматтер
nix-output-monitor
# Утилиты
delta # красивый git diff
trash-cli # rm с корзиной
];
# --- FZF ---
programs.fzf = {
enable = true;
enableZshIntegration = true;
defaultCommand = "fd --type f --hidden --exclude .git";
defaultOptions = [ "--height 40%" "--layout=reverse" "--border" ];
};
# --- Zoxide ---
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [ "--cmd cd" ];
};
# --- Bat ---
programs.bat = {
enable = true;
config = {
theme = "Catppuccin Macchiato";
italic-text = "always";
style = "numbers,changes,header";
};
};
# --- Eza ---
programs.eza = {
enable = true;
icons = "auto";
git = true;
};
# --- Git: сервер-минимум. Без SHA-signing/GPG (gpg агента на сервере нет),
# с pull.rebase для чистой истории при правках прямо на хосте. ---
programs.git = {
enable = true;
userName = "mikl";
userEmail = "mikl@iscg.dev";
settings = {
init.defaultBranch = "main";
pull.rebase = true;
push.autoSetupRemote = true;
};
};
programs.delta = {
enable = true;
enableGitIntegration = true;
};
# --- Zsh: минимульный, без pure-prompt и fastfetch (это десктоп-флёр) ---
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
size = 10000;
save = 10000;
ignoreDups = true;
share = true;
};
shellAliases = {
ll = "eza -l --icons --git";
la = "eza -la --icons --git";
};
initContent = ''
# Простой промпт для headless: user@host:path$
autoload -U colors && colors
PROMPT='%F{green}%n@%m%f:%F{blue}%~%f$ '
RPROMPT='%F{240}%D{%H:%M}%f'
'';
};
}