diff --git a/lib/deploy-rs.nix b/lib/deploy-rs.nix new file mode 100644 index 00000000..bb164d7f --- /dev/null +++ b/lib/deploy-rs.nix @@ -0,0 +1,5 @@ +let lock = builtins.fromJSON (builtins.readFile ./flake.lock).nodes.flake-compat.lockedd; +in import (fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; +}) \ No newline at end of file diff --git a/lib/nixpkgs.nix b/lib/nixpkgs.nix index 95c079ca..09cdd557 100644 --- a/lib/nixpkgs.nix +++ b/lib/nixpkgs.nix @@ -1,5 +1,3 @@ -# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file -# Useful to avoid using channels when using legacy nix commands let nixpkgs-lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.nixpkgs.locked; in import (fetchTarball { url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-lock.rev}.tar.gz"; diff --git a/lib/sops-nix.nix b/lib/sops-nix.nix index 17832f1a..89a01a29 100644 --- a/lib/sops-nix.nix +++ b/lib/sops-nix.nix @@ -1,4 +1,3 @@ -# Useful to avoid using channels when using legacy nix commands let sops-nix-lock = (builtins.fromJSON (builtins.readFile ../flake.lock)).nodes.sops-nix.locked; in import (fetchTarball { url = "https://github.com/Mic92/sops-nix/archive/${sops-nix-lock.rev}.tar.gz"; diff --git a/shell.nix b/shell.nix index 0dd8d1c2..bdf8a566 100644 --- a/shell.nix +++ b/shell.nix @@ -2,8 +2,9 @@ # A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file # Useful to avoid using channels when using legacy nix commands { - pkgs ? (import ./lib/nixpkgs.nix ) { }, - sops-nix ? (import ./lib/sops-nix.nix) { } + pkgs ? (import ./lib/nixpkgs.nix ) { }, + sops-nix ? (import ./lib/sops-nix.nix ) { }, + deploy-rs ? (import ./lib/deploy-rs.nix) { } }: { default = pkgs.mkShell { NIX_CONFIG = "experimental-features = nix-command flakes";