Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created November 2, 2018 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinisil/09ced691dc0729a5346a740483369fd3 to your computer and use it in GitHub Desktop.
Save infinisil/09ced691dc0729a5346a740483369fd3 to your computer and use it in GitHub Desktop.
let
overlay1 = self: super:
{
a1 = super.stdenv.mkDerivation {
src = builtins.fetchGit {
url = "git@github.com:my-secret/repository.git";
ref = "master";
rev = "adab8b916a45068c044658c4158d81878f9ed1c3";
};
};
inherit (self) perl;
};
pkgs = import <nixpkgs> { overlays = [ overlay1 ]; };
lib = pkgs.lib;
x86_config = { pkgs, ... }:
{
fileSystems = {
"/" = { device = "LABEL=nixos"; fsType = "ext4"; };
};
boot = {
loader.grub = {
enable = true;
device = "/dev/vda";
};
};
environment.systemPackages = [ pkgs.bustle pkgs.qt5.full ];
services.mingetty.autologinUser = "root";
};
x86_build = import <nixpkgs/nixos> { configuration = x86_config; };
rootDisk = import <nixpkgs/nixos/lib/make-disk-image.nix> {
name = "nix_x86_rootfs";
inherit pkgs lib;
config = x86_build.config;
diskSize = 4096;
};
in rootDisk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment