let nixpkgs-tar = builtins.fetchTarball (import ./nixpkgs.nix); nixpkgs = import "${nixpkgs-tar}" {}; nixos = import "${nixpkgs-tar}/nixos"; # TODO(bsima): buildNixOS should be split into multiple functions that each # return one thing, instead of a single function that returns multiple things buildOS = import ./Com/Simatime/buildOS.nix nixos; buildGhc = import ./Com/Simatime/buildGhc.nix nixpkgs; buildGhcjs = import ./Com/Simatime/buildGhcjs.nix nixpkgs; nixos-mailserver = let ver = "v2.3.0"; in builtins.fetchTarball { url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${ver}/nixos-mailserver-${ver}.tar.gz"; sha256 = "0lpz08qviccvpfws2nm83n7m2r8add2wvfg9bljx9yxx8107r919"; }; in rec { Com.Simatime.cloud = buildOS { enableVpn = true; ipAddress = "159.89.128.69"; vpnRsaPrivateKeyFile = "/etc/tinc/rsa_key.priv"; vpnEd25519PrivateKeyFile = "/etc/tinc/ed25519_key.priv"; configuration = { imports = [ ./Com/Simatime/hardware.nix ./Com/Simatime/networking.nix ./Com/Simatime/packages.nix ./Com/Simatime/git.nix ./Com/Simatime/mail.nix ./Com/Simatime/web.nix ./Com/Simatime/chat.nix ./Com/Simatime/znc.nix nixos-mailserver ]; programs.mosh = { enable = true; withUtempter = true; }; }; }; Com.Simatime.dev = buildOS { enableVpn = true; ipAddress = "69.181.254.154"; vpnConnectTo = "com.simatime"; vpnRsaPrivateKeyFile = "/etc/tinc/rsa_key.priv"; vpnEd25519PrivateKeyFile = "/etc/tinc/ed25519_key.priv"; configuration = { imports = [ ./Com/Simatime/packages.nix ./Com/Simatime/dev/hardware.nix ./Com/Simatime/dev/configuration.nix ]; }; }; Com.Simatime.Serval = buildOS { deps = { que-server = Run.Que.Server; }; configuration = { imports = [ ./Com/Simatime/packages.nix ./Com/Simatime/Serval/hardware.nix ./Com/Simatime/Serval/networking.nix ./Run/Que/service.nix ./Com/Simatime/Serval/configuration.nix ]; networking.hostName = "serval.simatime.com"; boot.enableContainers = true; }; }; Com.InfluencedByBooks.os = buildOS { configuration = { imports = [ ./Com/InfluencedByBooks/service.nix ./Com/Simatime/packages.nix ]; nixpkgs.config.allowUnfree = true; boot.isContainer = true; networking.useDHCP = false; }; }; Com.InfluencedByBooks.Server = buildGhc { name = "Com.InfluencedByBooks.Server"; nick = "ibb"; deps = [ "clay" "miso" "protolude" "servant" "text" "MonadRandom" "acid-state" "blaze-html" "blaze-markup" "bytestring" "ixset" "random" "safecopy" "scotty" "servant-server" "text" ]; }; Com.InfluencedByBooks.Client = buildGhcjs { name = "Com.InfluencedByBooks.Client"; nick = "ibb"; deps = [ "clay" "miso" "protolude" "servant" "text" "aeson" "containers" "ghcjs-base" ]; }; Com.MusicMeetsComics = { Server = buildGhc { name = "Com.MusicMeetsComics.Server"; nick = "mmc"; deps = [ "aeson" "clay" "containers" "miso" "protolude" "servant" "split" "string-quote" "text" "dhall" "ekg" "fast-logger" "http-types" "katip" "lucid" "monad-logger" "monad-metrics" "mtl" "network-uri" "safe" "servant-lucid" "servant-server" "split" "wai" "wai-app-static" "wai-extra" "wai-middleware-metrics" "warp" ]; }; Client = buildGhcjs { name = "Com.MusicMeetsComics.Client"; nick = "mmc"; deps = [ "aeson" "clay" "containers" "miso" "protolude" "servant" "split" "string-quote" "text" "ghcjs-base" ]; }; }; Run.Que.Server = buildGhc { name = "Run.Que.Server"; nick = "que-server"; deps = [ "async" "protolude" "scotty" "stm" "unagi-chan" "unordered-containers" ]; }; Run.Que.Website = buildGhc { name = "Run.Que.Website"; nick = "que-website"; deps = [ "async" "process" "protolude" "req" ]; }; }