Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0620e0fdbf4d
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dfd8f84aef12
Choose a head ref
Loading
Showing with 1,640 additions and 533 deletions.
  1. +5 −0 maintainers/maintainer-list.nix
  2. +1 −0 nixos/modules/module-list.nix
  3. +41 −63 nixos/modules/services/misc/plex.nix
  4. +312 −0 nixos/modules/services/networking/wg-quick.nix
  5. +74 −9 nixos/modules/services/networking/wireguard.nix
  6. +2 −0 nixos/tests/all-tests.nix
  7. +69 −0 nixos/tests/mosquitto.nix
  8. +57 −0 nixos/tests/wireguard/generated.nix
  9. +2 −2 pkgs/applications/audio/padthv1/default.nix
  10. +57 −53 pkgs/applications/editors/sublime/3/common.nix
  11. +4 −3 pkgs/applications/graphics/epeg/default.nix
  12. +2 −2 pkgs/applications/misc/alacritty/default.nix
  13. +9 −9 pkgs/applications/networking/browsers/chromium/upstream-info.nix
  14. +14 −11 pkgs/applications/networking/browsers/vivaldi/default.nix
  15. +2 −2 pkgs/applications/office/atlassian-cli/default.nix
  16. +65 −0 pkgs/applications/science/biology/sumatools/default.nix
  17. +2 −2 pkgs/applications/science/math/gmsh/default.nix
  18. +5 −2 pkgs/applications/version-management/gogs/default.nix
  19. +123 −0 pkgs/applications/version-management/sublime-merge/common.nix
  20. +16 −0 pkgs/applications/version-management/sublime-merge/default.nix
  21. +10 −1 pkgs/build-support/fetchurl/builder.sh
  22. +3 −3 pkgs/build-support/rust/build-rust-crate/configure-crate.nix
  23. +2 −1 pkgs/build-support/rust/build-rust-crate/default.nix
  24. +26 −0 pkgs/data/fonts/lalezar-fonts/default.nix
  25. +3 −3 pkgs/desktops/mate/atril/default.nix
  26. +7 −7 pkgs/desktops/mate/caja-dropbox/default.nix
  27. +4 −5 pkgs/desktops/mate/caja-extensions/default.nix
  28. +3 −3 pkgs/desktops/mate/caja/default.nix
  29. +0 −4 pkgs/desktops/mate/default.nix
  30. +3 −3 pkgs/desktops/mate/engrampa/default.nix
  31. +4 −5 pkgs/desktops/mate/eom/default.nix
  32. +4 −12 pkgs/desktops/mate/libmatekbd/default.nix
  33. +4 −4 pkgs/desktops/mate/libmatemixer/default.nix
  34. +4 −4 pkgs/desktops/mate/libmateweather/default.nix
  35. +4 −4 pkgs/desktops/mate/marco/default.nix
  36. +3 −3 pkgs/desktops/mate/mate-applets/default.nix
  37. +4 −4 pkgs/desktops/mate/mate-backgrounds/default.nix
  38. +4 −4 pkgs/desktops/mate/mate-calc/default.nix
  39. +4 −4 pkgs/desktops/mate/mate-common/default.nix
  40. +3 −3 pkgs/desktops/mate/mate-control-center/default.nix
  41. +5 −4 pkgs/desktops/mate/mate-desktop/default.nix
  42. +1 −1 pkgs/desktops/mate/mate-icon-theme-faenza/default.nix
  43. +4 −4 pkgs/desktops/mate/mate-icon-theme/default.nix
  44. +3 −3 pkgs/desktops/mate/mate-indicator-applet/default.nix
  45. +4 −3 pkgs/desktops/mate/mate-media/default.nix
  46. +5 −5 pkgs/desktops/mate/mate-menus/default.nix
  47. +3 −3 pkgs/desktops/mate/mate-netbook/default.nix
  48. +7 −6 pkgs/desktops/mate/mate-notification-daemon/default.nix
  49. +4 −5 pkgs/desktops/mate/mate-panel/default.nix
  50. +4 −4 pkgs/desktops/mate/mate-polkit/default.nix
  51. +3 −3 pkgs/desktops/mate/mate-power-manager/default.nix
  52. +3 −3 pkgs/desktops/mate/mate-screensaver/default.nix
  53. +4 −5 pkgs/desktops/mate/mate-sensors-applet/default.nix
  54. +3 −3 pkgs/desktops/mate/mate-session-manager/default.nix
  55. +9 −6 pkgs/desktops/mate/mate-settings-daemon/default.nix
  56. +4 −4 pkgs/desktops/mate/mate-system-monitor/default.nix
  57. +3 −3 pkgs/desktops/mate/mate-terminal/default.nix
  58. +3 −3 pkgs/desktops/mate/mate-themes/default.nix
  59. +4 −4 pkgs/desktops/mate/mate-user-guide/default.nix
  60. +4 −5 pkgs/desktops/mate/mate-user-share/default.nix
  61. +5 −4 pkgs/desktops/mate/mate-utils/default.nix
  62. +6 −6 pkgs/desktops/mate/mozo/default.nix
  63. +5 −5 pkgs/desktops/mate/pluma/default.nix
  64. +7 −7 pkgs/desktops/mate/python-caja/default.nix
  65. +12 −2 pkgs/desktops/mate/update.sh
  66. +25 −0 pkgs/development/compilers/julia/allow_nix_mtime.patch
  67. +6 −0 pkgs/development/compilers/julia/shared.nix
  68. +2 −2 pkgs/development/compilers/ocaml/4.08.nix
  69. +5 −0 pkgs/development/coq-modules/Verdi/default.nix
  70. +2 −2 pkgs/development/coq-modules/tlc/default.nix
  71. +4 −2 pkgs/development/interpreters/python/mk-python-derivation.nix
  72. +2 −2 pkgs/development/libraries/catch2/default.nix
  73. +2 −2 pkgs/development/libraries/gecode/default.nix
  74. +7 −2 pkgs/development/libraries/grpc/default.nix
  75. +9 −3 pkgs/development/libraries/libp11/default.nix
  76. +2 −2 pkgs/development/libraries/protobuf/3.7.nix
  77. +9 −8 pkgs/development/libraries/quazip/default.nix
  78. +3 −3 pkgs/development/libraries/science/math/cudnn/default.nix
  79. +9 −4 pkgs/development/ocaml-modules/zarith/default.nix
  80. +2 −2 pkgs/development/python-modules/asynctest/default.nix
  81. +2 −2 pkgs/development/python-modules/cmd2/default.nix
  82. +2 −2 pkgs/development/python-modules/jenkins-job-builder/default.nix
  83. +9 −0 pkgs/development/python-modules/jupyterlab/default.nix
  84. +2 −2 pkgs/development/python-modules/pychromecast/default.nix
  85. +41 −0 pkgs/development/python-modules/pyomo/default.nix
  86. +32 −0 pkgs/development/python-modules/pyutilib/default.nix
  87. +21 −0 pkgs/development/tools/analysis/evmdis/default.nix
  88. +4 −4 pkgs/development/tools/database/timescaledb-parallel-copy/default.nix
  89. +5 −5 pkgs/development/tools/database/timescaledb-parallel-copy/deps.nix
  90. +24 −0 pkgs/development/tools/database/timescaledb-tune/default.nix
  91. +21 −0 pkgs/development/tools/database/timescaledb-tune/deps.nix
  92. +3 −3 pkgs/development/tools/java/cfr/default.nix
  93. +1 −0 pkgs/development/web/insomnia/default.nix
  94. +9 −4 pkgs/games/torcs/default.nix
  95. +7 −0 pkgs/misc/uboot/default.nix
  96. +2 −2 pkgs/misc/vscode-extensions/wakatime/default.nix
  97. +2 −2 pkgs/os-specific/linux/cifs-utils/default.nix
  98. +2 −2 pkgs/os-specific/linux/fwts/default.nix
  99. +3 −3 pkgs/os-specific/linux/kernel/linux-rpi.nix
  100. +7 −10 pkgs/os-specific/linux/mxu11x0/default.nix
  101. +2 −2 pkgs/servers/monitoring/cadvisor/default.nix
  102. +4 −9 pkgs/servers/mqtt/mosquitto/default.nix
  103. +92 −71 pkgs/servers/plex/default.nix
  104. +70 −0 pkgs/servers/plex/raw.nix
  105. +3 −3 pkgs/servers/sql/postgresql/ext/plv8.nix
  106. +4 −4 pkgs/servers/sql/postgresql/ext/timescaledb.nix
  107. +2 −2 pkgs/tools/filesystems/bindfs/default.nix
  108. +29 −0 pkgs/tools/package-management/cargo-outdated/default.nix
  109. +27 −16 pkgs/tools/security/rng-tools/default.nix
  110. +19 −1 pkgs/top-level/all-packages.nix
  111. +20 −14 pkgs/top-level/php-packages.nix
  112. +4 −0 pkgs/top-level/python-packages.nix
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -5455,6 +5455,11 @@
github = "zohl";
name = "Al Zohali";
};
zookatron = {
email = "tim@zookatron.com";
github = "zookatron";
name = "Tim Zook";
};
zoomulator = {
email = "zoomulator@gmail.com";
github = "zoomulator";
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -686,6 +686,7 @@
./services/networking/vsftpd.nix
./services/networking/wakeonlan.nix
./services/networking/websockify.nix
./services/networking/wg-quick.nix
./services/networking/wicd.nix
./services/networking/wireguard.nix
./services/networking/wpa_supplicant.nix
104 changes: 41 additions & 63 deletions nixos/modules/services/misc/plex.nix
Original file line number Diff line number Diff line change
@@ -10,35 +10,38 @@ in
services.plex = {
enable = mkEnableOption "Plex Media Server";

# FIXME: In order for this config option to work, symlinks in the Plex
# package in the Nix store have to be changed to point to this directory.
dataDir = mkOption {
type = types.str;
default = "/var/lib/plex";
description = "The directory where Plex stores its data files.";
description = ''
The directory where Plex stores its data files.
'';
};

openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Open ports in the firewall for the media server
Open ports in the firewall for the media server.
'';
};

user = mkOption {
type = types.str;
default = "plex";
description = "User account under which Plex runs.";
description = ''
User account under which Plex runs.
'';
};

group = mkOption {
type = types.str;
default = "plex";
description = "Group under which Plex runs.";
description = ''
Group under which Plex runs.
'';
};


managePlugins = mkOption {
type = types.bool;
default = true;
@@ -80,73 +83,48 @@ in
description = "Plex Media Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
test -d "${cfg.dataDir}/Plex Media Server" || {
echo "Creating initial Plex data directory in \"${cfg.dataDir}\"."
mkdir -p "${cfg.dataDir}/Plex Media Server"
chown -R ${cfg.user}:${cfg.group} "${cfg.dataDir}"
}
# Copy the database skeleton files to /var/lib/plex/.skeleton
# See the the Nix expression for Plex's package for more information on
# why this is done.
install --owner ${cfg.user} --group ${cfg.group} -d "${cfg.dataDir}/.skeleton"
for db in "com.plexapp.plugins.library.db"; do
if [ ! -e "${cfg.dataDir}/.skeleton/$db" ]; then
cp "${cfg.package}/usr/lib/plexmediaserver/Resources/base_$db" "${cfg.dataDir}/.skeleton/$db"
fi
chmod u+w "${cfg.dataDir}/.skeleton/$db"
chown ${cfg.user}:${cfg.group} "${cfg.dataDir}/.skeleton/$db"
done
# If managePlugins is enabled, setup symlinks for plugins.
${optionalString cfg.managePlugins ''
echo "Preparing plugin directory."
PLUGINDIR="${cfg.dataDir}/Plex Media Server/Plug-ins"
test -d "$PLUGINDIR" || {
mkdir -p "$PLUGINDIR";
chown ${cfg.user}:${cfg.group} "$PLUGINDIR";
}
echo "Removing old symlinks."
# First, remove all of the symlinks in the directory.
for f in `ls "$PLUGINDIR/"`; do
if [[ -L "$PLUGINDIR/$f" ]]; then
echo "Removing plugin symlink $PLUGINDIR/$f."
rm "$PLUGINDIR/$f"
fi
done
echo "Symlinking plugins."
for path in ${toString cfg.extraPlugins}; do
dest="$PLUGINDIR/$(basename $path)"
if [[ ! -d "$path" ]]; then
echo "Error symlinking plugin from $path: no such directory."
elif [[ -d "$dest" || -L "$dest" ]]; then
echo "Error symlinking plugin from $path to $dest: file or directory already exists."
else
echo "Symlinking plugin at $path..."
ln -s "$path" "$dest"
fi
done
''}
'';

serviceConfig = {
Type = "simple";
User = cfg.user;
Group = cfg.group;
PermissionsStartOnly = "true";
ExecStart = "\"${cfg.package}/usr/lib/plexmediaserver/Plex Media Server\"";

# Run the pre-start script with full permissions (the "!" prefix) so it
# can create the data directory if necessary.
ExecStartPre = let
preStartScript = pkgs.writeScript "plex-run-prestart" ''
#!${pkgs.bash}/bin/bash
# Create data directory if it doesn't exist
if ! test -d "$PLEX_DATADIR"; then
echo "Creating initial Plex data directory in: $PLEX_DATADIR"
install -d -m 0755 -o "${cfg.user}" -g "${cfg.group}" "$PLEX_DATADIR"
fi
'';
in
"!${preStartScript}";

ExecStart = "${cfg.package}/bin/plexmediaserver";
KillSignal = "SIGQUIT";
Restart = "on-failure";
};

environment = {
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=cfg.dataDir;
PLEX_MEDIA_SERVER_HOME="${cfg.package}/usr/lib/plexmediaserver";
# Configuration for our FHS userenv script
PLEX_DATADIR=cfg.dataDir;
PLEX_PLUGINS=concatMapStringsSep ":" builtins.toString cfg.extraPlugins;

# The following variables should be set by the FHS userenv script:
# PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
# PLEX_MEDIA_SERVER_HOME

# Allow access to GPU acceleration; the Plex LD_LIBRARY_PATH is added
# by the FHS userenv script.
LD_LIBRARY_PATH="/run/opengl-driver/lib";

PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6";
PLEX_MEDIA_SERVER_TMPDIR="/tmp";
PLEX_MEDIA_SERVER_USE_SYSLOG="true";
LD_LIBRARY_PATH="/run/opengl-driver/lib:${cfg.package}/usr/lib/plexmediaserver/lib";
LC_ALL="en_US.UTF-8";
LANG="en_US.UTF-8";
};
Loading