Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor playbook.yaml to install packages using nix (package manager) #11

Open
capsulecorplab opened this issue Mar 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@capsulecorplab
Copy link
Member

capsulecorplab commented Mar 20, 2024

as a more robust candidate alternative to apt for installing packages on the read-only filesystem

@capsulecorplab capsulecorplab added the enhancement New feature or request label Mar 20, 2024
@capsulecorplab capsulecorplab changed the title investigate nixos investigate nix (package manager) Mar 20, 2024
@capsulecorplab
Copy link
Member Author

Could try installing nix with https://github.com/danielrolls/nix-install

@capsulecorplab
Copy link
Member Author

@capsulecorplab
Copy link
Member Author

Encountering a build error while attempting to install nix https://github.com/LearnTeachCode/ltc-workspace-image/actions/runs/8919725444/job/24496399929#step:5:905. Nix discord community suggests following to be the actual problem:

/nix/store/nhq5xmjvp6hv0pjpffapb98zdjanh1ad-nix-2.22.0/bin/nix-store: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/nhq5xmjvp6hv0pjpffapb98zdjanh1ad-nix-2.22.0/bin/nix-store)

@capsulecorplab
Copy link
Member Author

May need to update to Ubuntu 23.10 as per https://answers.launchpad.net/ubuntu/+source/glibc/+question/708407

@capsulecorplab capsulecorplab changed the title investigate nix (package manager) refactor playbook.yaml to install packages using nix (package manager) Nov 8, 2024
@capsulecorplab
Copy link
Member Author

New error as of https://github.com/LearnTeachCode/ltc-workspace-image/actions/runs/11751228768/job/32740882657#step:5:617

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4279  100  4279    0     0  18735      0 --:--:-- --:--:-- --:--:--  130k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.5M  100 22.5M    0     0   173M      0 --:--:-- --:--:-- --:--:--  173M
Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo groupadd -g 30000 --system nixbld

Create the Nix build group, nixbld


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 1 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30001 --password ! nixbld1

Creating the Nix build user, nixbld1

useradd warning: nixbld1's uid 30001 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 2 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30002 --password ! nixbld2

Creating the Nix build user, nixbld2

useradd warning: nixbld2's uid 30002 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 3 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30003 --password ! nixbld3

Creating the Nix build user, nixbld3

useradd warning: nixbld3's uid 30003 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 4 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30004 --password ! nixbld4

Creating the Nix build user, nixbld4

useradd warning: nixbld4's uid 30004 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 5 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30005 --password ! nixbld5

Creating the Nix build user, nixbld5

useradd warning: nixbld5's uid 30005 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 6 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30006 --password ! nixbld6

Creating the Nix build user, nixbld6

useradd warning: nixbld6's uid 30006 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 7 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30007 --password ! nixbld7

Creating the Nix build user, nixbld7

useradd warning: nixbld7's uid 30007 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 8 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30008 --password ! nixbld8

Creating the Nix build user, nixbld8

useradd warning: nixbld8's uid 30008 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 9 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30009 --password ! nixbld9

Creating the Nix build user, nixbld9

useradd warning: nixbld9's uid 30009 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 10 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30010 --password ! nixbld10

Creating the Nix build user, nixbld10

useradd warning: nixbld10's uid 30010 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 11 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30011 --password ! nixbld11

Creating the Nix build user, nixbld11

useradd warning: nixbld11's uid 30011 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 12 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30012 --password ! nixbld12

Creating the Nix build user, nixbld12

useradd warning: nixbld12's uid 30012 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 13 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30013 --password ! nixbld13

Creating the Nix build user, nixbld13

useradd warning: nixbld13's uid 30013 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 14 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30014 --password ! nixbld14

Creating the Nix build user, nixbld14

useradd warning: nixbld14's uid 30014 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 15 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30015 --password ! nixbld15

Creating the Nix build user, nixbld15

useradd warning: nixbld15's uid 30015 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 16 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30016 --password ! nixbld16

Creating the Nix build user, nixbld16

useradd warning: nixbld16's uid 30016 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 17 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30017 --password ! nixbld17

Creating the Nix build user, nixbld17

useradd warning: nixbld17's uid 30017 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 18 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30018 --password ! nixbld18

Creating the Nix build user, nixbld18

useradd warning: nixbld18's uid 30018 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 19 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30019 --password ! nixbld19

Creating the Nix build user, nixbld19

