Skip to content

feat: add Nix flake support and instructions#118

Open
TheFacc wants to merge 1 commit intoYakitrak:mainfrom
TheFacc:main
Open

feat: add Nix flake support and instructions#118
TheFacc wants to merge 1 commit intoYakitrak:mainfrom
TheFacc:main

Conversation

@TheFacc
Copy link
Copy Markdown

@TheFacc TheFacc commented Mar 27, 2026

Nix Flake support + Installation/Run instructions for Nix users

Description

Installation instructions for Nix/NixOS users.
Add a repo-root flake (flake.nix, flake.lock) that allows Nix users to run/build the package directly with e.g.
nix run github:Yakitrak/notesmd-cli -- list-vaults
or also easily build the binary, or use the package in a shell, as per instructions.
Also supports future versions with e.g. nix run github:Yakitrak/notesmd-cli/v0.3.5 -- --help

Motivation and Context

There is no Nixpkgs package yet for this repo; the flake gives Nix users a simple command to use the package, and flake.lock ensures future reproducibility. Also, installation instructions for non-flake Nix users.

Checklist:

  • I have written unit tests for my changes.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@Yakitrak
Copy link
Copy Markdown
Owner

Hey thanks for submitting an MR. I don't know much about Nix but building from source already works for Nix users, and I'd prefer not to take on the maintenance burden of flake files. I believe a Nixpkgs submission would be the better home for this.

@TheFacc
Copy link
Copy Markdown
Author

TheFacc commented Mar 27, 2026

Hi, totally understandable, in fact my first move was just editing README.md with Nix instructions, no extra files. But putting the whole flake in there looked too long, so I thought about just making it a flake.

About maintainance: there is no maintainance needed, the flake can remain unchanged forever, the flake.lock pings nixpkgs to the current version but it only affects the Go version used to build it. The lock file can be removed also, everything works the same, might just break in the far future if the repo becomes unmaintained and new Go version cannot build it.

Also, I never submitted to nixpkgs. Yet. That might be a real maintainance! :)

Would it be ok to just merge a change regarding the readme only, no new files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants