Custom nixpkgs repository for packages.
Add to your flake:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rwxd-nixpkgs.url = "github:rwxd/my-nixpkgs";
rwxd-nixpkgs.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, rwxd-nixpkgs, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
specialArgs = { inherit rwxd-nixpkgs; };
modules = [
({ pkgs, rwxd-nixpkgs, ... }: {
environment.systemPackages = [
rwxd-nixpkgs.packages.${pkgs.system}.vmrss
rwxd-nixpkgs.packages.${pkgs.system}.notify-me
];
})
];
};
};
}vmrss- Memory usage monitoring toolnotify-me- CLI tool to send notifications to various servicesbest-of- CLI tool to find the best of somethingdnsbl-exporter- Prometheus exporter for DNS Block Listspdnsgrep- Search through PowerDNS records via API
Create a new package in pkgs/<package-name>/package.nix.
-
Update version and rev in
pkgs/<package-name>/package.nix -
Get the hash:
nix-prefetch-url --unpack https://github.com/owner/repo/archive/refs/tags/vX.Y.Z.tar.gz nix hash to-sri --type sha256 <hash>
-
Update the hash in package.nix
-
Commit and push
# Show all packages
nix flake show
# Build package
nix build '.#vmrss'
# Run directly
nix run '.#vmrss' -- --help