This repository has no description
950 B
28 lines
1{ config, pkgs, ... }:
2{
3 krebs.sync-containers3.containers.hotdog = {
4 sshKey = "${config.krebs.secret.directory}/hotdog.sync.key";
5 startCommand = ''
6 export PATH=$PATH:${pkgs.git}/bin
7 ln -sfrT /var/lib/var_src /var/src
8 until ${pkgs.dig.host}/bin/host github.com; do sleep 1; done
9 ${pkgs.nixos-rebuild}/bin/nixos-rebuild --refresh --flake 'git+https://cgit.lassul.us/stockholm#hotdog' switch --no-write-lock-file
10 '';
11 };
12 containers.hotdog.bindMounts."/var/lib" = {
13 hostPath = "/var/lib/sync-containers3/hotdog/state";
14 isReadOnly = false;
15 };
16 clanCore.facts.services.hotdog-container = {
17 secret."hotdog.sync.key" = { };
18 public."hotdog.sync.pub" = { };
19 generator.path = with pkgs; [
20 coreutils
21 openssh
22 ];
23 generator.script = ''
24 ssh-keygen -t ed25519 -N "" -f "$secrets"/hotdog.sync.key
25 mv "$secrets"/hotdog.sync.key.pub "$facts"/hotdog.sync.pub
26 '';
27 };
28}