Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikeodr/nixos-config
My nixos configurations
https://github.com/mikeodr/nixos-config
nix nix-flake nixos
Last synced: about 1 month ago
JSON representation
My nixos configurations
- Host: GitHub
- URL: https://github.com/mikeodr/nixos-config
- Owner: mikeodr
- License: bsd-3-clause
- Created: 2024-07-30T01:36:39.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-24T01:02:34.000Z (about 2 months ago)
- Last Synced: 2024-09-30T07:23:25.133Z (about 2 months ago)
- Topics: nix, nix-flake, nixos
- Language: Nix
- Homepage:
- Size: 132 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NixOS Configuration Flake
My NixOS configuration flake.
This is my personal config, please be inspired and copy from it as needed!
## Structure
- `home`: Home manager configuration settings
- `hosts`: Per host machine flake settings
- `modules`: Custom module configuration imported by host, home, other modules## Secrets
Secrets are encrypted with [sops-nix](https://github.com/Mic92/sops-nix) for deploying to multiple hosts.
Please see [Vimjoyer's Excellent Video](https://www.youtube.com/watch?v=G5f6GC7SnhU) in addition to the `sops-nix` documentation.
## Running
### Deploying locally on a machine
[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.
### Deploying to multiple machines
[colmena](https://github.com/zhaofengli/colmena) is used to deploy to multiple machines either individually by host or by group of tags.
- `colmena apply switch --on `
- `colmena apply switch --on @tag`### Adding a new host to the secrets access
- For a new host run:
- `mkdir -p ~/.config/sops/age/keys.txt`
- `nix-shell -p age --run "age-keygen -o ~/.config/sops/age/keys.txt"`
- Add public key returned to `.sops.yaml`
- Update secrets/secrets.yaml with new keys:
`nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"`#### Credits
[BonusPlay/sysconf](https://github.com/BonusPlay/sysconf), a random repo I found that had a nice layout, and used colemna for managing multiple hosts.