{"id":16581746,"url":"https://github.com/kaushalmodi/nim_config","last_synced_at":"2025-07-25T13:36:44.084Z","repository":{"id":56595523,"uuid":"153283938","full_name":"kaushalmodi/nim_config","owner":"kaushalmodi","description":"Global project-agnostic config.nims","archived":false,"fork":false,"pushed_at":"2022-12-05T17:19:24.000Z","size":49,"stargazers_count":66,"open_issues_count":3,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T15:44:32.338Z","etag":null,"topics":["config","nim","nimscript"],"latest_commit_sha":null,"homepage":null,"language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaushalmodi.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-16T12:45:27.000Z","updated_at":"2025-03-20T23:58:10.000Z","dependencies_parsed_at":"2023-01-24T06:15:12.663Z","dependency_job_id":null,"html_url":"https://github.com/kaushalmodi/nim_config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaushalmodi%2Fnim_config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaushalmodi%2Fnim_config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaushalmodi%2Fnim_config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaushalmodi%2Fnim_config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaushalmodi","download_url":"https://codeload.github.com/kaushalmodi/nim_config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065285,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","nim","nimscript"],"created_at":"2024-10-11T22:29:47.816Z","updated_at":"2025-04-09T16:20:39.013Z","avatar_url":"https://github.com/kaushalmodi.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: Global Nim config\n#+author: Kaushal Modi\n\nThis repo contains my global Nim configuration ~config.nims~ (which I\nplace in the *$XDG_CONFIG_HOME/nim/* directory.)\n\n* Requirement\nNeeds Nim built from its ~devel~ branch (\u003c2018-10-16 Tue\u003e).\n* List available tasks\n#+begin_example\nnim help\n#+end_example\nNote that there's no ~--~ before ~help~.\n\nThat will print:\n#+begin_example\ninstallPcre          Install PCRE using musl-gcc\ninstallLibreSsl      Install LIBRESSL using musl-gcc\ninstallOpenSsl       Install OPENSSL using musl-gcc\nstrip                Optimize the binary size using 'strip' utility\nupx                  Optimize the binary size using 'upx' utility\nchecksums            Generate checksums of the binary using 'sha1sum' and 'md5sum'\nsign                 Sign the binary using 'gpg' (armored, ascii)\nencrypt              Encrypt the binary using 'gpg' (compressed, symmetric, ascii)\nmusl                 Build an optimized static binary using musl\nglibc25              Build C, dynamically linked to GLibC 2.5 (x86_64)\njs2asm               Build JS, print Assembly from that JS (performance debug)\nc2asm                Build C, print Assembly from that C (performance debug)\nfmt                  Run nimpretty on all git-managed .nim files in the current repo\nrmfiles              Recursively remove all files with the specific extension(s) from the current directory\ntest                 Run tests via 'nim doc' (runnableExamples) and tests in tests/ dir\ndocs                 Deploy doc html + search index to public/ directory\nrunc                 Run equivalent of 'nim c -r ..'\nruncpp               Run equivalent of 'nim cpp -r ..'\n#+end_example\n* How to use this\n** Use in your local projects\n1. Create *$XDG_CONFIG_HOME/nim/* directory if it doesn't already\n   exist (or *~/.config/nim/* if you don't have ~XDG_CONFIG_HOME~\n   environment variable set).\n2. Download the [[https://github.com/kaushalmodi/nim_config/blob/master/config.nims][config.nims]] and put it in that directory.\n** Install using Curl:\n#+begin_src bash\nmkdir --verbose $XDG_CONFIG_HOME/nim/\ncurl -o $XDG_CONFIG_HOME/nim/config.nims https://raw.githubusercontent.com/kaushalmodi/nim_config/master/config.nims\n#+end_src\n** Uninstall:\n#+begin_src bash\nrm --verbose $XDG_CONFIG_HOME/nim/config.nims\n#+end_src\n** Use in Travis CI\nI use this same file during Nim project builds on Travis CI by\nincluding the below in the ~script:~ phase:\n#+begin_example\ngit clone https://github.com/kaushalmodi/nim_config \u0026\u0026 cp nim_config/config.nims .\n#+end_example\n\n- Note :: This will overwrite your project-specific ~config.nims~ (if\n          any) with the version in this repo. That overwrite happens\n          only in that Travis workspace, but still understand what the\n          above command is doing before using it. *** Using the ~test~\n          and ~docs~ tasks\n*** Example use of ~test~ and ~docs~ tasks\n#+begin_src yaml\nscript:\n  - nim -v\n  - git clone https://github.com/kaushalmodi/nim_config \u0026\u0026 cp nim_config/config.nims . # Get my global config.nims\n  - nim test # The 'test' task is defined in the above retrieved config.nims\n  - nim docs # The 'docs' task is defined in the above retrieved config.nims\n#+end_src\n[[https://github.com/kaushalmodi/elnim/blob/8f795c691f80e9d6a4ffe1bafc7892830d4b78ba/.travis.yml#L43-L47][Source]]\n*** Example use of ~musl~ task\n#+begin_src yaml\nscript:\n  - cd \"${TRAVIS_BUILD_DIR}\" # Ensure that you are in repo/build root now.\n  - nimble install --depsOnly --accept\n  - git clone https://github.com/kaushalmodi/nim_config \u0026\u0026 cp nim_config/config.nims . # Get my global config.nims\n  - nim musl \"${NIMFILE}\" # The ${NIMFILE} var is defined further up in that .travis.yml\n#+end_src\n[[https://github.com/OrgTangle/ntangle/blob/92fcd43569f48b512799ebf563ac4bbef6813795/.travis.yml#L59-L66][Source]]\n* References\n- [[https://nim-lang.github.io/Nim/nimscript.html][NimScript API]]\n- [[https://nim-lang.github.io/Nim/nims.html][*.nims* config]]\n- [[https://github.com/kaushalmodi/hello_musl][*musl* task]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaushalmodi%2Fnim_config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaushalmodi%2Fnim_config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaushalmodi%2Fnim_config/lists"}