https://github.com/herbetom/npins-updater
https://github.com/herbetom/npins-updater
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/herbetom/npins-updater
- Owner: herbetom
- Created: 2025-01-15T14:17:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T15:36:47.000Z (over 1 year ago)
- Last Synced: 2025-01-15T17:46:47.272Z (over 1 year ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npins-updater
## Install
`npins-updater` can be installed and updated via npins itself:
1. add npins-updater to your sources:
```bash
npins add github herbetom npins-updater -b main
```
2. edit `shell.nix` to add npins-updater to your development shell:
```nix
{ pkgs ? import {} }:
pkgs.mkShell {
packages = with pkgs; [
npins
# This is the important line:
(pkgs.callPackage "${(import ./npins).npins-updater}/pkgs/npins-updater.nix" {})
];
}
```
3. enter `nix-shell`. That's it!
## Usage
```
$ npins-updater --help
usage: npins-updater [-h] [--no-changelog] [-c CONFIG] [-S] [PACKAGE]
Update npins 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/npins-updater/config.toml
-S, --sign GPG-sign commits.
```
## Config File
```
# 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.npins-updater]
url="https://github.com/herbetom/npins-updater/"
path="/home/user/git/npins-updater"
fetch=true
```