This repository has no description
980 B
28 lines
1{ config, pkgs, ... }:
2{
3 lass.sync-containers3.containers.hotdog = {
4 sshKey = config.clan.core.vars.generators.hotdog-container.files."hotdog.sync.key".path;
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://github.com/krebs/stockholm?submodules=1#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 clan.core.vars.generators.hotdog-container = {
17 files."hotdog.sync.key" = { };
18 files."hotdog.sync.pub".secret = false;
19 runtimeInputs = with pkgs; [
20 coreutils
21 openssh
22 ];
23 script = ''
24 ssh-keygen -t ed25519 -N "" -f "$out"/hotdog.sync.key
25 mv "$out"/hotdog.sync.key.pub "$out"/hotdog.sync.pub
26 '';
27 };
28}