2022-06-15 21:14:59 +02:00
# nixos-config [](https://builtwithnix.org)
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
This repository holds my NixOS configuration. It is fully reproducible, flakes
based, and position-independent, meaning there is no moving around of
`configuration.nix` .
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
Deployment is done using [deploy-rs ](https://github.com/serokell/deploy-rs ), see [usage ](#usage ).
2022-11-23 22:57:09 +01:00
Secret are managed using [sops-nix ](https://github.com/Mic92/sops-nix ). For formatting [pre-commit-hooks ](https://github.com/cachix/pre-commit-hooks.nix ) is used.
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
## structure
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
```
.
2022-07-30 15:03:48 +02:00
├── modules # Own nix-options, to modularize services
2022-06-15 21:14:59 +02:00
├── nixos # Machine definitions
2022-07-30 15:03:48 +02:00
└── pgks # Own packages, which are not available in nixpkgs
2022-06-15 21:14:59 +02:00
```
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
## usage
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
updating:
```bash
nix flake update
```
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
deployment:
```bash
deploy .#myHost
```
secrets:
```bash
sops ./nixos/myHost/secrets.yaml
```
2022-07-03 13:51:27 +02:00
## inspired by
- [deploy hugo with nix ](https://ayats.org/blog/flake-blog/ )
2022-07-30 15:03:48 +02:00
- [Nix config by Mic92 ](https://github.com/Mic92/dotfiles )
- [Nix config by ambroisie ](https://github.com/ambroisie/nix-config )
- [Nix config by pborzenkov ](https://github.com/pborzenkov/nix-config )
- [Nix config by nyanloutre ](https://gitea.nyanlout.re/nyanloutre/nixos-config )
2022-07-03 13:51:27 +02:00
- [deploy-rs by disassembler ](https://samleathers.com/posts/2022-02-03-my-new-network-and-deploy-rs.html )
2022-11-23 22:57:09 +01:00
- [pre-commit config ](https://github.com/cachix/pre-commit-hooks.nix/blob/master/template/flake.nix )