{"id":14967959,"url":"https://github.com/mbkma/nix-get","last_synced_at":"2026-01-20T01:21:25.210Z","repository":{"id":245080522,"uuid":"817203467","full_name":"mbkma/nix-get","owner":"mbkma","description":"A cli tool for nixos to install packages with a single command.","archived":false,"fork":false,"pushed_at":"2024-06-19T08:30:48.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T03:32:03.989Z","etag":null,"topics":["apt","apt-get","bash-script","linux","nix","nixos","package-manager"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/mbkma.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T08:21:48.000Z","updated_at":"2024-06-19T13:48:12.000Z","dependencies_parsed_at":"2024-06-19T17:16:13.243Z","dependency_job_id":"966001ed-6202-4248-b114-e451fa390352","html_url":"https://github.com/mbkma/nix-get","commit_stats":null,"previous_names":["mbkma/nix-get"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbkma%2Fnix-get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbkma%2Fnix-get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbkma%2Fnix-get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbkma%2Fnix-get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbkma","download_url":"https://codeload.github.com/mbkma/nix-get/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423721,"owners_count":20936656,"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":["apt","apt-get","bash-script","linux","nix","nixos","package-manager"],"created_at":"2024-09-24T13:39:00.027Z","updated_at":"2026-01-20T01:21:25.177Z","avatar_url":"https://github.com/mbkma.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix-Get 📦\n\n`nix-get` is a simple script to manage NixOS packages, similar to the `apt-get` CLI tool. This script allows you to install packages either for the current user or system-wide.\n\n## Features ✨\n\n- 📥 Install packages for the current user\n- 🌐 Install packages system-wide\n- 🛠 Automatically detects the current user\n- 🔍 Checks for duplicate packages before adding\n\n## Usage 🚀\n\n1. **Download and make the script executable:**\n\n    ```bash\n    chmod +x nix-get.sh\n    ```\n\n2. **Install a package for the current user:**\n\n    ```bash\n    sudo ./nix-get.sh install \u003cpackage-name\u003e\n    ```\n\n3. **Install a package system-wide:**\n\n    ```bash\n    sudo ./nix-get.sh --system install \u003cpackage-name\u003e\n    ```\n\n    Replace `\u003cpackage-name\u003e` with the name of the package you want to install.\n\n## Example 🔧\n\nTo install `htop` for the current user:\n\n```bash\nsudo ./nix-get.sh install htop\n```\n\nTo install `htop` system-wide:\n\n```bash\nsudo ./nix-get.sh --system install htop\n```\n\n## Script Explanation 📝\n\n1. **Root Check:** Ensures the script is run with sudo.\n2. **Argument Check:** Validates that the required arguments are provided.\n3. **Argument Parsing:** Checks for the `--system` flag.\n4. **Action Validation:** Ensures the action is `install`.\n5. **Configuration File Check:** Verifies the existence of `/etc/nixos/configuration.nix`.\n6. **System-Wide Installation:**\n    - Checks if the package is already in the system-wide list.\n    - Appends the package if not present.\n    - Rebuilds the NixOS configuration.\n7. **User-Specific Installation:**\n    - Detects the current user.\n    - Checks if the package is already in the user's list.\n    - Appends the package if not present.\n    - Rebuilds the NixOS configuration.\n8. **Output Message:** Provides feedback on the success or failure of the operation.\n\n## License 📜\n\nThis project is licensed under the MIT License.\n\n## Contributions ❤️\n\nContributions are welcome! Please fork the repository and submit a pull request.\n\n## Contact 📬\n\nFor any questions or feedback, please open an issue on the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbkma%2Fnix-get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbkma%2Fnix-get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbkma%2Fnix-get/lists"}