initial zeta config
This commit is contained in:
parent
fa12f695a8
commit
1003e1cce2
7 changed files with 60 additions and 14 deletions
24
zeta/configuration.nix
Normal file
24
zeta/configuration.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# Include the necessary packages and configuration for Apple Silicon support.
|
||||
./apple-silicon-support
|
||||
# Shared config of all machines
|
||||
/data/nixos/share/common.nix
|
||||
];
|
||||
|
||||
# AArch64 machine
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
|
||||
# our hostname
|
||||
networking.hostName = "zeta";
|
||||
networking.hostId = "cce4e4c1";
|
||||
|
||||
# german laptop keyboard
|
||||
services.xserver.xkb.layout = "de";
|
||||
}
|
16
zeta/hardware-configuration.nix
Normal file
16
zeta/hardware-configuration.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
# basic drivers
|
||||
boot.initrd.availableKernelModules = [ "uas" ];
|
||||
|
||||
# /boot efi partition to boot in UEFI mode
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-id/nvme-APPLE_SSD_AP1024Z_0ba01e0141400628-part4";
|
||||
fsType = "vfat";
|
||||
neededForBoot = true;
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
}
|
|
@ -13,6 +13,13 @@ nix build .#m1n1 -o m1n1
|
|||
# build uboot
|
||||
nix build .#uboot-asahi -o u-boot
|
||||
|
||||
# add to nixos-apple-silicon/iso-configuration/installer-configuration.nix
|
||||
|
||||
networking.hostId = "cce4e4c1";
|
||||
boot.supportedFilesystems.zfs = lib.mkForce true;
|
||||
|
||||
to have ZFS support
|
||||
|
||||
# build installer ISO
|
||||
nix build .#installer-bootstrap -o installer -j4 -L
|
||||
|
||||
|
@ -112,7 +119,7 @@ zpool create \
|
|||
-O encryption=on \
|
||||
-O keylocation=prompt \
|
||||
-O keyformat=passphrase \
|
||||
zpool $RAID
|
||||
-f zpool $RAID
|
||||
|
||||
sleep 5
|
||||
|
||||
|
@ -171,7 +178,11 @@ mount
|
|||
nixos-generate-config --root /mnt
|
||||
|
||||
# copy config data from another machine including secrets
|
||||
doas scp -r /data/nixos root@192.168.13.102:/mnt/data
|
||||
doas scp -r /data/nixos root@192.168.13.113:/mnt/data
|
||||
|
||||
# add apple silicon support
|
||||
cp -r /etc/nixos/apple-silicon-support /mnt/etc/nixos/
|
||||
chmod -R +w /mnt/etc/nixos/
|
||||
|
||||
# install
|
||||
nixos-install --option experimental-features 'nix-command flakes' --no-root-passwd --root /mnt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue