See https://discourse.nixos.org/t/anatomy-of-a-nixos-config/40252/7
nix eval --raw .#nixOnDroidConfiguration
s.sams9.config.home-manager.config.custom.programs
.emacs-nano.finalPackage --impure
if error-free also approach building
nix build .#nixOnDroidConfiguration
s.sams9.config.home-manager.config.custom.programs
See https://discourse.nixos.org/t/how-to-efficiently-iterate-while-developing-a-flake-input/39784/4
One more possibility would be cp *binary-name* $out/renamed-name
in install phase for each wanted derication as stated here. https://discourse.nixos.org/t/how-can-i-distinguish-between-two-packages-who-has-the-same-name-for-the-executable/39770/3
This is also important NixOS/nix#2283 (comment)
-bash-5.2$ nix shell --impure --expr 'with import (builtins.getFlake " | |
ata/data/com.termux.nix/files/hom.nix-config").inputs.unstable {}; | |
julia' -c julia --help | |
julia [switches] -- [programfile] [args...] | |
Switches (a '*' marks the default value, if applicable; settings marke | |
d '($)' may trigger package precompilation): | |
-v, --version Display version information |
- choose flake when starting n-o-d for the 1st time after installing app
- according to nix-community/nix-on-droid#65 (comment):
cd ~/.config/nix-on-droid
vi flake.nix # change nixpkgs to point to master and n-o-d to point to master too
vi nix-on-droid.nix # add git to packages and add line `nix.package = pkgs.nixVersions.unstable`
nix flake update
nix-on-droid build -F .
nix-on-droid switch -F . # nix should be newest version after that
Track when PRs are merged to certain branch, i. e. package nix
here: https://nixpk.gs/pr-tracker.html?pr=285264
- See https://nix.dev/manual/nix/2.19/command-ref/new-cli/nix3-profile-install#examples and
- https://www.reddit.com/r/NixOS/comments/15ke4tk/comment/jv4w235/ and i. e.
- https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=hledger-iadd
Given at lazamar is:
nix-env -iA haskellPackages.hledger-iadd_1_3_16 -f https://github.com/NixOS/nixpkgs/archive/d1c3fea7ecbed758168787fe4e4a3157e52bc808.tar.gz
which translates to (I have flake-registry set, see example):
I. e. when last successful running gha was (https://github.com/573/nix-config-1/actions/runs/7762460516, commit is https://github.com/573/nix-config-1/commit/0bd694c0a76fdc0561fd637700619dccd6b6570e) and I wanna know the difference to my current failing one.
So I first fetch this exact commit 0bd694c0a76fdc0561fd637700619dccd6b6570e to a debug
branch while then I can inspect the differences to my local branch's (wsl2
) head:
git fetch https://github.com/573/nix-config-1.git 0bd694c0a76fdc0561fd637700619dccd6b6570e:refs/heads/debug --depth 1
git diff 0bd694c0a76fdc0561fd637700619dccd6b6570e..wsl2
git diff 0bd694c0a76fdc0561fd637700619dccd6b6570e..wsl2 -- . ":(exclude)flake.lock"
# change something accordingly
nix eval --show-trace --raw .#nixosConfigurations.DANIELKNB1.config.system.build.toplevel