This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / services / radio / container-host.nix
965 B 31 lines
1{ self, config, pkgs, ... }: 2{ 3 imports = [ 4 self.inputs.stockholm.nixosModules.htgen 5 ]; 6 krebs.sync-containers3.containers.radio = { 7 sshKey = "${config.krebs.secret.directory}/radio.sync.key"; 8 startCommand = '' 9 export PATH=$PATH:${pkgs.git}/bin 10 until ${pkgs.dig.host}/bin/host github.com; do sleep 1; done 11 ${pkgs.nixos-rebuild}/bin/nixos-rebuild --refresh --flake github:lassulus/superconfig#radio switch --no-write-lock-file 12 ''; 13 }; 14 containers.radio = { 15 bindMounts."/var/music" = { 16 hostPath = "/var/music"; 17 isReadOnly = false; 18 }; 19 }; 20 krebs.iptables.tables.filter.INPUT.rules = [ 21 { predicate = "-p tcp --dport 8000"; target = "ACCEPT"; } 22 ]; 23 krebs.htgen.radio-redirect = { 24 port = 8000; 25 scriptFile = pkgs.writers.writeDash "redir" '' 26 printf 'HTTP/1.1 301 Moved Permanently\r\n' 27 printf "Location: http://radio.lassul.us''${Request_URI}\r\n" 28 printf '\r\n' 29 ''; 30 }; 31}