on master help sign in
Don't use fetchGit by default yet
commit6f5fa977cc1a260886da24e8452f8de0066972e0 authorElliot Cameron <eacameron@gmail.com> dateMon 21 May 2018, 11:44 (8 years ago) parent4e13222
4 files changed+18−33
default.nix+8−14 lib/command/src/Obelisk/Command/Thunk.hs+2−2 lib/https/default.nix+6−15 lib/https/github.json+2−2
default.nix+8−14
@@ -178,20 +178,14 @@ rec {
178178 server = exe: hostName:
179179 let system = "x86_64-linux";
180180 nixos = import (pkgs.path + /nixos);
181− https = import (pkgs.fetchFromGitHub {
182− owner = "obsidiansystems";
183− repo = "obelisk-https";
184− rev = "999e36b4ab14cbe31be6815cdbc3a1223a7b4617";
185− sha256 = "0qxi7hg751ikkp4r5j7d706gjrsl26lzlrnh905havij10plcg1l";
186− private = true;
187− } + "/module.nix") {} {
188− backendPort = 8000; # TODO read from config
189− # sslConfig = {
190− # hostName = "example.com";
191− # adminEmail = "webmaster@example.com";
192− # subdomains = [ "www" ];
193− # };
194− };
181+ https = (import lib/https {}).module {
182+ backendPort = 8000; # TODO read from config
183+ # sslConfig = {
184+ # hostName = "example.com";
185+ # adminEmail = "webmaster@example.com";
186+ # subdomains = [ "www" ];
187+ # };
188+ };
195189 in nixos {
196190 inherit system;
197191 configuration = args: {
lib/command/src/Obelisk/Command/Thunk.hs+2−2
@@ -346,8 +346,8 @@ updateThunkToLatest target = do
346346-- This tool will only ever produce the newest one when it writes a thunk.
347347gitHubStandaloneLoaders :: NonEmpty Text
348348gitHubStandaloneLoaders =
349− gitHubStandaloneLoaderV3 :|
350− [ gitHubStandaloneLoaderV2
349+ gitHubStandaloneLoaderV2 :|
350+ [ gitHubStandaloneLoaderV3
351351 , gitHubStandaloneLoaderV1
352352 ]
353353
lib/https/default.nix+6−15
@@ -1,16 +1,7 @@
11# DO NOT HAND-EDIT THIS FILE
2−let
3− fetch = { private ? false, ... }@args: if private && builtins.hasAttr "fetchGit" builtins
4− then fetchFromGitHubPrivate args
5− else (import <nixpkgs> {}).fetchFromGitHub (builtins.removeAttrs args ["branch"]);
6− fetchFromGitHubPrivate =
7− { owner, repo, rev, branch ? null, name ? null, sha256 ? null, private ? false
8− , fetchSubmodules ? false, githubBase ? "github.com", ...
9− }: assert !fetchSubmodules;
10− builtins.fetchGit ({
11− url = "ssh://git@${githubBase}/${owner}/${repo}.git";
12− inherit rev;
13− }
14− // (if branch == null then {} else { ref = branch; })
15− // (if name == null then {} else { inherit name; }));
16−in import (fetch (builtins.fromJSON (builtins.readFile ./github.json)))
2+import ((import <nixpkgs> {}).fetchFromGitHub (
3+ let json = builtins.fromJSON (builtins.readFile ./github.json);
4+ in { inherit (json) owner repo rev sha256;
5+ private = json.private or false;
6+ }
7+))
lib/https/github.json+2−2
@@ -2,6 +2,6 @@
22 "owner": "obsidiansystems",
33 "repo": "obelisk-https",
44 "private": true,
5− "rev": "862214f9379a830f5e5b45a03f267896bd752971",
6− "sha256": "1m2ryi157c6hwgalibygb5swj0w4kha1g438vnp6z0bbw31bcvzg"
5+ "rev": "5bc5cd81b669a0ea1b4415a1be8fd8c5a0680f0b",
6+ "sha256": "105n7pxykz02n8ilgjznssmxa8hszclg21nqiyqdr64bcrxjyxf4"
77}