Compare commits

...

3 Commits

Author SHA1 Message Date
Phillip Klein 9921e719ed free target env of seal-off command 2024-10-16 15:55:16 +02:00
Phillip Klein be9ab28418 add lan store url option as cli flag 2024-10-16 13:46:07 +02:00
Phillip Klein 10220fb515 revert auto-reboot 2024-10-14 13:52:48 +02:00
4 changed files with 36 additions and 27 deletions

10
README
View File

@ -1,8 +1,16 @@
On build device:
* nix-build
* (for LAN builds) nix-build --arg mlabs true
On target device:
* Enter BIOS, disable secure boot, enable UEFI PXE network boot
* sudo auto-install
* sudo reboot
* Run memtest86
* Copy device database to ~/artiq
* Set timezone and kb layout
* Comment out openssh.authorizedKeys.keys
* sudo seal-off
* history clear
On build device:
* cat sealoff.sh | ssh rabi@artiq "sudo sh"

View File

@ -41,23 +41,28 @@ let
nixos-generate-config --root /mnt
cp ${./final}/* /mnt/etc/nixos
nixos-install --no-root-password --flake /mnt/etc/nixos#artiq
reboot
'';
customModule = {
system.stateVersion = "24.05";
environment.systemPackages = [ autoInstall pkgs.git ];
documentation.info.enable = false; # https://github.com/NixOS/nixpkgs/issues/124215
documentation.man.enable = false;
nix.settings.trusted-public-keys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.settings.substituters = ["https://nixbld.m-labs.hk"];
};
customModule = mlabs:
let storeUrl = "https://nixbld.m-labs.hk" + (if mlabs then "?priority=10" else "");
in
{
system.stateVersion = "24.05";
environment.systemPackages = [ autoInstall pkgs.git ];
documentation.info.enable = false; # https://github.com/NixOS/nixpkgs/issues/124215
documentation.man.enable = false;
nix.settings.trusted-public-keys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.settings.substituters = [ storeUrl ];
};
in
makeNetboot {
modules = [
<nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
customModule
];
system = "x86_64-linux";
}
{ mlabs ? false }:
let module = customModule mlabs;
in
makeNetboot {
modules = [
<nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
module
];
system = "x86_64-linux";
}

View File

@ -1,14 +1,6 @@
{ config, pkgs, artiq, ... }:
let
sealOff = pkgs.writeShellScriptBin "seal-off"
''
set -e
nixos-rebuild boot
nix-collect-garbage -d
'';
in {
{
imports =
[
./hardware-configuration.nix
@ -44,7 +36,6 @@ in {
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
sealOff
wget
vim
gitAndTools.gitFull

5
sealoff.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
nixos-rebuild boot
nix-collect-garbage -d