mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge master into staging-next
This commit is contained in:
commit
912b8082df
26 changed files with 195 additions and 134 deletions
|
@ -4,7 +4,15 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.spotifyd;
|
||||
spotifydConf = pkgs.writeText "spotifyd.conf" cfg.config;
|
||||
toml = pkgs.formats.toml {};
|
||||
warnConfig =
|
||||
if cfg.config != ""
|
||||
then lib.trace "Using the stringly typed .config attribute is discouraged. Use the TOML typed .settings attribute instead."
|
||||
else id;
|
||||
spotifydConf =
|
||||
if cfg.settings != {}
|
||||
then toml.generate "spotify.conf" cfg.settings
|
||||
else warnConfig (pkgs.writeText "spotifyd.conf" cfg.config);
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -14,6 +22,16 @@ in
|
|||
config = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
(Deprecated) Configuration for Spotifyd. For syntax and directives, see
|
||||
<link xlink:href="https://github.com/Spotifyd/spotifyd#Configuration"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
default = {};
|
||||
type = toml.type;
|
||||
example = { global.bitrate = 320; };
|
||||
description = ''
|
||||
Configuration for Spotifyd. For syntax and directives, see
|
||||
<link xlink:href="https://github.com/Spotifyd/spotifyd#Configuration"/>.
|
||||
|
@ -23,6 +41,13 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.config == "" || cfg.settings == {};
|
||||
message = "At most one of the .config attribute and the .settings attribute may be set";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.services.spotifyd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" "sound.target" ];
|
||||
|
|
|
@ -324,7 +324,7 @@ in
|
|||
autoCreation = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Automatically create the destination dataset if it does not exists.";
|
||||
description = "Automatically create the destination dataset if it does not exist.";
|
||||
};
|
||||
|
||||
zetup = mkOption {
|
||||
|
|
|
@ -41,7 +41,7 @@ let
|
|||
validated = pkgs.runCommand "nagios-checked.cfg" {preferLocalBuild=true;} ''
|
||||
cp ${file} nagios.cfg
|
||||
# nagios checks the existence of /var/lib/nagios, but
|
||||
# it does not exists in the build sandbox, so we fake it
|
||||
# it does not exist in the build sandbox, so we fake it
|
||||
mkdir lib
|
||||
lib=$(readlink -f lib)
|
||||
sed -i s@=${nagiosState}@=$lib@ nagios.cfg
|
||||
|
|
|
@ -119,7 +119,7 @@ in
|
|||
password, and the <option>syncserver.secret</option> setting is used by the server to
|
||||
generate cryptographically-signed authentication tokens.
|
||||
|
||||
If this file does not exists, then it is created with a generated
|
||||
If this file does not exist, then it is created with a generated
|
||||
<option>syncserver.secret</option> settings.
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue