!UUqahLbShAYkkrXmKs:matrix.org

DevOS

34 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
13 Aug 2021
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Ok, so the value I give to home-manager is intelligently merged with the defaults (and any other modules I load as well), and if there are conflicts it fails to switch.
In the context of the 'module system' you can thing of advanced merge semantics and any such semantic can be expressed. Unfortunately, it is implemented itself in nix and not yet a language feature. This is at the root of a bad as bad can be tracing experience, which often hangs somewhere in or through the module system. nickel to the rescue.
18:16:20
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Ok, so the value I give to home-manager is intelligently merged with the defaults (and any other modules I load as well), and if there are conflicts it fails to switch.
* In the context of the 'module system' you can thing of advanced merge semantics and any such semantic can be expressed. Unfortunately, it is implemented itself in nix and not yet a language feature. This is at the root of a bad as bad can be tracing experience, which often hangs somewhere in or through the module system. nickel to the rescue. 🙏
18:16:49
@blaggacao:matrix.orgDavid Arnold (blaggacao)

Is there a bind mount experw among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"

18:18:30
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Is there a bind mount expert among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"

18:18:42
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Is there a bind mount expert among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"
18:18:55
@blaggacao:matrix.orgDavid Arnold (blaggacao)(worth doing read only bind mounts in some places?)18:19:31
@gtrunsec:matrix.org@gtrunsec:matrix.org
In reply to @kraftnix:matrix.org
yeah a default like host.wait_for("multi-user.target") or "default.target" might be better
It works well for me https://github.com/GTrunSec/digga/commit/eb224906cad3e45bca621f76f7c45ae02830dc37
23:35:24
14 Aug 2021
@kraftnix:matrix.org@kraftnix:matrix.orgis nickel usable with nix/nixos at the moment? i would be really interested to try it out if it were02:58:49
@timdeh:matrix.org@timdeh:matrix.org it outputs json, so you could output static values. Though, since nix derivations already have substitution scripts, it would probably be easy enough to leave placeholders in the nickel such as @foo@, and substitute dynamic values on the nix side 03:03:49
@timdeh:matrix.org@timdeh:matrix.orgI mean, you obviously have the computation on the nickel side to do whatever you like to generate those static values as well. If someone were to reimplement the nix module system in nickel, it would be a lot more ergonomic to generate an entire config, and then simply import the final result from the json03:07:55
@timdeh:matrix.org@timdeh:matrix.orgAnd the nix module system could probably do with some strict contracts anyway. Could help improve the design. We certainly would have to maintain the bolted on type system there03:08:37
@timdeh:matrix.org@timdeh:matrix.org * And the nix module system could probably do with some strict contracts anyway. Could help improve the design. We certainly wouldn't have to maintain the bolted on type system there03:08:51
@gtrunsec:matrix.org@gtrunsec:matrix.org kraftnix: this PR for disable the allProfilesTest https://github.com/GTrunSec/digga/commit/ed16f26086809e7cc6019661ff702119f5135a01 07:33:19
@gtrunsec:matrix.org@gtrunsec:matrix.org * kraftnix: this rev for disable the allProfilesTest https://github.com/GTrunSec/digga/commit/ed16f26086809e7cc6019661ff702119f5135a01 07:33:39
@gtrunsec:matrix.org@gtrunsec:matrix.org * kraftnix: this rev for disable the allProfilesTest https://github.com/GTrunSec/digga/commit/2a14c3ed08401884b795bb9f46f365e2bd7eb988 07:39:14
@gtrunsec:matrix.org@gtrunsec:matrix.org* kraftnix: this rev for disable the allProfilesTest,or filterHost by ["host-1"host-2"] which one is better? https://github.com/GTrunSec/digga/commit/2a14c3ed08401884b795bb9f46f365e2bd7eb98808:33:42
@blaggacao:matrix.orgDavid Arnold (blaggacao)A friend pointed me to https://github.com/nix-community/disko13:27:32
@blaggacao:matrix.orgDavid Arnold (blaggacao)(a declarative wrapper around parted/mkfs)13:27:51
@blaggacao:matrix.orgDavid Arnold (blaggacao)would be nice to explore how that could be connected with https://github.com/serokell/deploy-rs/issues/12313:29:08
@blaggacao:matrix.orgDavid Arnold (blaggacao) (a --part-script flag for deploy-rs) 13:30:09
@d4hines:matrix.org@d4hines:matrix.org

I wrote the following flake to run a simple JS script: https://github.com/d4hines/beth/blob/4f3bbdd8d627061b8b9ddd8e8593b8512c8fa7bd/scripts/complice/flake.nix

Is there a shebang I can add to the file ./complice.js such that I can invoke it directly from my normal home environment? There are guides for using nix-shell commands but none for nix develop that I can find.

17:59:23
@kraftnix:matrix.org@kraftnix:matrix.org
In reply to @blaggacao:matrix.org
A friend pointed me to https://github.com/nix-community/disko
i essentially have scripts for this for zfs/btrfs (which aren't currently supported 🤔, so may be worth contributing). one problem i see for install automation (unless your deploy-rs PR handles this for install) is if you are using luks and/or zfs you need some hashes for your new host (hostId for zfs, uuid for luks devices), i tend to just let this be auto-generated by nixos-generate-config but it's been a barrier for me in terms of further automation.
21:18:03
15 Aug 2021
@yusdacra:nixos.dev@yusdacra:nixos.dev changed their profile picture.03:21:20
@gtrunsec:matrix.org@gtrunsec:matrix.org kraftnix: how about https://github.com/GTrunSec/digga/commit/11108bebc9422f4fae342c638b111719fa2e806a 04:10:15
@kraftnix:matrix.org@kraftnix:matrix.org gtrunsec: perfect 👌, good global disable + selective host filter 15:10:22
@ultranix:matrix.orgultranix kraftnix: i figured out something strange with the home-manager emacs stuff, i think its a bug in rakeLeaves 15:12:24
@ultranix:matrix.orgultranix

as long as the directory users/profiles/emacs/ isnt referred to in the home suites, you wont get the error

error: The option `home-manager.users.tgunnoe.inputs' does not exist. Definition values:
       - In `/nix/store/q36vh61yrcnnw2d49hi6357d03i02r3a-source/users/tgunnoe': { }
15:14:04
@ultranix:matrix.orgultranixso just renaming the directory and referring to new directory in the suites works15:14:37
@ultranix:matrix.orgultranixand i looked for conflicts around the rest of my repo, but there are no other emacs objects15:14:59
@ultranix:matrix.orgultranixso 😕15:15:15

Show newer messages


Back to Room ListRoom Version: 6