lutwIj // mI'ghach nIgh

qechmey, Qu'mey, 'ej mI'ghach ghItlh

lutmey vI' ghajbogh: #nixos hoch vI' ×

DaH NixOS juH De'wI'wIj polmeH ghu' vIchoHpu'. jaj script vIlo'be', 'ach rep polmeH ghu' vIlo'. jupwI' Mastodon De'wI' 'IHqu' law' ghu'wIj 'IH puS – pa' 20 tupmey ZFS snapshotmey lu'agh – 'ach ghu'vam vImuSHa'. NixOS vImuSHa'choH. AI (De'wI' 'ong) vIlo'be'chugh, ghu'vam vIyajlaHbe', 'ach DaH Nix-De'ghunmey vIlaDlaH. Linux motlh vIlo' vInabpu', 'ach DaH majQa' ghu'vam...

  1. /etc/nixos: NixOS ghu' (hoch .nix De'ghunmey).

  2. /opt/minecraft: Minecraft qo'mey De' je.

  3. /opt/satisfactory: Satisfactory quv De' ghu' je.

  4. /opt/Blog: Blog mu'ghun De' je.

  5. /opt/ui: Mastodon-UI 'ay'mey.

  6. /opt/audiobookshelf: paq chu'wI' De'ghun je.

S3 De' lulDaq RClone lo'taHvIS hoch De' vIlan.

NixOS ghu'


{ config, pkgs, ... }:

{
  # BorgBackup ghu'
  services.borgbackup.jobs.hourly = {
    # S3-mountDaq repository He
    repo = "/opt/S3/Backup/NixOSHomeServer_Borg";

    # peghmu' nIteb
    encryption.mode = "none";

    # De' tIn choHmeH
    compression = "auto,zstd";

    # He polmeH
    paths = [
      "/etc/nixos"
      "/opt/minecraft"
      "/opt/satisfactory"
      "/opt/Blog"
      "/opt/ui"
      "/opt/audiobookshelf"
    ];

    # hoch rep
    startAt = "hourly";

    # repository tagh
    doInit = true;

    # polmeH chot
    prune.keep = {
      within = "1d"; # hoch snapshotmey 24 rep ret
      daily = 7;
      weekly = 4;
      monthly = 12;
    };
  };

  # S3-mount ghu' lugh 'e' yInID, Borg taghpa'
  systemd.services.borgbackup-job-hourly = {
    requires = [ "rclone-s3-mount.service" ];
    after = [ "rclone-s3-mount.service" ];
  };
}

Blog vIcherpu' — #NixOS vIghojmeH. ngeDqu' 'e' vItu'pu'.

WriteFreely lI'qu': mach, nom cherlu'. ghojmeH 'ej taghmeH maj. choHghach vIleghlaH. wivwI'mey vIwiv, Reverse Proxy vIlo' — rIn.

NixOS-Daq choHghachwIj:

{ config, pkgs, ... }:

{
  services.writefreely = {
    enable = true;
    host = "blog.burningboard.org"; 
    settings = {
      server = {
        port = 8080;
        min_log_level = "debug";
      };
      app = {
        host = "https://blog.burningboard.org";
        single_user = true;
        landing = "/read";
        wf_modesty = true;
        federation = true;
        public_stats = true;
        theme = "write";
      };
    };
    stateDir = "/opt/writefreely";
  };

  # Fix für die ActivityPub-Schlüsselgenerierung: Föderation erfordert openssl
  systemd.services.writefreely.path = [ pkgs.openssl ];

  # Automatisches Erstellen des Datenverzeichnisses mit den korrekten Berechtigungen
  systemd.tmpfiles.rules = [
    "d /opt/writefreely 0700 writefreely writefreely -"
  ];

  services.caddy.virtualHosts."blog.burningboard.org".extraConfig = ''
    reverse_proxy 127.0.0.1:8080 {
      header_up Host {host}
      header_up X-Real-IP {remote_host}
      header_up X-Forwarded-For {remote_host}
      header_up X-Forwarded-Proto {scheme}
    }
  '';
}

rIn. NixOS lo'taHvIs, janmey vIcherlaH 'ej vIchoHlaH. ngeDqu'.