Skip to content

Fix npins instructions to use main branches like flakes do. #263

@ulfbayte

Description

@ulfbayte

Hello,

First, thanks for all of this and also making a tutorial :)

I'm a beginner and I'm doing the tutorial https://den.oeiuwq.com/guides/from-zero-to-den/#step-2-pinning-den-and-dependencies so I can't use the standard process for reporting bugs.

I hope I don't waste anyone time with this...

I'm just doing the step 2

Image

The npins + home manager part isn't happy.
Error message seems legit but I think I had to report it here.

[ulfbayte@cyrix:~/nix-config]$ l
total 12K
drwxr-xr-x  3 ulfbayte users 4,0K 11 mars  21:40 .
drwx------ 20 ulfbayte users 4,0K 11 mars  21:25 ..
drwxr-xr-x  2 ulfbayte users 4,0K 11 mars  21:17 modules

[ulfbayte@cyrix:~/nix-config]$ cp -r /etc/nixos/ modules/_nixos

[ulfbayte@cyrix:~/nix-config]$ npins init
[INFO ] Welcome to npins!
[INFO ] Creating `npins` directory
[INFO ] Writing default.nix
[INFO ] Writing initial lock file with nixpkgs entry (need to fetch latest commit first)
[INFO ] Successfully written initial files to 'npins/sources.json'.

[ulfbayte@cyrix:~/nix-config]$ npins add github vic import-tree
[INFO ] Adding 'import-tree' …
    repository: https://github.com/vic/import-tree.git
    pre_releases: false
    submodules: false
    version: v0.1.0
    revision: a037ed2a58fc0ebed9e93b9ef79b0646e648f719
    hash: sha256-TEbh9zISiQcU82VwVoEbmXHnSGlUxTwvjJA9g9ErSDA=
    frozen: false


[ulfbayte@cyrix:~/nix-config]$ npins add github vic flake-aspects
[INFO ] Adding 'flake-aspects' …
    repository: https://github.com/vic/flake-aspects.git
    pre_releases: false
    submodules: false
    version: v0.6.0
    revision: 81a51a8997abe392b9d0794424a4823adc9bd3af
    hash: sha256-e3YqMwdQ2EpVTuWRkK2rkrHywp8QCpkj7x2U53SNoIA=
    frozen: false


[ulfbayte@cyrix:~/nix-config]$ npins add github vic den    
[INFO ] Adding 'den' …
    repository: https://github.com/vic/den.git
    pre_releases: false
    submodules: false
    version: v0.11.0
    revision: 2a654815e310c3a9bd6a64f4fe1afec82444deba
    hash: sha256-T0xYjpbcbyr1a9+2oG3mWBdRsCzXKwec29inS0bgMZE=
    frozen: false


[ulfbayte@cyrix:~/nix-config]$ npins add github vic with-inputs
[INFO ] Adding 'with-inputs' …
    repository: https://github.com/vic/with-inputs.git
    pre_releases: false
    submodules: false
    version: v0.2.0
    revision: 198a16e871b27672edfb3594fd5b25b871d8ce73
    hash: sha256-VF+qg8Uv/x9U2hiuEI4qgI6emMk2SQ73SSMUBvYnTco=
    frozen: false


[ulfbayte@cyrix:~/nix-config]$ npins add github nix-community home-manager
[INFO ] Adding 'home-manager' …
Error: Failed to fully initialize the pin

Caused by:
    Repository has no matching release tags


[ulfbayte@cyrix:~/nix-config]$

I was able to resolve (I hope) the issue as the npins doc say I can pin a branch instead of a release

[ulfbayte@cyrix:~/nix-config]$ npins add github nix-community home-manager --branch release-25.11
[INFO ] Adding 'home-manager' …
    repository: https://github.com/nix-community/home-manager.git
    branch: release-25.11
    submodules: false
    revision: 8f736f007139d7f70752657dff6a401a585d6cbc
    url: https://github.com/nix-community/home-manager/archive/8f736f007139d7f70752657dff6a401a585d6cbc.tar.gz
    hash: sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=
    frozen: false

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions