|
36 | 36 | DOCUMENTATION_URL = optionalString isNixos "https://nixos.org/learn.html"; |
37 | 37 | SUPPORT_URL = optionalString isNixos "https://nixos.org/community.html"; |
38 | 38 | BUG_REPORT_URL = optionalString isNixos "https://github.com/NixOS/nixpkgs/issues"; |
39 | | - ANSI_COLOR = optionalString isNixos "1;34"; |
| 39 | + ANSI_COLOR = optionalString isNixos "0;38;2;126;186;228"; |
40 | 40 | IMAGE_ID = optionalString (config.system.image.id != null) config.system.image.id; |
41 | 41 | IMAGE_VERSION = optionalString (config.system.image.version != null) config.system.image.version; |
42 | 42 | VARIANT = optionalString (cfg.variantName != null) cfg.variantName; |
43 | 43 | VARIANT_ID = optionalString (cfg.variant_id != null) cfg.variant_id; |
44 | 44 | DEFAULT_HOSTNAME = config.system.nixos.distroId; |
45 | | - SUPPORT_END = "2025-06-30"; |
46 | | - }; |
| 45 | + } // cfg.extraOSReleaseArgs; |
47 | 46 |
|
48 | 47 | initrdReleaseContents = (removeAttrs osReleaseContents [ "BUILD_ID" ]) // { |
49 | 48 | PRETTY_NAME = "${osReleaseContents.PRETTY_NAME} (Initrd)"; |
|
143 | 142 | default = "NixOS"; |
144 | 143 | description = "The name of the operating system vendor"; |
145 | 144 | }; |
| 145 | + |
| 146 | + extraOSReleaseArgs = mkOption { |
| 147 | + internal = true; |
| 148 | + type = types.attrsOf types.str; |
| 149 | + default = { }; |
| 150 | + description = "Additional attributes to be merged with the /etc/os-release generator."; |
| 151 | + example = { |
| 152 | + ANSI_COLOR = "1;31"; |
| 153 | + }; |
| 154 | + }; |
| 155 | + |
| 156 | + extraLSBReleaseArgs = mkOption { |
| 157 | + internal = true; |
| 158 | + type = types.attrsOf types.str; |
| 159 | + default = { }; |
| 160 | + description = "Additional attributes to be merged with the /etc/lsb-release generator."; |
| 161 | + example = { |
| 162 | + LSB_VERSION = "1.0"; |
| 163 | + }; |
| 164 | + }; |
146 | 165 | }; |
147 | 166 |
|
148 | 167 | image = { |
|
237 | 256 | # https://www.freedesktop.org/software/systemd/man/os-release.html for the |
238 | 257 | # format. |
239 | 258 | environment.etc = { |
240 | | - "lsb-release".text = attrsToText { |
| 259 | + "lsb-release".text = attrsToText ({ |
241 | 260 | LSB_VERSION = "${cfg.release} (${cfg.codeName})"; |
242 | 261 | DISTRIB_ID = "${cfg.distroId}"; |
243 | 262 | DISTRIB_RELEASE = cfg.release; |
244 | 263 | DISTRIB_CODENAME = toLower cfg.codeName; |
245 | 264 | DISTRIB_DESCRIPTION = "${cfg.distroName} ${cfg.release} (${cfg.codeName})"; |
246 | | - }; |
| 265 | + } // cfg.extraLSBReleaseArgs); |
247 | 266 |
|
248 | 267 | "os-release".text = attrsToText osReleaseContents; |
249 | 268 | }; |
|
0 commit comments