- Rename muscari -> heather (YC VM). rosemary reserved for future EU server. - Add hosts/heather/image.nix: YC guest profile + qcow2 build target based on nixos/lib/make-disk-image.nix (the nixpkgs-standard cloud image builder). partitionTableType=legacy (MBR + single ext4 root, label nixos), GRUB in MBR on /dev/vda, virtio drivers, console=ttyS0, cloud-init (Ec2 datasource) so poppy ssh key auto-lands from YC metadata, growPartition. - Drop disko flake input + disk-config.nix (was only for nixos-anywhere runtime install; replaced by make-disk-image build-time approach, no kexec). - Add home/server.nix: minimal headless home for NixOS hosts (no ollama/ texliveFull/kitty/syncthing/pass). flake mkNixos uses it instead of full ./home. - k3s.nix: drop dead firewall block (firewall off in image.nix -> trustedInterfaces was a no-op). Cilium manages pod networking via BPF. - image.baseName=heather, configurationLimit=1, remove virtio dups (qemu-guest profile already provides most). - Fix sha256 pin on forgejo mikl.keys (was stale, would break fetchurl). - home/zsh.nix: source yandex-cloud yc completion.
109 lines
2.7 KiB
Nix
109 lines
2.7 KiB
Nix
# Минимальный 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";
|
||
extraConfig = {
|
||
init.defaultBranch = "main";
|
||
pull.rebase = true;
|
||
push.autoSetupRemote = true;
|
||
diff.pager = "delta";
|
||
};
|
||
delta.enable = 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'
|
||
'';
|
||
};
|
||
}
|