useradd warning: nixbld19's uid 30019 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 20 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30020 --password ! nixbld20

Creating the Nix build user, nixbld20

useradd warning: nixbld20's uid 30020 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 21 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30021 --password ! nixbld21

Creating the Nix build user, nixbld21

useradd warning: nixbld21's uid 30021 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 22 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30022 --password ! nixbld22

Creating the Nix build user, nixbld22

useradd warning: nixbld22's uid 30022 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 23 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30023 --password ! nixbld23

Creating the Nix build user, nixbld23

useradd warning: nixbld23's uid 30023 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 24 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30024 --password ! nixbld24

Creating the Nix build user, nixbld24

useradd warning: nixbld24's uid 30024 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 25 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30025 --password ! nixbld25

Creating the Nix build user, nixbld25

useradd warning: nixbld25's uid 30025 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 26 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30026 --password ! nixbld26

Creating the Nix build user, nixbld26

useradd warning: nixbld26's uid 30026 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 27 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30027 --password ! nixbld27

Creating the Nix build user, nixbld27

useradd warning: nixbld27's uid 30027 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 28 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30028 --password ! nixbld28

Creating the Nix build user, nixbld28

useradd warning: nixbld28's uid 30028 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 29 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30029 --password ! nixbld29

Creating the Nix build user, nixbld29

useradd warning: nixbld29's uid 30029 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 30 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30030 --password ! nixbld30

Creating the Nix build user, nixbld30

useradd warning: nixbld30's uid 30030 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 31 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30031 --password ! nixbld31

Creating the Nix build user, nixbld31

useradd warning: nixbld31's uid 30031 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo useradd --home-dir /var/empty --comment Nix build user 32 --gid 30000 --groups nixbld --no-user-group --system --shell /sbin/nologin --uid 30032 --password ! nixbld32

Creating the Nix build user, nixbld32

useradd warning: nixbld32's uid 30032 is greater than SYS_UID_MAX 999

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix /nix/var/nix/db /nix/var/nix/gcroots /nix/var/nix/profiles /nix/var/nix/temproots /nix/var/nix/userpool /nix/var/nix/daemon-socket /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user

to make the basic directory structure of Nix (part 1)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -g nixbld -m 1775 /nix/store

to make the basic directory structure of Nix (part 2)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0555 /etc/nix

to place the default nix daemon configuration (part 1)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -m 0664 /tmp/tmp.kSNAYLqypR/.nix-channels /root/.nix-channels

