mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 22:19:17 +03:00
Merge pull request #312757 from eclairevoyant/navidrome-fix
nixos/navidrome: fix settings type
This commit is contained in:
commit
04636fec37
1 changed files with 29 additions and 7 deletions
|
@ -6,8 +6,18 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkEnableOption mkPackageOption mkOption maintainers;
|
inherit (lib)
|
||||||
inherit (lib.types) bool str;
|
mkEnableOption
|
||||||
|
mkPackageOption
|
||||||
|
mkOption
|
||||||
|
maintainers
|
||||||
|
;
|
||||||
|
inherit (lib.types)
|
||||||
|
bool
|
||||||
|
port
|
||||||
|
str
|
||||||
|
submodule
|
||||||
|
;
|
||||||
cfg = config.services.navidrome;
|
cfg = config.services.navidrome;
|
||||||
settingsFormat = pkgs.formats.json { };
|
settingsFormat = pkgs.formats.json { };
|
||||||
in
|
in
|
||||||
|
@ -20,10 +30,22 @@ in
|
||||||
package = mkPackageOption pkgs "navidrome" { };
|
package = mkPackageOption pkgs "navidrome" { };
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = settingsFormat.type;
|
type = submodule {
|
||||||
default = {
|
freeformType = settingsFormat.type;
|
||||||
Address = "127.0.0.1";
|
|
||||||
Port = 4533;
|
options = {
|
||||||
|
Address = mkOption {
|
||||||
|
default = "127.0.0.1";
|
||||||
|
description = "Address to run Navidrome on.";
|
||||||
|
type = str;
|
||||||
|
};
|
||||||
|
|
||||||
|
Port = mkOption {
|
||||||
|
default = 4533;
|
||||||
|
description = "Port to run Navidrome on.";
|
||||||
|
type = port;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
example = {
|
example = {
|
||||||
MusicFolder = "/mnt/music";
|
MusicFolder = "/mnt/music";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue