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: 3bd7a3b3b960
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: 2d6f84c1090a
Choose a head ref

Commits on Jan 24, 2019

  1. libLAS: fix build

    lsix committed Jan 24, 2019
    Copy the full SHA
    12ab4c3 View commit details
  2. qgis: 2.18.22 -> 2.18.28

    lsix committed Jan 24, 2019
    Copy the full SHA
    76b1610 View commit details

Commits on Jan 28, 2019

  1. Copy the full SHA
    da0fbf4 View commit details
  2. Copy the full SHA
    efb1b47 View commit details

Commits on Feb 1, 2019

  1. nixos/redmine: add an extraEnv option (which could be used to turn on…

    … debug logging, etc...), enable automatic log rotation
    aanderse committed Feb 1, 2019
    Copy the full SHA
    52bd7c5 View commit details
  2. Copy the full SHA
    0d17ecc View commit details
  3. Revert "coq-modules: add default to fix eval"

    This reverts commit e20b651.
    vbgl committed Feb 1, 2019
    Copy the full SHA
    59949aa View commit details

Commits on Feb 2, 2019

  1. minecraft-server: 1.12.2 -> 1.13.2

    Update minecraft client to 1.13.2. The url is not as nice as before
    but it is the one provided by mojang. Adds 1_13_2, 1_13_1 as well.
    
    https://minecraft.net/en-us/download/server
    costrouc committed Feb 2, 2019
    Copy the full SHA
    9080b2e View commit details

Commits on Feb 3, 2019

  1. nixos/mincraft-server: refactor

     - allow for options to (added 2 options):
       - agree to eula (eula.txt) true/false will create symlink over
         existing eula.txt to `/nix/store/...`.
       - whitelist users (optional and will symlink over existing
         whitelist.json and create backup)
       - server.properties can be configured with the serverProperties
         option. If there is an existing server.properties it will
         copy it to a server.properties.old to keep the old
         one. server.properties MUST be writable thus symlinking is not
         an option.
      - all ports that are stated in `server.properties` are exposed
        properly in the firewall.
    
    (infinisil) nixos/minecraft-server: Fix, refactor and polish
    
    Adds an option `declarative` (defaulted to false), in order to stay
    (mostly) backwards compatible. The only thing that's not backwards
    compatible is that you now need to agree to the EULA on evaluation time,
    but that's guarded by an assertion and therefore doesn't need a release
    note.
    costrouc authored and infinisil committed Feb 3, 2019
    Copy the full SHA
    58c89ec View commit details
  2. nixos/tests: add ndppd test

    fpletz authored and elseym committed Feb 3, 2019
    Copy the full SHA
    f1b91b5 View commit details
  3. ndppd module: refactor

    elseym committed Feb 3, 2019
    Copy the full SHA
    4ce1c59 View commit details
  4. Copy the full SHA
    2746973 View commit details
  5. nixos/ndppd: register test

    Ma27 committed Feb 3, 2019
    Copy the full SHA
    a29294c View commit details

