{"id":26016074,"url":"https://github.com/arrrgi/dotfiles","last_synced_at":"2025-03-06T03:52:53.642Z","repository":{"id":189288745,"uuid":"625966962","full_name":"arrrgi/dotfiles","owner":"arrrgi","description":"🏡 MacOS / Ubuntu / WSL / Codespaces dotfiles managed by Chezmoi","archived":false,"fork":false,"pushed_at":"2025-01-11T04:17:50.000Z","size":595,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T05:20:40.350Z","etag":null,"topics":["chezmoi","dotfiles","linux","macos","neovim","tmux","ubuntu","wezterm","wsl2","zsh"],"latest_commit_sha":null,"homepage":"https://dotfiles.bald.engineer","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/arrrgi.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}},"created_at":"2023-04-10T14:07:09.000Z","updated_at":"2025-01-11T04:17:36.000Z","dependencies_parsed_at":"2024-01-03T01:08:28.834Z","dependency_job_id":"235b8684-2bf6-46e3-af02-bb987ec15535","html_url":"https://github.com/arrrgi/dotfiles","commit_stats":null,"previous_names":["arrrgi/dotfiles"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrrgi%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrrgi%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrrgi%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrrgi%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arrrgi","download_url":"https://codeload.github.com/arrrgi/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242144486,"owners_count":20078967,"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":["chezmoi","dotfiles","linux","macos","neovim","tmux","ubuntu","wezterm","wsl2","zsh"],"created_at":"2025-03-06T03:52:53.001Z","updated_at":"2025-03-06T03:52:53.608Z","avatar_url":"https://github.com/arrrgi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotfiles\n\n## Description\n\nOpinionated dotfiles for \\*nix based personal and work development environments,\nmanaged by [Chezmoi](https://www.chezmoi.io).\n\n## Installation\n\n**Requirements:**\n\n1. Ubuntu (VM, Baremetal or WSL) or MacOS target operating system\n2. curl installed in target operating system\n\n**Run:**\n\n```bash\nsh -c \"$(curl -fsLS get.chezmoi.io/lb)\" -- init --apply arrrgi [--branch=ref] --use-builtin-git=true\n```\n\n## Dotfiles Decision Tree\n\nChezmoi runs context/OS specific scripts and applies relevant dotfiles using the\nhigh-level logic outlined.\n\n```mermaid\ngraph TD\n  Start((Start))\n  Start --\u003e TTY{Is the session a TTY?}\n  TTY -- False --\u003e checkContainer{Is the session within\u003cbr\u003ea Docker container?}\n  checkContainer -- True --\u003e setContainer[Set Container\u003cbr\u003econtext Variables]\n  setContainer --\u003e Success[End logic with\u003cbr\u003esuccess message]\n  checkContainer -- False --\u003e Error[Exit with error message]\n  Error --\u003e Finish((Finish))\n  Success --\u003e ApplyTemplate[Apply Chezmoi Template]\n  ApplyTemplate --\u003e Finish\n  TTY -- True --\u003e promptName[Prompt for full name]\n  promptName --\u003e whichOS{Check OS Logic}\n  whichOS --\u003e checkMacOS{Is the OS MacOS?}\n  whichOS --\u003e checkWSL{Is the OS WSL?}\n  whichOS --\u003e checkUbuntu{Is the OS Ubuntu?}\n  whichOS -- Other --\u003e Error\n  checkWSL -- False --\u003e Error\n  checkUbuntu -- False --\u003e Error\n  checkMacOS -- True --\u003e setMacOS[Set MacOS\u003cbr\u003econtext Variables]\n  checkMacOS -- False --\u003e Error\n  checkWSL -- True --\u003e setWSL[Set WSL\u003cbr\u003econtext Variables]\n  checkUbuntu -- True --\u003e checkRootAccess{Do you have root access?}\n  checkRootAccess -- True --\u003e setUbuntuRoot[Set Ubuntu with root\u003cbr\u003econtext Variables]\n  checkRootAccess -- False --\u003e setUbuntuNormal[Set Ubuntu without root\u003cbr\u003econtext Variables]\n  setMacOS --\u003e Success\n  setWSL --\u003e Success\n  setUbuntuRoot --\u003e Success\n  setUbuntuNormal --\u003e Success\n```\n\nThis could be interpreted as the following pseudo-Bash script which minimises\nthe number of nested condition statements by using guard clauses. This aligns\nclosely to the way the Chezmoi base template evaluates conditions, captures\nnecessary inputs from _**stdin**_ during installation and then executes context\nand OS specific scripts and config to the target environment.\n\nAdditional detail on the conditional logic and inputs required is available in\nthe [documentation](https://dotfiles.bald.engineer) for this repo.\n\n```bash\n#!/bin/bash\n\necho \"Start\"\necho \"-----\"\n\n# Check if the session is a TTY\necho \"Is this a TTY session? (y/n)\"\nread is_tty\n\nif [ \"$is_tty\" == \"n\" ]; then\n    # Check if the session is within a Docker container\n    echo \"Is the session within a Docker container? (y/n)\"\n    read is_container\n\n    if [ \"$is_container\" == \"y\" ]; then\n        # Set container context variables\n        echo \"Setting Container context variables...\"\n        # Perform necessary operations\n\n        echo \"End logic with success message\"\n        echo \"Apply Chezmoi Template\"\n    else\n        echo \"Exit with error message\"\n        echo \"Finish\"\n    fi\nelse\n    echo \"Is the OS MacOS? (y/n)\"\n    read is_macos\n\n    if [ \"$is_macos\" == \"y\" ]; then\n        # Set MacOS context variables\n        echo \"Setting MacOS context variables...\"\n        # Perform necessary operations\n\n        echo \"End logic with success message\"\n        echo \"Apply Chezmoi Template\"\n    elif [ \"$is_macos\" == \"n\" ]; then\n        echo \"Is the OS WSL? (y/n)\"\n        read is_wsl\n\n        if [ \"$is_wsl\" == \"y\" ]; then\n            # Set WSL context variables\n            echo \"Setting WSL context variables...\"\n            # Perform necessary operations\n\n            echo \"End logic with success message\"\n            echo \"Apply Chezmoi Template\"\n        else\n            echo \"Is the OS Ubuntu? (y/n)\"\n            read is_ubuntu\n\n            if [ \"$is_ubuntu\" == \"y\" ]; then\n                echo \"Do you have root access? (y/n)\"\n                read has_root_access\n\n                if [ \"$has_root_access\" == \"y\" ]; then\n                    # Set Ubuntu context variables with root\n                    echo \"Setting Ubuntu with root context variables...\"\n                    # Perform necessary operations\n\n                    echo \"End logic with success message\"\n                    echo \"Apply Chezmoi Template\"\n                elif [ \"$has_root_access\" == \"n\" ]; then\n                    # Set Ubuntu context variables without root\n                    echo \"Setting Ubuntu without root context variables...\"\n                    # Perform necessary operations\n\n                    echo \"End logic with success message\"\n                    echo \"Apply Chezmoi Template\"\n                else\n                    echo \"Exit with error message\"\n                    echo \"Finish\"\n                fi\n            else\n                echo \"Exit with error message\"\n                echo \"Finish\"\n            fi\n        fi\n    else\n        echo \"Exit with error message\"\n        echo \"Finish\"\n    fi\nfi\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrrgi%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farrrgi%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrrgi%2Fdotfiles/lists"}