Site Tools


onny:notizen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
onny:notizen [2026/03/24 14:19] – [nixops] 10.250.0.1onny:notizen [2026/04/14 08:59] (current) – [postmarketOS] fdc9:281f:4d7:9ee9::1
Line 291: Line 291:
 Constant quality AV1.  The CRF value can be from 0–63. Lower values mean better quality. Constant quality AV1.  The CRF value can be from 0–63. Lower values mean better quality.
 <code bash> <code bash>
-ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -strict experimental av1_test.mp4+ffmpeg -i input.mov -c:v libsvtav1 -crf 30 -preset 6 -svtav1-params tune=0 -c:a libopus -b:a 128k output.webm
 </code> </code>
 Burn subtitles, fast video conversion Burn subtitles, fast video conversion
Line 617: Line 617:
 </code> </code>
 ==== git ==== ==== git ====
 +
 +unstage changes to a specific file of a specific commit
 +<code bash>
 +git rebase -i 19d0900f23e0b29fc2706dbbf8a806cea7c3e0f2^
 +git restore --staged --source=HEAD^ -- pkgs/by-name/op/openproject/package.nix
 +git restore -- pkgs/by-name/op/openproject/package.nix
 +git commit --amend
 +git rebase --continue
 +</code>
 +
 +merge changes into last commit
 +<code bash>
 +git commit -a --amend --no-edit
 +</code>
 +
 show remote origin show remote origin
 <code bash> <code bash>
 git remote show origin git remote show origin
 </code> </code>
 +
 change remote origin change remote origin
 <code bash> <code bash>
Line 981: Line 997:
 </code> </code>
 ===== systemd ===== ===== systemd =====
 +
 +systemctl show unit environment
 +<code>
 +systemctl show rsshub --property=Environment
 +</code>
 +
 service hardening service hardening
 <code> <code>
Line 1020: Line 1042:
 <code> <code>
 sudo nixos-rebuild switch --flake '/etc/nixos#joes-desktop' sudo nixos-rebuild switch --flake '/etc/nixos#joes-desktop'
-sudo nixos-rebuild boot --flake '/etc/nixos#joes-desktop' # raspi specific 
-</code> 
- 
-update channel, rebuild and switch 
- 
-<code bash> 
-nixos-rebuild switch --upgrade 
 </code> </code>
  
Line 1033: Line 1048:
 <code bash> <code bash>
 nix search gedit nix search gedit
-</code> 
- 
-nixos testing environement 
- 
-<code bash> 
-nix-shell -p toilet 
-</code> 
- 
-install unstable package 
- 
-<code bash> 
-nix-channel --add https://nixos.org/channels/nixos-unstable unstable 
-nix-channel --update unstable 
-nix-env -iA unstable.pdfarranger 
 </code> </code>
  
Line 1083: Line 1084:
   ];   ];
 </code> </code>
 +
 garbade collector garbade collector
 <code bash> <code bash>
 nix-collect-garbage -d nix-collect-garbage -d
 </code> </code>
 +
 list package files list package files
 <code bash> <code bash>
 find $(nix eval -f /etc/nixos/apps --raw xerox6000-6010.outPath) find $(nix eval -f /etc/nixos/apps --raw xerox6000-6010.outPath)
 </code> </code>
 +
 install package install package
 <code bash> <code bash>
 nix-env -i icecat nix-env -i icecat
 </code> </code>
 +
 remove package remove package
 <code bash> <code bash>
Line 1124: Line 1129:
 source venv/bin/activate source venv/bin/activate
 pip install -r requirements.txt pip install -r requirements.txt
-</code> 
- 
-local repository (nixpkgs clone) as systemwide channel  
- 
-<code bash> 
-$ nix-build nixos/release.nix -A channel --arg nixpkgs  '{ outPath = ./. ; revCount = "'$(git rev-list HEAD | wc -l)'"; shortRev = "'$(git rev-parse --short HEAD)'"; }' 
-... 
-/nix/store/hash-name/ 
-$ sudo nix-channel --remove nixos 
-$ sudo nix-channel --add file:///nix/store/hash-name/tarballs/thetarball.tar.xz nixos 
-$ sudo nix-channel --update 
 </code> </code>
  
Line 1169: Line 1163:
 curl -sL https://github.com/NixOS/nixpkgs/pull/64977.patch \ curl -sL https://github.com/NixOS/nixpkgs/pull/64977.patch \
                 | head -n 1 | grep -o -E -e "[0-9a-f]{40}"                 | head -n 1 | grep -o -E -e "[0-9a-f]{40}"
