···414414- The `erlang_node_short_name`, `erlang_node_name`, `port` and `options` configuration parameters are gone, and have been replaced with an `environment` parameter.
415415 Use the appropriate [environment variables](https://hexdocs.pm/livebook/readme.html#environment-variables) inside `environment` to configure the service instead.
416416417417+- `akkoma` now requires explicitly setting the base URL for uploaded media (`settings."Pleroma.Upload".base_url`), as well as for the media proxy if enabled (`settings."Media"`).
418418+ This is recommended to be a separate (sub)domain to the one Akkoma is hosted at.
419419+ See [here](https://meta.akkoma.dev/t/akkoma-stable-2024-03-securer-i-barely-know-her/681#explicit-upload-and-media-proxy-domains-5) for more details.
420420+417421- The `crystal` package has been updated to 1.11.x, which has some breaking changes.
418422 Refer to crystal's changelog for more information. ([v1.10](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1100-2023-10-09), [v1.11](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1110-2024-01-08))
419423···577581578582- QtMultimedia has changed its default backend to `QT_MEDIA_BACKEND=ffmpeg` (previously `gstreamer` on Linux or `darwin` on MacOS).
579583 The previous native backends remain available but are now minimally maintained. Refer to [upstream documentation](https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend) for further details about each platform.
584584+585585+- The `drbd` out-of-tree Linux kernel driver has been added in version `9.2.7`. With it the DRBD 9.x features can be used instead of the 8.x features provided by the `8.4.11` in-tree driver.
580586581587- The oil shell's c++ version is now available as `oils-for-unix`. The python version is still available as `oil`
582588
···11{ config, lib, pkgs, ... }:
2233-with lib;
44-53let
66- toStr = value:
77- if true == value then "yes"
88- else if false == value then "no"
99- else toString value;
44+ inherit (lib.attrsets) optionalAttrs;
55+ inherit (lib.generators) toINIWithGlobalSection;
66+ inherit (lib.lists) optional;
77+ inherit (lib.modules) mkIf;
88+ inherit (lib.options) literalExpression mkEnableOption mkOption;
99+ inherit (lib.strings) escape;
1010+ inherit (lib.types) attrsOf bool int lines oneOf str submodule;
10111112 cfg = config.services.davfs2;
1212- format = pkgs.formats.toml { };
1313- configFile = let
1414- settings = mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings;
1515- in pkgs.writeText "davfs2.conf" ''
1616- ${concatStringsSep "\n" settings}
1717- ${cfg.extraConfig}
1818- '';
1313+1414+ escapeString = escape ["\"" "\\"];
1515+1616+ formatValue = value:
1717+ if true == value then "1"
1818+ else if false == value then "0"
1919+ else if builtins.isString value then "\"${escapeString value}\""
2020+ else toString value;
2121+2222+ configFile = pkgs.writeText "davfs2.conf" (
2323+ if (cfg.settings != { }) then
2424+ (toINIWithGlobalSection {
2525+ mkSectionName = escapeString;
2626+ mkKeyValue = k: v: "${k} ${formatValue v}";
2727+ } cfg.settings)
2828+ else
2929+ cfg.extraConfig
3030+ );
1931in
2032{
21332234 options.services.davfs2 = {
2323- enable = mkOption {
2424- type = types.bool;
2525- default = false;
2626- description = lib.mdDoc ''
2727- Whether to enable davfs2.
2828- '';
2929- };
3535+ enable = mkEnableOption "davfs2";
30363137 davUser = mkOption {
3232- type = types.str;
3838+ type = str;
3339 default = "davfs2";
3434- description = lib.mdDoc ''
4040+ description = ''
3541 When invoked by root the mount.davfs daemon will run as this user.
3642 Value must be given as name, not as numerical id.
3743 '';
3844 };
39454046 davGroup = mkOption {
4141- type = types.str;
4747+ type = str;
4248 default = "davfs2";
4343- description = lib.mdDoc ''
4949+ description = ''
4450 The group of the running mount.davfs daemon. Ordinary users must be
4551 member of this group in order to mount a davfs2 file system. Value must
4652 be given as name, not as numerical id.
···4854 };
49555056 extraConfig = mkOption {
5151- type = types.lines;
5757+ type = lines;
5258 default = "";
5359 example = ''
5454- kernel_fs coda
5560 proxy foo.bar:8080
5661 use_locks 0
6262+6363+ [/media/dav]
6464+ use_locks 1
6565+6666+ [/home/otto/mywebspace]
6767+ gui_optimize 1
5768 '';
5858- description = lib.mdDoc ''
6969+ description = ''
5970 Extra lines appended to the configuration of davfs2.
6071 See {manpage}`davfs2.conf(5)` for available settings.
6172···6677 };
67786879 settings = mkOption {
6969- type = types.submodule {
7070- freeformType = format.type;
8080+ type = submodule {
8181+ freeformType = let
8282+ valueTypes = [ bool int str ];
8383+ in
8484+ attrsOf (attrsOf (oneOf (valueTypes ++ [ (attrsOf (oneOf valueTypes)) ] )));
7185 };
7272- default = {};
8686+ default = { };
7387 example = literalExpression ''
7488 {
7575- kernel_fs = "coda";
7676- proxy = "foo.bar:8080";
7777- use_locks = 0;
8989+ globalSection = {
9090+ proxy = "foo.bar:8080";
9191+ use_locks = false;
9292+ };
9393+ sections = {
9494+ "/media/dav" = {
9595+ use_locks = true;
9696+ };
9797+ "/home/otto/mywebspace" = {
9898+ gui_optimize = true;
9999+ };
100100+ };
78101 }
79102 '';
8080- description = lib.mdDoc ''
103103+ description = ''
81104 Extra settings appended to the configuration of davfs2.
82105 See {manpage}`davfs2.conf(5)` for available settings.
83106 '' ;
···8610987110 config = mkIf cfg.enable {
881118989- warnings = lib.optional (cfg.extraConfig != null) ''
9090- services.davfs2.extraConfig will be deprecated in future releases, please use the settings option now.
112112+ assertions = [
113113+ {
114114+ assertion = cfg.extraConfig != "" -> cfg.settings == { };
115115+ message = ''
116116+ services.davfs2.extraConfig and services.davfs2.settings cannot be used together.
117117+ Please prefer using services.davfs2.settings.
118118+ '';
119119+ }
120120+ ];
121121+122122+ warnings = optional (cfg.extraConfig != "") ''
123123+ services.davfs2.extraConfig will be deprecated in future releases;
124124+ please use services.davfs2.settings instead.
91125 '';
9212693127 environment.systemPackages = [ pkgs.davfs2 ];
94128 environment.etc."davfs2/davfs2.conf".source = configFile;
9512996130 services.davfs2.settings = {
9797- dav_user = cfg.davUser;
9898- dav_group = cfg.davGroup;
131131+ globalSection = {
132132+ dav_user = cfg.davUser;
133133+ dav_group = cfg.davGroup;
134134+ };
99135 };
100136101137 users.groups = optionalAttrs (cfg.davGroup == "davfs2") {
+43-1
nixos/modules/services/web-apps/akkoma.nix
···764764 };
765765 };
766766767767+ "Pleroma.Upload" = let
768768+ httpConf = cfg.config.":pleroma"."Pleroma.Web.Endpoint".url;
769769+ in {
770770+ base_url = mkOption {
771771+ type = types.nonEmptyStr;
772772+ default = if lib.versionOlder config.system.stateVersion "24.05"
773773+ then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
774774+ else null;
775775+ description = mdDoc ''
776776+ Base path which uploads will be stored at.
777777+ Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.
778778+ '';
779779+ };
780780+ };
781781+767782 ":frontends" = mkOption {
768783 type = elixirValue;
769784 default = mapAttrs
···781796 [{option}`config.services.akkoma.frontends`](#opt-services.akkoma.frontends).
782797 '';
783798 };
799799+800800+801801+ ":media_proxy" = let
802802+ httpConf = cfg.config.":pleroma"."Pleroma.Web.Endpoint".url;
803803+ in {
804804+ enabled = mkOption {
805805+ type = types.bool;
806806+ default = false;
807807+ description = mdDoc ''
808808+ Whether to enable proxying of remote media through the instance's proxy.
809809+ '';
810810+ };
811811+ base_url = mkOption {
812812+ type = types.nullOr types.nonEmptyStr;
813813+ default = if lib.versionOlder config.system.stateVersion "24.05"
814814+ then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
815815+ else null;
816816+ description = mdDoc ''
817817+ Base path for the media proxy.
818818+ Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.
819819+ '';
820820+ };
821821+ };
822822+784823 };
785824786825 ":web_push_encryption" = mkOption {
···904943 };
905944906945 config = mkIf cfg.enable {
946946+ assertions = optionals (cfg.config.":pleroma".":media_proxy".enabled && cfg.config.":pleroma".":media_proxy".base_url == null) [''
947947+ `services.akkoma.config.":pleroma".":media_proxy".base_url` must be set when the media proxy is enabled.
948948+ ''];
907949 warnings = optionals (with config.security; (!sudo.enable) && (!sudo-rs.enable)) [''
908950 The pleroma_ctl wrapper enabled by the installWrapper option relies on
909951 sudo, which appears to have been disabled through security.sudo.enable.
···10831125 };
10841126 };
1085112710861086- meta.maintainers = with maintainers; [ mvs ];
11281128+ meta.maintainers = with maintainers; [ mvs tcmal ];
10871129 meta.doc = ./akkoma.md;
10881130}
···11+# This file was automatically generated by passthru.fetch-deps.
22+# Please dont edit it manually, your changes might get overwritten!
33+44+{ fetchNuGet }: [
55+]
···11+# This file was automatically generated by passthru.fetch-deps.
22+# Please dont edit it manually, your changes might get overwritten!
33+44+{ fetchNuGet }: [
55+]
···2121 "43": "43",
2222 "44": "44",
2323 "45": "45",
2424+ "46": "46",
2425}
25262627# Some type alias to increase readability of complex compound types
···11-{ lib
22-, stdenv
33-, llvm_meta
44-, fetch
55-, fetchpatch
66-, cmake
77-, llvm
88-, targetLlvm
99-, perl
1010-, version
1111-}:
1212-1313-stdenv.mkDerivation rec {
1414- pname = "openmp";
1515- inherit version;
1616-1717- src = fetch pname "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0";
1818-1919- patches = [
2020- # Fix cross.
2121- (fetchpatch {
2222- url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
2323- hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
2424- })
2525- ];
2626-2727- patchFlags = [ "-p2" ];
2828-2929- nativeBuildInputs = [ cmake perl ];
3030- buildInputs = [
3131- (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
3232- ];
3333-3434- meta = llvm_meta // {
3535- homepage = "https://openmp.llvm.org/";
3636- description = "Support for the OpenMP language";
3737- longDescription = ''
3838- The OpenMP subproject of LLVM contains the components required to build an
3939- executable OpenMP program that are outside the compiler itself.
4040- Contains the code for the runtime library against which code compiled by
4141- "clang -fopenmp" must be linked before it can run and the library that
4242- supports offload to target devices.
4343- '';
4444- # "All of the code is dual licensed under the MIT license and the UIUC
4545- # License (a BSD-like license)":
4646- license = with lib.licenses; [ mit ncsa ];
4747- };
4848-}
···11-{ lib, stdenv, llvm_meta
22-, buildLlvmTools
33-, src
44-, cmake
55-, libxml2
66-, libllvm
77-, version
88-}:
99-1010-stdenv.mkDerivation rec {
1111- pname = "lld";
1212- inherit version;
1313-1414- inherit src;
1515- sourceRoot = "${src.name}/${pname}";
1616-1717- patches = [
1818- ./gnu-install-dirs.patch
1919- ];
2020-2121- # On Darwin the llvm-config is perhaps not working fine as the
2222- # LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as the
2323- # include path is not correct.
2424- postPatch = lib.optionalString stdenv.isDarwin ''
2525- substituteInPlace MachO/CMakeLists.txt --replace \
2626- '(''${LLVM_MAIN_SRC_DIR}/' '(../'
2727- '';
2828-2929- nativeBuildInputs = [ cmake ];
3030- buildInputs = [ libllvm libxml2 ];
3131-3232- cmakeFlags = [
3333- "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
3434- ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
3535- "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
3636- ];
3737-3838- # Musl's default stack size is too small for lld to be able to link Firefox.
3939- LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
4040-4141- outputs = [ "out" "lib" "dev" ];
4242-4343- meta = llvm_meta // {
4444- homepage = "https://lld.llvm.org/";
4545- description = "The LLVM linker (unwrapped)";
4646- longDescription = ''
4747- LLD is a linker from the LLVM project that is a drop-in replacement for
4848- system linkers and runs much faster than them. It also provides features
4949- that are useful for toolchain developers.
5050- The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
5151- WebAssembly in descending order of completeness. Internally, LLD consists
5252- of several different linkers.
5353- '';
5454- };
5555-}
···11-{ lib
22-, stdenv
33-, llvm_meta
44-, src
55-, fetchpatch
66-, cmake
77-, llvm
88-, targetLlvm
99-, perl
1010-, version
1111-}:
1212-1313-stdenv.mkDerivation rec {
1414- pname = "openmp";
1515- inherit version;
1616-1717- inherit src;
1818- sourceRoot = "${src.name}/${pname}";
1919-2020- patches = [
2121- # Fix cross.
2222- (fetchpatch {
2323- url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
2424- hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
2525- })
2626- ];
2727-2828- patchFlags = [ "-p2" ];
2929-3030- nativeBuildInputs = [ cmake perl ];
3131- buildInputs = [
3232- (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
3333- ];
3434-3535- cmakeFlags = [
3636- "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
3737- ];
3838-3939- meta = llvm_meta // {
4040- homepage = "https://openmp.llvm.org/";
4141- description = "Support for the OpenMP language";
4242- longDescription = ''
4343- The OpenMP subproject of LLVM contains the components required to build an
4444- executable OpenMP program that are outside the compiler itself.
4545- Contains the code for the runtime library against which code compiled by
4646- "clang -fopenmp" must be linked before it can run and the library that
4747- supports offload to target devices.
4848- '';
4949- # "All of the code is dual licensed under the MIT license and the UIUC
5050- # License (a BSD-like license)":
5151- license = with lib.licenses; [ mit ncsa ];
5252- };
5353-}
···11-{ lib, stdenv, llvm_meta
22-, buildLlvmTools
33-, monorepoSrc, runCommand
44-, cmake
55-, libxml2
66-, libllvm
77-, version
88-}:
99-1010-stdenv.mkDerivation rec {
1111- pname = "lld";
1212- inherit version;
1313-1414- # Blank llvm dir just so relative path works
1515- src = runCommand "${pname}-src-${version}" {} ''
1616- mkdir -p "$out"
1717- cp -r ${monorepoSrc}/cmake "$out"
1818- cp -r ${monorepoSrc}/${pname} "$out"
1919- mkdir -p "$out/libunwind"
2020- cp -r ${monorepoSrc}/libunwind/include "$out/libunwind"
2121- mkdir -p "$out/llvm"
2222- '';
2323-2424- sourceRoot = "${src.name}/${pname}";
2525-2626- patches = [
2727- ./gnu-install-dirs.patch
2828- # On Darwin the llvm-config is perhaps not working fine as the
2929- # LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as
3030- # the include path is not correct.
3131- ./fix-root-src-dir.patch
3232- ];
3333-3434- nativeBuildInputs = [ cmake ];
3535- buildInputs = [ libllvm libxml2 ];
3636-3737- cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
3838- "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
3939- ];
4040-4141- # Musl's default stack size is too small for lld to be able to link Firefox.
4242- LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
4343-4444- outputs = [ "out" "lib" "dev" ];
4545-4646- meta = llvm_meta // {
4747- homepage = "https://lld.llvm.org/";
4848- description = "The LLVM linker (unwrapped)";
4949- longDescription = ''
5050- LLD is a linker from the LLVM project that is a drop-in replacement for
5151- system linkers and runs much faster than them. It also provides features
5252- that are useful for toolchain developers.
5353- The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
5454- WebAssembly in descending order of completeness. Internally, LLD consists
5555- of several different linkers.
5656- '';
5757- };
5858-}
···214214 # TODO(@rrbutani): fix/follow-up
215215 substituteInPlace unittests/TargetParser/Host.cpp \
216216 --replace "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
217217-218218- # This test fails with a `dysmutil` crash; have not yet dug into what's
219219- # going on here (TODO(@rrbutani)).
220220- rm test/tools/dsymutil/ARM/obfuscated.test
221217 '' + ''
222218 # FileSystem permissions tests fail with various special bits
223219 substituteInPlace unittests/Support/CMakeLists.txt \