{"id":15061928,"url":"https://github.com/mikeodr/nixos-config","last_synced_at":"2025-04-10T09:47:20.861Z","repository":{"id":250799234,"uuid":"835506565","full_name":"mikeodr/nixos-config","owner":"mikeodr","description":"My nixos configurations","archived":false,"fork":false,"pushed_at":"2025-04-02T13:59:03.000Z","size":296,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T14:49:55.034Z","etag":null,"topics":["nix","nix-flake","nixos"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeodr.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-07-30T01:36:39.000Z","updated_at":"2025-04-02T13:59:06.000Z","dependencies_parsed_at":"2024-08-28T02:38:17.440Z","dependency_job_id":"ebb762b9-e127-47bc-bd49-d15519885b23","html_url":"https://github.com/mikeodr/nixos-config","commit_stats":{"total_commits":127,"total_committers":2,"mean_commits":63.5,"dds":0.007874015748031482,"last_synced_commit":"805152aeec62d65a6fad5057cdf59f44f7c5d4fb"},"previous_names":["mikeodr/nixos-config"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeodr%2Fnixos-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeodr%2Fnixos-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeodr%2Fnixos-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeodr%2Fnixos-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeodr","download_url":"https://codeload.github.com/mikeodr/nixos-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248196755,"owners_count":21063495,"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":["nix","nix-flake","nixos"],"created_at":"2024-09-24T23:27:11.317Z","updated_at":"2025-04-10T09:47:20.853Z","avatar_url":"https://github.com/mikeodr.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NixOS Configuration Flake\n\nMy NixOS configuration flake.\n\nThis is my personal config, please be inspired and copy from it as needed!\n\n## Structure\n\n- `home`: Home manager configuration settings\n- `hosts`: Per host machine flake settings\n- `modules`: Custom module configuration imported by host, home, other modules\n\n## Secrets\n\nSecrets are encrypted with [sops-nix](https://github.com/Mic92/sops-nix) for deploying to multiple hosts.\n\nPlease see [Vimjoyer's Excellent Video](https://www.youtube.com/watch?v=G5f6GC7SnhU) in addition to the `sops-nix` documentation.\n\n## Running\n\n### Deploying locally on a machine\n\n[Nix Helper](https://github.com/viperML/nh) makes running flake updates quick. `nh os switch`. Setting the flake in the config makes executing it direct. No need to specify the flake path. Read the [example config](https://github.com/viperML/nh?tab=readme-ov-file#nixos-module) for details.\n\n### Deploying to multiple machines\n\n[colmena](https://github.com/zhaofengli/colmena) is used to deploy to multiple machines either individually by host or by group of tags.\n\n- `colmena apply switch --on \u003chost\u003e`\n- `colmena apply switch --on @tag`\n\n### Adding a new host via colmena\n\n- Host should have a user set\n- SSH key should be set\n- Set `security.sudo.wheelNeedsPassword = false;`\n\n### Adding a new host to the secrets access\n\n- For a new host run:  \n  - `mkdir -p ~/.config/sops/age/`\n  - `nix-shell -p age --run \"age-keygen -o ~/.config/sops/age/keys.txt\"`\n- Add public key returned to `.sops.yaml`\n- Update secrets/secrets.yaml with new keys:  \n  - `nix-shell -p sops --run \"sops updatekeys secrets/secrets.yaml\"`\n  - `nix-shell -p sops --run \"sops updatekeys hosts/tachi/secrets.yaml\"`\n\n### Infecting other hosts\n\n```bash\nnix run nixpkgs#nixos-anywhere -- --flake .#\u003chost\u003e --generate-hardware-config nixos-generate-config ./hosts/\u003chosts\u003e/hardware-configuration.nix --build-on-remote root@\u003cip\u003e\n```\n\n#### Credits\n\n[BonusPlay/sysconf](https://github.com/BonusPlay/sysconf), a random repo I found that had a nice layout, and used colmena for managing multiple hosts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeodr%2Fnixos-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeodr%2Fnixos-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeodr%2Fnixos-config/lists"}