oizys/hosts/algiz
2025-02-17 13:50:11 -06:00
..
caddy fix logo path handling 2025-02-17 13:50:11 -06:00
settings settingsfy the other hosts 2025-01-07 10:28:42 -06:00
default.nix reorg 2025-02-11 17:43:39 -06:00
hardware-configuration.nix nixfmt-rfc-style now 2024-05-06 14:32:00 -05:00
README.md a new cache. a new oppurtunity 2025-02-12 10:43:41 -06:00
restic.nix reorg 2025-02-11 17:43:39 -06:00
secrets.nix a new cache. a new oppurtunity 2025-02-12 10:43:41 -06:00
secrets.yaml a new cache. a new oppurtunity 2025-02-12 10:43:41 -06:00
services.nix fix logo path handling 2025-02-17 13:50:11 -06:00
system.nix typo 2025-01-20 11:38:16 -06:00

algiz

Setting up git user for use with gitea originally

sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key"
sudo -u git cat /home/git/.ssh/id_rsa.pub | sudo -u git tee -a /home/git/.ssh/authorized_keys
sudo -u git chmod 600 /home/git/.ssh/authorized_keys

/home/git/.ssh/authorized_keys should look like this:

# SSH pubkey from git user
ssh-rsa <Gitea Host Key>

# other keys from users
command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <user pubkey>

To point gitea/forgejo to the shim gitea binary for SSH I symlink the current system version to /usr/local/bin/gitea.

ln -s /run/current-system/sw/bin/gitea /usr/local/bin/gitea

Setting up Attic

Generated a key using command provided in attic docs:

nix run nixpkgs#openssl -- genrsa -traditional 4096 | base64 -w0

And wrote ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64="output from above" to /etc/attic.env

I generated a token to configure the caches using the following command:

atticd-atticadm make-token --sub daylin --push "*" --pull "*" --validity '1y' --create-cache "*" --configure-cache "*" --configure-cache-retention "*" --destroy-cache "*" --delete "*"

If I handled secrets via sops or agenix I think this could be stored directly in the repo. I also had to modify the firewall so that docker would forward along the requests by caddy to host.docker.internal correctly.

Setting up Harmonia

Generated a signing key with the following command:

nix-store --generate-binary-cache-key nix-cache.dayl.in-1 ./secret ./public

public key:

nix-cache.dayl.in-1:lj22Sov7m1snupBz/43O1fxyEfy/S7cxBpweD7iREcs=

Then enabled the service using the nixos module and used sops to store the private key.