Migrated muscari from nix-config-legacy (preserved for reference per
garden.md) to new multi-host flake structure.
Includes:
- hosts/muscari/default.nix: hostname, GRUB (BIOS), firewall
(22/80/443), SSH keys via forgejo .keys endpoint with sha256 pinning,
stateVersion 25.11
- hosts/muscari/disk-config.nix: disko config — 512M ESP + ext4 root,
device = /dev/vda (YC standard-v3 single virtio disk)
- hosts/muscari/k3s.nix: k3s single-node with --flannel-backend=none
(Cilium to be installed separately via Helm)
Architecture decisions (unchanged from legacy):
- Bootloader: GRUB (VM is in Legacy BIOS mode — see PREREQUISITES.md
check 5+11 in projects/servers/muscari/)
- Filesystem: ext4 root + vfat ESP (ESP unused in BIOS but ready if
ever switched to UEFI)
- Build deps: nixpkgs/nixos-25.11
Verification (after commit):
- nix flake show: nixosConfigurations.{muscari,rosemary} OK
- muscari.networking.hostName = "muscari"
- muscari.boot.loader.grub.enable = true
- muscari.boot.loader.systemd-boot.enable = false
- muscari.services.k3s.enable = true
- fileSystems derived correctly from disko
- poppy (darwin) and rosemary (NixOS) configs untouched
Session: verify plan
44 lines
No EOL
1.4 KiB
Nix
44 lines
No EOL
1.4 KiB
Nix
# disk-config.nix для muscari — Yandex Cloud VM
|
|
# YC VM из образа Debian 12: один диск /dev/vda (virtio scsi), GPT
|
|
# Используем disko для переформатирования под NixOS:
|
|
# - 512M ESP (vfat) для /boot — не используется в BIOS mode (GRUB ставит в MBR),
|
|
# но если когда-нибудь переключимся на UEFI, раздел будет готов
|
|
# - остальное → ext4 root
|
|
#
|
|
# Bootloader: GRUB (BIOS mode, см. hosts/muscari/default.nix)
|
|
#
|
|
# Перенесено из nix-config-legacy (commit 231f9d5 — диск-фикс для disko 1.13+)
|
|
|
|
{ lib, ... }:
|
|
{
|
|
disko.devices = {
|
|
disk.disk1 = {
|
|
device = lib.mkDefault "/dev/vda";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
name = "ESP";
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
};
|
|
root = {
|
|
name = "root";
|
|
size = "100%"; # disko 1.13+ требует "100%" вместо "100%FREE"
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
} |