diff --git a/lib/default.nix b/lib/default.nix
index fe5d2db0db8f..2dfe62e82a8b 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -66,7 +66,7 @@ let
stringLength sub substring tail trace;
inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor
bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
- importJSON importTOML warn warnIf throwIfNot
+ importJSON importTOML warn warnIf throwIfNot checkListOfEnum
info showWarnings nixpkgsVersion version
mod compare splitByAndCompare functionArgs setFunctionArgs isFunction
toHexString toBaseDigits;
diff --git a/lib/trivial.nix b/lib/trivial.nix
index c961d3aa7301..575aaf6a7ad4 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -347,6 +347,23 @@ rec {
*/
throwIfNot = cond: msg: if cond then x: x else throw msg;
+ /* Check if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.
+
+ Example:
+ let colorVariants = ["bright" "dark" "black"]
+ in checkListOfEnum "color variants" [ "standard" "light" "dark" ] colorVariants;
+ =>
+ error: color variants: bright, black unexpected; valid ones: standard, light, dark
+
+ Type: String -> List ComparableVal -> List ComparableVal -> a -> a
+ */
+ checkListOfEnum = msg: valid: given:
+ let
+ unexpected = lib.subtractLists valid given;
+ in
+ lib.throwIfNot (unexpected == [])
+ "${msg}: ${builtins.concatStringsSep ", " (builtins.map builtins.toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep ", " (builtins.map builtins.toString valid)}";
+
info = msg: builtins.trace "INFO: ${msg}";
showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index 3d7e5b19d6ce..1cfef8254891 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -252,6 +252,13 @@
set autoSubUidGidRange = true.
+
+
+ services.thelounge.private was removed in
+ favor of services.thelounge.public, to
+ follow with upstream changes.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index 52e19c381046..181630263217 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -83,6 +83,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- Normal users (with `isNormalUser = true`) which have non-empty `subUidRanges` or `subGidRanges` set no longer have additional implicit ranges allocated. To enable automatic allocation back set `autoSubUidGidRange = true`.
+- `services.thelounge.private` was removed in favor of `services.thelounge.public`, to follow with upstream changes.
+
## Other Notable Changes {#sec-release-22.05-notable-changes}
- The option [services.redis.servers](#opt-services.redis.servers) was added
diff --git a/nixos/modules/services/networking/thelounge.nix b/nixos/modules/services/networking/thelounge.nix
index 9a366c97fcb6..a5118fd8b339 100644
--- a/nixos/modules/services/networking/thelounge.nix
+++ b/nixos/modules/services/networking/thelounge.nix
@@ -6,7 +6,7 @@ let
cfg = config.services.thelounge;
dataDir = "/var/lib/thelounge";
configJsData = "module.exports = " + builtins.toJSON (
- { private = cfg.private; port = cfg.port; } // cfg.extraConfig
+ { inherit (cfg) public port; } // cfg.extraConfig
);
pluginManifest = {
dependencies = builtins.listToAttrs (builtins.map (pkg: { name = getName pkg; value = getVersion pkg; }) cfg.plugins);
@@ -20,14 +20,17 @@ let
'';
in
{
+ imports = [ (mkRemovedOptionModule [ "services" "thelounge" "private" ] "The option was renamed to `services.thelounge.public` to follow upstream changes.") ];
+
options.services.thelounge = {
enable = mkEnableOption "The Lounge web IRC client";
- private = mkOption {
+ public = mkOption {
type = types.bool;
default = false;
description = ''
- Make your The Lounge instance private. You will need to configure user
+ Make your The Lounge instance public.
+ Setting this to false will require you to configure user
accounts by using the (thelounge) command or by adding
entries in ${dataDir}/users. You might need to restart
The Lounge after making changes to the state directory.
@@ -79,7 +82,9 @@ in
group = "thelounge";
isSystemUser = true;
};
+
users.groups.thelounge = { };
+
systemd.services.thelounge = {
description = "The Lounge web IRC client";
wantedBy = [ "multi-user.target" ];
diff --git a/pkgs/applications/misc/deco/default.nix b/pkgs/applications/misc/deco/default.nix
index 2ea3483f1bac..b19f3f38dac7 100644
--- a/pkgs/applications/misc/deco/default.nix
+++ b/pkgs/applications/misc/deco/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "deco";
- version = "0.0.2";
+ version = "unstable-2019-04-03";
src = fetchFromGitHub {
owner = "ebzzry";
repo = pname;
- rev = "49cded5ad123b0169f47cd0dc0f5420f4b581837";
- sha256 = "19rvqhw0blwga8ck86yy8hj7j1l9hriphlld6yrfd3yip4jprjzz";
+ rev = "dd8ec7905bc85d085eb2ee3bddabea451054288c";
+ sha256 = "sha256-/3GeNvWOCRPOYTUbodXDUxR5QVDEyx6x2Jt5PxsPdvk=";
};
installPhase = ''
diff --git a/pkgs/development/python-modules/dnslib/default.nix b/pkgs/development/python-modules/dnslib/default.nix
index 7e0402999f03..a6dffcdd83e9 100644
--- a/pkgs/development/python-modules/dnslib/default.nix
+++ b/pkgs/development/python-modules/dnslib/default.nix
@@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "dnslib";
- version = "0.9.16";
+ version = "0.9.18";
src = fetchPypi {
inherit pname version;
- sha256 = "2d66b43d563d60c469117c8cb615843e7d05bf8fb2e6cb00a637281d26b7ec7d";
+ sha256 = "71a60664e275b411e08d9807aaafd2ee897a872bed003d5c8fdf12f5818503da";
};
checkPhase = "VERSIONS=${python.interpreter} ./run_tests.sh";
diff --git a/pkgs/development/python-modules/goodwe/default.nix b/pkgs/development/python-modules/goodwe/default.nix
index b940163b089c..07abaab181fc 100644
--- a/pkgs/development/python-modules/goodwe/default.nix
+++ b/pkgs/development/python-modules/goodwe/default.nix
@@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "goodwe";
- version = "0.2.12";
+ version = "0.2.13";
format = "pyproject";
disabled = pythonOlder "3.8";
@@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "marcelblijleven";
repo = pname;
rev = "v${version}";
- sha256 = "153qv1x7yphfpf2nkcbd4fl6i7fjc3j5dvmyr7f59f1cm469sp10";
+ sha256 = "189szff4sl5pc670wv8syl6zcv3p748s33w11biig0vbd59kdr1l";
};
checkInputs = [
diff --git a/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix b/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix
index 747979b1037c..86ff7ff5d219 100644
--- a/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix
+++ b/pkgs/os-specific/linux/alsa-project/alsa-plugins/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "alsa-plugins";
- version = "1.2.5";
+ version = "1.2.6";
src = fetchurl {
url = "mirror://alsa/plugins/${pname}-${version}.tar.bz2";
- sha256 = "086z2g2f95570vfvp9d5bakib4k18fb4bszf3lgx3j6j6f2gkvj2";
+ sha256 = "sha256-BogYpLVdjAKdqgABXYU9RRE/VrIkt8ZOHhF5iMglsqA=";
};
nativeBuildInputs = [ pkg-config ];