forked from emily/nixfiles
updated readme
This commit is contained in:
parent
2683044937
commit
27d787533f
3 changed files with 47 additions and 13 deletions
22
README.md
22
README.md
|
@ -1,5 +1,7 @@
|
|||
# emilys Nix Infra
|
||||
|
||||
[Build Status](https://hydra.kyouma.net/jobset/nixfiles/main#tabs-jobs)
|
||||
|
||||
## First deployment
|
||||
|
||||
### remote hosts
|
||||
|
@ -10,7 +12,6 @@ $ nix run github:nix-community/nixos-anywhere -- --flake ".#<configuration>" roo
|
|||
|
||||
### desktops
|
||||
|
||||
|
||||
```console
|
||||
$ nix --extra-experimental-features nix-command run github:nix-community/nixos-anywhere -- --flake "git+https://git.bsd.gay/snaki/nixfiles.git#<configuration>" --no-reboot --build-on-target root@127.0.0.1
|
||||
$ nixos-enter
|
||||
|
@ -20,20 +21,15 @@ $ git clone https://git.bsd.gay/snaki/nixfiles.git
|
|||
$ colmena apply-local --sudo --node <node>
|
||||
```
|
||||
|
||||
## Todo
|
||||
|
||||
## Deploy changes on ...
|
||||
- tomate (router dus)
|
||||
- kartoffel
|
||||
- most services
|
||||
- brokkoli2 (router ams)
|
||||
- alucard
|
||||
- merge hetzner hosts
|
||||
|
||||
### all hosts
|
||||
|
||||
```console
|
||||
$ colmena apply --on @production
|
||||
```
|
||||
|
||||
### routers only
|
||||
|
||||
```console
|
||||
$ colmena apply --on @router
|
||||
```
|
||||
## Structure
|
||||
```
|
||||
nixfiles
|
||||
|
|
12
pkgs/update-nixfiles/default.nix
Normal file
12
pkgs/update-nixfiles/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "update-nixfiles";
|
||||
text = builtins.readFile ./update-nixfiles.sh;
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
nix
|
||||
gnugrep
|
||||
];
|
||||
}
|
26
pkgs/update-nixfiles/update-nixfiles.sh
Normal file
26
pkgs/update-nixfiles/update-nixfiles.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
BRANCH="update-inputs"
|
||||
HYDRA_URL="https://hydra.kyouma.net"
|
||||
JOBSET_URL="${HYDRA_URL}/jobset/nixfiles/update-inputs"
|
||||
ROOT="$(mktemp -d)"
|
||||
|
||||
test_build () {
|
||||
local build_jobs
|
||||
build_jobs="$(curl --fail -s -L -H "Accept: application/json" "${JOBSET_URL}/latest-eval" | jq -r ".builds | .[]")"
|
||||
for build in ${build_jobs}; do
|
||||
local build_url
|
||||
build_status="$(curl -s -L -H "Accept: application/json" "https://hydra.kyouma.net/build/${build}" | jq -r ".buildstatus")"
|
||||
[[ $build_status != 0 ]] && exit 1
|
||||
done
|
||||
}
|
||||
|
||||
git clone git@git.bsd.gay:snaki/nixfiles.git
|
||||
|
||||
git checkout -b "${BRANCH}"
|
||||
|
||||
nix flake update --commit-lock-file
|
||||
|
||||
git push --set-upstream origin "${BRANCH}"
|
Loading…
Reference in a new issue