The flake.nix exposes three things:
packages.riff(alsopackages.default) — the installable appoverlays.default— an overlay for nixpkgsdevShells.default— a shell for hacking on Riff
Add the input:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
riff.url = "github:rootscripts/riff";
};
outputs = { self, nixpkgs, riff, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
environment.systemPackages = [ riff.packages.x86_64-linux.default ];
})
];
};
};
}For home-manager, inside your home config:
{
inputs.riff.url = "github:rootscripts/riff";
outputs = { nixpkgs, home-manager, riff, ... }: {
homeConfigurations.you = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
({ pkgs, ... }: {
home.packages = [ riff.packages.x86_64-linux.default ];
})
];
};
};
}Useful when you want pkgs.riff available everywhere rather than referencing riff.packages... directly:
{
inputs.riff.url = "github:rootscripts/riff";
outputs = { nixpkgs, riff, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ riff.overlays.default ];
};
in {
nixosConfigurations.myhost = pkgs.lib.nixosSystem {
inherit system;
modules = [{ environment.systemPackages = [ pkgs.riff ]; }];
};
};
}# install into your profile
nix profile install github:rootscripts/riff
# or just run it once
nix run github:rootscripts/riff
# from a local checkout
nix profile install .
nix run .After installing, riff is on your PATH and a Riff desktop entry + icon are registered.
git clone https://github.com/rootscripts/riff
cd riff
nix develop # nodejs, python3, yt-dlp, ffmpeg
npm install
npm start- The package wraps the nixpkgs
electronwith the app directory and putsyt-dlpandffmpegonPATH, so Riff finds them instead of self-downloading. npmDepsHashinflake.nixmust be updated wheneverpackage.json/package-lock.jsonchange. Rebuild with a wrong/placeholder hash and copy the reportedgot:value, or regenerate it withnix-prefetch-npm-deps/prefetch-npm-deps.