Commits on Feb 4, 2019

  1. star: 2.6.1d -> 2.7.0a

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/star/versions
    r-ryantm committed Feb 4, 2019
    Copy the full SHA
    e27eaf6 View commit details
  2. primesieve: init at 7.3

    guibou committed Feb 4, 2019
    Copy the full SHA
    9f0ee6c View commit details
  3. haskellPackages.primesieve: fix build

    Temporaries changes in `configuration-common.nix` to fix the cabal
    file which does not specify that the haskell library depends on the
    C++ shared library. Pull request had been sent upstream.
    guibou committed Feb 4, 2019
    Copy the full SHA
    3652cfe View commit details
  4. Merge pull request #55196 from guibou/primesieve

    Introduce the primesieve package
    peti authored Feb 4, 2019
    Copy the full SHA
    790e14c View commit details
  5. make-derivation: only modify name when name is given

    This preserves Nix’s native error handling of missing name:
    
      error: derivation name missing
    matthewbauer committed Feb 4, 2019
    Copy the full SHA
    c6f8f8d View commit details
  6. Merge pull request #55053 from vbgl/mkderivation-lazy-name

    mkDerivation: cleaner handling of the `name` argument
    matthewbauer authored Feb 4, 2019
    Copy the full SHA
    2c31b95 View commit details
  7. Merge pull request #55050 from aanderse/redmine-extra-env

    nixos/redmine: add an extraEnv option, enable automatic log rotation
    7c6f434c authored Feb 4, 2019
    Copy the full SHA
    7ff8a16 View commit details
  8. LTS Haskell 13.6

    peti committed Feb 4, 2019
    Copy the full SHA
    c736980 View commit details
  9. hackage-packages.nix: automatic Haskell package set update

    This update was generated by hackage2nix v2.14.1 from Hackage revision
    commercialhaskell/all-cabal-hashes@6098061.
    peti committed Feb 4, 2019
    Copy the full SHA
    0f68f39 View commit details
  10. Copy the full SHA
    aa4af45 View commit details
  11. verilator: 4.008 -> 4.010

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/verilator/versions
    r-ryantm authored and thoughtpolice committed Feb 4, 2019
    Copy the full SHA
    b015c68 View commit details
  12. nixos/nextcloud: use matching nginx package when configuring nginx

    NixOS currently defaults services.nginx.package to
    nginxStable. Including configuration files from nginxMainline could
    potentially cause incompatible configuration.
    thefloweringash committed Feb 4, 2019
    Copy the full SHA
    a7d9dca View commit details
  13. python37Packages.rasterio: 1.0.13 -> 1.0.15

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/python3.7-rasterio/versions
    r-ryantm authored and worldofpeace committed Feb 4, 2019
    Copy the full SHA
    8dda7e9 View commit details
  14. Merge pull request #54554 from lsix/qgis_2_18_28

     qgis: 2.18.22 -> 2.18.28
    lsix authored Feb 4, 2019
    Copy the full SHA
    73ad11d View commit details
  15. vimPlugins: Update

    rvolosatovs committed Feb 4, 2019
    Copy the full SHA
    23319c6 View commit details
  16. Copy the full SHA
    722af38 View commit details
  17. Merge pull request #55122 from elseym/ndppd-module

    ndppd module: refactor and fix
    Ma27 authored Feb 4, 2019
    Copy the full SHA
    5a3a543 View commit details
  18. Merge pull request #54752 from eadwu/bcachefs/20190123

    linux_testing_bcachefs,bcachefs-tools: 20190123
    dywedir authored Feb 4, 2019
    Copy the full SHA
    8626808 View commit details
  19. Copy the full SHA
    9edc2d4 View commit details
  20. Copy the full SHA
    8cec070 View commit details
  21. Merge pull request #55152 from r-ryantm/auto-update/star

    star: 2.6.1d -> 2.7.0a
    markuskowa authored Feb 4, 2019
    Copy the full SHA
    5c7edec View commit details
  22. Copy the full SHA
    7a8b65d View commit details
  23. notejot: 1.5.3 -> 1.5.4

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/notejot/versions
    r-ryantm authored and worldofpeace committed Feb 4, 2019
    Copy the full SHA
    b934770 View commit details
  24. gnome3.orca: 3.30.1 -> 3.30.2

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/orca/versions
    r-ryantm authored and worldofpeace committed Feb 4, 2019
    Copy the full SHA
    091de08 View commit details
  25. Merge pull request #53875 from rvolosatovs/update/vim-plugins

    vimPlugins: Update
    Mic92 authored Feb 4, 2019
    Copy the full SHA
    c4daffb View commit details
  26. Merge pull request #55222 from thefloweringash/nextcloud-nginx-config

    nixos/nextcloud: use matching nginx package when configuring nginx
    Ma27 authored Feb 4, 2019
    Copy the full SHA
    ae7e8c6 View commit details
  27. pythia: 8.235 -> 8.240

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/pythia/versions
    r-ryantm authored and veprbl committed Feb 4, 2019
    Copy the full SHA
    904e9ab View commit details

