Repository navigation
Refactor playbook to use nix - #23
capsulecorplab wants to merge 70 commits into
Conversation
84310ff to
18326b6
Compare
as per https://zero-to-nix.com/start/install/ - run nix-installer with --no-confirm
18326b6 to
3357c1d
Compare
|
Finally installed nix as of 936cc2a ! EDIT (for posterity): Abandoning |
70cc8ff to
bec8470
Compare
|
git installed with nix as of bec8470 |
40baad6 to
bd478b4
Compare
2cf2f04 to
1e359a3
Compare
1e359a3 to
9821994
Compare
a23247f to
62ef4fb
Compare
|
Encountering |
|
Giving up for now; opened an issue at NixOS/nix#16668 |
…mmand for running nix installation
|
Upon input from NixOS/nix#16668 (comment), I unset |
This seems relevant NixOS/nix#1559 |
If you are running Nix as root, you need build users for privilege separation. |
Ah, thank you! How do I go about setting up a build user? EDIT: Nevermind, I think it's just |
…bld group rearranges setup/teardown of dev (user) to be able to add to nixbld group
- dynamically unset LD_LIBRARY_PATH per nix-related operation (i.e., installation of nix and nix packages) at buildtime of kasm container - test nix-installed git and keychain versions at buildtime of kasm container - unset LD_LIBRARY_PATH and add nix bin directory to PATH in /etc/profile for system-wide access to nix-installed binaries at runtime of kasm container
e82a0bc to
2af639d
Compare
|
Installed nix and nix packages as of 2af639d!! |
…ckages - Installs python 3.13 & pip from nixpkgs - Tests pint version against expected version
E-A-N
left a comment
There was a problem hiding this comment.
Nothing jumps out at me, the pipelines are passing, and I can follow your commits. Although I haven't tested myself. Maybe on a project I were serious about I'd suggest storing your commits in another branch then squashing the commits in this branch before merging, coupled with a comprehensive description of your PR. But honestly it all looks good to me in any case!
From Discord
Note that the build users are special and shouldn't be used by any other program. Nix will regularly kill all processes running as the build user via |
Ah, good to know! For now, we're just using nix as a package manager. If we need to do any builds that require more builders, we can always open another PR. |
…pt from unpacked tarball Uses workaround for circumventing GLIBC incompatibilities between nix and non-NixOS host machine by unsetting LD_LIBRARY_PATH See LearnTeachCode/ltc-workspace#23



This PR replaces apt-installed packages with nix installed packages.
closes #11
Dev notes
In order to get nix installed in kasm, I ran the nix installer in single-user mode as to avoid having to run the daemon during buildtime of the image. Since nix installer complains if you're installing as root in single-user mode, I had to create a
nixbldgroup and added a dummydevuser to that group to silence the nix installer (See NixOS/nix#1559). Also, since the host machine is Ubuntu, I had to dynamically unsetLD_LIBRARY_PATHduring build time of the image in order to circumvent theOPENSSL_3.4.0and GLIBC-related errors (Apparently, nix uses its own implementation of GLIBC that encounters incompatibilities with non-NixOS host machines. See NixOS/nixpkgs#327854). Likewise, I had to update/etc/profileto unsetLD_LIBRARY_PATHfor the runtime of the container, as well as update PATH to include the nix bin directory (technically, a directory of symlinks to the actual hashed binaries) for users of the container to be able to access nix-installed packages.