Skip to content

Instantly share code, notes, and snippets.

@lheckemann
Created June 14, 2017 12:48
Show Gist options
  • Save lheckemann/ce382bfbc71b1cc73a7f626b85d9e302 to your computer and use it in GitHub Desktop.
Save lheckemann/ce382bfbc71b1cc73a7f626b85d9e302 to your computer and use it in GitHub Desktop.
let
pkgs = import <nixpkgs> {};
config = {...}: {
imports = [
<nixpkgs/nixos/modules/hardware/all-firmware.nix>
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
<nixpkgs/nixos/modules/profiles/base.nix>
];
fileSystems."/" = { device = "LABEL=nixos"; fsType = "ext4"; };
boot.loader.grub.devices = [ "/dev/vda" ];
};
evaluated = (import <nixpkgs/nixos/lib/eval-config.nix> {
inherit (pkgs) system;
modules = [ config ];
});
image = import <nixpkgs/nixos/lib/make-disk-image.nix> {
name = "superMagicWritableUSB";
inherit pkgs;
inherit (pkgs) lib;
config = (import <nixpkgs/nixos> { configuration = config; }).config;
partitioned = true;
installBootLoader = true;
diskSize = 3072;
};
in
image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment