From 1003e1cce2bd9ac23a4081a42771b4893a3415fa Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Fri, 4 Jul 2025 17:44:35 +0200 Subject: [PATCH] initial zeta config --- beta/configuration.nix | 1 + miku/configuration.nix | 1 + neko/configuration.nix | 1 + share/common.nix | 16 ++++------------ zeta/configuration.nix | 24 ++++++++++++++++++++++++ zeta/hardware-configuration.nix | 16 ++++++++++++++++ zeta/install.txt | 15 +++++++++++++-- 7 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 zeta/configuration.nix create mode 100644 zeta/hardware-configuration.nix diff --git a/beta/configuration.nix b/beta/configuration.nix index cdd1bdb..117eac1 100644 --- a/beta/configuration.nix +++ b/beta/configuration.nix @@ -13,6 +13,7 @@ # x86-64 machine nixpkgs.hostPlatform = "x86_64-linux"; boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.memtest86.enable = true; # our hostname networking.hostName = "beta"; diff --git a/miku/configuration.nix b/miku/configuration.nix index c8b52de..8e2b41c 100644 --- a/miku/configuration.nix +++ b/miku/configuration.nix @@ -13,6 +13,7 @@ # x86-64 machine nixpkgs.hostPlatform = "x86_64-linux"; boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.memtest86.enable = true; # our hostname networking.hostName = "miku"; diff --git a/neko/configuration.nix b/neko/configuration.nix index 63bfff9..4016935 100644 --- a/neko/configuration.nix +++ b/neko/configuration.nix @@ -13,6 +13,7 @@ # x86-64 machine nixpkgs.hostPlatform = "x86_64-linux"; boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.memtest86.enable = true; # our hostname networking.hostName = "neko"; diff --git a/share/common.nix b/share/common.nix index f625887..e74f836 100644 --- a/share/common.nix +++ b/share/common.nix @@ -113,12 +113,6 @@ in # Use the systemd-boot EFI boot loader. 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 / boot.initrd.systemd.enable = true; @@ -620,10 +614,10 @@ in environment.variables.EDITOR = "micro"; # enable VirtualBox - virtualisation.virtualbox.host.enable = true; - virtualisation.virtualbox.host.enableKvm = true; - virtualisation.virtualbox.host.enableHardening = false; - virtualisation.virtualbox.host.addNetworkInterface = false; +# virtualisation.virtualbox.host.enable = true; +# virtualisation.virtualbox.host.enableKvm = true; +# virtualisation.virtualbox.host.enableHardening = false; +# virtualisation.virtualbox.host.addNetworkInterface = false; # allow GrapheneOS install programs.adb.enable = true; @@ -645,8 +639,6 @@ in loadModels = [ "deepseek-coder" "deepseek-r1" "gemma3" "llama3.2" "llava" "mistral" ]; }; - services.open-webui.enable = true; - # get gnupg to work programs.gnupg.agent.enable = true; programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses; diff --git a/zeta/configuration.nix b/zeta/configuration.nix new file mode 100644 index 0000000..a987588 --- /dev/null +++ b/zeta/configuration.nix @@ -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"; +} diff --git a/zeta/hardware-configuration.nix b/zeta/hardware-configuration.nix new file mode 100644 index 0000000..62097c4 --- /dev/null +++ b/zeta/hardware-configuration.nix @@ -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" ]; + }; +} diff --git a/zeta/install.txt b/zeta/install.txt index 60f8226..930113a 100644 --- a/zeta/install.txt +++ b/zeta/install.txt @@ -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