Merge master into staging-next

authored by

github-actions[bot] and committed by
GitHub
1b82d09a f620e30c

+189 -23
+1
nixos/modules/module-list.nix
··· 366 ./services/games/minecraft-server.nix 367 ./services/games/minetest-server.nix 368 ./services/games/openarena.nix 369 ./services/games/teeworlds.nix 370 ./services/games/terraria.nix 371 ./services/hardware/acpid.nix
··· 366 ./services/games/minecraft-server.nix 367 ./services/games/minetest-server.nix 368 ./services/games/openarena.nix 369 + ./services/games/quake3-server.nix 370 ./services/games/teeworlds.nix 371 ./services/games/terraria.nix 372 ./services/hardware/acpid.nix
+111
nixos/modules/services/games/quake3-server.nix
···
··· 1 + { config, pkgs, lib, ... }: 2 + with lib; 3 + 4 + let 5 + cfg = config.services.quake3-server; 6 + configFile = pkgs.writeText "q3ds-extra.cfg" '' 7 + set net_port ${builtins.toString cfg.port} 8 + 9 + ${cfg.extraConfig} 10 + ''; 11 + defaultBaseq3 = pkgs.requireFile rec { 12 + name = "baseq3"; 13 + hashMode = "recursive"; 14 + sha256 = "5dd8ee09eabd45e80450f31d7a8b69b846f59738726929298d8a813ce5725ed3"; 15 + message = '' 16 + Unfortunately, we cannot download ${name} automatically. 17 + Please purchase a legitimate copy of Quake 3 and change into the installation directory. 18 + 19 + You can either add all relevant files to the nix-store like this: 20 + mkdir /tmp/baseq3 21 + cp baseq3/pak*.pk3 /tmp/baseq3 22 + nix-store --add-fixed sha256 --recursive /tmp/baseq3 23 + 24 + Alternatively you can set services.quake3-server.baseq3 to a path and copy the baseq3 directory into 25 + $services.quake3-server.baseq3/.q3a/ 26 + ''; 27 + }; 28 + home = pkgs.runCommand "quake3-home" {} '' 29 + mkdir -p $out/.q3a/baseq3 30 + 31 + for file in ${cfg.baseq3}/*; do 32 + ln -s $file $out/.q3a/baseq3/$(basename $file) 33 + done 34 + 35 + ln -s ${configFile} $out/.q3a/baseq3/nix.cfg 36 + ''; 37 + in { 38 + options = { 39 + services.quake3-server = { 40 + enable = mkEnableOption "Quake 3 dedicated server"; 41 + 42 + port = mkOption { 43 + type = types.port; 44 + default = 27960; 45 + description = '' 46 + UDP Port the server should listen on. 47 + ''; 48 + }; 49 + 50 + openFirewall = mkOption { 51 + type = types.bool; 52 + default = false; 53 + description = '' 54 + Open the firewall. 55 + ''; 56 + }; 57 + 58 + extraConfig = mkOption { 59 + type = types.lines; 60 + default = ""; 61 + example = '' 62 + seta rconPassword "superSecret" // sets RCON password for remote console 63 + seta sv_hostname "My Quake 3 server" // name that appears in server list 64 + ''; 65 + description = '' 66 + Extra configuration options. Note that options changed via RCON will not be persisted. To list all possible 67 + options, use "cvarlist 1" via RCON. 68 + ''; 69 + }; 70 + 71 + baseq3 = mkOption { 72 + type = types.either types.package types.path; 73 + default = defaultBaseq3; 74 + example = "/var/lib/q3ds"; 75 + description = '' 76 + Path to the baseq3 files (pak*.pk3). If this is on the nix store (type = package) all .pk3 files should be saved 77 + in the top-level directory. If this is on another filesystem (e.g /var/lib/baseq3) the .pk3 files are searched in 78 + $baseq3/.q3a/baseq3/ 79 + ''; 80 + }; 81 + }; 82 + }; 83 + 84 + config = let 85 + baseq3InStore = builtins.typeOf cfg.baseq3 == "set"; 86 + in mkIf cfg.enable { 87 + networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall [ cfg.port ]; 88 + 89 + systemd.services.q3ds = { 90 + description = "Quake 3 dedicated server"; 91 + wantedBy = [ "multi-user.target" ]; 92 + after = [ "networking.target" ]; 93 + 94 + environment.HOME = if baseq3InStore then home else cfg.baseq3; 95 + 96 + serviceConfig = with lib; { 97 + Restart = "always"; 98 + DynamicUser = true; 99 + WorkingDirectory = home; 100 + 101 + # It is possible to alter configuration files via RCON. To ensure reproducibility we have to prevent this 102 + ReadOnlyPaths = if baseq3InStore then home else cfg.baseq3; 103 + ExecStartPre = optionalString (!baseq3InStore) "+${pkgs.coreutils}/bin/cp ${configFile} ${cfg.baseq3}/.q3a/baseq3/nix.cfg"; 104 + 105 + ExecStart = "${pkgs.ioquake3}/ioq3ded.x86_64 +exec nix.cfg"; 106 + }; 107 + }; 108 + }; 109 + 110 + meta.maintainers = with maintainers; [ f4814n ]; 111 + }
+9 -11
nixos/modules/services/misc/home-assistant.nix
··· 50 # List of components used in config 51 extraComponents = filter useComponent availableComponents; 52 53 - testedPackage = if (cfg.autoExtraComponents && cfg.config != null) 54 then (cfg.package.override { inherit extraComponents; }) 55 else cfg.package; 56 - 57 - # overridePythonAttrs has to be applied after override 58 - package = testedPackage.overridePythonAttrs (oldAttrs: { 59 - doCheck = false; 60 - }); 61 62 # If you are changing this, please update the description in applyDefaultConfig 63 defaultConfig = { ··· 188 }; 189 190 package = mkOption { 191 - default = pkgs.home-assistant; 192 defaultText = literalExample '' 193 - pkgs.home-assistant 194 ''; 195 type = types.package; 196 example = literalExample '' ··· 199 } 200 ''; 201 description = '' 202 - Home Assistant package to use. Tests are automatically disabled, as they take a considerable amout of time to complete. 203 Override <literal>extraPackages</literal> or <literal>extraComponents</literal> in order to add additional dependencies. 204 If you specify <option>config</option> and do not set <option>autoExtraComponents</option> 205 to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect. 206 - Avoid <literal>home-assistant.overridePythonAttrs</literal> if you use 207 - <literal>autoExtraComponents</literal>. 208 ''; 209 }; 210
··· 50 # List of components used in config 51 extraComponents = filter useComponent availableComponents; 52 53 + package = if (cfg.autoExtraComponents && cfg.config != null) 54 then (cfg.package.override { inherit extraComponents; }) 55 else cfg.package; 56 57 # If you are changing this, please update the description in applyDefaultConfig 58 defaultConfig = { ··· 183 }; 184 185 package = mkOption { 186 + default = pkgs.home-assistant.overrideAttrs (oldAttrs: { 187 + doInstallCheck = false; 188 + }); 189 defaultText = literalExample '' 190 + pkgs.home-assistant.overrideAttrs (oldAttrs: { 191 + doInstallCheck = false; 192 + }) 193 ''; 194 type = types.package; 195 example = literalExample '' ··· 198 } 199 ''; 200 description = '' 201 + Home Assistant package to use. By default the tests are disabled, as they take a considerable amout of time to complete. 202 Override <literal>extraPackages</literal> or <literal>extraComponents</literal> in order to add additional dependencies. 203 If you specify <option>config</option> and do not set <option>autoExtraComponents</option> 204 to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect. 205 + Avoid <literal>home-assistant.overridePythonAttrs</literal> if you use <literal>autoExtraComponents</literal>. 206 ''; 207 }; 208
+66 -10
pkgs/applications/misc/with-shell/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub }: 2 - stdenv.mkDerivation { 3 - name = "with-2016-08-20"; 4 src = fetchFromGitHub { 5 owner = "mchav"; 6 repo = "With"; 7 - rev = "cc2828bddd92297147d4365765f4ef36385f050a"; 8 - sha256 = "10m2xv6icrdp6lfprw3a9hsrzb3bip19ipkbmscap0niddqgcl9b"; 9 }; 10 installPhase = '' 11 - mkdir -p $out/bin 12 - cp with $out/bin/with 13 ''; 14 - meta = { 15 homepage = "https://github.com/mchav/With"; 16 description = "Command prefixing for continuous workflow using a single tool"; 17 - license = lib.licenses.asl20; 18 - platforms = lib.platforms.unix; 19 }; 20 }
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , installShellFiles 5 + }: 6 + 7 + stdenv.mkDerivation rec { 8 + pname = "with"; 9 + version = "unstable-2018-03-20"; 10 + 11 src = fetchFromGitHub { 12 owner = "mchav"; 13 repo = "With"; 14 + rev = "28eb40bbc08d171daabf0210f420477ad75e16d6"; 15 + hash = "sha256-mKHsLHs9/I+NUdb1t9wZWkPxXcsBlVWSj8fgZckXFXk="; 16 }; 17 + 18 + nativeBuildInputs = [ installShellFiles ]; 19 + 20 installPhase = '' 21 + runHook preInstall 22 + install -D with $out/bin/with 23 + installShellCompletion --bash --name with.bash with.bash-completion 24 + runHook postInstall 25 ''; 26 + 27 + meta = with lib; { 28 homepage = "https://github.com/mchav/With"; 29 description = "Command prefixing for continuous workflow using a single tool"; 30 + longDescription = '' 31 + with is a Bash script that starts an interactive shell with where every 32 + command is prefixed using <program>. 33 + 34 + For example: 35 + 36 + $ with git 37 + git> add . 38 + git> commit -a -m "Commited" 39 + git> push 40 + 41 + Can also be used for compound commands. 42 + 43 + $ with java Primes 44 + java Primes> 1 45 + 2 46 + java Primes> 4 47 + 7 48 + 49 + And to repeat commands: 50 + 51 + $ with gcc -o output input.c 52 + gcc -o -output input.c> 53 + <enter> 54 + Compiling... 55 + gcc -o -output input.c> 56 + 57 + To execute a shell command proper prefix line with :. 58 + 59 + git> :ls 60 + 61 + You can also drop, add, and replace different commands. 62 + 63 + git> +add 64 + git add> <some file> 65 + git add> !commit 66 + git commit> <arguments and message> 67 + git commit> - 68 + git> 69 + 70 + To exit use either :q or :exit. 71 + ''; 72 + license = licenses.asl20; 73 + maintainers = with maintainers; [ AndersonTorres ]; 74 + platforms = platforms.unix; 75 }; 76 }
+2 -2
pkgs/applications/virtualization/podman/default.nix
··· 16 17 buildGoModule rec { 18 pname = "podman"; 19 - version = "3.1.0"; 20 21 src = fetchFromGitHub { 22 owner = "containers"; 23 repo = "podman"; 24 rev = "v${version}"; 25 - sha256 = "sha256-Cql9ikk0lo/LeWNykEJSKgfGnBSUU5vOh/zUIEvMapk="; 26 }; 27 28 patches = [
··· 16 17 buildGoModule rec { 18 pname = "podman"; 19 + version = "3.1.1"; 20 21 src = fetchFromGitHub { 22 owner = "containers"; 23 repo = "podman"; 24 rev = "v${version}"; 25 + sha256 = "1ihpz50c50frw9nrjp0vna2lg50kwlar6y6vr4s5sjiwza1qv2d2"; 26 }; 27 28 patches = [