Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Mar 10, 2023
2 parents 0fd04a5 + d562454 commit f29c3dc
Show file tree
Hide file tree
Showing 61 changed files with 442 additions and 156 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2305.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- [fzf](https://github.com/junegunn/fzf), a command line fuzzyfinder. Available as [programs.fzf](#opt-programs.fzf.fuzzyCompletion).

- [gemstash](https://github.com/rubygems/gemstash), a RubyGems.org cache and private gem server. Available as [services.gemstash](#opt-services.gemstash.enable).

- [gmediarender](https://github.com/hzeller/gmrender-resurrect), a simple, headless UPnP/DLNA renderer. Available as [services.gmediarender](options.html#opt-services.gmediarender.enable).

- [stevenblack-blocklist](https://github.com/StevenBlack/hosts), A unified hosts file with base extensions for blocking unwanted websites. Available as [networking.stevenblack](options.html#opt-networking.stevenblack.enable).
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@
./services/development/blackfire.nix
./services/development/bloop.nix
./services/development/distccd.nix
./services/development/gemstash.nix
./services/development/hoogle.nix
./services/development/jupyter/default.nix
./services/development/jupyterhub/default.nix
Expand Down
103 changes: 103 additions & 0 deletions nixos/modules/services/development/gemstash.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{ lib, pkgs, config, ... }:
with lib;

let
settingsFormat = pkgs.formats.yaml { };

# gemstash uses a yaml config where the keys are ruby symbols,
# which means they start with ':'. This would be annoying to use
# on the nix side, so we rewrite plain names instead.
prefixColon = s: listToAttrs (map
(attrName: {
name = ":${attrName}";
value =
if isAttrs s.${attrName}
then prefixColon s."${attrName}"
else s."${attrName}";
})
(attrNames s));

# parse the port number out of the tcp://ip:port bind setting string
parseBindPort = bind: strings.toInt (last (strings.splitString ":" bind));

cfg = config.services.gemstash;
in
{
options.services.gemstash = {
enable = mkEnableOption (lib.mdDoc "gemstash service");

openFirewall = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to open the firewall for the port in {option}`services.gemstash.bind`.
'';
};

settings = mkOption {
default = {};
description = lib.mdDoc ''
Configuration for Gemstash. The details can be found at in
[gemstash documentation](https://github.com/rubygems/gemstash/blob/master/man/gemstash-configuration.5.md).
Each key set here is automatically prefixed with ":" to match the gemstash expectations.
'';
type = types.submodule {
freeformType = settingsFormat.type;
options = {
base_path = mkOption {
type = types.path;
default = "/var/lib/gemstash";
description = lib.mdDoc "Path to store the gem files and the sqlite database. If left unchanged, the directory will be created.";
};
bind = mkOption {
type = types.str;
default = "tcp://0.0.0.0:9292";
description = lib.mdDoc "Host and port combination for the server to listen on.";
};
db_adapter = mkOption {
type = types.nullOr (types.enum [ "sqlite3" "postgres" "mysql" "mysql2" ]);
default = null;
description = lib.mdDoc "Which database type to use. For choices other than sqlite3, the dbUrl has to be specified as well.";
};
db_url = mkOption {
type = types.nullOr types.str;
default = null;
description = lib.mdDoc "The database to connect to when using postgres, mysql, or mysql2.";
};
};
};
};
};

config =
mkIf cfg.enable {
users = {
users.gemstash = {
group = "gemstash";
isSystemUser = true;
};
groups.gemstash = { };
};

networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ (parseBindPort cfg.settings.bind) ];

systemd.services.gemstash = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = mkMerge [
{
ExecStart = "${pkgs.gemstash}/bin/gemstash start --no-daemonize --config-file ${settingsFormat.generate "gemstash.yaml" (prefixColon cfg.settings)}";
NoNewPrivileges = true;
User = "gemstash";
Group = "gemstash";
PrivateTmp = true;
RestrictSUIDSGID = true;
LockPersonality = true;
}
(mkIf (cfg.settings.base_path == "/var/lib/gemstash") {
StateDirectory = "gemstash";
})
];
};
};
}
2 changes: 1 addition & 1 deletion nixos/modules/services/monitoring/prometheus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ let
'';

action =
mkDefOpt (types.enum [ "replace" "keep" "drop" "hashmod" "labelmap" "labeldrop" "labelkeep" ]) "replace" ''
mkDefOpt (types.enum [ "replace" "lowercase" "uppercase" "keep" "drop" "hashmod" "labelmap" "labeldrop" "labelkeep" ]) "replace" ''
Action to perform based on regex matching.
'';
};
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ in {
ft2-clone = handleTest ./ft2-clone.nix {};
mimir = handleTest ./mimir.nix {};
garage = handleTest ./garage {};
gemstash = handleTest ./gemstash.nix {};
gerrit = handleTest ./gerrit.nix {};
geth = handleTest ./geth.nix {};
ghostunnel = handleTest ./ghostunnel.nix {};
Expand Down
51 changes: 51 additions & 0 deletions nixos/tests/gemstash.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ system ? builtins.currentSystem, config ? { }
, pkgs ? import ../.. { inherit system config; } }:

with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

let common_meta = { maintainers = [ maintainers.viraptor ]; };
in
{
gemstash_works = makeTest {
name = "gemstash-works";
meta = common_meta;

nodes.machine = { config, pkgs, ... }: {
services.gemstash = {
enable = true;
};
};

# gemstash responds to http requests
testScript = ''
machine.wait_for_unit("gemstash.service")
machine.wait_for_file("/var/lib/gemstash")
machine.wait_for_open_port(9292)
machine.succeed("curl http://localhost:9292")
'';
};

gemstash_custom_port = makeTest {
name = "gemstash-custom-port";
meta = common_meta;

nodes.machine = { config, pkgs, ... }: {
services.gemstash = {
enable = true;
openFirewall = true;
settings = {
bind = "tcp://0.0.0.0:12345";
};
};
};

# gemstash responds to http requests
testScript = ''
machine.wait_for_unit("gemstash.service")
machine.wait_for_file("/var/lib/gemstash")
machine.wait_for_open_port(12345)
machine.succeed("curl http://localhost:12345")
'';
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/misc/ausweisapp2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

mkDerivation rec {
pname = "AusweisApp2";
version = "1.26.2";
version = "1.26.3";

src = fetchFromGitHub {
owner = "Governikus";
repo = "AusweisApp2";
rev = version;
hash = "sha256-jN4xKgdNO+LyDy+ySM13M5YCaijDq8zAxS+x4Io1ThE=";
hash = "sha256-YI9/rMoe5Waw2e/tObvu+wi9dkmhEoG9v3ZQzkn4QH4=";
};

nativeBuildInputs = [ cmake pkg-config ];
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/misc/blender/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ stdenv.mkDerivation rec {
cmakeFlags =
[
"-DWITH_ALEMBIC=ON"
# Blender supplies its own FindAlembic.cmake (incompatible with the Alembic-supplied config file)
"-DALEMBIC_INCLUDE_DIR=${lib.getDev alembic}/include"
"-DALEMBIC_LIBRARY=${lib.getLib alembic}/lib/libAlembic.so"
"-DWITH_MOD_OCEANSIM=ON"
"-DWITH_CODEC_FFMPEG=ON"
"-DWITH_CODEC_SNDFILE=ON"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/brave/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ in

stdenv.mkDerivation rec {
pname = "brave";
version = "1.48.171";
version = "1.49.120";

src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
sha256 = "sha256-3dFOBl+Iomn8NnCYZ2owrTPQlqqj4LFdtnN4IXhbRps=";
sha256 = "sha256-KSu6HaNKc7uVY1rSyzU+VZSE2dbIOOrsUx1RYKnz8yU=";
};

dontConfigure = true;
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/networking/cluster/fluxcd/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ lib, buildGoModule, fetchFromGitHub, fetchzip, installShellFiles, stdenv }:

let
version = "0.40.2";
sha256 = "00rzd9i9dd13wsr2f8y6b7q5zphrfx3bgigfinmzcfdinydv3bm4";
manifestsSha256 = "05bkqkhyb3mgd68w2zr9bav6dfibfzfw65anzkz269wqrkf0d86k";
version = "0.41.0";
sha256 = "1xqgscmzq96jdlvwmckpz2zh7gsdla77xir6a6nylz509wkv3gid";
manifestsSha256 = "03azig0axa6d5yapzr36ziza1jsy549sqnna6ja6xa2zl0ljx33n";

manifests = fetchzip {
url =
Expand All @@ -23,7 +23,7 @@ in buildGoModule rec {
inherit sha256;
};

vendorSha256 = "sha256-crFBOWRjgFIm4mrX3Sf9ovodG5t8hhJUbMr2qpIt7LQ=";
vendorSha256 = "sha256-nQzpJX1B1zXpW27YtzkAYK2vL7rnWPgAtlZlZqdV5QI=";

postUnpack = ''
cp -r ${manifests} source/cmd/flux/manifests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@
"vendorHash": null
},
"aws": {
"hash": "sha256-ouS+0fLs4Zo17ZIqsd7CiYUKQMSNtuwVs3qdZ52qbns=",
"hash": "sha256-dOcsD5yJrn+zpX5F0ImIqD9d+iC228Wem/668RtsQNY=",
"homepage": "https://registry.terraform.io/providers/hashicorp/aws",
"owner": "hashicorp",
"repo": "terraform-provider-aws",
"rev": "v4.57.1",
"rev": "v4.58.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-X4fgw0AJMDDsRuS9MlMu+pnnjxJ33P9QXnpqDXfvfuA="
"vendorHash": "sha256-nNQmiPBkIuQSBGDujMZI+dZMwv6xQcd8+nc1cMKrJws="
},
"azuread": {
"hash": "sha256-MGCGfocs16qmJnvMRRD7TRHnPkS17h+oNUkMARAQhLs=",
Expand Down Expand Up @@ -382,11 +382,11 @@
"vendorHash": "sha256-E1gzdES/YVxQq2J47E2zosvud2C/ViBeQ8+RfNHMBAg="
},
"fastly": {
"hash": "sha256-OODPVNHFW8hnpofWLvzn7qukngB8okZADYI5t9muHpQ=",
"hash": "sha256-XvDsL2N/S7DE+9ks8Y6ZY3hcogzUsiF7VymNK7NnmaI=",
"homepage": "https://registry.terraform.io/providers/fastly/fastly",
"owner": "fastly",
"repo": "terraform-provider-fastly",
"rev": "v3.2.0",
"rev": "v4.0.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
Expand Down Expand Up @@ -467,13 +467,13 @@
"vendorHash": "sha256-fqVBnAivVekV+4tpkl+E6eNA3wi8mhLevJRCs3W7L2g="
},
"grafana": {
"hash": "sha256-4K0Pk7tgnOjFdHpe6SZNSt/wU8OBzdB/y99nibW5bAY=",
"hash": "sha256-b6vmtr2eHm7YNhRHS96+l6BLHYHgixR8Pw7/jK0tRPI=",
"homepage": "https://registry.terraform.io/providers/grafana/grafana",
"owner": "grafana",
"repo": "terraform-provider-grafana",
"rev": "v1.35.0",
"rev": "v1.36.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-oSpAq2834Nt+E8l64YhvuXdfUsoTU5rBr2I8+Yz9tkc="
"vendorHash": "sha256-zPO+TbJsFrgfjSaSrX5YRop/0LDDw/grNNntaIGiBU0="
},
"gridscale": {
"hash": "sha256-ahYCrjrJPEItGyqbHYtgkIH/RzMyxBQkebSAyd8gwYo=",
Expand Down Expand Up @@ -765,13 +765,13 @@
"vendorHash": null
},
"newrelic": {
"hash": "sha256-ReVP0droWSP+NWV0kQznfCllL/jx0uQKmaGr+CyR8iQ=",
"hash": "sha256-bf4t4xcA/K4atLyDVzkeLw5zm9sBz/dUBiivVaz4hNU=",
"homepage": "https://registry.terraform.io/providers/newrelic/newrelic",
"owner": "newrelic",
"repo": "terraform-provider-newrelic",
"rev": "v3.15.0",
"rev": "v3.16.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-aFjsUhdGboN8Hfu2ky6djG0hC/Z9MU2tOWDFXekOGNQ="
"vendorHash": "sha256-yF2yk85RLbvmULakODOV2V0Z9dzKfLClUSZTnECdO3o="
},
"nomad": {
"hash": "sha256-oHY+jM4JQgLlE1wd+/H9H8H2g0e9ZuxI6OMlz3Izfjg=",
Expand Down Expand Up @@ -856,11 +856,11 @@
"vendorHash": "sha256-aoJDRzackPjWxkrsQclweUFH3Bqdcj1aTJuTHZ7Dh7g="
},
"opentelekomcloud": {
"hash": "sha256-UIpzv5Tas5jxpaqg1n0KRoJhYj6vRE6DBQ2u701xgzU=",
"hash": "sha256-fkEQ4VWGJiPFTA6Wz8AxAiL4DOW+Kewl8T9ywy/yPME=",
"homepage": "https://registry.terraform.io/providers/opentelekomcloud/opentelekomcloud",
"owner": "opentelekomcloud",
"repo": "terraform-provider-opentelekomcloud",
"rev": "v1.33.1",
"rev": "v1.33.2",
"spdx": "MPL-2.0",
"vendorHash": "sha256-EbUHKM6fKEZk1ey4qTgAd/20OKJu0DoBF0MAOxB7y64="
},
Expand All @@ -883,11 +883,11 @@
"vendorHash": null
},
"pagerduty": {
"hash": "sha256-uicfk05Y8p4jQLG+Z8Cd2kI8rToI++13lsg0JUsm7Ew=",
"hash": "sha256-9aIYGmcbDgSZqtldLBMRjD0qKJZ3USuwNBpK3bvGrFY=",
"homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty",
"owner": "PagerDuty",
"repo": "terraform-provider-pagerduty",
"rev": "v2.11.0",
"rev": "v2.11.1",
"spdx": "MPL-2.0",
"vendorHash": null
},
Expand Down Expand Up @@ -1045,11 +1045,11 @@
"vendorHash": "sha256-NO1r/EWLgH1Gogru+qPeZ4sW7FuDENxzNnpLSKstnE8="
},
"spotinst": {
"hash": "sha256-OroABl6G5nCatoyPxHZkM9I7qidxwMlgFjWC9Ljshik=",
"hash": "sha256-a/WXuEIvFsbYGoIDT0vHNM1LoFs7VlqmGXHDszON/rU=",
"homepage": "https://registry.terraform.io/providers/spotinst/spotinst",
"owner": "spotinst",
"repo": "terraform-provider-spotinst",
"rev": "v1.104.0",
"rev": "v1.105.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-juso8uzTjqf/vxUmpiv/07WkqMJRS1CqHQhu6pHf7QY="
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ callPackage }: builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; })) {
signal-desktop = {
dir = "Signal";
version = "6.5.1";
hash = "sha256-At4ILl6nHltP1TMI5cjK7gE4NENAccS4MPMHXJoGveM=";
version = "6.7.0";
hash = "sha256-njiVPTkzYdt7QZcpohXUI3hj/o+fO4/O0ZlQrq2oP6Y=";
};
signal-desktop-beta = {
dir = "Signal Beta";
version = "6.6.0-beta.1";
hash = "sha256-txSvMg7Q+r9UWJMC9Rj2XQ8y1WN3xphMruvOZok/VPk=";
version = "6.8.0-beta.1";
hash = "sha256-akQmGxDW6SBQCRLU6TgfODP8ZjEPsvaBvrkdd+6DqKs=";
};
}
6 changes: 3 additions & 3 deletions pkgs/applications/networking/syncthing/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ let
common = { stname, target, postInstall ? "" }:
buildGoModule rec {
pname = stname;
version = "1.23.1";
version = "1.23.2";

src = fetchFromGitHub {
owner = "syncthing";
repo = "syncthing";
rev = "v${version}";
hash = "sha256-Jbg56Nn+5ZjIv1KZrThkqWY+P13MglLE78E6jc0rbY0=";
hash = "sha256-EowUQYfSznTuAHV7OIesFPM99zRmeKkzYNp7VANtR2U=";
};

vendorHash = "sha256-q63iaRxJRvPY0Np20O6JmdMEjSg/kxRneBfs8fRTwXk=";
vendorHash = "sha256-5NgflkRXkbWiIkASmxIgWliE8sF89HtlMtlIF+5u6Ic=";

doCheck = false;

Expand Down
Loading

0 comments on commit f29c3dc

Please sign in to comment.