···449449450450- `nextcloud-setup.service` no longer changes the group of each file & directory inside `/var/lib/nextcloud/{config,data,store-apps}` if one of these directories has the wrong owner group. This was part of transitioning the group used for `/var/lib/nextcloud`, but isn't necessary anymore.
451451452452+- `services.kavita` now uses the freeform option `services.kavita.settings` for the application settings file.
453453+ The options `services.kavita.ipAdresses` and `services.kavita.port` now exist at `services.kavita.settings.IpAddresses`
454454+ and `services.kavita.settings.IpAddresses`.
455455+452456- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
453457454458- Gitea 1.21 upgrade has several breaking changes, including:
···11+{ config, lib, ... }:
22+33+with lib;
44+55+let
66+ cfg = config.services.scion;
77+in
88+{
99+ options.services.scion = {
1010+ enable = mkEnableOption (lib.mdDoc "all of the scion components and services");
1111+ bypassBootstrapWarning = mkOption {
1212+ type = types.bool;
1313+ default = false;
1414+ description = lib.mdDoc ''
1515+ bypass Nix warning about SCION PKI bootstrapping
1616+ '';
1717+ };
1818+ };
1919+ config = mkIf cfg.enable {
2020+ services.scion = {
2121+ scion-dispatcher.enable = true;
2222+ scion-daemon.enable = true;
2323+ scion-router.enable = true;
2424+ scion-control.enable = true;
2525+ };
2626+ assertions = [
2727+ { assertion = cfg.bypassBootstrapWarning == true;
2828+ message = ''
2929+ SCION is a routing protocol and requires bootstrapping with a manual, imperative key signing ceremony. You may want to join an existing Isolation Domain (ISD) such as scionlab.org, or bootstrap your own. If you have completed and configured the public key infrastructure for SCION and are sure this process is complete, then add the following to your configuration:
3030+3131+ services.scion.bypassBootstrapWarning = true;
3232+3333+ refer to docs.scion.org for more information
3434+ '';
3535+ }
3636+ ];
3737+ };
3838+}
3939+
+43-20
nixos/modules/services/web-apps/kavita.nix
···2233let
44 cfg = config.services.kavita;
55-in {
55+ settingsFormat = pkgs.formats.json { };
66+ appsettings = settingsFormat.generate "appsettings.json" ({ TokenKey = "@TOKEN@"; } // cfg.settings);
77+in
88+{
99+ imports = [
1010+ (lib.mkChangedOptionModule [ "services" "kavita" "ipAdresses" ] [ "services" "kavita" "settings" "IpAddresses" ] (config:
1111+ let value = lib.getAttrFromPath [ "services" "kavita" "ipAdresses" ] config; in
1212+ lib.concatStringsSep "," value
1313+ ))
1414+ (lib.mkRenamedOptionModule [ "services" "kavita" "port" ] [ "services" "kavita" "settings" "Port" ])
1515+ ];
1616+617 options.services.kavita = {
718 enable = lib.mkEnableOption (lib.mdDoc "Kavita reading server");
819···2738 It can be generated with `head -c 32 /dev/urandom | base64`.
2839 '';
2940 };
3030- port = lib.mkOption {
3131- default = 5000;
3232- type = lib.types.port;
3333- description = lib.mdDoc "Port to bind to.";
3434- };
3535- ipAdresses = lib.mkOption {
3636- default = ["0.0.0.0" "::"];
3737- type = lib.types.listOf lib.types.str;
3838- description = lib.mdDoc "IP Addresses to bind to. The default is to bind
3939- to all IPv4 and IPv6 addresses.";
4141+4242+ settings = lib.mkOption {
4343+ default = { };
4444+ description = lib.mdDoc ''
4545+ Kavita configuration options, as configured in {file}`appsettings.json`.
4646+ '';
4747+ type = lib.types.submodule {
4848+ freeformType = settingsFormat.type;
4949+5050+ options = {
5151+ Port = lib.mkOption {
5252+ default = 5000;
5353+ type = lib.types.port;
5454+ description = lib.mdDoc "Port to bind to.";
5555+ };
5656+5757+ IpAddresses = lib.mkOption {
5858+ default = "0.0.0.0,::";
5959+ type = lib.types.commas;
6060+ description = lib.mdDoc ''
6161+ IP Addresses to bind to. The default is to bind to all IPv4 and IPv6 addresses.
6262+ '';
6363+ };
6464+ };
6565+ };
4066 };
4167 };
4268···4672 wantedBy = [ "multi-user.target" ];
4773 after = [ "network.target" ];
4874 preStart = ''
4949- umask u=rwx,g=rx,o=
5050- cat > "${cfg.dataDir}/config/appsettings.json" <<EOF
5151- {
5252- "TokenKey": "$(cat ${cfg.tokenKeyFile})",
5353- "Port": ${toString cfg.port},
5454- "IpAddresses": "${lib.concatStringsSep "," cfg.ipAdresses}"
5555- }
5656- EOF
7575+ install -m600 ${appsettings} ${lib.escapeShellArg cfg.dataDir}/config/appsettings.json
7676+ ${pkgs.replace-secret}/bin/replace-secret '@TOKEN@' \
7777+ ''${CREDENTIALS_DIRECTORY}/token \
7878+ '${cfg.dataDir}/config/appsettings.json'
5779 '';
5880 serviceConfig = {
5981 WorkingDirectory = cfg.dataDir;
6060- ExecStart = "${lib.getExe cfg.package}";
8282+ LoadCredential = [ "token:${cfg.tokenKeyFile}" ];
8383+ ExecStart = lib.getExe cfg.package;
6184 Restart = "always";
6285 User = cfg.user;
6386 };
···11+This NixOS VM test implements the network topology outlined in https://github.com/scionproto/scion/blob/27983125bccac6b84d1f96f406853aab0e460405/doc/tutorials/deploy.rst#sample-scion-demo-topology, below is an excerpt from that document
22+33+Sample SCION Demo Topology
44+..........................
55+66+The topology of the ISD includes the inter-AS connections to neighboring ASes, and defines the underlay IP/UDP addresses of services and routers running in this AS. This is specified in topology files - this guide later explains how to configure these files. A following graphic depicts the topology on a high level.
77+88+.. figure:: https://github.com/scionproto/scion/raw/27983125bccac6b84d1f96f406853aab0e460405/doc/tutorials/deploy/SCION-deployment-guide.drawio.png
99+ :width: 95 %
1010+ :figwidth: 100 %
1111+1212+ *Figure 1 - Topology of the sample SCION demo environment. It consists of 1 ISD, 3 core ASes and 2 non-core ASes.*
···11+lib: self: super: pkgs:
22+33+### Deprecated aliases - for backward compatibility
44+55+### Please maintain this list in ASCIIbetical ordering.
66+### Hint: the "sections" are delimited by ### <letter> ###
77+88+# These aliases should not be used within nixpkgs, but exist to improve
99+# backward compatibility in projects outside of nixpkgs. See the
1010+# documentation for the `allowAliases` option for more background.
1111+1212+# A script to convert old aliases to throws and remove old
1313+# throws can be found in './maintainers/scripts/remove-old-aliases.py'.
1414+1515+# Add 'preserve, reason: reason why' after the date if the alias should not be removed.
1616+# Try to keep them to a minimum.
1717+# valid examples of what to preserve:
1818+# distro aliases such as:
1919+# debian-package-name -> nixos-package-name
2020+2121+# pkgs is provided to allow packages to be moved out of the darwin attrset.
2222+2323+with self;
2424+2525+let
2626+ # Removing recurseForDerivation prevents derivations of aliased attribute set
2727+ # to appear while listing all the packages available.
2828+ removeRecurseForDerivations =
2929+ alias:
3030+ if alias.recurseForDerivations or false then
3131+ lib.removeAttrs alias [ "recurseForDerivations" ]
3232+ else
3333+ alias;
3434+3535+ # Disabling distribution prevents top-level aliases for non-recursed package
3636+ # sets from building on Hydra.
3737+ removeDistribute = alias: if lib.isDerivation alias then lib.dontDistribute alias else alias;
3838+3939+ # Make sure that we are not shadowing something from darwin-packages.nix.
4040+ checkInPkgs =
4141+ n: alias:
4242+ if builtins.hasAttr n super then throw "Alias ${n} is still in darwin-packages.nix" else alias;
4343+4444+ mapAliases = lib.mapAttrs (
4545+ n: alias: removeDistribute (removeRecurseForDerivations (checkInPkgs n alias))
4646+ );
4747+in
4848+4949+mapAliases ({
5050+ ### B ###
5151+5252+ builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06
5353+})
+3-3
pkgs/top-level/darwin-packages.nix
···1818 fetchurlBoot = import ../build-support/fetchurl/boot.nix {
1919 inherit (stdenv) system;
2020 };
2121+2222+ aliases = self: super: lib.optionalAttrs config.allowAliases (import ../top-level/darwin-aliases.nix lib self super pkgs);
2123in
22242325makeScopeWithSplicing' {
2426 otherSplices = generateSplicesForMkScope "darwin";
2527 extra = spliced: spliced.apple_sdk.frameworks;
2626- f = (self: let
2828+ f = lib.extends aliases (self: let
2729 inherit (self) mkDerivation callPackage;
28302931 # Must use pkgs.callPackage to avoid infinite recursion.
···260262 modules = [ { nixpkgs.hostPlatform = "x86_64-linux"; } ];
261263 };
262264263263-} // lib.optionalAttrs config.allowAliases {
264264- builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06
265265});
266266}