onny:notizen
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| onny:notizen [2026/05/18 16:27] – [git] 10.250.0.1 | onny:notizen [2026/07/14 09:42] (current) – [packaging] 10.250.0.1 | ||
|---|---|---|---|
| Line 489: | Line 489: | ||
| </ | </ | ||
| - | ==== wordpress docker image ==== | ||
| - | <file yml docker-compose.yml> | ||
| - | version: ' | ||
| - | |||
| - | services: | ||
| - | db: | ||
| - | | ||
| - | | ||
| - | - db_data:/ | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | - db | ||
| - | | ||
| - | | ||
| - | - .:/ | ||
| - | | ||
| - | - " | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | volumes: | ||
| - | db_data: | ||
| - | </ | ||
| - | Note the mount instruction in the volumes section, providing the local theme to the wordpress container. | ||
| - | <code bash> | ||
| - | docker-compose up -d | ||
| - | </ | ||
| - | Visit 127.0.0.1: | ||
| ===== eigenes system setup ===== | ===== eigenes system setup ===== | ||
| Line 635: | Line 598: | ||
| </ | </ | ||
| ==== git ==== | ==== git ==== | ||
| + | |||
| + | git fetch remote branch of a pull request | ||
| + | < | ||
| + | git fetch upstream pull/ | ||
| + | git checkout pr-518799 | ||
| + | </ | ||
| git show, list only affected files | git show, list only affected files | ||
| Line 1255: | Line 1224: | ||
| <code bash> | <code bash> | ||
| nix-shell -p ' | nix-shell -p ' | ||
| - | </ | ||
| - | |||
| - | fetchpatch array | ||
| - | |||
| - | < | ||
| - | patches = map fetchpatch [ | ||
| - | /* This patch is currently necessary for the unit test suite to run correctly. | ||
| - | * See https:// | ||
| - | * and https:// | ||
| - | */ | ||
| - | #{ | ||
| - | # name = " | ||
| - | # sha256 = " | ||
| - | # url = " | ||
| - | #} | ||
| - | |||
| - | # This patch fixes test compile issues with glibc 2.33+. | ||
| - | #{ | ||
| - | # name = " | ||
| - | # sha256 = " | ||
| - | # url = " | ||
| - | #} | ||
| </ | </ | ||
| Line 1311: | Line 1258: | ||
| }; | }; | ||
| }; | }; | ||
| + | </ | ||
| + | |||
| + | update package | ||
| + | |||
| + | < | ||
| + | nix-update gelly | ||
| + | nix-update stamp --version=branch=main | ||
| </ | </ | ||
| ==== packaging ==== | ==== packaging ==== | ||
| + | fetchpatch | ||
| + | |||
| + | < | ||
| + | patches = [ | ||
| + | (fetchpatch { | ||
| + | url = " | ||
| + | hash = " | ||
| + | name = " | ||
| + | }) | ||
| + | ]; | ||
| + | </ | ||
| + | |||
| + | fetchpatch array | ||
| + | |||
| + | < | ||
| + | patches = map fetchpatch [ | ||
| + | /* This patch is currently necessary for the unit test suite to run correctly. | ||
| + | * See https:// | ||
| + | * and https:// | ||
| + | */ | ||
| + | #{ | ||
| + | # name = " | ||
| + | # sha256 = " | ||
| + | # url = " | ||
| + | #} | ||
| + | |||
| + | # This patch fixes test compile issues with glibc 2.33+. | ||
| + | #{ | ||
| + | # name = " | ||
| + | # sha256 = " | ||
| + | # url = " | ||
| + | #} | ||
| + | </ | ||
| + | |||
| + | systemd hardening | ||
| + | |||
| + | < | ||
| + | { | ||
| + | ... | ||
| + | }: | ||
| + | |||
| + | let | ||
| + | |||
| + | defaultServiceConfig = { | ||
| + | User = " | ||
| + | Group = " | ||
| + | WorkingDirectory = " | ||
| + | StateDirectory = cfg.stateDir; | ||
| + | # Service hardening | ||
| + | ReadWritePaths = [ cfg.stateDir ]; | ||
| + | CacheDirectory = " | ||
| + | AmbientCapabilities = ""; | ||
| + | CapabilityBoundingSet = ""; | ||
| + | # ProtectClock adds DeviceAllow=char-rtc r | ||
| + | DeviceAllow = ""; | ||
| + | DevicePolicy = " | ||
| + | LockPersonality = true; | ||
| + | # Loosening setting, required by Ruby daemon | ||
| + | MemoryDenyWriteExecute = false; | ||
| + | NoNewPrivileges = true; | ||
| + | RemoveIPC = true; | ||
| + | PrivateDevices = true; | ||
| + | PrivateMounts = true; | ||
| + | PrivateTmp = true; | ||
| + | PrivateUsers = true; | ||
| + | ProtectClock = true; | ||
| + | ProtectHome = true; | ||
| + | ProtectHostname = true; | ||
| + | ProtectSystem = " | ||
| + | ProtectControlGroups = true; | ||
| + | ProtectKernelLogs = true; | ||
| + | ProtectKernelModules = true; | ||
| + | ProtectKernelTunables = true; | ||
| + | ProtectProc = " | ||
| + | ProcSubset = " | ||
| + | RestrictAddressFamilies = [ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ]; | ||
| + | RestrictNamespaces = true; | ||
| + | RestrictRealtime = true; | ||
| + | RestrictSUIDSGID = true; | ||
| + | SystemCallArchitectures = " | ||
| + | SystemCallFilter = [ | ||
| + | " | ||
| + | # Loosening setting, required by Ruby daemon | ||
| + | #" | ||
| + | ]; | ||
| + | UMask = " | ||
| + | }; | ||
| + | |||
| + | in | ||
| + | { | ||
| + | |||
| + | [...] | ||
| + | systemd.services." | ||
| + | serviceConfig = defaultServiceConfig // { | ||
| + | </ | ||
| + | |||
| + | python modules hooks | ||
| + | |||
| + | < | ||
| + | nativeCheckInputs = [ | ||
| + | pytestCheckHook | ||
| + | writableTmpDirAsHomeHook | ||
| + | ] | ||
| + | </ | ||
| + | |||
| + | update script git updater | ||
| + | |||
| + | < | ||
| + | passthru.updateScript = gitUpdater { | ||
| + | ignoredVersions = " | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | debuggig, run commands inside derivation | ||
| + | |||
| + | < | ||
| + | nix develop -f . stamp -c bash -c ' | ||
| + | nix develop -f . stamp -c bash -c ' | ||
| + | nix develop -f . stamp -c bash -c ' | ||
| + | 2.88.1 | ||
| + | </ | ||
| ===== tools ===== | ===== tools ===== | ||
| Line 1641: | Line 1720: | ||
| invoiceplane = inputs.invoiceplane-unstable.legacyPackages.x86_64-linux.invoiceplane; | invoiceplane = inputs.invoiceplane-unstable.legacyPackages.x86_64-linux.invoiceplane; | ||
| plausible = inputs.plausible-riscv.legacyPackages.x86_64-linux.pkgsCross.riscv64.plausible; | plausible = inputs.plausible-riscv.legacyPackages.x86_64-linux.pkgsCross.riscv64.plausible; | ||
| + | }) | ||
| + | ]; | ||
| + | </ | ||
| + | |||
| + | overlay examples | ||
| + | |||
| + | < | ||
| + | nixpkgs.overlays = [ | ||
| + | (self: super: { | ||
| + | |||
| + | python3 = super.python3.override { | ||
| + | packageOverrides = python-final: | ||
| + | mypy = python-prev.mypy.overridePythonAttrs (old: { | ||
| + | nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ | ||
| + | super.librt | ||
| + | ]; | ||
| + | }); | ||
| + | }; | ||
| + | }; | ||
| + | |||
| + | bcachefs-tools = super.bcachefs-tools.overrideAttrs (final: oldAttrs: { | ||
| + | version = " | ||
| + | src = super.fetchFromGitHub { | ||
| + | owner = " | ||
| + | repo = " | ||
| + | rev = " | ||
| + | hash = " | ||
| + | }; | ||
| + | cargoHash = null; | ||
| + | cargoDeps = pkgs.rustPlatform.fetchCargoVendor { | ||
| + | src = final.src; | ||
| + | hash = " | ||
| + | }; | ||
| + | }); | ||
| + | |||
| }) | }) | ||
| ]; | ]; | ||
| Line 1816: | Line 1930: | ||
| ===== postmarketOS ===== | ===== postmarketOS ===== | ||
| + | ====== personal setup ====== | ||
| + | * enable beacondb in geoclue conf | ||
| + | |||
| + | ====== notes ====== | ||
| update checksum | update checksum | ||
| <code bash> | <code bash> | ||
| Line 1944: | Line 2062: | ||
| # download kernel and stuff from here http:// | # download kernel and stuff from here http:// | ||
| qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | ||
| + | </ | ||
| + | |||
| + | ===== mariadb ===== | ||
| + | |||
| + | import dump | ||
| + | <code bash> | ||
| + | mariadb -u root nextcloud < mydump.sql | ||
| + | </ | ||
| + | |||
| + | list tables and size of database nextcloud | ||
| + | <code bash> | ||
| + | SELECT | ||
| + | table_name AS `Table`, | ||
| + | ROUND(((data_length + index_length) / 1024 / 1024), 2) AS `Size (MB)`, | ||
| + | table_rows AS `Approx Rows` | ||
| + | FROM information_schema.tables | ||
| + | WHERE table_schema = ' | ||
| + | ORDER BY (data_length + index_length) DESC; | ||
| </ | </ | ||
| Line 2000: | Line 2136: | ||
| multi-cursor selection mode | multi-cursor selection mode | ||
| + | |||
| < | < | ||
| Normal mode -> V (visual mode) -> Shift+C (multiple times) -> i (insert mode) -> Enter something | Normal mode -> V (visual mode) -> Shift+C (multiple times) -> i (insert mode) -> Enter something | ||
| ESC -> , | ESC -> , | ||
| + | </ | ||
| + | |||
| + | sort | ||
| + | |||
| + | < | ||
| + | - select multiple lines | ||
| + | - press Alt-S | ||
| + | - type ": | ||
| </ | </ | ||
onny/notizen.1779121669.txt.gz · Last modified: by 10.250.0.1
