~sircmpwn/builds.sr.ht

builds.sr.ht/images/nixos/image.nix -rw-r--r-- 659 bytes
48fa5794Dhruvin Gandhi alpine: run setup-timezone conditionally 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ pkgs ? import <nixpkgs> {} }:

let
  makeDiskImage = import "${pkgs.path}/nixos/lib/make-disk-image.nix";
  evalConfig = import "${pkgs.path}/nixos/lib/eval-config.nix";
  config = (evalConfig {
    modules = [ (import ./qemu-system-configuration.nix) ];
  }).config;
in
  makeDiskImage {
    inherit pkgs config;
    lib = pkgs.lib;
    diskSize = 16000;
    format = "qcow2-compressed";
    contents = [{
      source = pkgs.writeText "gitconfig" ''
        [user]
          name = builds.sr.ht
          email = builds@sr.ht
      '';
      target = "/home/build/.gitconfig";
      user = "build";
      group = "users";
      mode = "644";
    }];
  }