initial zeta config
This commit is contained in:
parent
fa12f695a8
commit
1003e1cce2
7 changed files with 60 additions and 14 deletions
|
@ -13,6 +13,7 @@
|
||||||
# x86-64 machine
|
# x86-64 machine
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
|
||||||
# our hostname
|
# our hostname
|
||||||
networking.hostName = "beta";
|
networking.hostName = "beta";
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# x86-64 machine
|
# x86-64 machine
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
|
||||||
# our hostname
|
# our hostname
|
||||||
networking.hostName = "miku";
|
networking.hostName = "miku";
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# x86-64 machine
|
# x86-64 machine
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
|
|
||||||
# our hostname
|
# our hostname
|
||||||
networking.hostName = "neko";
|
networking.hostName = "neko";
|
||||||
|
|
|
@ -113,12 +113,6 @@ in
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# use a high resolution
|
|
||||||
boot.loader.systemd-boot.consoleMode = "max";
|
|
||||||
|
|
||||||
# we want to be able to do a memtest
|
|
||||||
boot.loader.systemd-boot.memtest86.enable = true;
|
|
||||||
|
|
||||||
# use systemd early, we use boot.initrd.systemd.services.rollback to rollback /
|
# use systemd early, we use boot.initrd.systemd.services.rollback to rollback /
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
@ -620,10 +614,10 @@ in
|
||||||
environment.variables.EDITOR = "micro";
|
environment.variables.EDITOR = "micro";
|
||||||
|
|
||||||
# enable VirtualBox
|
# enable VirtualBox
|
||||||
virtualisation.virtualbox.host.enable = true;
|
# virtualisation.virtualbox.host.enable = true;
|
||||||
virtualisation.virtualbox.host.enableKvm = true;
|
# virtualisation.virtualbox.host.enableKvm = true;
|
||||||
virtualisation.virtualbox.host.enableHardening = false;
|
# virtualisation.virtualbox.host.enableHardening = false;
|
||||||
virtualisation.virtualbox.host.addNetworkInterface = false;
|
# virtualisation.virtualbox.host.addNetworkInterface = false;
|
||||||
|
|
||||||
# allow GrapheneOS install
|
# allow GrapheneOS install
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
@ -645,8 +639,6 @@ in
|
||||||
loadModels = [ "deepseek-coder" "deepseek-r1" "gemma3" "llama3.2" "llava" "mistral" ];
|
loadModels = [ "deepseek-coder" "deepseek-r1" "gemma3" "llama3.2" "llava" "mistral" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.open-webui.enable = true;
|
|
||||||
|
|
||||||
# get gnupg to work
|
# get gnupg to work
|
||||||
programs.gnupg.agent.enable = true;
|
programs.gnupg.agent.enable = true;
|
||||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
|
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
|
||||||
|
|
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
|
# build uboot
|
||||||
nix build .#uboot-asahi -o u-boot
|
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
|
# build installer ISO
|
||||||
nix build .#installer-bootstrap -o installer -j4 -L
|
nix build .#installer-bootstrap -o installer -j4 -L
|
||||||
|
|
||||||
|
@ -112,7 +119,7 @@ zpool create \
|
||||||
-O encryption=on \
|
-O encryption=on \
|
||||||
-O keylocation=prompt \
|
-O keylocation=prompt \
|
||||||
-O keyformat=passphrase \
|
-O keyformat=passphrase \
|
||||||
zpool $RAID
|
-f zpool $RAID
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
|
@ -171,7 +178,11 @@ mount
|
||||||
nixos-generate-config --root /mnt
|
nixos-generate-config --root /mnt
|
||||||
|
|
||||||
# copy config data from another machine including secrets
|
# 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
|
# install
|
||||||
nixos-install --option experimental-features 'nix-command flakes' --no-root-passwd --root /mnt
|
nixos-install --option experimental-features 'nix-command flakes' --no-root-passwd --root /mnt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue