lol

Merge pull request #91813 from Mic92/types1

nixos/*: Add types to the database module options

authored by

Kevin Cox and committed by
GitHub
5666f34b 3d9a14f7

+44 -7
+3
nixos/modules/services/databases/firebird.nix
··· 59 59 60 60 port = mkOption { 61 61 default = "3050"; 62 + type = types.port; 62 63 description = '' 63 64 Port Firebird uses. 64 65 ''; ··· 66 67 67 68 user = mkOption { 68 69 default = "firebird"; 70 + type = types.str; 69 71 description = '' 70 72 User account under which firebird runs. 71 73 ''; ··· 73 75 74 76 baseDir = mkOption { 75 77 default = "/var/db/firebird"; # ubuntu is using /var/lib/firebird/2.1/data/.. ? 78 + type = types.str; 76 79 description = '' 77 80 Location containing data/ and system/ directories. 78 81 data/ stores the databases, system/ stores the password database security2.fdb.
+10 -5
nixos/modules/services/databases/memcached.nix
··· 17 17 options = { 18 18 19 19 services.memcached = { 20 - 21 20 enable = mkEnableOption "Memcached"; 22 21 23 22 user = mkOption { 23 + type = types.str; 24 24 default = "memcached"; 25 25 description = "The user to run Memcached as"; 26 26 }; 27 27 28 28 listen = mkOption { 29 + type = types.str; 29 30 default = "127.0.0.1"; 30 - description = "The IP address to bind to"; 31 + description = "The IP address to bind to."; 31 32 }; 32 33 33 34 port = mkOption { 35 + type = types.port; 34 36 default = 11211; 35 - description = "The port to bind to"; 37 + description = "The port to bind to."; 36 38 }; 37 39 38 40 enableUnixSocket = mkEnableOption "unix socket at /run/memcached/memcached.sock"; 39 41 40 42 maxMemory = mkOption { 43 + type = types.ints.unsigned; 41 44 default = 64; 42 45 description = "The maximum amount of memory to use for storage, in megabytes."; 43 46 }; 44 47 45 48 maxConnections = mkOption { 49 + type = types.ints.unsigned; 46 50 default = 1024; 47 - description = "The maximum number of simultaneous connections"; 51 + description = "The maximum number of simultaneous connections."; 48 52 }; 49 53 50 54 extraOptions = mkOption { 55 + type = types.listOf types.str; 51 56 default = []; 52 - description = "A list of extra options that will be added as a suffix when running memcached"; 57 + description = "A list of extra options that will be added as a suffix when running memcached."; 53 58 }; 54 59 }; 55 60
+7
nixos/modules/services/databases/mongodb.nix
··· 41 41 }; 42 42 43 43 user = mkOption { 44 + type = types.str; 44 45 default = "mongodb"; 45 46 description = "User account under which MongoDB runs"; 46 47 }; 47 48 48 49 bind_ip = mkOption { 50 + type = types.str; 49 51 default = "127.0.0.1"; 50 52 description = "IP to bind to"; 51 53 }; 52 54 53 55 quiet = mkOption { 56 + type = types.bool; 54 57 default = false; 55 58 description = "quieter output"; 56 59 }; ··· 68 71 }; 69 72 70 73 dbpath = mkOption { 74 + type = types.str; 71 75 default = "/var/db/mongodb"; 72 76 description = "Location where MongoDB stores its files"; 73 77 }; 74 78 75 79 pidFile = mkOption { 80 + type = types.str; 76 81 default = "/run/mongodb.pid"; 77 82 description = "Location of MongoDB pid file"; 78 83 }; 79 84 80 85 replSetName = mkOption { 86 + type = types.str; 81 87 default = ""; 82 88 description = '' 83 89 If this instance is part of a replica set, set its name here. ··· 86 92 }; 87 93 88 94 extraConfig = mkOption { 95 + type = types.lines; 89 96 default = ""; 90 97 example = '' 91 98 storage.journal.enabled: false
+19 -2
nixos/modules/services/databases/redis.nix
··· 122 122 }; 123 123 124 124 slaveOf = mkOption { 125 - default = null; # { ip, port } 126 - description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave."; 125 + type = with types; nullOr (submodule ({ ... }: { 126 + options = { 127 + ip = mkOption { 128 + type = str; 129 + description = "IP of the Redis master"; 130 + example = "192.168.1.100"; 131 + }; 132 + 133 + port = mkOption { 134 + type = port; 135 + description = "port of the Redis master"; 136 + default = 6379; 137 + }; 138 + }; 139 + })); 140 + 141 + default = null; 142 + description = "IP and port to which this redis instance acts as a slave."; 127 143 example = { ip = "192.168.1.100"; port = 6379; }; 128 144 }; 129 145 130 146 masterAuth = mkOption { 147 + type = types.str; 131 148 default = null; 132 149 description = ''If the master is password protected (using the requirePass configuration) 133 150 it is possible to tell the slave to authenticate before starting the replication synchronization
+5
nixos/modules/services/databases/virtuoso.nix
··· 16 16 enable = mkEnableOption "Virtuoso Opensource database server"; 17 17 18 18 config = mkOption { 19 + type = types.lines; 19 20 default = ""; 20 21 description = "Extra options to put into Virtuoso configuration file."; 21 22 }; 22 23 23 24 parameters = mkOption { 25 + type = types.lines; 24 26 default = ""; 25 27 description = "Extra options to put into [Parameters] section of Virtuoso configuration file."; 26 28 }; 27 29 28 30 listenAddress = mkOption { 31 + type = types.str; 29 32 default = "1111"; 30 33 example = "myserver:1323"; 31 34 description = "ip:port or port to listen on."; 32 35 }; 33 36 34 37 httpListenAddress = mkOption { 38 + type = types.nullOr types.str; 35 39 default = null; 36 40 example = "myserver:8080"; 37 41 description = "ip:port or port for Virtuoso HTTP server to listen on."; 38 42 }; 39 43 40 44 dirsAllowed = mkOption { 45 + type = types.nullOr types.str; # XXX Maybe use a list in the future? 41 46 default = null; 42 47 example = "/www, /home/"; 43 48 description = "A list of directories Virtuoso is allowed to access";