-
-
Save samueldr/e757d8554903dc842c41459c1cf10c9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? <nixpkgs>, system ? "aarch64-linux" } : | |
# ^ (1) changed to aarch64-linux | |
let | |
myisoconfig = { pkgs, ...}: { | |
imports = [ | |
"${nixpkgs}/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix" | |
]; | |
boot = { | |
# ^ (2) fixed the options `boot.*` namespacing issue | |
kernelParams = [ "cma=32M" ]; | |
supportedFilesystems = [ "f2fs" ]; | |
}; | |
environment.systemPackages = with pkgs; [ vim ]; | |
users.extraUsers.root = { | |
packages = with pkgs; [ f2fs-tools lynx vim w3m ]; | |
initialPassword = "nixos"; | |
}; | |
fileSystems = { | |
"/boot" = { | |
device = "/dev/disk/by-label/NIXOS_BOOT"; | |
fsType = "vfat"; | |
}; | |
"/" = { | |
device = "/dev/disk/by-label/NIXOS_SD"; | |
fsType = "f2fs"; | |
}; | |
}; | |
}; | |
evalNixos = configuration: import "${nixpkgs}/nixos" { | |
inherit system configuration; | |
}; | |
in { sd = (evalNixos myisoconfig).config.system.build.sdImage; } | |
# ^ (3) (uselessly) renamed to sd ^ | |
# ^ (4) use sdImage here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment