summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-12-04 15:52:52 -0500
committerBen Sima <ben@bsima.me>2024-12-21 10:08:05 -0500
commit81cf94523f5a794e5b0c69dbd9a94619135a23c7 (patch)
tree22544f9d741827ebfe65f73f0202b2b095a09cf8
parent47c48abf836f5918120c0550c57d4eda32d3f10e (diff)
Prune unused stuff
This was all dead weight, just delete it and move on.
-rw-r--r--Biz/Nixpert.md101
-rw-r--r--Biz/Nixpert.nix26
-rw-r--r--Biz/Nixpert/ChatWidget.html2
-rw-r--r--Biz/Nixpert/Course.md23
-rw-r--r--Biz/Nixpert/Plan.md78
-rw-r--r--Biz/Pie.hs27
-rw-r--r--Biz/Que.nix80
-rw-r--r--Biz/Que/Apidocs.md3
-rw-r--r--Biz/Que/Site.hs7
-rw-r--r--Biz/Que/Site.nix1
-rw-r--r--Biz/Serval.scm179
-rw-r--r--Omni/Bild.hs4
-rw-r--r--Omni/Cloud.nix2
-rw-r--r--Omni/Cloud/Grocy.nix17
-rw-r--r--Omni/Cloud/Hub.nix57
-rw-r--r--Omni/Dev/Lithium.nix8
16 files changed, 3 insertions, 612 deletions
diff --git a/Biz/Nixpert.md b/Biz/Nixpert.md
deleted file mode 100644
index 041a9de..0000000
--- a/Biz/Nixpert.md
+++ /dev/null
@@ -1,101 +0,0 @@
----
-title: Nixpert.chat
----
-
-[Nix](https://nixos.org) is a hermetic, deterministic, and declarative build system, package manager, and operating system. It will save you time and money by making sure:
-
-- your development environment is the same as your production environment
-- every build you do is definitive and reproducible
-- all your dependencies and environment variables are accounted for
-- developers never have to compile something twice - just download it from the cache
-
-But, you have to use it right. You can't go half-way in.
-
-Do you find Nix hard to use? Is the documentation confusing, the language obtuse and difficult? Have you had trouble training new devs?
-
-If so, you need this service.
-
-I'm offering dedicated Nix support for a limited number of clients. Here's how it works:
-
-- If you have a problem or question with Nix, NixOS, or Nixpkgs, send me a message
-- I will respond within an hour during business hours (~9am-9pm EST)
-- I'll stay online with you until your problem is resolved
-- If we can't solve it via chat, we'll start a video call to work through it
-
-To sign up, say hello in the chat box in the corner to get started, or [register][] an account.
-
-# Why buy as a team?
-
-Get a dedicated help room just for your team. Speed up your Nix development time for everyone. Accellerate your product development by getting the infrastructure questions out of the way.
-
-- $3000/month
-- ∞ Nix language questions
-- ∞ NixOS questions
-- ∞ Nixpkgs ecosystem questions
-- ∞ tooling support
-- 10h code review
- - architecture review
- - security review
- - best practices
-
-# Why buy as an individual?
-
-Is Nix part of your job, but you don't feel 100% comfortable? Get fast dedicated help from an expert. Perform better at your job. Get your Nix questions answered before anyone else and get back to being productive.
-
-- $300/month
-- ∞ Nix language questions
-- ∞ NixOS questions
-- ∞ Nixpkgs ecosystem questions
-- ∞ tooling support
-- 2h code review
- - architecture review
- - security review
- - best practices
-
-# About this service
-
-This is just a private XMPP server, you can register an account [here][register] or use your own. Join the public [nix-lobby][] room to get started. When you sign up for the dedicated, paid support you'll be added to a private chat room that you can use for future help requests. We also have 1-on-1 and encrypted messaging for any sensitive information.
-
-# Who runs this?
-
-I'm [Ben Sima](https://bsima.me) and I've been working with Nix for 5+ years. All of my personal infrastructure runs on NixOS: email, IRC, XMPP, hardware, websites including this one. I've contributed open source packages and modules to nixpkgs. In my day job, I've managed a Nix-based build system and infrastructure for 150+ developers, handling dozens of custom packages, hundreds of builds per day, and a private cache of terabytes of Nix packages. I've probably managed the largest Nix deployment in the world besides the public NixOS.org infrastructure.
-
-# Why make this service?
-
-My career mission is to make reliable software, and Nix is one of the best tools for that job. But people often complain that Nix is hard to use. So my goal with this project is to make Nix easy to use and understand. First I will help you with your day-to-day problems. Along the way I will work out better ways to explain the concepts, benefits and usage of Nix. Then I will take these lessons back to the Nix manual and tooling to make the product better. So in buying this service your money actually buys twice the value: you get direct suport of your daily problems, and you get indirect support by improving Nix over time.
-
-The business mantra I operate by is "win and help win." By offering this service I will help your organization win by improving your infrastructure and delivering reliable software products, and the Nix community wins by having more dedicated improvements contributed upstream.
-
-# FAQ
-
-## Do you offer Nix development or training?
-
-For special projects I offer Nix development work and training on a contract basis. Message me at [bsima@simatime.com](xmpp://bsima@simatime.com) and we'll see if your project is a good fit. If not, I can recommend other contractors that I trust will get the job done.
-
-## How do I manage my payment and account?
-
-It's all manual right now. I'll invoice you for payment at the beginning of every month. If you want to cancel, just message me, no hard feelings. Or just don't pay your invoice I guess.
-
-If you want your XMPP account deleted, you can usually do that from an XMPP client, or message me directly and I'll do it from the admin console.
-
-## Do you log our chats?
-
-Yeah I save the logs for 30 days. If you need them deleted for some reason, message me an I'll delete any logs. If you have sensitive data, use OMEMO or PGP encryption.
-
-[register]: https://simatime.com/chat
-[nix-lobby]: xmpp:nix-lobby@conference.simatime.com
-
-<script>
- // https://conversejs.org/demo/anonymous.html
- converse.initialize({
- allow_logout: false,
- authentication: "anonymous",
- auto_login: true,
- auto_join_rooms: [ "nix-lobby@conference.simatime.com" ],
- notify_all_room_messages: [ "nix-lobby@conference.simatime.com" ],
- jid: "anon.simatime.com",
- keepalive: true,
- hide_muc_server: true,
- bosh_service_url: "https://anon.simatime.com/http-bind"
- });
-</script>
diff --git a/Biz/Nixpert.nix b/Biz/Nixpert.nix
deleted file mode 100644
index f2f99b2..0000000
--- a/Biz/Nixpert.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ pkgs, ... }:
-
-let
- salespage = pkgs.runCommand "salespage" { } ''
- mkdir -p $out
- ${pkgs.pandoc}/bin/pandoc \
- --standalone \
- -f commonmark_x \
- --include-in-header ${./Que/Style.css} \
- --include-in-header ${./Nixpert/ChatWidget.html} \
- -t html \
- ${./Nixpert.md} \
- > $out/index.html
- '';
-in {
- services.nginx.virtualHosts."nixpert.chat" = {
- forceSSL = true;
- enableACME = true;
- locations."/" = {
- root = "${salespage}";
- extraConfig = ''
- add_header Access-Control-Allow-Origin "*";
- '';
- };
- };
-}
diff --git a/Biz/Nixpert/ChatWidget.html b/Biz/Nixpert/ChatWidget.html
deleted file mode 100644
index f9a77cf..0000000
--- a/Biz/Nixpert/ChatWidget.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/9.0.0/dist/converse.min.css">
-<script src="https://cdn.conversejs.org/9.0.0/dist/converse.min.js" charset="utf-8"></script>
diff --git a/Biz/Nixpert/Course.md b/Biz/Nixpert/Course.md
deleted file mode 100644
index 3478da3..0000000
--- a/Biz/Nixpert/Course.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: "Nixpert Course"
----
-
-# Nixpert Course
-## Accellerate your dev team with cutting edge Nix tooling
-
-You'll learn how to:
-
-- create a Nix dev environment
-- create a Nix package
-- customize your own NixOS image and deployment
-- make your first Nixpkgs contribution
-- debug Nix code
-- quickly navigate a Nix codebase
-- scale nix infrastructure
-
-## Contents
-
-- Introduction to Nix
-- Getting things done
-- Shipping confidently with Nix
-- Understanding Nix
diff --git a/Biz/Nixpert/Plan.md b/Biz/Nixpert/Plan.md
deleted file mode 100644
index d97b504..0000000
--- a/Biz/Nixpert/Plan.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-title: Nixpert.chat biz plan
----
-
-# Problem
-
-Nix is hard to use, especially hard to get started with. But the benefits are
-compounding for companies that do adopt it.
-
-The major pain point is getting help: devs often can't go to IRC because it's
-hard to use or they are prevented from doing so by confidential company
-information.
-
-# Solution
-
-We create a paid chat service where devs can quickly get answers to
-questions. We'll have a hosted chat client that is easy to use, maybe just use
-slack or something.
-
-# Key Metrics
-
-- Number of customers
-- Questions answered per shift
-- Hours of availability (24/7)
-
-# Unique Value Proposition
-
-## High-Level Concept
-
-Direct-line support for your infrastructure and build code. Like monadfix.com for Nix stuff.
-
-# Unfair Advantage
-
-- first mover
-
-# Channels
-
-- write articles on:
- - common solutions
- - benefits of nix
- - highlight nix tool
- - highlight nix function or technique
-
-# Customer Segments
-
-- crypto companies
-- ml companies
-
-## Early Adopters
-
-- startups, nix companies I know?
-
-# Cost Structure
-
-- hourly wages for staff
-- infrastructure costs
- - chat server via prosody
- - errbot for common questions?
- - jitsi video chat
- - hosted chat room via conversejs.org or JSXC
- - chat clients (Dino, iOS: Trillian)
-
-# Revenue Streams
-
-- $500 - $1500 monthly subscription for companies
-- pair-programming sessions for added $150/hr
-
-# Growth plan
-
-## Unicorn Requirements
-
-### Sales Penetration
-
-## Support requirements
-
-### Tech Infra
-
-### Customer Support
diff --git a/Biz/Pie.hs b/Biz/Pie.hs
deleted file mode 100644
index 8de6ca6..0000000
--- a/Biz/Pie.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- | [P]roduct [I]mprovement [E]ngine
---
--- A product improvement engine must measure two things:
---
--- 1. Is your product built?
--- 2. Do you have product-market fit?
---
--- Let's use an analogy: building a startup is like jumping off a clif and
--- assembling a plane on the way down. As we approach the ground at terminal
--- velocity, only two questions are relevant: Is the plane built? Does it fly?
--- Nothing else matters.
---
--- So, Pie is a program that records answers to these two things and then
--- reports on whether we are making the correct progress.
---
--- This is inspired by a few things:
---
--- - YC's Startup School has a build sprint questionnaire
--- - Sam Altman's startup playbook: "You want to build a 'product improvement
--- engine' in your company."
--- - Sean Ellis' question: "How would you feel if you could no longer use this
--- product? (a) Very disappointed, (b) somewhat disappointed, (c) not
--- disappointed" and then measure the percentage who answer (a).
-module Biz.Pie where
-
-main :: IO ()
-main = pure ()
diff --git a/Biz/Que.nix b/Biz/Que.nix
deleted file mode 100644
index 9f1f098..0000000
--- a/Biz/Que.nix
+++ /dev/null
@@ -1,80 +0,0 @@
-{ bild }:
-
-# The production server for que.run
-
-bild.os {
- imports = [
- ../Omni/OsBase.nix
- ../Omni/Packages.nix
- ../Omni/Users.nix
- ./Que/Host.nix
- ./Que/Site.nix
- ];
- networking.hostName = "prod-que";
- networking.domain = "que.run";
- services.que-server = {
- enable = true;
- port = 80;
- package = bild.run ./Que/Host.hs;
- };
- boot.loader.grub.device = "/dev/vda";
- fileSystems."/" = {
- device = "/dev/vda1";
- fsType = "ext4";
- };
- swapDevices = [{
- device = "/swapfile";
- } # 4GB
- ];
- networking.firewall.allowedTCPPorts = [ 22 80 443 ];
- networking = {
- nameservers = [ "67.207.67.2" "67.207.67.3" ];
- defaultGateway = "157.245.224.1";
- defaultGateway6 = "2604:a880:2:d1::1";
- dhcpcd.enable = false;
- usePredictableInterfaceNames = bild.lib.mkForce true;
- interfaces = {
- eth0 = {
- ipv4.addresses = [
- {
- address = "157.245.236.44";
- prefixLength = 20;
- }
- {
- address = "10.46.0.5";
- prefixLength = 16;
- }
- ];
- ipv6.addresses = [
- {
- address = "2604:a880:2:d1::a2:5001";
- prefixLength = 64;
- }
- {
- address = "fe80::7892:a5ff:fec6:dbc3";
- prefixLength = 64;
- }
- ];
- ipv4.routes = [{
- address = "157.245.224.1";
- prefixLength = 32;
- }];
- ipv6.routes = [{
- address = "2604:a880:2:d1::1";
- prefixLength = 32;
- }];
- };
- };
- };
- services = {
- que-website = {
- enable = true;
- namespace = "_";
- package = bild.run ./Que/Site.hs;
- };
-
- udev.extraRules = ''
- ATTR{address}=="7a:92:a5:c6:db:c3", NAME="eth0"
- '';
- };
-}
diff --git a/Biz/Que/Apidocs.md b/Biz/Que/Apidocs.md
deleted file mode 100644
index f400889..0000000
--- a/Biz/Que/Apidocs.md
+++ /dev/null
@@ -1,3 +0,0 @@
-% que.run Api Docs
-
-coming soon
diff --git a/Biz/Que/Site.hs b/Biz/Que/Site.hs
index 963927d..f4e4a9c 100644
--- a/Biz/Que/Site.hs
+++ b/Biz/Que/Site.hs
@@ -42,7 +42,6 @@ move args = do
client = src </> "Client.py",
quescripts = src </> "Quescripts.md",
style = src </> "Style.css",
- apidocs = src </> "Apidocs.md",
tutorial = src </> "Tutorial.md"
}
where
@@ -82,8 +81,7 @@ data Sources = Sources
quescripts :: FilePath,
client :: FilePath,
style :: FilePath,
- tutorial :: FilePath,
- apidocs :: FilePath
+ tutorial :: FilePath
}
type Namespace = Text
@@ -103,8 +101,7 @@ run key ns Sources {..} = Async.runConcurrently actions |> void
[ toHtml index +> serve key ns "index" |> forever,
toHtml quescripts +> serve key ns "quescripts" |> forever,
BS.readFile client +> serve key ns "client" |> forever,
- toHtml tutorial +> serve key ns "tutorial" |> forever,
- toHtml apidocs +> serve key ns "apidocs" |> forever
+ toHtml tutorial +> serve key ns "tutorial" |> forever
]
toHtml :: FilePath -> IO ByteString
toHtml md =
diff --git a/Biz/Que/Site.nix b/Biz/Que/Site.nix
index cc525f6..da51032 100644
--- a/Biz/Que/Site.nix
+++ b/Biz/Que/Site.nix
@@ -7,7 +7,6 @@ let
name = "que-website-static";
installPhase = ''
mkdir -p $out
- cp ${./Apidocs.md} $out/Apidocs.md
cp ${./Index.md} $out/Index.md
cp ${./Quescripts.md} $out/Quescripts.md
cp ${./Style.css} $out/Style.css
diff --git a/Biz/Serval.scm b/Biz/Serval.scm
deleted file mode 100644
index 93eb3ac..0000000
--- a/Biz/Serval.scm
+++ /dev/null
@@ -1,179 +0,0 @@
-;;
-;; Serval - fast container management
-;;
-;; : out serval
-;;
-;; `Container management' simply refers to tracking the configuration
-;; for individual containers and their running state.
-;;
-;; Serval stores container configuration in a directory, which forms the
-;; database. Each container is associated with a `.kit' file, which is a
-;; serialized s-expr of a `@Kit' record type.
-;;
-;; Runtime state is offloaded to systemd, and certain commands simply
-;; reach out to `systemctl' and `machinectl' for this functionality.
-;;
-;; Serval does not concern itself with deployment. For that, use `nix copy'.
-;;
-;; Currently Serval only supports a single physical machine: if we want
-;; to cluster containers across machines, we must find a way to store
-;; and reason about the host in addition to the container. This might
-;; mean absorbing some functionality that systemd currently performs for
-;; us.
-;;
-;; FILES
-;;
-;; /var/lib/serval/<kit-name>.kit - kit state (serialized s-expr)
-;; /var/lib/serval/<kit-name>/ - root directory for the kit
-;; /nix/var/nix/profiles/per-kit/<kit-name> - symlink to cfg in /nix/store
-;;
-(define-module (Biz Serval)
- #:use-module ((ice-9 getopt-long))
- #:use-module ((ice-9 match)
- #:select (match))
- #:use-module ((srfi srfi-9)
- #:select (define-record-type))
- #:use-module ((bs core)
- #:select (first second rest turn fmt prn comment))
- #:use-module ((bs test)
- #:select (testing))
- #:use-module ((bs shell) #:prefix Shell.)
- #:export (main))
-
-(define *data-dir* "/var/lib/serval")
-(define *nix-profiles-dir* "/nix/var/nix/profiles")
-
-(define (main args)
- ;; pop first arg if its the executable
- (let* ([args (if (equal? (first args) "Biz/Serval.scm")
- (rest args)
- args)]
- [cmd (first args)])
- (match cmd
- ["new" (new-kit! args)]
- ["del" (del-kit! args)]
- ["start" (start-kit! args)]
- ["stop" (stop-kit! args)]
- ["scale" (prn "scale running kits")]
- ["ssh" (run-in-kit! args)]
- ["info" (prn "show kit")]
- ["ls" ("list available kits")]
- [else (prn "help text")])))
-
-(define-record-type @Kit
- (Kit name nix-path system-path host-address
- host-port local-address auto-start)
- kit?
- ;; a unique name for this kit
- (name kit-name)
- ;; location in the nix store
- (nix-path get-nix-path set-nix-path!)
- ;; this is like /etc/nixos/conf.nix in NixOS proper. At
- ;; initialization, this is just `/var/lib/serval/$kit'. Afterwards,
- ;; it's `/nix/var/nix/profiles/per-kit/$kit'.
- (system-path get-system-path set-system-path!)
- ;; host IP
- (host-address get-host-address set-host-address!)
- ;; host port
- (host-port get-host-port set-host-port!)
- ;; the private IP
- (local-address get-local-address set-local-address!)
- ;; should this kit start when the host starts?
- (auto-start get-auto-start set-auto-start!))
-
-(define (zip a b)
- "Combine a and b into a single list of pairs."
- (apply map cons (list a b)))
-
-(define (serialize kit)
- "Turns a kit into an association list."
- (let* ((fields (record-type-fields @Kit))
- (values (turn fields
- (lambda (field) ((record-accessor @Kit field) kit)))))
- (zip fields values)))
-
-(define (deserialize alist)
- "Creates a @Kit from an association list."
- (apply Kit (map rest alist)))
-
-(define (save-kit! kit)
- (call-with-output-file (fmt "~a/~a.kit" *data-dir* (kit-name kit))
- (lambda (a) (write (serialize kit) a))))
-
-(define (load-kit! kit-name)
- (call-with-input-file (fmt "~a/~a.kit" *data-dir* kit-name)
- (lambda (a) (deserialize (read a)))))
-
-(define (find-available-address)
- "10.233.0.1")
-
-;; top-level commands, each take an argstr
-
-(define (setup!)
- "Initial setup, only need to run once."
- (Shell.exec (fmt "mkdir -p ~a" *nix-profiles-dir*))
- (Shell.exec (fmt "mkdir -p ~a" *data-dir*)))
-
-(define (new-kit! args)
- "Creates a new kit:
-1. first arg is name
-2. second arg is nix-path
-3. rest args parsed by getopt-long
-"
- (let* ([name (first args)]
- [nix-path (second args)]
- [option-spec '((auto-start (single-char #\a) (value #f)))]
- [options (getopt-long args option-spec)]
- [auto-start (option-ref options 'auto-start #f)]
- [local-address (find-available-address)]
- [kit (Kit name nix-path "fixme-system-path" "fixme-host-address"
- "fixme-host-port" local-address auto-start)])
- (save-kit! kit)
- (prn ;; Shell.exec
- (fmt "nix-env -p ~a/per-kit/system --set ~a"
- *nix-profiles-dir* (get-system-path kit)))
- kit))
-
-(define (del-kit! args)
- (let ([name (first args)])
- (Shell.exec (fmt "rm ~a/~a" *data-dir* name))))
-
-(define (list-kits)
- (Shell.exec (fmt "ls ~a" *data-dir*)))
-
-(define (update-kit! args)
- (let ([kit #nil])
- (Shell.exec
- (fmt "nix-env -p ~a/system -I nixos-config=~a -f <nixpkgs/nixos> --set -A system"
- *nix-profiles-dir*
- (get-system-path #nil)))))
-
-(define (run-in-kit! args)
- (let ([kit #nil])
- (Shell.exec
- (fmt "systemd-run --machine ~a --pty --quiet -- ~{~a~}"
- (kit-name kit) args))))
-
-(define (is-kit-running? kit)
- (Shell.exec
- (fmt "systemctl show kit@~a" (kit-name kit))))
-
-(define (start-kit! kit)
- (Shell.exec
- (fmt "systemctl start kit@~a" (kit-name kit))))
-
-(define (stop-kit! kit)
- (let* ([force-stop #f]
- [cmd (if force-stop
- (fmt "machinectl terminate ~a" (kit-name kit))
- (fmt "systemctl stop kit@~a" (kit-name kit)))])
- (Shell.exec cmd)))
-
-(define (restart-kit! kit)
- (stop-kit! kit)
- (start-kit! kit))
-
-(define (get-leader kit)
- "Return the PID of the init process of the kit."
- (Shell.exec
- (fmt "machinectl show ~a -p Leader" (kit-name kit))))
diff --git a/Omni/Bild.hs b/Omni/Bild.hs
index e6c9152..659619b 100644
--- a/Omni/Bild.hs
+++ b/Omni/Bild.hs
@@ -460,9 +460,7 @@ isBuildableNs = \case
(Namespace _ Namespace.Toml) -> True
where
nixTargets =
- [ ["Biz", "Pie"],
- ["Biz", "Que"],
- ["Omni", "Cloud"],
+ [ ["Omni", "Cloud"],
["Omni", "Dev"],
["Omni", "Dev", "Lithium"],
["Omni", "Dev", "Beryllium"],
diff --git a/Omni/Cloud.nix b/Omni/Cloud.nix
index 08d1ba2..2ec801f 100644
--- a/Omni/Cloud.nix
+++ b/Omni/Cloud.nix
@@ -10,13 +10,11 @@ bild.os {
./Cloud/Comms.nix
./Cloud/Git.nix
./Cloud/Hardware.nix
- ./Cloud/Hub.nix
./Cloud/Mail.nix
./Cloud/Networking.nix
./Cloud/Web.nix
./Cloud/Znc.nix
"${bild.sources.nixos-mailserver}"
- # ./Nixpert.nix
];
networking.hostName = "simatime";
networking.domain = "simatime.com";
diff --git a/Omni/Cloud/Grocy.nix b/Omni/Cloud/Grocy.nix
deleted file mode 100644
index 697c2f1..0000000
--- a/Omni/Cloud/Grocy.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ ... }:
-
-{
- services.grocy = {
- enable = true;
- hostName = "grocy.simatime.com";
- nginx.enableSSL = false; # set in Web.nix
- settings = {
- calendar = {
- firstDayOfWeek = 1;
- showWeekNumber = true;
- };
- currency = "USD";
- culture = "en";
- };
- };
-}
diff --git a/Omni/Cloud/Hub.nix b/Omni/Cloud/Hub.nix
deleted file mode 100644
index 39bbdd0..0000000
--- a/Omni/Cloud/Hub.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ lib, pkgs, config, ... }:
-
-let
- ssl = {
- cert = "/var/lib/acme/${config.networking.domain}/fullchain.pem";
- key = "/var/lib/acme/${config.networking.domain}/key.pem";
- };
- ports = import ./Ports.nix;
- mkPlugin = path: settings: {
- plugin = "${pkgs.uhub}/plugins/${path}";
- inherit settings;
- };
- motdFile = pkgs.writeText "motd" ''
- Meshheads write code.
- '';
- rulesFile = pkgs.writeText "rules" ''
- 1. x
- 2. (λx.M)
- 3. (M N)
- 4. Profit.
- '';
-in {
- networking.firewall.allowedUDPPorts = [ ports.meshhub ];
- networking.firewall.allowedTCPPorts = [ ports.meshhub ];
-
- services.uhub = {
- "meshhub" = {
- enable = true;
- enableTLS = false;
- settings = {
- hub_name = "meshhub";
- hub_description = "vaporware is dead. long live vaporware";
- server_port = toString ports.meshhub;
- server_bind_addr = "any";
- max_users = 14; # we only have 14 users in meshheads chat
- tls_private_key = ssl.key;
- tls_certificate = ssl.cert;
- tls_enable = "no";
- tls_require = "no";
- };
- plugins = lib.attrsets.mapAttrsToList mkPlugin {
- #"mod_logging.so" = {
- # file = "/var/log/uhub/meshhub.log";
- #};
- "mod_welcome.so" = {
- motd = "${motdFile}";
- rules = "${rulesFile}";
- };
- "mod_chat_history.so" = {
- history_max = "200";
- history_default = "10";
- history_connect = "5";
- };
- };
- };
- };
-}
diff --git a/Omni/Dev/Lithium.nix b/Omni/Dev/Lithium.nix
index 567f6e0..1716d51 100644
--- a/Omni/Dev/Lithium.nix
+++ b/Omni/Dev/Lithium.nix
@@ -11,17 +11,9 @@ bild.os {
./Hoogle.nix
./Networking.nix
./Dns.nix
- ../../Biz/Dragons.nix
#./Guix.nix # I need to package a bunch of guile libs first
./Vpn.nix
];
networking.hostName = "lithium";
networking.domain = "dev.simatime.com";
- services.dragons = {
- enable = true;
- port = 8095;
- package = bild.run ../../Biz/Dragons.hs;
- keep = "/var/dragons/keep";
- depo = "/var/dragons/depo";
- };
}