-
-
Notifications
You must be signed in to change notification settings - Fork 2k
numbat: add initFile #7159
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
base: master
Are you sure you want to change the base?
numbat: add initFile #7159
Conversation
This adds the option initFile for initialization of numbat shell with custom units, functions and constants
This is my first pull request to a nixos project, so if there is any formatting or style issues, please let me know |
Thanks for the PR! Looks pretty good to me overall; with the suggested change(s), I think we should be good to merge. |
Added the new types.sourceFileOrLines feature to allow for a declared source file init.nbt
Co-authored-by: awwpotato <[email protected]>
This reverts commit c8a2905 as a variable of type sourceFileOrLines assigns source to null which is incompatible with home.file.initFile.source being an absolute path.
Merge master to pass tests
This commit fixes the broken tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds 100 lines of code for something any user can do with xdg.configFile."numbat/init.nbt".text = ...
.
The option is not used in the module so I would say it's an unnecessary PR.
This adds the option initFile for initialization of numbat shell with custom units, functions and constants
Description
Numbat has an optional ~/.config/numbat/init.nbt to define custom functions, constants, and units. This PR adds a string option to insert text into that file.
Checklist
Change is backwards compatible.
Code formatted with
nix fmt
ornix-shell -p treefmt nixfmt-rfc-style keep-sorted --run treefmt
.Code tested through
nix-shell --pure tests -A run.all
or
nix build --reference-lock-file flake.lock ./tests#test-all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC
@Aehmlo