machines: add a rescue
machine for live-booting
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
machines.desko = decl-bootable-machine { name = "desko"; system = "x86_64-linux"; };
|
||||
machines.lappy = decl-bootable-machine { name = "lappy"; system = "x86_64-linux"; };
|
||||
machines.moby = decl-bootable-machine { name = "moby"; system = "aarch64-linux"; };
|
||||
machines.rescue = decl-bootable-machine { name = "rescue"; system = "x86_64-linux"; };
|
||||
in {
|
||||
nixosConfigurations = builtins.mapAttrs (name: value: value.nixosConfiguration) machines;
|
||||
imgs = builtins.mapAttrs (name: value: value.img) machines;
|
||||
|
15
machines/rescue/default.nix
Normal file
15
machines/rescue/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
# TODO: enable root login via ssh
|
||||
|
||||
# docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion
|
||||
system.stateVersion = "21.05";
|
||||
}
|
13
machines/rescue/fs.nix
Normal file
13
machines/rescue/fs.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# root is a tmpfs so that we have an ephemeral system ("impermanence" handles the state)
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44445555-6666-7777-8888-999900001111";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/2222-3333";
|
||||
fsType = "vfat";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user