From 1a459d1c3bdd77a3dbd19c97b3ff373594e5a9bd Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Fri, 20 Sep 2019 13:13:47 -0400 Subject: [PATCH] Factor nixpkgs expression out for easier reuse --- morph/make-grid.nix | 10 +--------- morph/nixpkgs.nix | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 morph/nixpkgs.nix diff --git a/morph/make-grid.nix b/morph/make-grid.nix index 60d80aae..1728daca 100644 --- a/morph/make-grid.nix +++ b/morph/make-grid.nix @@ -5,15 +5,7 @@ # server in the morph network. { name, nodes }: let - # Pin the deployment package-set to a specific version of nixpkgs. This is - # NixOS 19.03 as of Aug 28 2019. There's nothing special about it. It's - # just recent at the time of development. It can be upgraded when there is - # value in doing so. Meanwhile, our platform doesn't shift around beneath - # us in surprising ways as time passes. - pkgs = import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/3c83ad6ac13b67101cc3e2e07781963a010c1624.tar.gz"; - sha256 = "0cdq342wrkvkyccygpp1gvwp7hhqg68hljjwld4vjixm901ayy14"; - }) {}; + pkgs = import ./nixpkgs.nix { }; # Load our JSON configuration for later use. cfg = pkgs.lib.trivial.importJSON ./grid.config.json; in diff --git a/morph/nixpkgs.nix b/morph/nixpkgs.nix new file mode 100644 index 00000000..ab317b2e --- /dev/null +++ b/morph/nixpkgs.nix @@ -0,0 +1,9 @@ +# Pin the deployment package-set to a specific version of nixpkgs. This is +# NixOS 19.03 as of Aug 28 2019. There's nothing special about it. It's +# just recent at the time of development. It can be upgraded when there is +# value in doing so. Meanwhile, our platform doesn't shift around beneath +# us in surprising ways as time passes. +(builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/3c83ad6ac13b67101cc3e2e07781963a010c1624.tar.gz"; + sha256 = "0cdq342wrkvkyccygpp1gvwp7hhqg68hljjwld4vjixm901ayy14"; +}) -- GitLab