# sc.exe start usbipd # admin pwsh
$ usbipd bind --busid 1-2 # pwsh
# \# meaning with sudo, $ meaning regular wsl
$ sudo -i systemctl start wsl-vpnkit
$ sudo systemctl stop usbip-auto-attach@1-2.service
# usbip list --remote="$(grep nameserver /etc/resolv.conf | cut -d' ' -f2)"
definitly use scoop and winget (https://github.com/microsoft/winget-cli, https://github.com/microsoft/winget-cli/releases or via scoop)
the latter also manages system packages.
winget upgrade --allow-reboot --force -r -u --uninstall-previous --skip-dependencies -h --disable-interactivity
scoop clean:
$(scoop list) | ForEach-Object { cmd /c scoop cleanup $_.Name }
usbip list --remote="$(grep nameserver /etc/resolv.conf | cut -d' ' -f2)"
Exportable USB devices
======================
- 172.23.128.1
1-2: Canon, Inc. : CanoScan N1240U/LiDE 30 (04a9:220e)
: USB\VID_04A9&PID_220E\5&665DA22&0&2
: Vendor Specific Class / unknown subclass / unknown protocol (ff/00/ff)
: 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/ff)
export TERMINFO=/data/data/com.termux.nix/files/usr/etc/profiles/per-user/nix-on-droid/share/terminfo
for n in {1..10}; do echo "$n"; done | nix run nixpkgs#skim
also helped: https://discourse.nixos.org/t/error-with-terminfo-when-running-bash-with-nix-run-on-nixos/5660
I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.
I want the config to look like this:
{
services.zfs-auto-scrub = {
tank = "Sat *-*-* 00:00:00";
let | |
nixbuildDomain = "eu.nixbuild.net"; | |
nixbuildKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; | |
nixbuildPlatforms = [ "x86_64-linux" "aarch64-linux" ]; | |
nixbuildFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ]; | |
nixbuildSSH = '' | |
Host eu.nixbuild.net | |
PubkeyAcceptedKeyTypes ssh-ed25519 | |
ServerAliveInterval 60 | |
IPQoS throughput |
- Put all the files in place as mentioned in https://docs.nixbuild.net/getting-started/ (for user
root
/ nix-daemon) - Important passwordless key root-readable for builder access and optional regular pubkey for shell access
- Important
chmod 0600 ~/.ssh/my-nixbuild-key
and all three files in/root
and readable byroot
:
- .ssh/keyfile
- .ssh/config
- .ssh/known_hosts
- the call has to contain
--system
on non-NixOS when for another architecture is built, i. e.:
nix shell nixpkgs#postgresql -c psql -h ipaddress -U username -d dbname