{"id":20114049,"url":"https://github.com/davidb/nix-on-debian","last_synced_at":"2025-06-20T19:38:37.793Z","repository":{"id":43339905,"uuid":"376888136","full_name":"davidB/nix-on-debian","owner":"davidB","description":"A docker image to use nix/nixpkgs/nix-shell on debian (useful a ci+local image)","archived":false,"fork":false,"pushed_at":"2024-01-24T17:42:54.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-02T18:51:28.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["davidB"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-06-14T16:27:42.000Z","updated_at":"2022-03-07T10:33:03.000Z","dependencies_parsed_at":"2024-01-24T19:07:04.212Z","dependency_job_id":null,"html_url":"https://github.com/davidB/nix-on-debian","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidB/nix-on-debian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidB%2Fnix-on-debian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidB%2Fnix-on-debian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidB%2Fnix-on-debian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidB%2Fnix-on-debian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidB","download_url":"https://codeload.github.com/davidB/nix-on-debian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidB%2Fnix-on-debian/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261006113,"owners_count":23095985,"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":[],"created_at":"2024-11-13T18:27:54.816Z","updated_at":"2025-06-20T19:38:32.776Z","avatar_url":"https://github.com/davidB.png","language":"Shell","funding_links":["https://github.com/sponsors/davidB"],"categories":[],"sub_categories":[],"readme":"# nix-on-debian\n\nA OCI / Docker image to be able to run `nix-shell` (or other nix tool) over a debian image (and not a nixos image).\n\n## Sample usage\n\n### local\n\n```sh\n# docker build -t nix-on-debian:latest .\ndocker run -it --rm -v $PWD:/workspace -w /workspace -t davidb31/nix-on-debian:latest\n\n# inside container\n# create add-hox nodejs env and run `node --version` inside\nnix-shell -p nodejs --run 'node --version'\nexit\n```\n\n### CI\n\n1. setup a `shell.nix` into your project\n2. configure your ci to use the current image and then to run the shell command `nix-shell --run 'build_my_stuff'`\n\nInto a github-actions it will looks like:\n\n```yaml\nname: ci\n\non: [push]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    container: davidb31/nix-on-debian:latest\n    steps:\n      - uses: actions/checkout@v1\n      - name: First run of nix-shell to measure download time\n        run: nix-shell --run 'echo load shell'\n      - name: lint and test\n        run: nix-shell --run 'bazelisk test //...'\n      - name: demo of multi-line command\n        run: |\n            nix-shell --run '\n                echo \"command 1\"\n                echo \"command 2\"\n            '\n```\n\nsee folder [/examples](https://github.com/davidB/nix-on-debian/blob/main/examples) and [.github/workflows/examples.yaml]([.github/workflows/examples.yaml](https://github.com/davidB/nix-on-debian/blob/main/.github/workflows/examples.yaml))\n\n### local + CI\n\nOther how to reproduce and debug CI locally.\n\n### To specify a package version with nixpkgs\n\nPlease note there is two components nix and nixos with their own versions. For instance nix has the version 2.13.2 and nixos 22.11\nMore on the current version on the download page of nixos [https://nixos.org/download.html](https://nixos.org/download.html)\n\nTo find a package with a specific version use this website [https://lazamar.co.uk/nix-versions/](https://lazamar.co.uk/nix-versions/).\nIn this example we will use nixos 22.11. Enter a package name and select a revision. You will have some example as\n\n```sh\nnix-env -iA git-lfs -f https://github.com/NixOS/nixpkgs/archive/7d7622909a38a46415dd146ec046fdc0f3309f44.tar.gz\n```\n\nto add to your CI.\n\nYou can use the command \n\n```sh\nnix-env -qP --available git-lfs\n```\n\nto get some inside to with version is associated the latest version of a package.\n\n\n// TODO\n\n## TODO\n\n- [ ] reduce size\n- [x] avoid need to \"bash --login\" to load nix setup defined into `$HOME/.profile`\n- [ ] provide doc, more instructions,...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidb%2Fnix-on-debian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidb%2Fnix-on-debian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidb%2Fnix-on-debian/lists"}