diff --git a/default.nix b/default.nix index 6441675a243e22e6154267c656652c8d8575940e..8b605281715be3f74c375a6b5532a4a87a6b4993 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? import ./nixpkgs-2105.nix { } }: +{ pkgs ? import ./nixpkgs.nix { } }: { # Render the project documentation source to some presentation format (ie, # html) with Sphinx. diff --git a/morph/lib/default.nix b/morph/lib/default.nix index 88c83bc2211da2e00e69f95d7d2110d3ee636cc3..c43fa6ea1ebc6b3159f3f2f6872c23f0da62b776 100644 --- a/morph/lib/default.nix +++ b/morph/lib/default.nix @@ -17,7 +17,7 @@ # installed, as well as the NixOS module set that is used. # This is intended to be used in a grid definition like: # network = { ... ; inherit (gridlib) pkgs; ... } - pkgs = import ../../nixpkgs-2105.nix { + pkgs = import ../../nixpkgs.nix { # Ensure that configuration of the system where this runs # doesn't leak into what we build. # See https://github.com/NixOS/nixpkgs/issues/62513 diff --git a/nixos/modules/update-deployment b/nixos/modules/update-deployment index 1c8960588f418e57eeaadb7ad29db4285369cbdd..a8efffa062ad8f8dc6b6dc22827e4f0087b4d618 100755 --- a/nixos/modules/update-deployment +++ b/nixos/modules/update-deployment @@ -72,14 +72,14 @@ EOF ssh -o StrictHostKeyChecking=no "$(hostname).$(domainname)" ":" # Set nixpkgs to our preferred version for the morph build. Annoyingly, we -# can't just use nixpkgs-2105.nix as our nixpkgs because some code (in morph, +# can't just use nixpkgs.nix as our nixpkgs because some code (in morph, # at least) wants <nixpkgs> to be a fully-resolved path to a nixpkgs tree. # For example, morph evaluated `import <nixpkgs/lib>` which would turn into -# something like `import nixpkgs-2105.nix/lib` which is nonsense. +# something like `import nixpkgs.nix/lib` which is nonsense. # # So instead, import our nixpkgs which forces it to be instantiated in the # store, then ask for its path, then set NIX_PATH to that. -export NIX_PATH="nixpkgs=$(nix eval "(import ${CHECKOUT}/nixpkgs-2105.nix { }).path")" +export NIX_PATH="nixpkgs=$(nix eval "(import ${CHECKOUT}/nixpkgs.nix { }).path")" # Attempt to update just this host. Choose the morph grid definition matching # the grid we belong to and limit the morph deployment update to the host diff --git a/nixpkgs-2105.json b/nixpkgs.json similarity index 86% rename from nixpkgs-2105.json rename to nixpkgs.json index f7d74ca46466a3c97e9a21318dd23d137d37b13b..d516cb972a80b1e821e609a43ef9bf07a5a0d7e9 100644 --- a/nixpkgs-2105.json +++ b/nixpkgs.json @@ -1,5 +1,5 @@ { - "name": "release2105", + "name": "source", "url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.4717.df123677560/nixexprs.tar.xz", "sha256": "02zkhiwl3lwhk9fkmcbcfr927w135xdrgp6z7g804symbd1jcwal" -} \ No newline at end of file +} diff --git a/nixpkgs-2105.nix b/nixpkgs.nix similarity index 70% rename from nixpkgs-2105.nix rename to nixpkgs.nix index 536d913b89ba6a57d8d683381ea1c8f40e026b4f..a49c447874e45bea0804185636468568f5bd5035 100644 --- a/nixpkgs-2105.nix +++ b/nixpkgs.nix @@ -1 +1 @@ -import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ./nixpkgs-2105.json))) +import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ./nixpkgs.json))) diff --git a/shell.nix b/shell.nix index a5741377eec5ebd4b8862a0ea47e15edfdac2731..b8be3a3a6088a987468329ad29919a6957313c6a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ let - release2105 = import ./nixpkgs-2105.nix { }; + pinned-pkgs = import ./nixpkgs.nix { }; in -{ pkgs ? release2105, lib ? pkgs.lib, python ? pkgs.python3 }: +{ pkgs ? pinned-pkgs, lib ? pkgs.lib, python ? pkgs.python3 }: let tools = pkgs.callPackage ./tools {}; in @@ -10,7 +10,7 @@ pkgs.mkShell { # first adds that path to the store, and then interpolates the store path # into the string. We use `builtins.toString` to convert the path to a # string without copying it to the store before interpolating. Either the - # path is already in the store (e.g. when `pkgs` is `release2105`) so we + # path is already in the store (e.g. when `pkgs` is `pinned-pkgs`) so we # avoid making a second copy with a longer name, or the user passed in local # path (e.g. a checkout of nixpkgs) and we point at it directly, rather than # a snapshot of it. diff --git a/tools/update-nixpkgs b/tools/update-nixpkgs index 09c823b0a419b5937d4953337b94a26c4b502e32..2c4376acfffca5fa0568cd5768010e6ba9c28a2f 100755 --- a/tools/update-nixpkgs +++ b/tools/update-nixpkgs @@ -37,7 +37,7 @@ def main(): "repo_file", metavar="repo-file", nargs="?", - default=Path(__file__).parent.with_name("nixpkgs-2105.json"), + default=Path(__file__).parent.with_name("nixpkgs.json"), type=Path, help="JSON file with pinned configuration.", )