add airnix stub
This commit is contained in:
parent
57892c4d47
commit
f296afc1f2
5 changed files with 90 additions and 0 deletions
|
@ -174,6 +174,7 @@
|
|||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
||||
cupsnet = mkServer nixpkgs-stable "aarch64-linux" "cupsnet";
|
||||
mb1 = mkServer nixpkgs-stable "x86_64-linux" "mb1";
|
||||
airnix = mkServer nixpkgs-stable "aarch64-linux" "airnix";
|
||||
homescreen = mkRaspi nixpkgs-stable "homescreen";
|
||||
|
||||
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
||||
|
|
10
nixos/boxes/airnix/README.md
Normal file
10
nixos/boxes/airnix/README.md
Normal 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'`
|
11
nixos/boxes/airnix/boot.nix
Normal file
11
nixos/boxes/airnix/boot.nix
Normal 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;
|
||||
}
|
24
nixos/boxes/airnix/default.nix
Normal file
24
nixos/boxes/airnix/default.nix
Normal 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";
|
||||
}
|
44
nixos/boxes/airnix/disks.nix
Normal file
44
nixos/boxes/airnix/disks.nix
Normal 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 = {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue