{"id":16278170,"url":"https://github.com/valiantlynx/dotfiles","last_synced_at":"2025-09-17T20:32:00.148Z","repository":{"id":215568765,"uuid":"739256049","full_name":"valiantlynx/dotfiles","owner":"valiantlynx","description":"Setup new machines with just one command.  uses ansible for setting up. this is except for nixos which is its own dotfiles. it works on my main operating systems,  NixOS, Ubuntu, Arch, PopOS, MacOS and windows, it works in the wsl and docker version of these as well)","archived":false,"fork":false,"pushed_at":"2025-01-06T23:56:02.000Z","size":59217,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-07T00:31:04.912Z","etag":null,"topics":["ansible","arch","dotfiles","macos","nixos","pop","ubuntu","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valiantlynx.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-01-05T06:08:35.000Z","updated_at":"2025-01-07T00:13:17.000Z","dependencies_parsed_at":"2024-05-11T16:45:31.419Z","dependency_job_id":"18da1eec-751e-4280-8639-3dbc077f90c7","html_url":"https://github.com/valiantlynx/dotfiles","commit_stats":null,"previous_names":["valiantlynx/dotfiles"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valiantlynx","download_url":"https://codeload.github.com/valiantlynx/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233423069,"owners_count":18674091,"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","arch","dotfiles","macos","nixos","pop","ubuntu","windows"],"created_at":"2024-10-10T18:57:34.045Z","updated_at":"2025-09-17T20:31:50.116Z","avatar_url":"https://github.com/valiantlynx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### System Upgrade\nVerify your `Ubuntu` installation has all latest packages installed before running the playbook.\n\n```\nsudo apt-get update \u0026\u0026 sudo apt-get upgrade -y\n```\n\n\u003e NOTE: This will take some time.\n\n## Setup\n\n### all.yaml values file\n\nThe `all.yaml` file allows you to personalize your setup to your needs. This file will be created in the file located at `~/.dotfiles/group_vars/all.yaml` after you [Install this dotfiles](#install) and include your desired settings.\n\nBelow is a list of all available values. Not all are required but incorrect values will break the playbook if not properly set.\n\n\n| Name           | Type                           | Required |\n| -------------- | ------------------------------ | -------- |\n| git_user_email | string                         | yes      |\n| git_user_name  | string                         | yes      |\n| exclude_roles  | array`(see group_vars/all)`    | no       |\n| ssh_key        | dict`(see SSH Keys below)`     | no       |\n| system_host    | dict`(see System Hosts below)` | no       |\n| bash_public    | dict`(see Environment below)`  | no       |\n| bash_private   | dict`(see Environment below)`  | no       |\n\n#### Environment\n\nManage environment variables by configuring the `bash_public` and `bash_private` values in `values.yaml`. See both values usecase below.\n\n##### bash_public\n\nThe `bash_public` value allows you to include a dictionary of generic and unsecure key-value pairs that will be stored in a `~/.bash_public`.\n\n```yaml\n\n---\nbash_public:\n  MY_ENV_VAR: something\n```\n\n#### bash_private\n\nThe `bash_private` value allows you to include a dictionary of secure key-value pairs that will be stored in a `~/.bash_private`.\n\n```yaml\n\n---\nbash_private:\n  MY_ENV_VAR_SECRET: !vault |\n    $ANSIBLE_VAULT;1.1;AES256\n    62333533626436313366316235626561626635396233303730343332666466393561346462303163\n    3666636638613437353663356563656537323136646137630a336332303030323031376164316562\n    65333963633339323382938472963766303966643035303234376163616239663539366564396166\n    3830376265316231630a623834333061393138306331653164626437623337366165636163306237\n    3437\n```\n\n### SSH Keys\n\nManage SSH keys by setting the `ssh_key` value in `values.yaml` shown as example below:\n\n```yaml\n\n---\nssh_key:\n  \u003cfilename\u003e: !vault |\n    $ANSIBLE_VAULT;1.1;AES256\n    62333533626436313366316235626561626635396233303730343332666466393561346462303163\n    3666636638613437483928376563656537323136646137630a336332303030323031376164316562\n    65333963633339323762663865363766303966643035303234376163616239663539366564396166\n    3830376265316231630a623834333061393138306331653164626437623337366165636163306237\n    3437\n```\n\n\u003e NOTE: All ssh keys will be stored at `$HOME/.ssh/\u003cfilename\u003e`.\n\n### System Hosts\n\nManage `/etc/hosts` by setting the `system_host` value in `values.yaml`.\n\n```yaml\n\n---\nsystem_host:\n  127.0.0.1: foobar.localhost\n```\n\n### Examples\n\nBelow includes minimal and advanced configuration examples. If you would like to see a more real world example take a look at [blackglasses public configuration](https://github.com/valiantlynx/dotfiles-erikreinert) repository.\n\n#### Minimal\n\nBelow is a minimal example of `values.yaml` file:\n\n```yaml\n---\ngit_user_email: foo@bar.com\ngit_user_name: Foo Bar\n```\n\n#### Advanced\n\nBelow is a more advanced example of `values.yaml` file:\n\n```yaml\n---\ngit_user_email: foo@bar.com\ngit_user_name: Foo Bar\nexclude_roles:\n  - slack\nssh_key: !vault |\n  $ANSIBLE_VAULT;1.1;AES256\n  62333533626436313366316235626561626635396233303730343332666466393561346462303163\n  3666636638613437353663356563656537323136646137630a336332303030323031376164316562\n  65333963633339323762663865363766303966643035303234376163616239663539366564396166\n  3830376265316231630a623834333061393138306331653164626437623337366165636163306237\n  3437\nsystem_host:\n  127.0.0.1: foobar.localhost\nbash_public:\n  MY_PUBLIC_VAR: foobar\nbash_private:\n  MY_SECRET_VAR: !vault |\n    $ANSIBLE_VAULT;1.1;AES256\n    62333533626436313366316235626561626635396233303730343332666466393561346462303163\n    3666636638613437353663356563656537323136646137630a336332303030323031376164316562\n    65333963633339323762663865363766303966643035303234376163616239663539366564396166\n    3830376265316231630a623834333061393138306331653164626437623337366165636163306237\n    3437\n```\n\n### vault.secret\n\nThe `vault.secret` file allows you to encrypt values with `Ansible vault` and store them securely in source control. Create a file located at `~/.config/dotfiles/vault.secret` with a secure password in it.\n\n```bash\nvim ~/.ansible-vault/vault.secret\n```\n\nTo then encrypt values with your vault password use the following:\n\n```bash\n$ ansible-vault encrypt_string --vault-password-file $HOME/.ansible-vault/vault.secret \"mynewsecret\" --name \"MY_SECRET_VAR\"\n$ cat myfile.conf | ansible-vault encrypt_string --vault-password-file $HOME/.ansible-vault/vault.secret --stdin-name \"myfile\"\n```\n\n\u003e NOTE: This file will automatically be detected by the playbook when running `dotfiles` command to decrypt values. Read more on Ansible Vault [here](https://docs.ansible.com/ansible/latest/user_guide/vault.html).\n\n## Usage\n\n### Install\n\nThis playbook includes a custom shell script located at `bin/dotfiles`. This script is added to your $PATH after installation and can be run multiple times while making sure any Ansible dependencies are installed and updated.\n\nThis shell script is also used to initialize your environment after installing `Ubuntu` and performing a full system upgrade as mentioned above.\n\n\u003e NOTE: You must follow required steps before running this command or things may become unusable until fixed.\n\n```bash\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/valiantlynx/dotfiles/main/bin/dotfiles)\"\n```\n\nIf you want to run only a specific role, you can specify the following bash command:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/valiantlynx/dotfiles/main/bin/dotfiles | bash -s -- --tags bash,docker,git,nala,npm,pwsh,ssh  \n```\n\n### Update\n\nThis repository is continuously updated with new features and settings which become available to you when updating.\n\nTo update your environment run the `dotfiles` command in your shell:\n\n```bash\ndotfiles\n```\n\nThis will handle the following tasks:\n\n- Verify Ansible is up-to-date\n- Generate SSH keys and add to `~/.ssh/authorized_keys`\n- Clone this repository locally to `~/.dotfiles`\n- Verify any `ansible-galaxy` plugins are updated\n- Run this playbook with the values in `~/.config/dotfiles/group_vars/all.yaml`\n\nThis `dotfiles` command is available to you after the first use of this repo, as it adds this repo's `bin` directory to your path, allowing you to call `dotfiles` from anywhere.\n\nAny flags or arguments you pass to the `dotfiles` command are passed as-is to the `ansible-playbook` command.\n\nFor Example: Running the tmux tag with verbosity\n\n```bash\ndotfiles -t tmux -vvv\n```\n\n## bonus for myself\n\nfor connecting  this project to a monorepo\n\n### make a brach on the main repo named the same as the monorepo\n\n### add this as a subtree to the main repo\n\n```bash\ngit subtree add --prefix=packages/scripts/dotfiles https://github.com/valiantlynx/dotfiles.git main --squash\n```\n\n### pull the subtree\n\n```bash\ngit subtree pull --prefix=packages/scripts/dotfiles https://github.com/valiantlynx/dotfiles.git main --squash\n```\n\n### push the subtree\n\n```bash\ngit subtree push --prefix=packages/scripts/dotfiles https://github.com/valiantlynx/dotfiles.git main\n\n# make a test linux\ndocker run --rm -it ubuntu bash \napt-get update \u0026\u0026 apt-get upgrade -y \u0026\u0026 apt-get install sudo curl -y\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliantlynx%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaliantlynx%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliantlynx%2Fdotfiles/lists"}