Commits on Feb 5, 2019

  1. Merge pull request #45412 from costrouc/costrouc/minecraft-server

    minecraft-server: 1.12.2 -> 1.13.2 + service refactor
    infinisil authored Feb 5, 2019
    Copy the full SHA
    2d6f84c View commit details
Showing with 1,174 additions and 916 deletions.
  1. +8 −0 nixos/doc/manual/release-notes/rl-1903.xml
  2. +181 −20 nixos/modules/services/games/minecraft-server.nix
  3. +23 −0 nixos/modules/services/misc/redmine.nix
  4. +145 −25 nixos/modules/services/networking/ndppd.nix
  5. +1 −1 nixos/modules/services/web-apps/nextcloud.nix
  6. +1 −0 nixos/tests/all-tests.nix
  7. +61 −0 nixos/tests/ndppd.nix
  8. +6 −5 pkgs/applications/gis/qgis/default.nix
  9. +2 −2 pkgs/applications/misc/notejot/default.nix
  10. +2 −2 pkgs/applications/misc/orca/default.nix
  11. +2 −12 pkgs/applications/networking/ndppd/default.nix
  12. +2 −2 pkgs/applications/science/biology/star/default.nix
  13. +2 −2 pkgs/applications/science/electronics/verilator/default.nix
  14. +2 −2 pkgs/data/misc/hackage/default.nix
  15. +1 −1 pkgs/development/coq-modules/QuickChick/default.nix
  16. +1 −1 pkgs/development/coq-modules/Velisarios/default.nix
  17. +1 −1 pkgs/development/coq-modules/category-theory/default.nix
  18. +1 −1 pkgs/development/coq-modules/coq-haskell/default.nix
  19. +1 −1 pkgs/development/coq-modules/coqprime/default.nix
  20. +1 −1 pkgs/development/coq-modules/dpdgraph/default.nix
  21. +1 −1 pkgs/development/coq-modules/equations/default.nix
  22. +7 −0 pkgs/development/haskell-modules/configuration-common.nix
  23. +25 −25 pkgs/development/haskell-modules/configuration-hackage2nix.yaml
  24. +356 −646 pkgs/development/haskell-modules/hackage-packages.nix
  25. +1 −0 pkgs/development/libraries/libLAS/default.nix
  26. +2 −2 pkgs/development/libraries/physics/pythia/default.nix
  27. +21 −0 pkgs/development/libraries/science/math/primesieve/default.nix
  28. +10 −2 pkgs/development/mobile/titaniumenv/build-app.nix
  29. +1 −0 pkgs/development/mobile/titaniumenv/default.nix
  30. +102 −0 pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix
  31. +14 −6 pkgs/development/mobile/xcodeenv/build-app.nix
  32. +2 −1 pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
  33. +2 −2 pkgs/development/python-modules/rasterio/default.nix
  34. +53 −27 pkgs/games/minecraft-server/default.nix
  35. +110 −110 pkgs/misc/vim-plugins/generated.nix
  36. +4 −4 pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
  37. +6 −6 pkgs/stdenv/generic/make-derivation.nix
  38. +4 −4 pkgs/tools/filesystems/bcachefs-tools/default.nix
  39. +9 −1 pkgs/top-level/all-packages.nix
8 changes: 8 additions & 0 deletions nixos/doc/manual/release-notes/rl-1903.xml
Original file line number Diff line number Diff line change
@@ -476,6 +476,14 @@
</para>
</note>
</listitem>
<listitem>
<para>
The <link xlink:href="https://github.com/DanielAdolfsson/ndppd"><literal>ndppd</literal></link> module
now supports <link linkend="opt-services.ndppd.enable">all config options</link> provided by the current
upstream version as service options. Additionally the <literal>ndppd</literal> package doesn't contain
the systemd unit configuration from upstream anymore, the unit is completely configured by the NixOS module now.
</para>
</listitem>
</itemizedlist>
</section>
</section>
201 changes: 181 additions & 20 deletions nixos/modules/services/games/minecraft-server.nix
Original file line number Diff line number Diff line change
@@ -4,49 +4,167 @@ with lib;

