Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocis: init at 5.0.7 #340706

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

ocis: init at 5.0.7 #340706

wants to merge 1 commit into from

Conversation

xinyangli
Copy link
Contributor

@xinyangli xinyangli commented Sep 9, 2024

Description of changes

Build ownCloud Infinite Scale from source. It can be built successfully, but I do not have enough time to fully test the binary at the moment.

The EULA applies to release tarball. Can we safely mark this package as Apache 2.0 since we are building from source?

Related: #230190

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@poperigby
Copy link
Contributor

poperigby commented Sep 17, 2024

I'm getting this error on startup:

{"level":"fatal","service":"idp","error":"open identifier/index.html: file does not exist","time":"2024-09-16T19:53:11-07:00","message":"Could not open index template"

This is my configuration:

{ config, inputs, system, ... }:

let
    cfg = config.services.ocis;
in
{
    services = {
        ocis = {
            enable = true;
            package = inputs.ocis.legacyPackages.${system}.ocis;
            environment = {
                NOTIFICATIONS_SMTP_HOST = "smtp.sendgrid.net";
                NOTIFICATIONS_SMTP_PORT = "587";
                NOTIFICATIONS_SMTP_SENDER = "[email protected]";
                NOTIFICATIONS_SMTP_USERNAME = "apikey";
            };
            environmentFile = config.sops.templates.ocis-secrets.path;
        };
        caddy.virtualHosts."files.haddock.cc".extraConfig = ''
            import auth
            reverse_proxy :${toString cfg.port}
        '';
    };

    sops = {
        templates.ocis-secrets = {
            content = # bash
            ''
                # IDs & passwords
                GATEWAY_STORAGE_USERS_MOUNT_ID=${config.sops.placeholder."haddock/ocis/gateway_storage_users_mount_id"}
                GRAPH_APPLICATION_ID=${config.sops.placeholder."haddock/ocis/graph_application_id"}
                IDM_IDPSVC_PASSWORD=${config.sops.placeholder."haddock/ocis/idm_idpsvc_password"}
                IDM_REVASVC_PASSWORD=${config.sops.placeholder."haddock/ocis/idm_revasvc_password"}
                IDM_SVC_PASSWORD=${config.sops.placeholder."haddock/ocis/idm_svc_password"}
                OCIS_JWT_SECRET=${config.sops.placeholder."haddock/ocis/jwt_secret"}
                OCIS_LDAP_BIND_PASSWORD=${config.sops.placeholder."haddock/ocis/ldap_bind_password"}
                OCIS_MACHINE_AUTH_API_KEY=${config.sops.placeholder."haddock/ocis/machine_auth_api_key"}
                OCIS_SERVICE_ACCOUNT_ID=${config.sops.placeholder."haddock/ocis/service_account_id"}
                OCIS_SERVICE_ACCOUNT_SECRET=${config.sops.placeholder."haddock/ocis/service_account_secret"}
                OCIS_SYSTEM_USER_API_KEY=${config.sops.placeholder."haddock/ocis/system_user_api_key"}
                OCIS_SYSTEM_USER_ID=${config.sops.placeholder."haddock/ocis/system_user_id"}
                OCIS_TRANSFER_SECRET=${config.sops.placeholder."haddock/ocis/transfer_secret"}
                STORAGE_USERS_MOUNT_ID=${config.sops.placeholder."haddock/ocis/storage_users_mount_id"}
                # Mail
                NOTIFICATIONS_SMTP_PASSWORD=${config.sops.placeholder.sendgrid-api-key_ocis}
            '';
            owner = cfg.user;
        };
        secrets = {
            "haddock/ocis/gateway_storage_users_mount_id".owner = cfg.user;
            "haddock/ocis/graph_application_id".owner = cfg.user;
            "haddock/ocis/jwt_secret".owner = cfg.user;
            "haddock/ocis/ldap_bind_password".owner = cfg.user;
            "haddock/ocis/machine_auth_api_key".owner = cfg.user;
            "haddock/ocis/service_account_id".owner = cfg.user;
            "haddock/ocis/service_account_secret".owner = cfg.user;
            "haddock/ocis/storage_users_mount_id".owner = cfg.user;
            "haddock/ocis/system_user_api_key".owner = cfg.user;
            "haddock/ocis/system_user_id".owner = cfg.user;
            "haddock/ocis/transfer_secret".owner = cfg.user;
            "haddock/ocis/idm_idpsvc_password".owner = cfg.user;
            "haddock/ocis/idm_revasvc_password".owner = cfg.user;
            "haddock/ocis/idm_svc_password".owner = cfg.user;
            ocis-oidc-client-id_ocis = {
                key = "haddock/ocis/oidc_client_id";
                owner = cfg.user;
            };
            ocis-oidc-client-id_authelia = {
                key = "haddock/ocis/oidc_client_id";
                owner = "authelia-haddock";
            };
            ocis-oidc-client-secret_authelia = {
                key = "haddock/ocis/oidc_client_secret/authelia";
                owner = "authelia-haddock";
            };
            sendgrid-api-key_ocis = {
                key = "common/sendgrid/api_key";
                owner = cfg.user;
            };
        };
    };
}

Did you forget to copy identifier/index.html over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants