diff options
Diffstat (limited to 'Biz')
-rw-r--r-- | Biz/Bild/Deps.nix | 4 | ||||
-rw-r--r-- | Biz/Bild/Deps/bearssl.nix | 24 | ||||
-rw-r--r-- | Biz/Bild/Deps/gmni.nix | 20 | ||||
-rw-r--r-- | Biz/Bild/Deps/gmnisrv.nix | 21 | ||||
-rw-r--r-- | Biz/Bild/Deps/wemux.nix | 11 | ||||
-rw-r--r-- | Biz/Bild/Sources.json | 29 | ||||
-rw-r--r-- | Biz/Cloud.nix | 1 | ||||
-rw-r--r-- | Biz/Cloud/gmnisrv.nix | 70 |
8 files changed, 9 insertions, 171 deletions
diff --git a/Biz/Bild/Deps.nix b/Biz/Bild/Deps.nix index a24e2d1..9b62f7d 100644 --- a/Biz/Bild/Deps.nix +++ b/Biz/Bild/Deps.nix @@ -50,10 +50,6 @@ in rec }; }; - wemux = pkgs.callPackage ./Deps/wemux.nix {}; guile-opengl = pkgs.callPackage ./Deps/guile-opengl.nix {}; inspekt3d = pkgs.callPackage ./Deps/inspekt3d.nix {}; - gmnisrv = pkgs.callPackage ./Deps/gmnisrv.nix {}; - bearssl = pkgs.callPackage ./Deps/bearssl.nix {}; - gmni = pkgs.callPackage ./Deps/gmni.nix {}; } diff --git a/Biz/Bild/Deps/bearssl.nix b/Biz/Bild/Deps/bearssl.nix deleted file mode 100644 index bbede64..0000000 --- a/Biz/Bild/Deps/bearssl.nix +++ /dev/null @@ -1,24 +0,0 @@ -{stdenv, fetchgit }: - -stdenv.mkDerivation rec { - name = "bearssl-2021-01-27"; - version = "79b1a9996c094ff593ae50bc4edc1f349f39dd6d"; - src = fetchgit { - url = "https://www.bearssl.org/git/BearSSL"; - rev = version; - sha256 = "0iljfg575g2n4jw6mjfi1xk749pnhsg9zpskqs0kvzch5hn5cvlf"; - }; - installPhase = '' - mkdir -p $out/{include,lib,bin} - cp inc/* $out/include - cp build/libbearssl.a $out/lib/libbearssl.a - cp build/brssl $out/bin/brssl - ''; - meta = with stdenv.lib; { - description = "An implementation of the SSL/TLS protocol in C"; - homepage = "https://bearssl.org/"; - license = licenses.mit; - maintainers = with maintainers; [ bsima ]; - platforms = platforms.all; - }; -} diff --git a/Biz/Bild/Deps/gmni.nix b/Biz/Bild/Deps/gmni.nix deleted file mode 100644 index 14c88b9..0000000 --- a/Biz/Bild/Deps/gmni.nix +++ /dev/null @@ -1,20 +0,0 @@ -{stdenv, fetchgit, pkg-config, bearssl, scdoc}: - -stdenv.mkDerivation rec { - name = "gmni"; - version = "77b73efb"; - src = fetchgit { - url = "https://git.sr.ht/~sircmpwn/gmni"; - rev = version; - sha256 = "1wvnzyv7vyddcd39y6q5aflpnnsdl4k4y5aj5ssb7vgkld0h1b7r"; - }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ bearssl scdoc ]; - meta = with stdenv.lib; { - description = "A Gemini client"; - homepage = "https://git.sr.ht/~sircmpwn/gmni"; - license = licenses.gpl3; - maintainers = with maintainers; [ bsima ]; - platforms = platforms.all; - }; -} diff --git a/Biz/Bild/Deps/gmnisrv.nix b/Biz/Bild/Deps/gmnisrv.nix deleted file mode 100644 index b4a298d..0000000 --- a/Biz/Bild/Deps/gmnisrv.nix +++ /dev/null @@ -1,21 +0,0 @@ -{stdenv, fetchgit, pkg-config, openssl, mailcap, scdoc}: - -stdenv.mkDerivation rec { - name = "gmnisrv"; - version = "f23ec10a"; - src = fetchgit { - url = "https://git.sr.ht/~sircmpwn/gmnisrv"; - rev = version; - sha256 = "1d9rjx0s092yfzjxd2yvzixhqgg883nlnmsysgp21w75n2as354n"; - }; - MIMEDB = "${mailcap}/etc/mime.types"; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl mailcap scdoc ]; - meta = with stdenv.lib; { - description = "A simple Gemini protocol server"; - homepage = "https://git.sr.ht/~sircmpwn/gmnisrv"; - license = licenses.gpl3; - maintainers = with maintainers; [ bsima ]; - platforms = platforms.all; - }; -} diff --git a/Biz/Bild/Deps/wemux.nix b/Biz/Bild/Deps/wemux.nix deleted file mode 100644 index b9f1dd8..0000000 --- a/Biz/Bild/Deps/wemux.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ sources, stdenv }: - -stdenv.mkDerivation rec { - name = "wemux-${version}"; - version = "2020.04.03"; - src = sources.wemux; - installPhase = '' - mkdir -p $out/bin - install ${src}/wemux $out/bin - ''; -} diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json index e6b23ca..eaf19ba 100644 --- a/Biz/Bild/Sources.json +++ b/Biz/Bild/Sources.json @@ -98,16 +98,17 @@ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, "nixpkgs": { - "branch": "nixos-20.09", + "branch": "biz", "description": "Nix Packages collection", - "homepage": "https://github.com/NixOS/nixpkgs", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d105075a1fd870b1d1617a6008cb38b443e65433", - "sha256": "1jcs44wn0s6mlf2jps25bvcai1rij9b2dil6zcj8zqwf2i8xmqjh", + "homepage": "git://simatime.com/nixpkgs.git", + "name": "nixpkgs", + "owner": "simatime", + "repo": "git://simatime.com/nixpkgs.git", + "rev": "c8e39e6e43869a845c6dee43f55f2060d7751966", + "sha256": "0l0qswvn8d132h771mm1vnqf8fbljg3j0f5yk42qkbcywiymsdlq", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/d105075a1fd870b1d1617a6008cb38b443e65433.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + "url": "https://simatime.com/archive/nixpkgs/biz/c8e39e6e43869a845c6dee43f55f2060d7751966.tar.gz", + "url_template": "https://simatime.com/archive/<name>/<branch>/<rev>.tar.gz" }, "regex-applicative": { "branch": "master", @@ -147,17 +148,5 @@ "type": "tarball", "url": "https://github.com/haskell-servant/servant-auth/archive/696fab268e21f3d757b231f0987201b539c52621.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, - "wemux": { - "branch": "master", - "description": "Multi-User Tmux Made Easy", - "homepage": "", - "owner": "zolrath", - "repo": "wemux", - "rev": "01c6541f8deceff372711241db2a13f21c4b210c", - "sha256": "1y962nzvs7sf720pl3wa582l6irxc8vavd0gp4ag4243b2gs4qvm", - "type": "tarball", - "url": "https://github.com/zolrath/wemux/archive/01c6541f8deceff372711241db2a13f21c4b210c.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" } } diff --git a/Biz/Cloud.nix b/Biz/Cloud.nix index 6eece13..4730f1f 100644 --- a/Biz/Cloud.nix +++ b/Biz/Cloud.nix @@ -20,7 +20,6 @@ bild.os { ./Cloud/Networking.nix ./Cloud/Web.nix ./Cloud/Znc.nix - ./Cloud/gmnisrv.nix nixos-mailserver ]; networking.hostName = "simatime"; diff --git a/Biz/Cloud/gmnisrv.nix b/Biz/Cloud/gmnisrv.nix deleted file mode 100644 index 2dbe872..0000000 --- a/Biz/Cloud/gmnisrv.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ lib -, options -, config -, pkgs -, ... -}: - -let - cfg = config.services.gmnisrv; - - # from https://github.com/openlab-aux/vuizvui/blob/1576e1025d570851449f6668e0bda2b1b9b21e06/modules/programs/foot/default.nix#L15-L48 - # this can be replaced with lib.formats.ini when - # https://github.com/NixOS/nixpkgs/pull/118925 is merged - cfgFormat = { - type = with lib.types; - let - iniAtom = nullOr (oneOf [ bool int float str ]) // { - description = "INI atom (null, bool, int, float, or string)"; - }; - in (attrsOf (either iniAtom (attrsOf iniAtom))) // { - description = '' - attribute set of either top-level INI atoms (bool, int, float or string) - or attribute sets (sections) of INI atoms - ''; - }; - generate = name: value: - let - isSection = builtins.isAttrs; - topLevel = lib.filterAttrs (_: v: !(isSection v)) value; - sections = lib.filterAttrs (_: v: isSection v) value; - in pkgs.writeText name '' - ${lib.generators.toKeyValue {} topLevel} - ${lib.generators.toINI {} sections} - ''; - }; -in { - options.services.gmnisrv = { - enable = lib.mkEnableOption "Enable the gmnisrv service"; - settings = lib.mkOption { - type = cfgFormat.type; - description = '' - Configuration for gmnisrv. See gmnisrv.ini(5) for supported settings. - ''; - default = { - "listen" = lib.mkDefault "0.0.0.0:1965 [::]:1965"; - ":tls" = { - "store" = lib.mkDefault "${cfg.dataDir}/certs"; - }; - }; - }; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.gmnisrv; - description = "gmnisrv package to use"; - }; - dataDir = lib.mkOption { - type = lib.types.str; - default = "/var/lib/gemini"; - description = "Where gmnisrv should store certs and other data."; - }; - }; - config = lib.mkIf cfg.enable { - systemd.services.gmnisrv = { - description = "gmnisrv service"; - wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" ]; - script = "${cfg.package}/bin/gmnisrv -C ${cfgFormat.generate "gmnisrv.ini" cfg.settings}"; - }; - }; -} |