···52525353- `util-linux` is now supported on Darwin and is no longer an alias to `unixtools`. Use the `unixtools.util-linux` package for access to the Apple variants of the utilities.
54545555+- `services.ddclient` has been removed on the request of the upstream maintainer because it is unmaintained and has bugs. Please switch to a different software like `inadyn` or `knsupdate`.
5656+5557- The `vlock` program from the `kbd` package has been moved into its own package output and should now be referenced explicitly as `kbd.vlock` or replaced with an alternative such as the standalone `vlock` package or `physlock`.
56585759- `fileSystems.<name>.autoFormat` now uses `systemd-makefs`, which does not accept formatting options. Therefore, `fileSystems.<name>.formatOptions` has been removed.
···5454 (mkRemovedOptionModule [ "services" "chronos" ] "The corresponding package was removed from nixpkgs.")
5555 (mkRemovedOptionModule [ "services" "couchpotato" ] "The corresponding package was removed from nixpkgs.")
5656 (mkRemovedOptionModule [ "services" "dd-agent" ] "dd-agent was removed from nixpkgs in favor of the newer datadog-agent.")
5757+ (mkRemovedOptionModule [ "services" "ddclient" ] "ddclient has been removed on the request of the upstream maintainer because it is unmaintained and has bugs. Please switch to a different software like `inadyn` or `knsupdate`.") # Added 2023-07-04
5758 (mkRemovedOptionModule [ "services" "dnscrypt-proxy" ] "Use services.dnscrypt-proxy2 instead")
5859 (mkRemovedOptionModule [ "services" "exhibitor" ] "The corresponding package was removed from nixpkgs.")
5960 (mkRemovedOptionModule [ "services" "firefox" "syncserver" ] "The corresponding package was removed from nixpkgs.")
-234
nixos/modules/services/networking/ddclient.nix
···11-{ config, pkgs, lib, ... }:
22-33-let
44- cfg = config.services.ddclient;
55- boolToStr = bool: if bool then "yes" else "no";
66- dataDir = "/var/lib/ddclient";
77- StateDirectory = builtins.baseNameOf dataDir;
88- RuntimeDirectory = StateDirectory;
99-1010- configFile' = pkgs.writeText "ddclient.conf" ''
1111- # This file can be used as a template for configFile or is automatically generated by Nix options.
1212- cache=${dataDir}/ddclient.cache
1313- foreground=YES
1414- use=${cfg.use}
1515- login=${cfg.username}
1616- password=${if cfg.protocol == "nsupdate" then "/run/${RuntimeDirectory}/ddclient.key" else "@password_placeholder@"}
1717- protocol=${cfg.protocol}
1818- ${lib.optionalString (cfg.script != "") "script=${cfg.script}"}
1919- ${lib.optionalString (cfg.server != "") "server=${cfg.server}"}
2020- ${lib.optionalString (cfg.zone != "") "zone=${cfg.zone}"}
2121- ssl=${boolToStr cfg.ssl}
2222- wildcard=YES
2323- quiet=${boolToStr cfg.quiet}
2424- verbose=${boolToStr cfg.verbose}
2525- ${cfg.extraConfig}
2626- ${lib.concatStringsSep "," cfg.domains}
2727- '';
2828- configFile = if (cfg.configFile != null) then cfg.configFile else configFile';
2929-3030- preStart = ''
3131- install --mode=600 --owner=$USER ${configFile} /run/${RuntimeDirectory}/ddclient.conf
3232- ${lib.optionalString (cfg.configFile == null) (if (cfg.protocol == "nsupdate") then ''
3333- install --mode=600 --owner=$USER ${cfg.passwordFile} /run/${RuntimeDirectory}/ddclient.key
3434- '' else if (cfg.passwordFile != null) then ''
3535- "${pkgs.replace-secret}/bin/replace-secret" "@password_placeholder@" "${cfg.passwordFile}" "/run/${RuntimeDirectory}/ddclient.conf"
3636- '' else ''
3737- sed -i '/^password=@password_placeholder@$/d' /run/${RuntimeDirectory}/ddclient.conf
3838- '')}
3939- '';
4040-4141-in
4242-4343-with lib;
4444-4545-{
4646-4747- imports = [
4848- (mkChangedOptionModule [ "services" "ddclient" "domain" ] [ "services" "ddclient" "domains" ]
4949- (config:
5050- let value = getAttrFromPath [ "services" "ddclient" "domain" ] config;
5151- in optional (value != "") value))
5252- (mkRemovedOptionModule [ "services" "ddclient" "homeDir" ] "")
5353- (mkRemovedOptionModule [ "services" "ddclient" "password" ] "Use services.ddclient.passwordFile instead.")
5454- (mkRemovedOptionModule [ "services" "ddclient" "ipv6" ] "")
5555- ];
5656-5757- ###### interface
5858-5959- options = {
6060-6161- services.ddclient = with lib.types; {
6262-6363- enable = mkOption {
6464- default = false;
6565- type = bool;
6666- description = lib.mdDoc ''
6767- Whether to synchronise your machine's IP address with a dynamic DNS provider (e.g. dyndns.org).
6868- '';
6969- };
7070-7171- package = mkOption {
7272- type = package;
7373- default = pkgs.ddclient;
7474- defaultText = lib.literalExpression "pkgs.ddclient";
7575- description = lib.mdDoc ''
7676- The ddclient executable package run by the service.
7777- '';
7878- };
7979-8080- domains = mkOption {
8181- default = [ "" ];
8282- type = listOf str;
8383- description = lib.mdDoc ''
8484- Domain name(s) to synchronize.
8585- '';
8686- };
8787-8888- username = mkOption {
8989- # For `nsupdate` username contains the path to the nsupdate executable
9090- default = lib.optionalString (config.services.ddclient.protocol == "nsupdate") "${pkgs.bind.dnsutils}/bin/nsupdate";
9191- defaultText = "";
9292- type = str;
9393- description = lib.mdDoc ''
9494- User name.
9595- '';
9696- };
9797-9898- passwordFile = mkOption {
9999- default = null;
100100- type = nullOr str;
101101- description = lib.mdDoc ''
102102- A file containing the password or a TSIG key in named format when using the nsupdate protocol.
103103- '';
104104- };
105105-106106- interval = mkOption {
107107- default = "10min";
108108- type = str;
109109- description = lib.mdDoc ''
110110- The interval at which to run the check and update.
111111- See {command}`man 7 systemd.time` for the format.
112112- '';
113113- };
114114-115115- configFile = mkOption {
116116- default = null;
117117- type = nullOr path;
118118- description = lib.mdDoc ''
119119- Path to configuration file.
120120- When set this overrides the generated configuration from module options.
121121- '';
122122- example = "/root/nixos/secrets/ddclient.conf";
123123- };
124124-125125- protocol = mkOption {
126126- default = "dyndns2";
127127- type = str;
128128- description = lib.mdDoc ''
129129- Protocol to use with dynamic DNS provider (see https://sourceforge.net/p/ddclient/wiki/protocols).
130130- '';
131131- };
132132-133133- server = mkOption {
134134- default = "";
135135- type = str;
136136- description = lib.mdDoc ''
137137- Server address.
138138- '';
139139- };
140140-141141- ssl = mkOption {
142142- default = true;
143143- type = bool;
144144- description = lib.mdDoc ''
145145- Whether to use SSL/TLS to connect to dynamic DNS provider.
146146- '';
147147- };
148148-149149- quiet = mkOption {
150150- default = false;
151151- type = bool;
152152- description = lib.mdDoc ''
153153- Print no messages for unnecessary updates.
154154- '';
155155- };
156156-157157- script = mkOption {
158158- default = "";
159159- type = str;
160160- description = lib.mdDoc ''
161161- script as required by some providers.
162162- '';
163163- };
164164-165165- use = mkOption {
166166- default = "web, web=checkip.dyndns.com/, web-skip='Current IP Address: '";
167167- type = str;
168168- description = lib.mdDoc ''
169169- Method to determine the IP address to send to the dynamic DNS provider.
170170- '';
171171- };
172172-173173- verbose = mkOption {
174174- default = false;
175175- type = bool;
176176- description = lib.mdDoc ''
177177- Print verbose information.
178178- '';
179179- };
180180-181181- zone = mkOption {
182182- default = "";
183183- type = str;
184184- description = lib.mdDoc ''
185185- zone as required by some providers.
186186- '';
187187- };
188188-189189- extraConfig = mkOption {
190190- default = "";
191191- type = lines;
192192- description = lib.mdDoc ''
193193- Extra configuration. Contents will be added verbatim to the configuration file.
194194-195195- ::: {.note}
196196- `daemon` should not be added here because it does not work great with the systemd-timer approach the service uses.
197197- :::
198198- '';
199199- };
200200- };
201201- };
202202-203203-204204- ###### implementation
205205-206206- config = mkIf config.services.ddclient.enable {
207207- systemd.services.ddclient = {
208208- description = "Dynamic DNS Client";
209209- wantedBy = [ "multi-user.target" ];
210210- after = [ "network.target" ];
211211- restartTriggers = optional (cfg.configFile != null) cfg.configFile;
212212- path = lib.optional (lib.hasPrefix "if," cfg.use) pkgs.iproute2;
213213-214214- serviceConfig = {
215215- DynamicUser = true;
216216- RuntimeDirectoryMode = "0700";
217217- inherit RuntimeDirectory;
218218- inherit StateDirectory;
219219- Type = "oneshot";
220220- ExecStartPre = "!${pkgs.writeShellScript "ddclient-prestart" preStart}";
221221- ExecStart = "${lib.getBin cfg.package}/bin/ddclient -file /run/${RuntimeDirectory}/ddclient.conf";
222222- };
223223- };
224224-225225- systemd.timers.ddclient = {
226226- description = "Run ddclient";
227227- wantedBy = [ "timers.target" ];
228228- timerConfig = {
229229- OnBootSec = cfg.interval;
230230- OnUnitInactiveSec = cfg.interval;
231231- };
232232- };
233233- };
234234-}
···146146 bitcoind-classic = throw "bitcoind-classic has been removed: the Bitcoin Classic project has closed down, https://bitcoinclassic.com/news/closing.html"; # Added 2022-11-24
147147 bitcoin-gold = throw "bitcoin-gold has been removed since it's unnmaintained and will stop building with Qt > 5.14"; # Added 2022-11-24
148148 bitcoind-gold = throw "bitcoin-gold has been removed since it's unnmaintained: https://github.com/BTCGPU/BTCGPU/graphs/code-frequency"; # Added 2022-11-24
149149+ ddclient = throw "ddclient has been removed on the request of the upstream maintainer because it is unmaintained and has bugs. Please switch to a different software like `inadyn` or `knsupdate`."; # Added 2023-07-04
149150 digibyte = throw "digibyte has been removed since it's unnmaintained and will stop building with Qt > 5.14"; # Added 2022-11-24
150151 digibyted = throw "digibyted has been removed since it's unnmaintained: https://github.com/digibyte/digibyte/graphs/code-frequency"; # Added 2022-11-24
151152 bitsnbots = throw "bitsnbots has been removed because it was broken and upstream missing"; # Added 2021-08-22