This commit is contained in:
Daniel Langbein 2025-02-03 15:32:09 +01:00
parent 3849dd9a60
commit 2f54aa81c9
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -33,10 +33,11 @@ This document contains general notes about NixOS that are independent of my NixO
* [Evaluate expressions in the context of a NixOS configuration managed with Colmena](#evaluate-expressions-in-the-context-of-a-nixos-configuration-managed-with-colmena)
* [Evaluate expressions](#evaluate-expressions)
* [Escape strings](#escape-strings)
* [Run AppImages](#run-appimages)
* [Audio troubleshooting - Realtek ALC898 Audio Codec on ASRock Z77 Extreme 4](#audio-troubleshooting---realtek-alc898-audio-codec-on-asrock-z77-extreme-4)
* [Graphic drivers](#graphic-drivers)
* [XDG mimes, desktop files](#xdg-mimes-desktop-files)
* [nix-shell - Development Environments](#nix-shell---development-environments)
* [Run AppImages](#run-appimages)
* [Additional resources](#additional-resources)
* [Nix Pills](#nix-pills)
* [Papers](#papers)
@ -823,21 +824,6 @@ Indented strings (e.g. `''foo bar''`):
URIs can be written without quotes (e.g. `http://example.org/foo.bar`).
## Run AppImages
* https://nixos.wiki/wiki/Appimage
```shell
# Note how your shell prefix changes.
nix-shell -p appimage-run
```
```shell
# Inside the shell, you can run an AppImage:
appimage-run ~/Downloads/ubports-installer_0.10.0_linux_x86_64.AppImage
```
See the [binfmt option](https://nixos.org/manual/nixos/stable/options#opt-programs.appimage.binfmt) to e.g. run AppImages of other processor architectures.
## Audio troubleshooting - Realtek ALC898 Audio Codec on ASRock Z77 Extreme 4
TODO: I couldn't get the onboard audio to work.
@ -1011,6 +997,45 @@ xdg-mime query default text/html
#=> firefox.desktop
```
## nix-shell - Development Environments
Add packages to `PATH` and run `bash` command:
```shell
nix-shell -p ungoogled-chromium --run 'chromium'
```
Add packages from `unstable` channel:
- https://discourse.nixos.org/t/selecting-a-channel-with-nix-shell/4247/4
- https://discourse.nixos.org/t/selecting-a-channel-with-nix-shell/4247/8
```shell
# This doesn't seem to work!
#nix-shell -p pmbootstrap '<unstable>' --run 'pmbootstrap -V'
nix-shell -I nixpkgs=/nix/var/nix/profiles/per-user/root/channels/unstable -p pmbootstrap --run 'pmbootstrap -V'
# or
NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/unstable nix-shell -p pmbootstrap --run 'pmbootstrap -V'
nix-shell -p '(import <unstable> {}).pmbootstrap' --run 'pmbootstrap -V'
```
## Run AppImages
* https://nixos.wiki/wiki/Appimage
```shell
# Note how your shell prefix changes.
nix-shell -p appimage-run
```
```shell
# Inside the shell, you can run an AppImage:
appimage-run ~/Downloads/ubports-installer_0.10.0_linux_x86_64.AppImage
```
See the [binfmt option](https://nixos.org/manual/nixos/stable/options#opt-programs.appimage.binfmt) to e.g. run AppImages of other processor architectures.
## Additional resources
* Simple NixOS flake template for NixOS with HomeManager. https://github.com/Misterio77/nix-starter-configs#readme