summaryrefslogtreecommitdiffstats
path: root/README
blob: f19b7c0b2a0bd4e8e5bd206c3407e70026155964 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
populate - source code installer

populate can install sources from various locations into a directory.
Currently populate knows how to install (local) files, Git repositories, and
symlinks.  Following example illustrates them all.


Example: Install some source to /var/src
----------------------------------------

First we have to create a "sentinel file" that tells populate it's okay to
install (and remove!) files from our target location:

    touch /var/src/.populate

Next we'll run populate with a source specification:

    populate root@localhost/var/src <<EOF
    {
      "mystuff": {
        "type": "file",
        "file": {
          "path": "/path/to/mystuff-1.0"
        }
      },
      "nixos-config": {
        "type": "symlink",
        "symlink": {
          "target": "mystuff/configuration.nix"
        }
      },
      "nixpkgs": {
        "type": "git",
        "git": {
          "ref": "8bf31d7d27cae435d7c1e9e0ccb0a320b424066f",
          "url": "https://github.com/NixOS/nixpkgs"
        }
      },
      "painload": {
        "type": "http",
        "http": {
          "keep-toplevel-singleton": false,
          "sha256": "46a9351e538144ee0f75d7e02ceb0b3359a215fff5905e6b9184e8d9558e7ff5",
          "unpack": true,
          "url": "https://github.com/krebscode/painload/tarball/master"
        }
    }
    EOF