2023-07-30 13:04:13 +02:00
# nixos-config [](https://builtwithnix.org)
2020-11-16 21:14:46 +01:00
2022-12-05 20:32:39 +01:00
This repository holds my NixOS configuration.
2023-07-30 12:51:01 +02:00
It is fully reproducible, flakes based, and position-independent, ...
2020-11-16 21:14:46 +01:00
2023-03-18 16:58:18 +01:00
used flakes:
2023-07-30 12:51:01 +02:00
2023-03-18 16:58:18 +01:00
- image generation: [nixos-generators ](https://github.com/nix-community/nixos-generators )
- disk formatting: [disko ](https://github.com/nix-community/disko )
- secrets: [sops-nix ](https://github.com/Mic92/sops-nix )
- deployment: [deploy-rs ](https://github.com/serokell/deploy-rs ), see [usage ](#usage )
- formatting: [pre-commit-hooks ](https://github.com/cachix/pre-commit-hooks.nix )
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
2023-07-30 12:51:01 +02:00
```text
2022-06-15 21:14:59 +02:00
.
2023-03-10 21:41:41 +01:00
├── images # custom image generations
├── machines # machine definitions
├── modules # own nix-options, to modularize services/hardware/...
├── overlays # overlays
├── pkgs # own packages, which are not available in nixpkgs
└── profiles # summarize module collections into single options
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:
2023-07-30 12:51:01 +02:00
2022-06-15 21:14:59 +02:00
```bash
nix flake update
```
2020-11-16 21:14:46 +01:00
2022-06-15 21:14:59 +02:00
deployment:
2023-07-30 12:51:01 +02:00
2022-06-15 21:14:59 +02:00
```bash
deploy .#myHost
```
secrets:
2023-07-30 12:51:01 +02:00
2022-06-15 21:14:59 +02:00
```bash
2022-12-05 20:32:39 +01:00
sops ./machines/myHost/secrets.yaml
2022-06-15 21:14:59 +02:00
```
2022-07-03 13:51:27 +02:00
2023-03-10 21:41:41 +01:00
images:
2023-07-30 12:51:01 +02:00
2023-03-10 21:41:41 +01:00
```bash
nix build .#install -iso
nix build .#aarch64 -install --system aarch64-linux
```
2022-07-03 13:51:27 +02:00
## inspired by
2023-07-30 12:51:01 +02:00
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-12-05 20:32:39 +01:00
- [pre-commit config ](https://github.com/cachix/pre-commit-hooks.nix/blob/master/template/flake.nix )