{"id":20122200,"url":"https://github.com/danielrolls/nix-install","last_synced_at":"2025-10-29T09:45:50.443Z","repository":{"id":59414112,"uuid":"530271096","full_name":"danielrolls/nix-install","owner":"danielrolls","description":"An Ansible role to install the Nix package manager","archived":false,"fork":false,"pushed_at":"2025-04-26T22:13:16.000Z","size":85,"stargazers_count":34,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T23:19:13.934Z","etag":null,"topics":["ansible","ansible-role","nix"],"latest_commit_sha":null,"homepage":"","language":null,"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/danielrolls.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-08-29T15:05:13.000Z","updated_at":"2025-04-26T22:13:18.000Z","dependencies_parsed_at":"2023-12-02T11:26:55.348Z","dependency_job_id":"9dc2c7d4-23db-4984-a98c-e754e9493d4c","html_url":"https://github.com/danielrolls/nix-install","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielrolls%2Fnix-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielrolls%2Fnix-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielrolls%2Fnix-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielrolls%2Fnix-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielrolls","download_url":"https://codeload.github.com/danielrolls/nix-install/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721086,"owners_count":21793749,"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":["ansible","ansible-role","nix"],"created_at":"2024-11-13T19:35:33.282Z","updated_at":"2025-10-29T09:45:45.401Z","avatar_url":"https://github.com/danielrolls.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"nix-install\n=========\n\n[![Galaxy](https://img.shields.io/badge/galaxy-danielrolls.nix-blue.svg?style=flat-square)](https://galaxy.ansible.com/danielrolls/nix/)\n\n\nThis is an Ansible role that installs the [nix](https://nixos.org/) package manager.\nAt the time of writing, all other roles I've seen that install nix, install a single user nix.\nThis role invokes the multi-user installation as recommended by the manual to ensure build isolation.\nThe role supports upgrading nix versions for which nix is uninstalled to allow the installer to work.\nThis role is also extremely simple and hence easy to adapt.\n\n\nRequirements\n------------\n\nThis should work with any Linux distribution that uses systemd.\nIt has been tested with Ubuntu.\n\nRole Variables\n--------------\nnix_version -- The version of nix to download and install.\nIf unset this role will take the latest nix version it has been tested with.\n\ninstaller_checksum -- A checksum for the installer binary.\nYou will need to change this if you change the nix version that is downloaded.\nIt's easiest to let this fail and fix the error since the error is clear and provides the new checksum value to copy in.\n\nnix_commands -- Optional list of shell commands to run in an environment with nix and the running nix daemon.\n\nflakes -- Set to enable nix flake commands.\n\nconfig -- Optionally pass addition config to be added to the nix configuration file\n\nremove_nix_directory -- Set to false to avoid cleaning up /nix on upgrades.\nBy doing this you avoid rebuilding packages in the Nix store after an upgrade.\n\nExample Playbook\n----------------\n\nThis example installs nix for all users on myhost\n```yaml\n- hosts: myhost\n  roles:\n    - role: danielrolls.nix\n```\n\nThis example also installs nix for all users on myhost and then installs and runs nix-info.\nSee the [NixOS homepage](https://nixos.org/) for examples of commands to run.\n```yaml\n- hosts: myhost\n  roles:\n    - role: danielrolls.nix\n      nix_commands:\n      - \"nix-shell -p nix-info --command nix-info\" \n```\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\n[Github Profile](https://github.com/danielrolls)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielrolls%2Fnix-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielrolls%2Fnix-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielrolls%2Fnix-install/lists"}