nix-config/hosts/muscari/default.nix

49 lines
No EOL
1.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.

# muscari — k3s single-node cluster на YC (Debian 12 → NixOS 25.11 через nixos-install в tmux)
# https://git.iscg.dev/mikl/nix-config
#
# Этот host перенесён из nix-config-legacy (см. commits в legacy repo).
# VM: 158.160.166.30, 2 vCPU / 8 GB / 64 GB SSD (network-ssd), Legacy BIOS
{ config, pkgs, lib, ... }:
{
imports = [
./disk-config.nix
./k3s.nix
];
networking = {
hostName = "muscari";
useDHCP = true;
firewall.allowedTCPPorts = [
22 # SSH
80 # HTTP (Ingress через Traefik)
443 # HTTPS (Ingress через Traefik)
# 6443 не открываем — kubectl через SSH-туннель
];
};
# Bootloader — GRUB (Legacy BIOS mode, см. PREREQUISITES.md check 5+11)
boot.loader.grub = {
enable = true;
device = "/dev/vda";
useOSProber = false;
};
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.efi.canTouchEfiVariables = lib.mkForce false;
# SSH ключи для michaotic: forgejo .keys endpoint с sha256-pinning
# + hardcoded fallback ключ для восстановления
users.users.michaotic.openssh.authorizedKeys.keyFiles = [
(pkgs.fetchurl {
url = "https://git.iscg.dev/mikl.keys";
sha256 = "sha256-4n6QLUPozdhHOmsRCuFn7HR9BU3nF0/GR2E7s5Lpz+Q=";
})
];
# fileSystems — определяется через disko (см. disk-config.nix)
# Не задаём явно fileSystems."/" чтобы не конфликтовать с disko
# После nixos-install первая установка 25.11,
# потом не трогаем (NixOS convention)
system.stateVersion = "25.11";
}