···103 pathContent = lib.attrByPath prefix null pkgs;
104 in
105 if pathContent == null then
106- builtins.throw "Attribute path `${path}` does not exists."
107 else
108 packagesWithPath prefix (path: pkg: builtins.hasAttr "updateScript" pkg)
109 pathContent;
···115 package = lib.attrByPath (lib.splitString "." path) null pkgs;
116 in
117 if package == null then
118- builtins.throw "Package with an attribute name `${path}` does not exists."
119 else if ! builtins.hasAttr "updateScript" package then
120 builtins.throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
121 else
···103 pathContent = lib.attrByPath prefix null pkgs;
104 in
105 if pathContent == null then
106+ builtins.throw "Attribute path `${path}` does not exist."
107 else
108 packagesWithPath prefix (path: pkg: builtins.hasAttr "updateScript" pkg)
109 pathContent;
···115 package = lib.attrByPath (lib.splitString "." path) null pkgs;
116 in
117 if package == null then
118+ builtins.throw "Package with an attribute name `${path}` does not exist."
119 else if ! builtins.hasAttr "updateScript" package then
120 builtins.throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
121 else
···553554 <varlistentry>
555 <term>
556+ <option>--use-substitutes</option>
557+ </term>
558+ <listitem>
559+ <para>
560+ When set, nixos-rebuild will add <option>--use-substitutes</option>
561+ to each invocation of nix-copy-closure. This will only affect the
562+ behavior of nixos-rebuild if <option>--target-host</option> or
563+ <option>--build-host</option> is also set. This is useful when
564+ the target-host connection to cache.nixos.org is faster than the
565+ connection between hosts.
566+ </para>
567+ </listitem>
568+ </varlistentry>
569+570+ <varlistentry>
571+ <term>
572 <option>--use-remote-sudo</option>
573 </term>
574 <listitem>
···45let
6 cfg = config.services.spotifyd;
7+ toml = pkgs.formats.toml {};
8+ warnConfig =
9+ if cfg.config != ""
10+ then lib.trace "Using the stringly typed .config attribute is discouraged. Use the TOML typed .settings attribute instead."
11+ else id;
12+ spotifydConf =
13+ if cfg.settings != {}
14+ then toml.generate "spotify.conf" cfg.settings
15+ else warnConfig (pkgs.writeText "spotifyd.conf" cfg.config);
16in
17{
18 options = {
···23 default = "";
24 type = types.lines;
25 description = ''
26+ (Deprecated) Configuration for Spotifyd. For syntax and directives, see
27+ <link xlink:href="https://github.com/Spotifyd/spotifyd#Configuration"/>.
28+ '';
29+ };
30+31+ settings = mkOption {
32+ default = {};
33+ type = toml.type;
34+ example = { global.bitrate = 320; };
35+ description = ''
36 Configuration for Spotifyd. For syntax and directives, see
37 <link xlink:href="https://github.com/Spotifyd/spotifyd#Configuration"/>.
38 '';
···41 };
4243 config = mkIf cfg.enable {
44+ assertions = [
45+ {
46+ assertion = cfg.config == "" || cfg.settings == {};
47+ message = "At most one of the .config attribute and the .settings attribute may be set";
48+ }
49+ ];
50+51 systemd.services.spotifyd = {
52 wantedBy = [ "multi-user.target" ];
53 after = [ "network-online.target" "sound.target" ];
+1-1
nixos/modules/services/backup/znapzend.nix
···324 autoCreation = mkOption {
325 type = bool;
326 default = false;
327- description = "Automatically create the destination dataset if it does not exists.";
328 };
329330 zetup = mkOption {
···324 autoCreation = mkOption {
325 type = bool;
326 default = false;
327+ description = "Automatically create the destination dataset if it does not exist.";
328 };
329330 zetup = mkOption {
+1-1
nixos/modules/services/monitoring/nagios.nix
···41 validated = pkgs.runCommand "nagios-checked.cfg" {preferLocalBuild=true;} ''
42 cp ${file} nagios.cfg
43 # nagios checks the existence of /var/lib/nagios, but
44- # it does not exists in the build sandbox, so we fake it
45 mkdir lib
46 lib=$(readlink -f lib)
47 sed -i s@=${nagiosState}@=$lib@ nagios.cfg
···41 validated = pkgs.runCommand "nagios-checked.cfg" {preferLocalBuild=true;} ''
42 cp ${file} nagios.cfg
43 # nagios checks the existence of /var/lib/nagios, but
44+ # it does not exist in the build sandbox, so we fake it
45 mkdir lib
46 lib=$(readlink -f lib)
47 sed -i s@=${nagiosState}@=$lib@ nagios.cfg
···119 password, and the <option>syncserver.secret</option> setting is used by the server to
120 generate cryptographically-signed authentication tokens.
121122- If this file does not exists, then it is created with a generated
123 <option>syncserver.secret</option> settings.
124 '';
125 };
···119 password, and the <option>syncserver.secret</option> setting is used by the server to
120 generate cryptographically-signed authentication tokens.
121122+ If this file does not exist, then it is created with a generated
123 <option>syncserver.secret</option> settings.
124 '';
125 };
···25 else "");
26in stdenv.mkDerivation rec {
27 pname = "signal-desktop";
28- version = "5.16.0"; # Please backport all updates to the stable channel.
29 # All releases have a limited lifetime and "expire" 90 days after the release.
30 # When releases "expire" the application becomes unusable until an update is
31 # applied. The expiration date for the current release can be extracted with:
···3536 src = fetchurl {
37 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
38- sha256 = "1na5ja68h14smfwxrli1kfr6fhf5dshyvcdaj0c4mwms838bdl4j";
39 };
4041 nativeBuildInputs = [
···25 else "");
26in stdenv.mkDerivation rec {
27 pname = "signal-desktop";
28+ version = "5.17.0"; # Please backport all updates to the stable channel.
29 # All releases have a limited lifetime and "expire" 90 days after the release.
30 # When releases "expire" the application becomes unusable until an update is
31 # applied. The expiration date for the current release can be extracted with:
···3536 src = fetchurl {
37 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
38+ sha256 = "1m3bkrshlipxlbf4xr7gpw3zn1k39cdysrqmw705hy2cwf7pw7yy";
39 };
4041 nativeBuildInputs = [
···6768 export ANDROID_SERIAL="emulator-$port"
6970- # Create a virtual android device for testing if it does not exists
71 ${sdk}/libexec/android-sdk/tools/bin/avdmanager list target
7273 if [ "$(${sdk}/libexec/android-sdk/tools/android list avd | grep 'Name: device')" = "" ]
···6768 export ANDROID_SERIAL="emulator-$port"
6970+ # Create a virtual android device for testing if it does not exist
71 ${sdk}/libexec/android-sdk/tools/bin/avdmanager list target
7273 if [ "$(${sdk}/libexec/android-sdk/tools/android list avd | grep 'Name: device')" = "" ]
···6}:
7##User Input
8{ settings ? {}
9-# if marked as true will create an empty json file if does not exists
10, createIfDoesNotExists ? true
11, vscodeSettingsFile ? ".vscode/settings.json"
12, userSettingsFolder ? ""
···6}:
7##User Input
8{ settings ? {}
9+# if marked as true will create an empty json file if does not exist
10, createIfDoesNotExists ? true
11, vscodeSettingsFile ? ".vscode/settings.json"
12, userSettingsFolder ? ""