https://github.com/herbetom/niv-updater
https://github.com/herbetom/niv-updater
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/herbetom/niv-updater
- Owner: herbetom
- Created: 2024-08-16T22:46:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T00:30:20.000Z (almost 2 years ago)
- Last Synced: 2025-02-22T18:49:47.444Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# niv-updater
## Install
`niv-updater` can be installed and updated via niv itself:
1. add niv-updater to your sources:
```bash
niv add herbetom/niv-updater
```
2. edit `shell.nix` to add niv-updater to your development shell:
```nix
{ pkgs ? import {} }:
pkgs.mkShell {
packages = with pkgs; [
niv
# This is the important line:
(pkgs.callPackage "${(import ./nix/sources.nix).niv-updater}/pkgs/niv-updater.nix" {})
];
}
```
3. enter `nix-shell`. That's it!
## Usage
```
$ niv-updater --help
usage: niv-updater [-h] [--no-changelog] [-c CONFIG] [-S] [PACKAGE]
Update niv sources and commit changes with a changelog
positional arguments:
PACKAGE The repo to update, if none is provided it will update all
options:
-h, --help show this help message and exit
--no-changelog do not create a changelog
-c CONFIG, --config CONFIG
provide a config file, default is ~/.config/niv-updater/config.toml
-S, --sign GPG-sign commits.
```
## Config File
```
# github_token=string (optional): Useful if you run into an api limit with niv
github_token="github_YOUR-PERSONAL-ACCESS-TOKEN"
# Enty for the nixpkgs repo
[repo.nixpkgs]
# url=string - URL of the repo.
url="https://github.com/NixOS/nixpkgs/"
# path=string - path of the repo
path="/home/user/git/NixOS/nixpkgs"
# fetch=string|boolean (optional): true by default. If true it will fetch from the default remote. If false it won't fetch. If a string is provided if will try fetching from the that remote.
fetch="upstream"
[repo.niv-updater]
url="https://github.com/herbetom/niv-updater/"
path="/home/user/git/niv-updater"
fetch=true
```