- flake.nix: mkHost helper, SOPS-age integration - hosts/common: locale, sshd, universal packages - hosts/muscari: k3s host with Cilium flags - modules/users/mikl: SSH keys via forgejo .keys + sha256 pinning - modules/services/k3s: k3s daemon with Cilium-compatible flags - hardware-configuration.nix: placeholder, will be regenerated on real VM Stack: - NixOS 25.11 - k3s single-node (Cilium CNI, Traefik ingress) - SOPS + age for secrets - Multi-host ready (rosemary planned)
26 lines
No EOL
765 B
Nix
26 lines
No EOL
765 B
Nix
# muscari — k3s single-node cluster на YC (Debian 12 → NixOS через nixos-anywhere)
|
|
# https://git.iscg.dev/mikl/nixos-iscg
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
../../modules/users/mikl.nix
|
|
../../modules/services/k3s.nix
|
|
];
|
|
|
|
networking = {
|
|
hostName = "muscari";
|
|
useDHCP = true;
|
|
firewall.allowedTCPPorts = [
|
|
22 # SSH
|
|
80 # HTTP (Ingress через Traefik)
|
|
443 # HTTPS (Ingress через Traefik)
|
|
# 6443 не открываем — kubectl через SSH-туннель
|
|
];
|
|
};
|
|
|
|
# После nixos-anywhere первая установка может быть 26.05,
|
|
# потом не трогаем (NixOS convention)
|
|
system.stateVersion = "25.11";
|
|
} |