This repository has no description
1.0 kB
37 lines
1{
2 self,
3 config,
4 pkgs,
5 ...
6}:
7{
8 imports = [
9 {
10 key = "stockholm-htgen";
11 imports = [ self.inputs.stockholm.nixosModules.htgen ];
12 }
13 ];
14 krebs.sync-containers3.containers.radio = {
15 sshKey = config.clan.core.vars.generators.radio-container.files."radio.sync.key".path;
16 startCommand = ''
17 export PATH=$PATH:${pkgs.git}/bin
18 until ${pkgs.dig.host}/bin/host github.com; do sleep 1; done
19 ${pkgs.nixos-rebuild}/bin/nixos-rebuild --refresh --flake github:lassulus/superconfig#radio switch --no-write-lock-file
20 '';
21 };
22 containers.radio = {
23 bindMounts."/var/music" = {
24 hostPath = "/var/music";
25 isReadOnly = false;
26 };
27 };
28 clan.core.vars.generators.radio-container = {
29 files."radio.sync.key" = { };
30 prompts.key.description = ''
31 copy or reference the secret key from the container into here, so we can actually start/sync the container
32 '';
33 script = ''
34 cat "$prompts"/key > "$out"/radio.sync.key
35 '';
36 };
37}