diff options
Diffstat (limited to 'lass')
-rw-r--r-- | lass/1systems/blue/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/cabal/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/daedalus/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/icarus/config.nix | 1 | ||||
-rw-r--r-- | lass/1systems/icarus/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/littleT/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/mors/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/prism/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/red/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/shodan/source.nix | 3 | ||||
-rw-r--r-- | lass/1systems/skynet/source.nix | 4 | ||||
-rw-r--r-- | lass/1systems/uriel/source.nix | 3 | ||||
-rw-r--r-- | lass/1systems/xerxes/source.nix | 5 | ||||
-rw-r--r-- | lass/2configs/blue.nix | 2 | ||||
-rw-r--r-- | lass/2configs/git.nix | 8 | ||||
-rw-r--r-- | lass/2configs/radio.nix | 81 | ||||
-rw-r--r-- | lass/2configs/reaktor-coders.nix | 2 | ||||
-rw-r--r-- | lass/2configs/websites/lassulus.nix | 2 | ||||
-rw-r--r-- | lass/source.nix | 29 |
19 files changed, 72 insertions, 100 deletions
diff --git a/lass/1systems/blue/source.nix b/lass/1systems/blue/source.nix deleted file mode 100644 index d8b979812..000000000 --- a/lass/1systems/blue/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "blue"; - secure = true; -} diff --git a/lass/1systems/cabal/source.nix b/lass/1systems/cabal/source.nix deleted file mode 100644 index 5d9507f3d..000000000 --- a/lass/1systems/cabal/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "cabal"; - secure = true; -} diff --git a/lass/1systems/daedalus/source.nix b/lass/1systems/daedalus/source.nix deleted file mode 100644 index a15ac80c2..000000000 --- a/lass/1systems/daedalus/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "daedalus"; - secure = true; -} diff --git a/lass/1systems/icarus/config.nix b/lass/1systems/icarus/config.nix index d54bd3e9e..1957c8ba4 100644 --- a/lass/1systems/icarus/config.nix +++ b/lass/1systems/icarus/config.nix @@ -16,6 +16,7 @@ <stockholm/lass/2configs/bitcoin.nix> <stockholm/lass/2configs/backup.nix> <stockholm/lass/2configs/wine.nix> + <stockholm/lass/2configs/blue-host.nix> ]; krebs.build.host = config.krebs.hosts.icarus; diff --git a/lass/1systems/icarus/source.nix b/lass/1systems/icarus/source.nix deleted file mode 100644 index 5b46a44f3..000000000 --- a/lass/1systems/icarus/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "icarus"; - secure = true; -} diff --git a/lass/1systems/littleT/source.nix b/lass/1systems/littleT/source.nix deleted file mode 100644 index a86b8fd10..000000000 --- a/lass/1systems/littleT/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "littleT"; - secure = true; -} diff --git a/lass/1systems/mors/source.nix b/lass/1systems/mors/source.nix deleted file mode 100644 index a9dfa2eb6..000000000 --- a/lass/1systems/mors/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "mors"; - secure = true; -} diff --git a/lass/1systems/prism/source.nix b/lass/1systems/prism/source.nix deleted file mode 100644 index 3dbd6c52b..000000000 --- a/lass/1systems/prism/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -with import <stockholm/lib>; -import <stockholm/lass/source.nix> { - name = "prism"; -} diff --git a/lass/1systems/red/source.nix b/lass/1systems/red/source.nix deleted file mode 100644 index f2bad743c..000000000 --- a/lass/1systems/red/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "red"; - secure = true; -} diff --git a/lass/1systems/shodan/source.nix b/lass/1systems/shodan/source.nix deleted file mode 100644 index be24ae2d5..000000000 --- a/lass/1systems/shodan/source.nix +++ /dev/null @@ -1,3 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "shodan"; -} diff --git a/lass/1systems/skynet/source.nix b/lass/1systems/skynet/source.nix deleted file mode 100644 index 2aa627f5c..000000000 --- a/lass/1systems/skynet/source.nix +++ /dev/null @@ -1,4 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "skynet"; - secure = true; -} diff --git a/lass/1systems/uriel/source.nix b/lass/1systems/uriel/source.nix deleted file mode 100644 index 11d6e1c34..000000000 --- a/lass/1systems/uriel/source.nix +++ /dev/null @@ -1,3 +0,0 @@ -import <stockholm/lass/source.nix> { - name = "uriel"; -} diff --git a/lass/1systems/xerxes/source.nix b/lass/1systems/xerxes/source.nix deleted file mode 100644 index d256b885b..000000000 --- a/lass/1systems/xerxes/source.nix +++ /dev/null @@ -1,5 +0,0 @@ -with import <stockholm/lib>; -import <stockholm/lass/source.nix> { - name = "xerxes"; - secure = true; -} diff --git a/lass/2configs/blue.nix b/lass/2configs/blue.nix index 16c63ff38..68f2256cf 100644 --- a/lass/2configs/blue.nix +++ b/lass/2configs/blue.nix @@ -11,6 +11,8 @@ with (import <stockholm/lib>); environment.systemPackages = with pkgs; [ ag + brain + dic nmap git-preview ]; diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 300637ff8..97def9df3 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -34,6 +34,10 @@ let rules = concatMap make-rules (attrValues repos); public-repos = mapAttrs make-public-repo { + Reaktor = { + cgit.desc = "Reaktor IRC bot"; + cgit.section = "software"; + }; buildbot-classic = { cgit.desc = "fork of buildbot"; cgit.section = "software"; @@ -54,6 +58,10 @@ let cgit.desc = "take a rss feed and a timeout and print it to stdout"; cgit.section = "software"; }; + nix-writers = { + cgit.desc = "high level writers for nix"; + cgit.section = "software"; + }; nixpkgs = { cgit.desc = "nixpkgs fork"; cgit.section = "configuration"; diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index a83d51f1d..fb7ae01b6 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -131,6 +131,30 @@ in { }; }; + systemd.services.radio-recent = let + recentlyPlayed = pkgs.writeDash "recentlyPlayed" '' + LIMIT=1000 #how many tracks to keep in the history + HISTORY_FILE=/tmp/played + while :; do + ${pkgs.mpc_cli}/bin/mpc idle player > /dev/null + ${pkgs.mpc_cli}/bin/mpc current -f %file% + done | while read track; do + echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE" + echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE" + done + ''; + in { + description = "radio recently played"; + after = [ "mpd.service" "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + restartIfChanged = true; + + serviceConfig = { + ExecStart = recentlyPlayed; + }; + }; + krebs.Reaktor.playlist = { nickname = "the_playlist|r"; channels = [ @@ -157,27 +181,40 @@ in { }) ]; }; - services.nginx.virtualHosts."lassul.us".locations."/the_playlist".extraConfig = let - html = pkgs.writeText "index.html" '' - <!DOCTYPE html> - <html lang="en"> - <head> - <meta charset="utf-8"> - <title>lassulus playlist</title> - </head> - <body> - <div style="display:inline-block;margin:0px;padding:0px;overflow:hidden"> - <iframe src="https://kiwiirc.com/client/irc.freenode.org/?nick=kiwi_test|?&theme=cli#the_playlist" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:95%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="95%" width="100%"></iframe> - </div> - <div style="position:absolute;bottom:1px;display:inline-block;background-color:red;"> - <audio controls autoplay="autoplay"><source src="http://lassul.us:8000/radio.ogg" type="audio/ogg">Your browser does not support the audio element.</audio> - </div> - <!-- page content --> - </body> - </html> + services.nginx = { + enable = true; + virtualHosts."radio.lassul.us" = { + forceSSL = true; + enableACME = true; + locations."/".extraConfig = '' + proxy_pass http://localhost:8000; + ''; + locations."/recent".extraConfig = '' + alias /tmp/played; + ''; + }; + virtualHosts."lassul.us".locations."/the_playlist".extraConfig = let + html = pkgs.writeText "index.html" '' + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="utf-8"> + <title>lassulus playlist</title> + </head> + <body> + <div style="display:inline-block;margin:0px;padding:0px;overflow:hidden"> + <iframe src="https://kiwiirc.com/client/irc.freenode.org/?nick=kiwi_test|?&theme=cli#the_playlist" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:95%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="95%" width="100%"></iframe> + </div> + <div style="position:absolute;bottom:1px;display:inline-block;background-color:red;"> + <audio controls autoplay="autoplay"><source src="http://lassul.us:8000/radio.ogg" type="audio/ogg">Your browser does not support the audio element.</audio> + </div> + <!-- page content --> + </body> + </html> + ''; + in '' + default_type "text/html"; + alias ${html}; ''; - in '' - default_type "text/html"; - alias ${html}; - ''; + }; } diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index 9365582b8..44d8984d7 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -65,7 +65,7 @@ with import <stockholm/lib>; }) (buildSimpleReaktorPlugin "random-unicorn-porn" { pattern = "^!rup$$"; - script = pkgs.writePython2 "rup" [] '' + script = pkgs.writePython2 "rup" {} '' t1 = """ _. ;=',_ () diff --git a/lass/2configs/websites/lassulus.nix b/lass/2configs/websites/lassulus.nix index 8f24fb212..4c29831a2 100644 --- a/lass/2configs/websites/lassulus.nix +++ b/lass/2configs/websites/lassulus.nix @@ -91,7 +91,7 @@ in { script = pkgs.writeBash "test" '' echo "hello world" ''; - #script = pkgs.execve "ddate-wrapper" { + #script = pkgs.exec "ddate-wrapper" { # filename = "${pkgs.ddate}/bin/ddate"; # argv = []; #}; diff --git a/lass/source.nix b/lass/source.nix deleted file mode 100644 index 49f919faf..000000000 --- a/lass/source.nix +++ /dev/null @@ -1,29 +0,0 @@ -with import <stockholm/lib>; -host@{ name, secure ? false, override ? {} }: let - builder = if getEnv "dummy_secrets" == "true" - then "buildbot" - else "lass"; - _file = <stockholm> + "/lass/1systems/${name}/source.nix"; - pkgs = import <nixpkgs> { - overlays = map import [ - <stockholm/krebs/5pkgs> - <stockholm/submodules/nix-writers/pkgs> - ]; - }; -in - evalSource (toString _file) [ - { - nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix"; - nixpkgs = (import <stockholm/krebs/source.nix> host).nixpkgs; - secrets = getAttr builder { - buildbot.file = toString <stockholm/lass/2configs/tests/dummy-secrets>; - lass.pass = { - dir = "${getEnv "HOME"}/.password-store"; - name = "hosts/${name}"; - }; - }; - stockholm.file = toString <stockholm>; - stockholm-version.pipe = "${pkgs.stockholm}/bin/get-version"; - } - override - ] |