- 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.
74 lines
No EOL
2 KiB
Nix
74 lines
No EOL
2 KiB
Nix
{
|
|
description = "nix-config — multi-host Nix configurations";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
nix-darwin = {
|
|
url = "github:LnL7/nix-darwin";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs, nix-darwin, home-manager, sops-nix, ... }:
|
|
let
|
|
mkNixos = hostname:
|
|
nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/common
|
|
./hosts/${hostname}
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
backupFileExtension = "backup";
|
|
# Серверные хосты используют минимульный home (headless).
|
|
# Десктоп-хосты (если появятся) могут переопределить users.mikl.
|
|
users.mikl = import ./home/server.nix;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
mkDarwin = hostname:
|
|
nix-darwin.lib.darwinSystem {
|
|
system = "aarch64-darwin";
|
|
modules = [
|
|
./hosts/${hostname}
|
|
home-manager.darwinModules.home-manager
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
backupFileExtension = "backup";
|
|
users.mikl = import ./home;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations = {
|
|
heather = mkNixos "heather";
|
|
# rosemary = mkNixos "rosemary"; # TODO: будущий EU сервер (не YC)
|
|
};
|
|
|
|
darwinConfigurations = {
|
|
poppy = mkDarwin "poppy";
|
|
};
|
|
};
|
|
} |