u/Aidenn0

▲ 11 r/NixOS

If this is wrong, I don't want to be right

I added this module to my nixos configuration:

{ nixpkgs, pkgs, lib, ...}:
let upstreamRegistry = pkgs.fetchurl {
  url = "https://raw.githubusercontent.com/NixOS/flake-registry/refs/heads/master/flake-registry.json";
  hash = "sha256-e56aGI09taupUuZbn3ocfEe4EyOWjWwr/sl8oByiBIw=";
};
upstreamRegistryNix = builtins.fromJSON (builtins.readFile upstreamRegistry); in
{
  nix.settings.flake-registry = pkgs.writeText "registry.json" ( builtins.toJSON {
    version = upstreamRegistryNix.version;
    flakes = upstreamRegistryNix.flakes ++ [ 
      { exact = true;
      from.id = "local-nixpkgs";
        from.type = "indirect";
        to = {
          type = "path";
          path = nixpkgs.outPath;
        } // lib.filterAttrs (n: _: n == "lastModified" || n == "rev" || n == "narHash") nixpkgs;
      }
    ]; });
}

Now I can use:

inputs.nixpkgs.url = "flake:nixpkgs-local"

for building my profile and have my profile use the same version of nixpkgs as my system. Someday someone will make a convincing argument to me why having flakes stop accepting the system registry entries was a Good Thing (surely lockfiles are sufficient?), but until then, I will work around it.

reddit.com
u/Aidenn0 — 3 days ago

Anyone tried Dee Jellie on tvOS?

Always looking for options for playing my music on my AppleTV that are better than running iTunes under wine. I'm totally willing to pay $10 if it doesn't suck, but after getting burned by SubSwift (it's terrible), I'd like to see what other people think.

reddit.com
u/Aidenn0 — 3 days ago