Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add nix flake infrastructure #14

Merged
merged 1 commit into from
Jul 18, 2024
Merged

✨ Add nix flake infrastructure #14

merged 1 commit into from
Jul 18, 2024

Conversation

arthsmn
Copy link
Contributor

@arthsmn arthsmn commented Jul 17, 2024

Adding nix infrastructure as suggested in #12 (comment).

Added a flake.nix and default.nix to properly build the package, which now can be used with nix build or nix run. The go modules are handled by gomod2nix, which can regerenate the gomod2nix.toml with nix develop and gomod2nix regenerate (if you change anything on the go modules). I've added a line in the justfile that make your release command also change the nix package version, so you don't have to worry about it. I've also added the result dir (the directory of the nix builds) to the gitignore.

The flake itself is locked with a flake.lock and can be updated with nix flake update. It's tracking nixos-unstable (the rolling-release branch of NixOS), but it can track the stable version if requested (although you'll have to change the url from time to time to update the stable version eg. 24.05 will be 24.11 in the next release).

Also added a shell.nix to handle nix develop, this pulls all the tooling for development and also gomod2nix. You can add more packages inside the pkgs.mkShell to enhance the development environment. I've added all the basic tools I've found in your justfile.

I've added a flake.nix and default.nix to handle
the package, a shell.nix to handle the development
environment and gomod2nix deals with go modules.
@ewen-lbh
Copy link
Member

Thx a lot <3

@ewen-lbh ewen-lbh merged commit 024df2a into hyprland-community:main Jul 18, 2024
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