let
cfg = config.services.minecraft-server;
in
{

# We don't allow eula=false anyways
eulaFile = builtins.toFile "eula.txt" ''
# eula.txt managed by NixOS Configuration
eula=true
'';

whitelistFile = pkgs.writeText "whitelist.json"
(builtins.toJSON
(mapAttrsToList (n: v: { name = n; uuid = v; }) cfg.whitelist));

cfgToString = v: if builtins.isBool v then boolToString v else toString v;

serverPropertiesFile = pkgs.writeText "server.properties" (''
# server.properties managed by NixOS configuration
'' + concatStringsSep "\n" (mapAttrsToList
(n: v: "${n}=${cfgToString v}") cfg.serverProperties));


# To be able to open the firewall, we need to read out port values in the
# server properties, but fall back to the defaults when those don't exist.
# These defaults are from https://minecraft.gamepedia.com/Server.properties#Java_Edition_3
defaultServerPort = 25565;

serverPort = cfg.serverProperties.server-port or defaultServerPort;

rconPort = if cfg.serverProperties.enable-rcon or false
then cfg.serverProperties."rcon.port" or 25575
else null;

queryPort = if cfg.serverProperties.enable-query or false
then cfg.serverProperties."query.port" or 25565
else null;

in {
options = {
services.minecraft-server = {

enable = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, start a Minecraft Server. The listening port for
the server is always <literal>25565</literal>. The server
If enabled, start a Minecraft Server. The server
data will be loaded from and saved to
<literal>${cfg.dataDir}</literal>.
<option>services.minecraft-server.dataDir</option>.
'';
};

declarative = mkOption {
type = types.bool;
default = false;
description = ''
Whether to use a declarative Minecraft server configuration.
Only if set to <literal>true</literal>, the options
<option>services.minecraft-server.whitelist</option> and
<option>services.minecraft-server.serverProperties</option> will be
applied.
'';
};

eula = mkOption {
type = types.bool;
default = false;
description = ''
Whether you agree to
<link xlink:href="https://account.mojang.com/documents/minecraft_eula">
Mojangs EULA</link>. This option must be set to
<literal>true</literal> to run Minecraft server.
'';
};

dataDir = mkOption {
type = types.path;
default = "/var/lib/minecraft";
description = ''
Directory to store minecraft database and other state/data files.
Directory to store Minecraft database and other state/data files.
'';
};

openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Whether to open ports in the firewall (if enabled) for the server.
Whether to open ports in the firewall for the server.
'';
};

whitelist = mkOption {
type = let
minecraftUUID = types.strMatching
"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" // {
description = "Minecraft UUID";
};
in types.attrsOf minecraftUUID;
default = {};
description = ''
Whitelisted players, only has an effect when
<option>services.minecraft-server.declarative</option> is
<literal>true</literal> and the whitelist is enabled
via <option>services.minecraft-server.serverProperties</option> by
setting <literal>white-list</literal> to <literal>true</literal>.
This is a mapping from Minecraft usernames to UUIDs.
You can use <link xlink:href="https://mcuuid.net/"/> to get a
Minecraft UUID for a username.
'';
example = literalExample ''
{
username1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy";
};
'';
};

serverProperties = mkOption {
type = with types; attrsOf (either bool (either int str));
default = {};
example = literalExample ''
{
server-port = 43000;
difficulty = 3;
gamemode = 1;
max-players = 5;
motd = "NixOS Minecraft server!";
white-list = true;
enable-rcon = true;
"rcon.password" = "hunter2";
}
'';
description = ''
Minecraft server properties for the server.properties file. Only has
an effect when <option>services.minecraft-server.declarative</option>
is set to <literal>true</literal>. See
<link xlink:href="https://minecraft.gamepedia.com/Server.properties#Java_Edition_3"/>
for documentation on these values.
'';
};

package = mkOption {
type = types.package;
default = pkgs.minecraft-server;
defaultText = "pkgs.minecraft-server";
example = literalExample "pkgs.minecraft-server_1_12_2";
description = "Version of minecraft-server to run.";
};

jvmOpts = mkOption {
type = types.str;
type = types.separatedString " ";
default = "-Xmx2048M -Xms2048M";
description = "JVM options for the Minecraft Service.";
# Example options from https://minecraft.gamepedia.com/Tutorials/Server_startup_script
example = "-Xmx2048M -Xms4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing "
+ "-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 "
+ "-XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10";
description = "JVM options for the Minecraft server.";
};
};
};