-</code> 
-allow unfree package installation nix-env 
-<code bash> 
-env NIXPKGS_ALLOW_UNFREE=1 nix-env -f /home/onny/projects/nur-packages -iA ocenaudio 
 </code> </code>
  
Line 1220: Line 1210:
 <code> <code>
 command-not-found telnet command-not-found telnet
-</code> 
- 
-use module from unstable 
- 
-<code> 
-nixpkgs.config.packageOverrides = pkgs: rec { 
-  unstable = import unstableTarball { }; 
-  opensnitch = unstable.opensnitch; 
-}; 
-</code> 
- 
-overlay: use / overwrite package from custom remote or local repo / fork: 
- 
-<code> 
-  nixpkgs.overlays = [ 
-    (self: super: { 
-      foo2zjs = (import (builtins.fetchTarball { 
-        url = 
-          "https://github.com/onny/nixpkgs/archive/foo2zjs.tar.gz"; 
-        sha256 = "1jp98jhc4mw9bipdiq7qdrzn3lslk4mi7prqfh2v43isgsvpd6bg"; 
-      }) { config = { allowUnfree = true; }; }).foo2zjs; 
-      linux-wifi-hotspot = (import /home/onny/projects/nixpkgs2 {}).linux-wifi-hotspot; 
-    }) 
-  ]; 
 </code> </code>
  
Line 1618: Line 1584:
 </code> </code>
  
 +==== system config ====
 +
 +use module and package from remote repo
 +
 +<code>
 +{
 +  inputs = {
 +    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
 +    invoiceplane-unstable.url = "nixpkgs/master";
 +  };
 +};
 +</code>
 +
 +<code>
 +disabledModules = [
 +  "services/web-apps/invoiceplane.nix"
 +];
 +imports = [
 +  "${inputs.invoiceplane-unstable}/nixos/modules/services/web-apps/invoiceplane.nix"
 +];
 +
 +nixpkgs.overlays = [
 +  (self: super: {
 +    invoiceplane = inputs.invoiceplane-unstable.legacyPackages.x86_64-linux.invoiceplane;
 +    plausible = inputs.plausible-riscv.legacyPackages.x86_64-linux.pkgsCross.riscv64.plausible;
 +  })
 +];
 +</code>
 +==== modules ====
 +
 +converting cfg.settings to strings only for systemd environment variables etc
 +
 +<code>
 +let
 +  configEnv = concatMapAttrs (
 +    name: value:
 +    optionalAttrs (value != null) {
 +      ${name} = if isBool value then boolToString value else toString value;
 +    }
 +  ) cfg.settings;
 +in
 +</code>
 ==== flake ==== ==== flake ====
  
 local file path as flake input local file path as flake input
 <code> <code>
-inputs.verwaltungstracker.url = "path:/home/onny/projects/verwaltungstracker";+inputs.verwaltungstracker.url = "git+file:///home/onny/projects/verwaltungstracker"; 
 +</code> 
 + 
 +development flake.nix 
 +<code> 
 +
 +  description = "Invoiceplane invoice template development shell"; 
 + 
 +  inputs.nixpkgs.url = "nixpkgs/nixos-25.11"; 
 + 
 +  outputs = { self, nixpkgs, ... }@inputs: 
 +    let 
 +      pkgs = nixpkgs.legacyPackages.x86_64-linux; 
 +    in { 
 +    devShells.x86_64-linux.default = pkgs.mkShell { 
 +      packages = [ pkgs.pnpm ]; 
 +    }; 
 + 
 +  }; 
 +}
 </code> </code>
 ===== filesystem ===== ===== filesystem =====
Line 1732: Line 1759:
 pnpm install jquery@3.5.1 --save # see npmjs.com pnpm install jquery@3.5.1 --save # see npmjs.com
 </code> </code>
-update packages+ 
 +check package updates
 <code bash> <code bash>
 pnpm outdated pnpm outdated
 +</code>
 +
 +update specific package
 +<code bash>
 +pnpm update @nextcloud/dialogs --latest
 </code> </code>
 ===== gitlab-ci ===== ===== gitlab-ci =====
Line 1754: Line 1787:
  
 ===== postmarketOS ===== ===== postmarketOS =====
 +
 +update checksum
 +<code bash>
 +pmbootstrap checksum device-samsung-dream
 +</code>
  
 general chroot management general chroot management
onny/notizen.1774361987.txt.gz · Last modified: by 10.250.0.1