]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Fix peertube default configuration
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 10 Apr 2020 12:54:48 +0000 (14:54 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 10 Apr 2020 12:54:48 +0000 (14:54 +0200)
modules/private/websites/tools/peertube/default.nix
modules/webapps/peertube.nix

index 445030c792b343ba3eb7d1c3a987f28ce7e35184..3345453d1cec5138a1c8f21c59419648fb861e09 100644 (file)
@@ -32,25 +32,6 @@ in {
           https: true
           hostname: 'peertube.immae.eu'
           port: 443
-        rates_limit:
-          api:
-            # 50 attempts in 10 seconds
-            window: 10 seconds
-            max: 50
-          login:
-            # 15 attempts in 5 min
-            window: 5 minutes
-            max: 15
-          signup:
-            # 2 attempts in 5 min (only succeeded attempts are taken into account)
-            window: 5 minutes
-            max: 2
-          ask_send_email:
-            # 3 attempts in 5 min
-            window: 5 minutes
-            max: 3
-        trust_proxy:
-          - 'loopback'
         database:
           hostname: '${env.postgresql.socket}'
           port: 5432
@@ -78,19 +59,7 @@ in {
         smtp:
           transport: sendmail
           sendmail: '/run/wrappers/bin/sendmail'
-          hostname: null
-          port: 465 # If you use StartTLS: 587
-          username: null
-          password: null
-          tls: true # If you use StartTLS: false
-          disable_starttls: false
-          ca_file: null # Used for self signed certificates
           from_address: 'peertube@tools.immae.eu'
-        email:
-          body:
-            signature: "PeerTube"
-          subject:
-            prefix: "[PeerTube]"
         storage:
           tmp: '${pcfg.dataDir}/storage/tmp/'
           avatars: '${pcfg.dataDir}/storage/avatars/'
@@ -104,134 +73,6 @@ in {
           captions: '${pcfg.dataDir}/storage/captions/'
           cache: '${pcfg.dataDir}/storage/cache/'
           plugins: '${pcfg.dataDir}/storage/plugins/'
-        log:
-          level: 'info'
-          rotation:
-            enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate
-            maxFileSize: 12MB
-            maxFiles: 20
-          anonymizeIP: false
-        search:
-          remote_uri:
-            users: true
-            anonymous: false
-        trending:
-          videos:
-            interval_days: 7
-        redundancy:
-          videos:
-            check_interval: '1 hour' # How often you want to check new videos to cache
-            strategies: # Just uncomment strategies you want
-        csp:
-          enabled: false
-          report_only: true # CSP directives are still being tested, so disable the report only mode at your own risk!
-          report_uri:
-        tracker:
-          enabled: true
-          private: true
-          reject_too_many_announces: false
-        history:
-          videos:
-            max_age: -1
-        views:
-          videos:
-            remote:
-              max_age: -1
-        plugins:
-          index:
-            enabled: true
-            check_latest_versions_interval: '12 hours'
-            url: 'https://packages.joinpeertube.org'
-        # Following are saved in local-production.json
-        cache:
-          previews:
-            size: 500 # Max number of previews you want to cache
-          captions:
-            size: 500 # Max number of video captions/subtitles you want to cache
-        admin:
-          email: 'peertube@tools.immae.eu'
-        contact_form:
-          enabled: true
-        signup:
-          enabled: false
-          limit: 10
-          requires_email_verification: false
-          filters:
-            cidr:
-              whitelist: []
-              blacklist: []
-        user:
-          video_quota: -1
-          video_quota_daily: -1
-        transcoding:
-          enabled: false
-          allow_additional_extensions: true
-          allow_audio_files: true
-          threads: 1
-          resolutions:
-            0p: false
-            240p: false
-            360p: false
-            480p: true
-            720p: true
-            1080p: true
-            2160p: false
-          webtorrent:
-            enabled: true
-          hls:
-            enabled: false
-        import:
-          videos:
-            http:
-              enabled: true
-            torrent:
-              enabled: false
-        auto_blacklist:
-          videos:
-            of_users:
-              enabled: false
-        instance:
-          name: 'Immae&#x2019;s PeerTube'
-          short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
-          description: '''
-          terms: '''
-          code_of_conduct: '''
-          moderation_information: '''
-          creation_reason: '''
-          administrator: '''
-          maintenance_lifetime: '''
-          business_model: '''
-          hardware_information: '''
-          languages:
-          categories:
-          default_client_route: '/videos/trending'
-          is_nsfw: false
-          default_nsfw_policy: 'do_not_list'
-          customizations:
-            javascript: '''
-            css: '''
-          robots: |
-            User-agent: *
-            Disallow:
-          securitytxt:
-            "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:"
-        services:
-          twitter:
-            username: '@_immae'
-            whitelisted: false
-        followers:
-          instance:
-            enabled: true
-            manual_approval: false
-        followings:
-          instance:
-            auto_follow_back:
-              enabled: false
-            auto_follow_index:
-              enabled: false
-              index_url: 'https://instances.joinpeertube.org'
-        theme:
-          default: 'default'
         '';
     }];
 
index 281ff8bc8bbfbbbdd6953c17d0f7ad99648bdcc6..1d76e9b3b5f92862b7ac003fd98d7805756cd32e 100644 (file)
@@ -83,6 +83,7 @@ in
       script = ''
         install -m 0750 -d ${cfg.dataDir}/config
         ln -sf ${cfg.configFile} ${cfg.dataDir}/config/production.yaml
+        ln -sf ${cfg.package}/config/default.yaml ${cfg.dataDir}/config/default.yaml
         exec npm run start
       '';