{"id":18360628,"url":"https://github.com/samasaur1/polytopia","last_synced_at":"2025-06-29T16:34:25.480Z","repository":{"id":199361390,"uuid":"702716782","full_name":"Samasaur1/polytopia","owner":"Samasaur1","description":"The Nix config for Polytopia","archived":false,"fork":false,"pushed_at":"2024-04-07T06:55:31.000Z","size":69,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-07T07:36:18.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/Samasaur1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-10-09T21:37:41.000Z","updated_at":"2024-04-14T22:36:35.653Z","dependencies_parsed_at":"2023-10-14T17:47:50.987Z","dependency_job_id":"a73e7392-b68f-426a-a64d-59c0c7d2fcfc","html_url":"https://github.com/Samasaur1/polytopia","commit_stats":null,"previous_names":["samasaur1/polytopia"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samasaur1%2Fpolytopia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samasaur1%2Fpolytopia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samasaur1%2Fpolytopia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samasaur1%2Fpolytopia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samasaur1","download_url":"https://codeload.github.com/Samasaur1/polytopia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248153682,"owners_count":21056481,"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-05T22:29:09.825Z","updated_at":"2025-06-29T16:34:25.455Z","avatar_url":"https://github.com/Samasaur1.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polytopia\n\n\u003e [!WARNING]  \n\u003e This repository has been archived in favor of \u003chttps://github.com/Reed-CSTAR/reednet\u003e\n\n***\n\nThis repository provides a couple things:\n\n### Nix dev shells\n\nThese are premade environments that provide all the software used in CS classes. On the CS department machines, you can access them via\n```bash\nnix develop polytopia#cs221\n```\nOn your own machine (if Nix is installed), you can access them via\n```bash\nnix develop github:Samasaur1/polytopia#cs384\n```\n\nAt the time of writing, there are three dev shells:\n- cs221\n- cs378\n- cs384\n\nYou can check the dev shells that exist now either by looking in the `devShells` directory or running `nix flake show polytopia`.\n\n##### Upgrades\n\n```bash\nnix flake update --commit-lock-file\n```\n\nThere is a GitHub Action set up that automatically updates the flake inputs weekly, so the only action necessary is to merge this PR.\n\nPerhaps we only want to update dev shells in between semesters, so that they are consistent throughout a class?\n\n### Ansible configuration\n\n##### Running the playbook\n\n1. Install Ansible (you can launch a subshell that provides Ansible via `nix develop`)\n2. Run the playbook\n\n    ```bash\n    ansible-playbook -i inventory.ini playbook.yaml -K\n    ```\n\n    If you're using the dev shell:\n    ```bash\n    poly-run-ansible\n    ```\n\n    Note that you need SSH host configurations for all machines, since they are defined in the inventory without their FQDNs\n\n##### Adding users\n\n1. Generate a temporary password (let's say it's `correct horse battery staple`)\n2. Install `mkpasswd` (you can launch a subshell that provides `mkpasswd` via `nix develop`)\n3. Hash the temporary password:\n\n    ```bash\n    mkpasswd --method=sha-512\n    ```\n\n    If you're using the dev shell:\n    ```bash\n    poly-hash-password\n    ```\n\n    Using our example, this gives `$6$e0A7MR6aAnL3r9Y5$WevmaiUlUo6p67OErBd8.krTCTg/36EnNrpj8zUJKNWwIn3L7MqSmc3rOPupmajxJQ9z3N9Hsg7x9GaZfeVZr.`\n4. Add user and group entries to `users.yaml`\n\n    ```yaml\n    - name: Synchronize group 'sam'\n      become: true\n      ansible.builtin.group:\n        name: sam\n        state: present\n        system: false\n    - name: Synchronize user 'sam'\n      become: true\n      ansible.builtin.user:\n        append: false\n        comment: Samasaur1,,,\n        create_home: true\n        generate_ssh_key: false\n        group: sam\n        groups: users\n        name: sam\n        password: '$6$e0A7MR6aAnL3r9Y5$WevmaiUlUo6p67OErBd8.krTCTg/36EnNrpj8zUJKNWwIn3L7MqSmc3rOPupmajxJQ9z3N9Hsg7x9GaZfeVZr.'\n        shell: '/usr/bin/bash'\n        state: present\n        system: false\n        update_password: on_create\n    ```\n\n5. [Run the Ansible playbook](#running-the-playbook)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamasaur1%2Fpolytopia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamasaur1%2Fpolytopia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamasaur1%2Fpolytopia/lists"}