config = mkIf cfg.enable {

users.users.minecraft = {
description = "Minecraft Server Service user";
description = "Minecraft server service user";
home = cfg.dataDir;
createHome = true;
uid = config.ids.uids.minecraft;
@@ -57,17 +175,60 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];

serviceConfig.Restart = "always";
serviceConfig.User = "minecraft";
script = ''
cd ${cfg.dataDir}
exec ${pkgs.minecraft-server}/bin/minecraft-server ${cfg.jvmOpts}
'';
};
serviceConfig = {
ExecStart = "${cfg.package}/bin/minecraft-server ${cfg.jvmOpts}";
Restart = "always";
User = "minecraft";
WorkingDirectory = cfg.dataDir;
};

preStart = ''
ln -sf ${eulaFile} eula.txt
'' + (if cfg.declarative then ''
if [ -e .declarative ]; then
# Was declarative before, no need to back up anything
ln -sf ${whitelistFile} whitelist.json
cp -f ${serverPropertiesFile} server.properties
else
networking.firewall = mkIf cfg.openFirewall {
allowedUDPPorts = [ 25565 ];
allowedTCPPorts = [ 25565 ];
# Declarative for the first time, backup stateful files
ln -sb --suffix=.stateful ${whitelistFile} whitelist.json
cp -b --suffix=.stateful ${serverPropertiesFile} server.properties
# server.properties must have write permissions, because every time
# the server starts it first parses the file and then regenerates it..
chmod +w server.properties
echo "Autogenerated file that signifies that this server configuration is managed declaratively by NixOS" \
> .declarative
fi
'' else ''
if [ -e .declarative ]; then
rm .declarative
fi
'');
};

networking.firewall = mkIf cfg.openFirewall (if cfg.declarative then {
allowedUDPPorts = [ serverPort ];
allowedTCPPorts = [ serverPort ]
++ optional (! isNull queryPort) queryPort
++ optional (! isNull rconPort) rconPort;
} else {
allowedUDPPorts = [ defaultServerPort ];
allowedTCPPorts = [ defaultServerPort ];
});

assertions = [
{ assertion = cfg.eula;
message = "You must agree to Mojangs EULA to run minecraft-server."
+ " Read https://account.mojang.com/documents/minecraft_eula and"
+ " set `services.minecraft-server.eula` to `true` if you agree.";
}
];

};
}
23 changes: 23 additions & 0 deletions nixos/modules/services/misc/redmine.nix
Original file line number Diff line number Diff line change
@@ -30,6 +30,13 @@ let
${cfg.extraConfig}
'';

additionalEnvironment = pkgs.writeText "additional_environment.rb" ''
config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
config.logger.level = Logger::INFO
${cfg.extraEnv}
'';

unpackTheme = unpack "theme";
unpackPlugin = unpack "plugin";
unpack = id: (name: source:
@@ -103,6 +110,19 @@ in
'';
};

extraEnv = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration in additional_environment.rb.
See https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example
'';
example = literalExample ''
config.logger.level = Logger::DEBUG
'';
};

themes = mkOption {
type = types.attrsOf types.path;
default = {};
@@ -249,6 +269,9 @@ in
# link in the application configuration
ln -fs ${configurationYml} "${cfg.stateDir}/config/configuration.yml"
# link in the additional environment configuration
ln -fs ${additionalEnvironment} "${cfg.stateDir}/config/additional_environment.rb"
# link in all user specified themes
rm -rf "${cfg.stateDir}/public/themes/"*
Loading