Skip to content

Nix package and modules#77

Closed
JeffDess wants to merge 3 commits intoDylanDevelops:mainfrom
JeffDess:nixos-flake
Closed

Nix package and modules#77
JeffDess wants to merge 3 commits intoDylanDevelops:mainfrom
JeffDess:nixos-flake

Conversation

@JeffDess
Copy link

@JeffDess JeffDess commented Feb 2, 2026

Hi! I have been using tmpo for a couple of days and I like it very much so far. I thought I'd contribute by adding a Nix setup so it's easier to use for Nix users and developers.

Thanks, keep up the good work!

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Description

Added support for Nix:

  • Nix package that can be run from flake or installed
  • NixOS module with only dev mode option
  • Home Manager module with options found in configuration file
  • Hide version upgrade notice if not on a semver format. The flake will run against latest commit on main and will show version unstable.
  • Updated installation docs for Linux and MacOS and developer setup in CONTRIBUTING.md

I've tested each option and everything seems to work well. The only caveat I found is with Home Manager module. If running tmpo config, you'd go through all the TUI flow to set each option, then there's an error telling you that the config file is readonly. The messaging is clear and this is to be expected on a managed home config, but a future improvement could be to check if the location is writable before starting asking questions.

Given flakes are enable on your machine, the package can be tested right now from my fork with:

nix run 'github:JeffDess/tmpo?ref=nixos-flake' -- --version

Previously only checked for "dev" or empty, but Nix flake will show
"unstable" as it run latest commit instead of a version.
@DylanDevelops
Copy link
Owner

Hi @JeffDess! Thank you so much for creating this pull request. I'll take a look in the next day or so, and we can move forward from there!

@DylanDevelops DylanDevelops self-requested a review February 2, 2026 21:29
@DylanDevelops
Copy link
Owner

Hey @JeffDess—apologies for the delay in my review; the week got ahead of me.

Thanks for this comprehensive contribution! The code quality is excellent, and I can see you put a lot of thought into this. 🫶

After careful consideration, I need to be mindful about setting a precedent for maintaining distribution-specific packaging in-tree. If I accept Nix flakes/modules here, it opens the door for requests to maintain Snap packages, Systemd units, etc., which could become a maintenance burden as the project evolves.

At this time, the only dedicated package manager support plan for releasing tmpo is Homebrew. Once we meet the requirements, that won't be for a while. I may consider providing more dedicated support if I see a large user base on a specific platform in the future.

However, the version check improvement is valuable regardless of Nix. The isReleaseVersion() refactor properly handles any non-semver version strings, not just "dev".

Here's what I'd like to propose:

What I'd like to merge:

  • The version check changes in cmd/utilities/version.go and cmd/utilities/version_test.go

For the Nix support:

I'd love to link to your Nix flake in our installation docs, but would prefer it lives in:

  • A separate repo you maintain, OR
  • Contributed to nixpkgs (the standard approach for Nix packages)

Your help

If you'd like to create a new PR with just the version check changes, I'll review and merge it promptly.

If you end up wanting to maintain a tmpo Nix repo, feel free to open an issue once it is complete with details, and I'd be happy to add a link to this repo that directs Nix users to yours.

Let me know if that works best for you, and thanks again for the quality contribution!

@JeffDess
Copy link
Author

JeffDess commented Feb 8, 2026

Got it. Sure, I could open a new PR just for the version check improvement.

But I don't feel like maintaining a separate repo just to add a flake is the right approach, at least I have no desire in doing that.

As for the nixpkgs PR, I think it would be best to wait a bit so your project has more mileage. This is why I suggested a flake, it is your best option right now. But if you decide to go the nixpkgs route in the future, I could be on the maintainers list. Even then, people wanting to contribute to your project would not have the developer setup benefits of the flake.

Just reach out if you ever change your mind about Nix support, I'll be glad to help!

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