diff options
Diffstat (limited to 'modules/pgbackrest.nix')
| -rw-r--r-- | modules/pgbackrest.nix | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/pgbackrest.nix b/modules/pgbackrest.nix index e02849f5..886840b9 100644 --- a/modules/pgbackrest.nix +++ b/modules/pgbackrest.nix | |||
| @@ -50,8 +50,8 @@ in { | |||
| 50 | package = mkPackageOption pkgs "pgbackrest" {}; | 50 | package = mkPackageOption pkgs "pgbackrest" {}; |
| 51 | dscpPackage = mkPackageOption pkgs "libdscp" { nullable = true; default = null; }; | 51 | dscpPackage = mkPackageOption pkgs "libdscp" { nullable = true; default = null; }; |
| 52 | 52 | ||
| 53 | dscp.archive-push = mkDSCPOption { default = 24; }; | 53 | dscp.archive-push = mkDSCPOption { default = 24; description = "DSCP during archive push"; }; |
| 54 | dscp.backup = mkDSCPOption { default = 8; }; | 54 | dscp.backup = mkDSCPOption { default = 8; description = "DSCP during backup"; }; |
| 55 | 55 | ||
| 56 | configurePostgresql = { | 56 | configurePostgresql = { |
| 57 | enable = mkEnableOption "configuring PostgreSQL for sending WAL to pgBackRest" // { | 57 | enable = mkEnableOption "configuring PostgreSQL for sending WAL to pgBackRest" // { |
| @@ -63,6 +63,7 @@ in { | |||
| 63 | type = types.str; | 63 | type = types.str; |
| 64 | default = config.networking.hostName; | 64 | default = config.networking.hostName; |
| 65 | defaultText = literalExpression "config.networking.hostName"; | 65 | defaultText = literalExpression "config.networking.hostName"; |
| 66 | description = "Stanza"; | ||
| 66 | }; | 67 | }; |
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| @@ -74,23 +75,28 @@ in { | |||
| 74 | global.log-level-console = mkOption { | 75 | global.log-level-console = mkOption { |
| 75 | type = loglevelType; | 76 | type = loglevelType; |
| 76 | default = "detail"; | 77 | default = "detail"; |
| 78 | description = "Log level to console"; | ||
| 77 | }; | 79 | }; |
| 78 | global.log-level-file = mkOption { | 80 | global.log-level-file = mkOption { |
| 79 | type = loglevelType; | 81 | type = loglevelType; |
| 80 | default = "off"; | 82 | default = "off"; |
| 83 | description = "Log level to logfile"; | ||
| 81 | }; | 84 | }; |
| 82 | global.log-level-stderr = mkOption { | 85 | global.log-level-stderr = mkOption { |
| 83 | type = loglevelType; | 86 | type = loglevelType; |
| 84 | default = "warn"; | 87 | default = "warn"; |
| 88 | description = "Log level to stderr"; | ||
| 85 | }; | 89 | }; |
| 86 | 90 | ||
| 87 | global.log-subprocess = mkOption { | 91 | global.log-subprocess = mkOption { |
| 88 | type = types.bool; | 92 | type = types.bool; |
| 89 | default = true; | 93 | default = true; |
| 94 | description = "Log subprocesses?"; | ||
| 90 | }; | 95 | }; |
| 91 | global.log-timestamp = mkOption { | 96 | global.log-timestamp = mkOption { |
| 92 | type = types.bool; | 97 | type = types.bool; |
| 93 | default = false; | 98 | default = false; |
| 99 | description = "Log timestamps?"; | ||
| 94 | }; | 100 | }; |
| 95 | }; | 101 | }; |
| 96 | }; | 102 | }; |
| @@ -106,10 +112,12 @@ in { | |||
| 106 | user = mkOption { | 112 | user = mkOption { |
| 107 | type = types.str; | 113 | type = types.str; |
| 108 | default = "postgres"; | 114 | default = "postgres"; |
| 115 | description = "User"; | ||
| 109 | }; | 116 | }; |
| 110 | group = mkOption { | 117 | group = mkOption { |
| 111 | type = types.str; | 118 | type = types.str; |
| 112 | default = "postgres"; | 119 | default = "postgres"; |
| 120 | description = "Group"; | ||
| 113 | }; | 121 | }; |
| 114 | }; | 122 | }; |
| 115 | 123 | ||
| @@ -119,32 +127,39 @@ in { | |||
| 119 | type = mkOption { | 127 | type = mkOption { |
| 120 | type = types.enum ["full" "incr" "diff"]; | 128 | type = types.enum ["full" "incr" "diff"]; |
| 121 | default = "full"; | 129 | default = "full"; |
| 130 | description = "Type"; | ||
| 122 | }; | 131 | }; |
| 123 | 132 | ||
| 124 | stanza = mkOption { | 133 | stanza = mkOption { |
| 125 | type = types.str; | 134 | type = types.str; |
| 126 | default = cfg.configurePostgresql.stanza; | 135 | default = cfg.configurePostgresql.stanza; |
| 127 | defaultText = literalExpression "config.services.pgbackrest.configurePostgresql.stanza"; | 136 | defaultText = literalExpression "config.services.pgbackrest.configurePostgresql.stanza"; |
| 137 | description = "Stanza"; | ||
| 128 | }; | 138 | }; |
| 129 | repo = mkOption { | 139 | repo = mkOption { |
| 130 | type = types.nullOr (types.strMatching "^[0-9]+$"); | 140 | type = types.nullOr (types.strMatching "^[0-9]+$"); |
| 141 | description = "Repository number"; | ||
| 131 | }; | 142 | }; |
| 132 | 143 | ||
| 133 | user = mkOption { | 144 | user = mkOption { |
| 134 | type = types.str; | 145 | type = types.str; |
| 135 | default = "postgres"; | 146 | default = "postgres"; |
| 147 | description = "User"; | ||
| 136 | }; | 148 | }; |
| 137 | group = mkOption { | 149 | group = mkOption { |
| 138 | type = types.str; | 150 | type = types.str; |
| 139 | default = "postgres"; | 151 | default = "postgres"; |
| 152 | description = "Group"; | ||
| 140 | }; | 153 | }; |
| 141 | 154 | ||
| 142 | timerConfig = mkOption { | 155 | timerConfig = mkOption { |
| 143 | type = types.attrsOf unitOption; | 156 | type = types.attrsOf unitOption; |
| 157 | description = "Systemd timer options"; | ||
| 144 | }; | 158 | }; |
| 145 | }; | 159 | }; |
| 146 | })); | 160 | })); |
| 147 | default = {}; | 161 | default = {}; |
| 162 | description = "Configure backups"; | ||
| 148 | }; | 163 | }; |
| 149 | }; | 164 | }; |
| 150 | }; | 165 | }; |