to set up the default system channel (part 1)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp -RPp ./store/0wb2jfh9zcdhh2maw76vrcd69yn56hw2-aws-c-sdkutils-0.1.16 ./store/0wq0r67l1lixwiwb7zyjbpl3yff5nbxw-boehm-gc-8.2.6 ./store/19avl2s0rd4whz3b0n118qdrv6yr3b0g-xgcc-13.2.0-libgcc ./store/2k9k3q1vk8z6w7743k6nb22vnb05xv06-zlib-1.3.1 ./store/2vdxsvrjrf1bgznbb9wga1rshpxc658a-publicsuffix-list-0-unstable-2024-01-07 ./store/39jg2qg6jlfm4hdc8j61d09skxg4gfw0-acl-2.3.2 ./store/40yjzm7r5ki59kkk9423dnwbm86x7pyd-gcc-13.2.0-lib ./store/503h8rdwzj12dh0fs1b6y643qm26vqsb-libunistring-1.1 ./store/5d4a4am9gb7ia79xfjcdbf2y3b9kwknn-aws-c-event-stream-0.4.2 ./store/5xvdvbb7vzyazmhw57yhwwch8kqwjfyk-aws-c-http-0.8.1 ./store/65ysp6n926dmcxdsg88q4qkw1kid7dih-attr-2.5.2 ./store/852a51xd3m7jyzifqimxc3jf3w2ipc4k-nss-cacert-3.101 ./store/86b4h0x1i310gglrsjrk093l0g2h26pr-aws-sdk-cpp-1.11.318 ./store/87848rvrg5c7jmplpi0iapvbxyj9kfid-glibc-2.39-52 ./store/8c9vyhad2gxlg4clvaa3zlikv7lsym3s-libsodium-1.0.19 ./store/8ivnsqp0wb8pna7rm31csdcn5aykdkqh-s2n-tls-1.4.12 ./store/96dj8i2gxxn31nw84r94h7bbfbg46rkw-pcre-8.45 ./store/9g700djj7aqgr3fqq5ji9m8w3n5ip75s-xz-5.4.7 ./store/ayndm66jniwbm76kprjjng06r4b7ypbw-keyutils-1.6.3-lib ./store/b5248mzca3qjhjvck1vw3n6gg5mdhkz8-aws-c-common-0.9.17 ./store/bdk3lnfjx46vsh5php2wbxsr9mriyhqb-aws-c-s3-0.5.7 ./store/by2v5cgvm6kkjjfv52fz7vajwgmcfdga-brotli-1.1.0-lib ./store/c46xzl45zg6225nxy780ccm5bzm9bdc4-aws-crt-cpp-0.26.8 ./store/ddzqsmrcpciq7rm4p70ynj3hi07w88kz-libxml2-2.12.7 ./store/dqrip0sx49kz9l6p8smq09aghas49s3b-gcc-13.2.0-libgcc ./store/dyxmqfpx08c2rhxg5kc83qa0qdxhzhfk-aws-c-cal-0.6.12 ./store/f6afb4jw9g5f94ixw0jn6cl0ah4liy35-sqlite-3.45.3 ./store/g0gx36d1l273mzhnz7jmq5vvjf6n9r70-bzip2-1.0.8 ./store/g45c2banpvki32fjydbx3wclgcphmsbs-libpsl-0.21.5 ./store/hdy82qidsybc3fg561pqfwagv44vschb-nix-2.24.10 ./store/isqwk2fj3d87ykqkhgr1513jqlrkymr6-lowdown-1.1.0-lib ./store/j8qdcfmjnlqlxk14mh59vcwr6hbznj92-boost-1.81.0 ./store/kcc6cnkqm8if32y6hwh9ixpwxba15hkq-nghttp2-1.61.0-lib ./store/kw6idhj5b1pmwjg7rnyvrlhg5ffrn1vs-curl-8.7.1 ./store/m5lk8pdk0sz0pkf3kjzk0j2b7gargzzx-aws-c-compression-0.2.18 ./store/mccadsxm3sgrcx2z0b9c8d5wgnlg7a3z-libarchive-3.7.4-lib ./store/mldkgahcv5kg2kv19dc8zqmz5y702k01-aws-c-io-0.14.7 ./store/p66hqwsh90q1xdb6ss31105rr11s4z9v-busybox-static-x86_64-unknown-linux-musl-1.36.1 ./store/p8pfm2w0sapcyizn9rkgdpllywq05x5n-libseccomp-2.5.5-lib ./store/p95ba37n695180m4vjp4mn3j8vd156jr-libcpuid-0.6.5 ./store/q46sbq9pgf58xb8zx5vlkbv96kidglxc-openssl-3.0.14 ./store/qcwlfkj0yggkfvv43y0bv7wyb35w1dh0-editline-1.17.1 ./store/rpj7hvnzrm4kh45bllm7fgncwmshlhiq-aws-c-mqtt-0.10.4 ./store/wckka8fxv4h5hp74cbkhaw3fw7kbvcs1-bash-5.2p26 ./store/xhd47fvyzk5gds3d6bnnvhfpqd9hrsvp-aws-c-auth-0.7.18 ./store/ya4arqpf6vwbq4msi449314kqbhdb4l4-libidn2-2.3.7 ./store/ydmbcr9ca5sdhvlx8icwvj454xvp6dd8-aws-checksums-0.1.18 ./store/yh9n3w67ivhxkzx9m58cswbaf8nag436-zstd-1.5.6 ./store/z5736fyn17s2mqql62rcznmj5yk5yx15-libkrb5-1.21.3 ./store/zg49hmjdvmmcak7k7rwvlpnnnz02ljhs-libgit2-20240516095848-lib ./store/zmczdj9cz73g8vfrqkv2hh5fv9achs7v-libssh2-1.11.0 /nix/store/

to copy the basic Nix files to the new store at /nix/store


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo chmod -R ugo-w /nix/store/

to make the new store non-writable at /nix/store


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo HOME=/root /nix/store/hdy82qidsybc3fg561pqfwagv44vschb-nix-2.24.10/bin/nix-store --load-db

to load data for the first time in to the Nix Database

      6465:	__vdso_gettimeofday/tmp/nix-binary-tarball-unpack.JUFZvaDv9W/unpack/nix-2.24.10-x86_64-linux/install-multi-user: line 354:  6465 Segmentation fault      (core dumped) env "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant