Skip to content

Add Nix flake, package, and NixOS module#38

Open
micahsoftdotexe wants to merge 1 commit into
poddmo:mainfrom
micahsoftdotexe:feature/nix-flake
Open

Add Nix flake, package, and NixOS module#38
micahsoftdotexe wants to merge 1 commit into
poddmo:mainfrom
micahsoftdotexe:feature/nix-flake

Conversation

@micahsoftdotexe

Copy link
Copy Markdown

This adds nixos support for this fork of the abcde application. I had been using the original application in nixpkgs but wanted to use some of the features in this branch. Note: just wanted to disclose that I did have AI assist in the making of this code but have done manual review.

@poddmo

poddmo commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Wow, thanks for the contribution. I'd never heard of flakes before. I'm very happy to have package support for broader distributions. It will take me a while to run up a VM and test this for myself. It would be good to get feedback from another NixOS user that is experienced.

Off the top of my head I'm thinking:

  • the NixOS specific stuff should go into a dedicated folder called nixos
  • create a readme-nixos.md for the documentation and link to it from the main readme.md
    Does that sound reasonable to you?
    Thanks again.

@poddmo poddmo added the enhancement New feature or request label Jul 10, 2026
@micahsoftdotexe

micahsoftdotexe commented Jul 10, 2026

Copy link
Copy Markdown
Author

That sounds pretty reasonable and I will get on that! The only thing I would bring up is for single-flake repos , the flake.nix and the flake.lock by convention are usually root of the repo. There is a way to have the flake in a subdirectory by adding the ?dir= syntax when you want to reference the flake. For instance, this is the code that I am using in my current nixos config, to currently target the fork I made for the changes, this is what I included in the flake.nix for my nixos repo:

 abcde = {
      url = "github:micahsoftdotexe/abcde/feature/nix-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };

This is what it would be if we placed the flake files into the nixos directory:

abcde = {
  url = "github:micahsoftdotexe/abcde/feature/nix-flake?dir=nixos";
  inputs.nixpkgs.follows = "nixpkgs";
};

sort of the same would apply when this would be merged into this repo except the url would change and I wouldn't have to specify a branch since it will be in the default branch
url = "github:poddmo/abcde"; vs url = "github:poddmo/abcde?dir=nixos";

I can make that change although I haven't run into the flake.nix and the flake.lock being put into a subdirectory but I am perfectly willing to add both to the subdirectory if necessary! I will move the others and work on the README in the meantime! 😃

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants