add airnix stub

This commit is contained in:
Cyryl Płotnicki 2024-07-17 10:04:10 +01:00
parent 57892c4d47
commit f296afc1f2
5 changed files with 90 additions and 0 deletions

View file

@ -174,6 +174,7 @@
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty"; bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
cupsnet = mkServer nixpkgs-stable "aarch64-linux" "cupsnet"; cupsnet = mkServer nixpkgs-stable "aarch64-linux" "cupsnet";
mb1 = mkServer nixpkgs-stable "x86_64-linux" "mb1"; mb1 = mkServer nixpkgs-stable "x86_64-linux" "mb1";
airnix = mkServer nixpkgs-stable "aarch64-linux" "airnix";
homescreen = mkRaspi nixpkgs-stable "homescreen"; homescreen = mkRaspi nixpkgs-stable "homescreen";
bootstrap = nixpkgs-stable.lib.nixosSystem rec { bootstrap = nixpkgs-stable.lib.nixosSystem rec {

View file

@ -0,0 +1,10 @@
## this is a VM on mac book air M1, so aarch64
- boot from minimal nixos installer image
> 604ad1abbcfdd93bc6258be695a7d289756921c0e6d9b4f3afb8e98c823052ec nixos-minimal-24.05.2780.53e81e790209-aarch64-linux.iso
> https://releases.nixos.org/nixos/unstable/nixos-23.05pre470969.0e19daa510e/nixos-minimal-23.05pre470969.0e19daa510e-x86_64-linux.iso
- launch in paralells
- change root password
- From macbook host `nix run github:numtide/nixos-anywhere -- root@IP --flake '.#airnix'`

View file

@ -0,0 +1,11 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,24 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
"${inputs.nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix"
../cli.nix
../send-logs.nix
./boot.nix
./disks.nix
];
networking.hostName = "airnix";
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 100;
};
time.timeZone = "Europe/London";
}

View file

@ -0,0 +1,44 @@
{
disko.devices = {
disk = {
a = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "64M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
mode = "mirror";
rootFsOptions = {
compression = "zstd";
};
mountpoint = "/";
datasets = {
};
};
};
};
}