Here is a quick how-to if you want to try out the new (supposedly fast) C/C++ linker https://github.com/rui314/mold
In this document I used Ubuntu-22.04 docker container with
- GCC version 11.2.0
- Clang version 14.0.0
Here is a quick how-to if you want to try out the new (supposedly fast) C/C++ linker https://github.com/rui314/mold
In this document I used Ubuntu-22.04 docker container with
| wpa_supplicant -B -i interface -c <(wpa_passphrase 'SSID' 'key'). | |
| ping 1.1.1.1 | |
| parted /dev/nvme0n1 -- mklabel gpt | |
| parted /dev/nvme0n1 -- mkpart primary 512MiB -0 | |
| parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB | |
| parted /dev/nvme0n1 -- set 2 esp on | |
| cryptsetup luksFormat /dev/nvme0n1p1 |
These are my installation-tricks and notes for running Linux on a 2021 Thinkpad
P14s Gen2 with AMD Ryzen 7 5850U. It should also be suitable for the Thinkpad T14 Gen2 AMD as they are technically the same modell.
Meanwhile there is also a good test on youtube and an entry in the arch-wiki, which also comments some points mentioned here.
| { pkgs ? import <nixpkgs> {} }: | |
| let | |
| # To use this shell.nix on NixOS your user needs to be configured as such: | |
| # users.extraUsers.adisbladis = { | |
| # subUidRanges = [{ startUid = 100000; count = 65536; }]; | |
| # subGidRanges = [{ startGid = 100000; count = 65536; }]; | |
| # }; |
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
enableFoo, but there is no way for the Nix
UI to discover them, let alone to provide programmatic ways toI did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).
This is my attempt at doing the same on Nixos.
I recently ran into an issue of MongoDB shell commands not working. The error message was:
Invariant failure !driverName.empty() && !driverVersion.empty() && !osType.empty() && !osName.empty() && !osArchitecture.empty() && !osVersion.empty() src/mongo/rpc/metadata/client_metadata.cpp
I ran an strace on the mongo command and saw it was trying (and failing) to open the following files:
| #!/usr/bin/env $SHELL | |
| alias lsblk="lsblk -o MODEL,VENDOR,NAME,LABEL,SIZE,MOUNTPOINT,FSTYPE" | |
| alias gramps="nix-env -p /nix/var/nix/profiles/system --list-generations" | |
| alias nixos-rebuild="nixos-rebuild -j 6 --cores 8" | |
| # | |
| # -j is how many "jobs" or simultaneous computational processes run in tandem | |
| # --cores is how many CPU cores you want to use | |
| # How do you get these values? `cat /proc/cpuinfo` and look at the number of | |
| # returned "CPUs". They're zero indexed, so if you get the last one as object | |
| # number seven (7), you have 8 cores. |
| [Match] | |
| Name=host* | |
| [Network] | |
| DHCP=yes |
nix-channel and ~/.nix-defexpr are gone. We'll use $NIX_PATH (or user environment specific overrides configured via nix set-path) to look up packages. Since $NIX_PATH supports URLs nowadays, this removes the need for channels: you can just set $NIX_PATH to e.g. https://nixos.org/channels/nixos-15.09/nixexprs.tar.xz and stay up to date automatically.
By default, packages are selected by attribute name, rather than the name attribute. Thus nix install hello is basically equivalent to nix-env -iA hello. The attribute name is recorded in the user environment manifest and used in upgrades. Thus (at least by default) hello won't be upgraded to helloVariant.
@vcunat suggested making this an arbitrary Nix expression rather than an attrpath, e.g. firefox.override { enableFoo = true; }. However, such an expression would not have a key in the user environment, unlike an attrpath. Better to require an explicit flag for this.
TBD: How to deal with search path clashes.