diff --git a/flake.nix b/flake.nix index a8cf858..f412f80 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,10 @@ outputs = { self, nixpkgs }: { overlays.default = final: prev: { + nix-index-unwrapped = prev.nix-index-unwrapped.overrideAttrs(old: { + patches = [ ./nix-index-https.patch ]; + }); + nixos-channel-native-programs = with final; stdenv.mkDerivation { name = "nixos-channel-native-programs"; buildInputs = [ @@ -48,7 +52,7 @@ brotli jq nixos-channel-native-programs - nix-index + nix-index-unwrapped ]; buildCommand = '' diff --git a/nix-index-https.patch b/nix-index-https.patch new file mode 100644 index 0000000..796b07c --- /dev/null +++ b/nix-index-https.patch @@ -0,0 +1,10 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 4393e4b..4a84fc0 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -23,4 +23,4 @@ pub mod workset; + /// The URL of the binary cache that we use to fetch file listings and references. + /// + /// Hardcoded for now, but may be made a configurable option in the future. +-pub const CACHE_URL: &str = "http://cache.nixos.org"; ++pub const CACHE_URL: &str = "https://cache.nixos.org";