Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / readme.md
Created February 27, 2024 15:02
nix tip: use a mixin to inject config for certain user for an app
@573
573 / readme.md
Created February 24, 2024 22:07
unfree packages in nix*
@573
573 / readme.md
Created February 23, 2024 22:37
nix tip: check the derivation of custom module
 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
@573
573 / readme.md
Last active February 21, 2024 16:07
nix tip: using two or more derivations of one and the same binary without collisions
@573
573 / proto.log
Last active February 16, 2024 14:19
julia on nix-on-droid
-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
@573
573 / readme.md
Created February 11, 2024 16:39
nix-on-droid initial setup
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
@573
573 / readme.md
Created February 9, 2024 12:41
nix tip: track when PRs are in certain branch
@573
573 / readme.md
Created February 8, 2024 14:09
translate nix-env calls given at lazamar.co.uk to nix profile calls
@573
573 / readme.md
Last active February 7, 2024 13:27
git github tip: diff of local revision towards a remote revision on github

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