Unverified Commit 3c070a08 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 019a8d20 6d468c3a
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1341,6 +1341,12 @@
    githubId = 84152630;
    name = "Ashley Chiara";
  };
  ashleyghooper = {
    email = "ashleyghooper@gmail.com";
    github = "ashleyghooper";
    githubId = 11037075;
    name = "Ashley Hooper";
  };
  aske = {
    email = "aske@fmap.me";
    github = "aske";
@@ -1469,6 +1475,12 @@
    githubId = 574938;
    name = "Jonathan Glines";
  };
  austin-artificial = {
    email = "austin.platt@artificial.io";
    github = "austin-artificial";
    githubId = 126663376;
    name = "Austin Platt";
  };
  austinbutler = {
    email = "austinabutler@gmail.com";
    github = "austinbutler";
@@ -4059,6 +4071,15 @@
    githubId = 108501;
    name = "David Pflug";
  };
  dr460nf1r3 = {
    email = "root@dr460nf1r3.org";
    github = "dr460nf1r3";
    githubId = 12834713;
    name = "Nico Jensch";
    keys = [{
      fingerprint = "D245 D484 F357 8CB1 7FD6  DA6B 67DB 29BF F3C9 6757";
    }];
  };
  dramaturg = {
    email = "seb@ds.ag";
    github = "dramaturg";
+6 −0
Original line number Diff line number Diff line
@@ -268,6 +268,12 @@ In addition to numerous new and upgraded packages, this release has the followin

- `services.borgmatic` now allows for multiple configurations, placed in `/etc/borgmatic.d/`, you can define them with `services.borgmatic.configurations`.

- `service.openafsServer` features a new backup server `pkgs.fabs` as a
  replacement for openafs's own `buserver`. See
  [FABS](https://github.com/openafs-contrib/fabs) to check if this is an viable
  replacement. It stores backups as volume dump files and thus better integrates
  into contemporary backup solutions.

- The `dnsmasq` service now takes configuration via the
  `services.dnsmasq.settings` attribute set. The option
  `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
+3 −3
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ let
  inherit (lib.attrsets) attrNames filterAttrs hasAttr mapAttrs mapAttrsToList optionalAttrs;
  inherit (lib.modules) mkDefault mkIf;
  inherit (lib.options) literalExpression mkEnableOption mkOption;
  inherit (lib.strings) concatStringsSep optionalString toLower;
  inherit (lib.strings) concatLines optionalString toLower;
  inherit (lib.types) addCheck attrsOf lines nonEmptyStr nullOr package path port str strMatching submodule;

  # Checks if given list of strings contains unique
@@ -164,7 +164,7 @@ let
        mkLine = k: v: k + optionalString (v!="") "  ${v}";
        lines = mapAttrsToList mkLine attrset;
      in
        concatStringsSep "\n" lines;
        concatLines lines;
    config.stanza = ''
      server  ${config.name}
      ${config.text}
@@ -263,7 +263,7 @@ let

    ${optionalString (cfg.defaultServername!=null) "defaultserver  ${cfg.defaultServername}"}

    ${concatStringsSep "\n" (mapAttrsToList (k: v: v.stanza) cfg.servers)}
    ${concatLines (mapAttrsToList (k: v: v.stanza) cfg.servers)}
  '';

in
+68 −18
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@
with import ./lib.nix { inherit config lib pkgs; };

let
  inherit (lib) concatStringsSep literalExpression mkIf mkOption optionalString types;
  inherit (lib) concatStringsSep literalExpression mkIf mkOption mkEnableOption
  optionalString types;

  bosConfig = pkgs.writeText "BosConfig" (''
    restrictmode 1
@@ -24,9 +25,15 @@ let
    parm ${openafsSrv}/libexec/openafs/salvageserver ${cfg.roles.fileserver.salvageserverArgs}
    parm ${openafsSrv}/libexec/openafs/dasalvager ${cfg.roles.fileserver.salvagerArgs}
    end
  '') + (optionalString (cfg.roles.database.enable && cfg.roles.backup.enable) ''
  '') + (optionalString (cfg.roles.database.enable && cfg.roles.backup.enable && (!cfg.roles.backup.enableFabs)) ''
    bnode simple buserver 1
    parm ${openafsSrv}/libexec/openafs/buserver ${cfg.roles.backup.buserverArgs} ${optionalString (cfg.roles.backup.cellServDB != []) "-cellservdb /etc/openafs/backup/"}
    parm ${openafsSrv}/libexec/openafs/buserver ${cfg.roles.backup.buserverArgs} ${optionalString useBuCellServDB "-cellservdb /etc/openafs/backup/"}
    end
  '') + (optionalString (cfg.roles.database.enable &&
                         cfg.roles.backup.enable &&
                         cfg.roles.backup.enableFabs) ''
    bnode simple buserver 1
    parm ${lib.getBin pkgs.fabs}/bin/fabsys server --config ${fabsConfFile} ${cfg.roles.backup.fabsArgs}
    end
  ''));

@@ -34,12 +41,27 @@ let
    pkgs.writeText "NetInfo" ((concatStringsSep "\nf " cfg.advertisedAddresses) + "\n")
  else null;

  buCellServDB = pkgs.writeText "backup-cellServDB-${cfg.cellName}" (mkCellServDB cfg.cellName cfg.roles.backup.cellServDB);
  buCellServDB = pkgs.writeText "backup-cellServDB-${cfg.cellName}"
    (mkCellServDB cfg.cellName cfg.roles.backup.cellServDB);

  useBuCellServDB = (cfg.roles.backup.cellServDB != []) && (!cfg.roles.backup.enableFabs);

  cfg = config.services.openafsServer;

  udpSizeStr = toString cfg.udpPacketSize;

  fabsConfFile = pkgs.writeText "fabs.yaml" (builtins.toJSON ({
    afs = {
      aklog = cfg.package + "/bin/aklog";
      cell = cfg.cellName;
      dumpscan = cfg.package + "/bin/afsdump_scan";
      fs = cfg.package + "/bin/fs";
      pts = cfg.package + "/bin/pts";
      vos = cfg.package + "/bin/vos";
    };
    k5start.command = (lib.getBin pkgs.kstart) + "/bin/k5start";
  } // cfg.roles.backup.fabsExtraConfig));

in {

  options = {
@@ -80,8 +102,8 @@ in {
      };

      package = mkOption {
        default = pkgs.openafs.server or pkgs.openafs;
        defaultText = literalExpression "pkgs.openafs.server or pkgs.openafs";
        default = pkgs.openafs;
        defaultText = literalExpression "pkgs.openafs";
        type = types.package;
        description = lib.mdDoc "OpenAFS package for the server binaries";
      };
@@ -154,16 +176,20 @@ in {
        };

        backup = {
          enable = mkOption {
            default = false;
            type = types.bool;
            description = lib.mdDoc ''
              Backup server role. Use in conjunction with the
          enable = mkEnableOption (lib.mdDoc ''
            Backup server role. When using OpenAFS built-in buserver, use in conjunction with the
            `database` role to maintain the Backup
            Database. Normally only used in conjunction with tape storage
            or IBM's Tivoli Storage Manager.
            '';
          };

            For a modern backup server, enable this role and see
            {option}`enableFabs`.
          '');

          enableFabs = mkEnableOption (lib.mdDoc ''
            FABS, the flexible AFS backup system. It stores volumes as dump files, relying on other
            pre-existing backup solutions for handling them.
          '');

          buserverArgs = mkOption {
            default = "";
@@ -181,6 +207,30 @@ in {
              other database server machines.
            '';
          };

          fabsArgs = mkOption {
            default = "";
            type = types.str;
            description = lib.mdDoc ''
              Arguments to the fabsys process. See
              {manpage}`fabsys_server(1)` and
              {manpage}`fabsys_config(1)`.
            '';
          };

          fabsExtraConfig = mkOption {
            default = {};
            type = types.attrs;
            description = lib.mdDoc ''
              Additional configuration parameters for the FABS backup server.
            '';
            example = literalExpression ''
            {
              afs.localauth = true;
              afs.keytab = config.sops.secrets.fabsKeytab.path;
            }
            '';
          };
        };
      };

@@ -239,7 +289,7 @@ in {
        mode = "0644";
      };
      buCellServDB = {
        enable = (cfg.roles.backup.cellServDB != []);
        enable = useBuCellServDB;
        text = mkCellServDB cfg.cellName cfg.roles.backup.cellServDB;
        target = "openafs/backup/CellServDB";
      };
@@ -257,7 +307,7 @@ in {
        preStart = ''
          mkdir -m 0755 -p /var/openafs
          ${optionalString (netInfo != null) "cp ${netInfo} /var/openafs/netInfo"}
          ${optionalString (cfg.roles.backup.cellServDB != []) "cp ${buCellServDB}"}
          ${optionalString useBuCellServDB "cp ${buCellServDB}"}
        '';
        serviceConfig = {
          ExecStart = "${openafsBin}/bin/bosserver -nofork";
+2 −2
Original line number Diff line number Diff line
@@ -21,13 +21,13 @@

mkDerivation rec {
  pname = "organicmaps";
  version = "2023.03.05-5";
  version = "2023.04.02-7";

  src = fetchFromGitHub {
    owner = "organicmaps";
    repo = "organicmaps";
    rev = "${version}-android";
    sha256 = "sha256-PfudozmrL8jNS/99nxSn0B3E53W34m4/ZN0y2ucB2WI=";
    sha256 = "sha256-xXBzHo7IOo2f1raGnpFcsvs++crHMI5SACIc345cX7g=";
    fetchSubmodules = true;
  };

Loading