2021-05-24

<clever> 2021-05-24 08:19:16 Cycles (leaves and joins) the current channel or the specified channel.
<clever> gchristensen: i have /cycle ready if you want to test triggering upon join

2021-05-23

<clever> hyper_ch: they changed the rules, so hijacking an "abandoned" channel is now perfectly fine
<clever> ahh
<clever> maybe the bot is broken?
<clever> ,matrix aduialthin[m]1

2021-05-21

<clever> hyper_ch5: ive not tried it yet
<clever> ,matrix
<clever> ,spaces
<clever> hyper_ch5: i'm in matrix
<clever> the example i gave works as-is, if your using channels
<clever> benlyn: it should be the path to the nixos subdir of a nixpkgs clone
<clever> edit the config until the differences are acceptable
<clever> benlyn: this shows the differences between what is currently running, and configuration.nix
<clever> [root@amd-nixos:~]# nix-diff $(nix-store -q --deriver /run/current-system) $(nix-instantiate '<nixpkgs/nixos>' -A system)
<clever> benlyn: then your only option is nix-diff and re-create it

2021-05-20

<clever> hpfr: "${toString ./.}"
<clever> boondang: and then claim you still support foss: https://freenode.net/news/freenode-is-foss
<clever> boondang: from what ive heard, "freenode ltd" wasnt supposed to have control, in the original agreement, then they changed their minds
<clever> boondang: i dont see how they could, since you can just run your own homeserver
<clever> boondang: the creator of the channel appears to be able to give out perms
<clever> via the homeserver of the other users?
<clever> boondang: i think the "home server" for an account deals with connecting to everybody in the chat somehow? and collects the unread messages?
<clever> boondang: i think its got some p2p elements to it
<clever> boondang: nixos is based on the linux kernel
<clever> ,matrix

2021-05-19

<clever> atralheaven: a flake is a nix file on a github repo
<clever> atralheaven: a channel is just an http folder with a tar file named correctly
<clever> shapr: `nix-build '<nixpkgs>' -A kaldi && ls -lh result/bin/`

2021-05-18

<clever> so you can experiment more freely
<clever> nixos at least makes it easy to undo such tests
<clever> ah, yeah, i dont know about that
<clever> sterni: but runtimeShell is bash!
<clever> > runtimeShell
<clever> runtimeShell should prevent that issue
<clever> pennae: last time i cross-compiled nixos, half of the shell scripts had an x86 bash in the #!
<clever> pennae: cross-compiling
<clever> colemickens: that would do it!
<clever> you can pull the stage1 out of /nix/store and find the path there
<clever> colemickens: does ash still exist in extraUtils (line 87) ?
<clever> colemickens: is that for the stage2 init or the stage1 init?
<clever> legendofmiracles: nope, a proper cross compiler
<clever> Henson, legendofmiracles: and this line configures nixops to cross-compile the whole system
<clever> this file defines a nixops network with 1 machine
<clever> Henson: yep, ive done that
<clever> Henson: you can either cross-compile nixos, or you can natively build it, but do the evals outside

2021-05-16

<clever> for me, it ran fine for years, until i moved it
<clever> "we cant find any problem, it works fine now"
<clever> that also explains why it was for sale as refurbished at wal-mart
<clever> odiug: the ram sockets are loose, and the ram contact is lost if you subject the case to a sudden shock, reseating the ram fixed it
<clever> odiug: after a few years of it being fine, then going bad again, then being fine, i figured out the cause
<clever> odiug: i had a windows machine that would randomly bluescreen, and memtest86 confirmed bad ram, but when i started to try to find which stick of ram was bad, the problem always vanished
<clever> i'm not sure either
<clever> ,tofu
<clever> matthewcroughan: nixpkgs is capable of cross-compiling go, as i just did
<clever> [clever@amd-nixos:~/apps/rpi/nixpkgs-test]$ file result/bin/ipfs
<clever> result/bin/ipfs: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=tXXpJYAiC1C3XlXx0WKO/miG7PDhKc8yOpLwpzlLJ/i_Rsi4DG9V7QNkxXXHbW/WZKIREpJNQvuWOuTUo5z, not stripped
<clever> [clever@amd-nixos:~/apps/rpi/nixpkgs-test]$ nix-build . -A pkgsCross.aarch64-multiplatform.ipfs
<clever> kini: i'm thinking use tab-completion in the repl to find a few random tests, and use :b tests.foo.x86_64-linux to run them
<clever> kini: yeah, i usually only run the tests that i think are effected
<clever> kini: sounds like some of the tests are broken, you can maybe do something based on `nix-build nixos/release.nix -A tests`, but using hydra could be simpler
<clever> kini: if you run `nix repl nixos/release.nix` and try to eval the tests attr, what do you find?
<clever> either pop it into a repl.nix or assign it to some variable in a plain `nix repl`
<clever> evalexpr: that expr can load a flake.nix and return whatever it returns
<clever> evalexpr: builtins.getFlake (toString ./.)
<clever> pennae: and what nixpkgs rev is it on?
<clever> pennae: what does nix-channel --list report?
<clever> the repl lets you view every config entry
<clever> which take effect the next time you rebuild switch
<clever> it will show the values of the current config
<clever> yurb: nix repl '<nixpkgs/nixos>' and then eval `config.services`
<clever> or nixos-rebuild dry-run
<clever> yurb: nix-instantiate '<nixpkgs/nixos>' -A system
<clever> atralheaven: search for fileSystems
<clever> and because its strict, it will force the evaluation of the whole thing, and not leak a ton of ram
<clever> when do you do `foldl' f initial [ 1 2 ]`, it will run the function you supplied like this: `f (f initial 1) 2`
<clever> its just part of the name
<clever> > lib.foldl'
<clever> thats the strict variant of foldl
<clever> this will generate multiple systemd services, one for each element in secrets.weechats
<clever> yurb: multiple instances on one machine is a bit more complex...
<clever> yurb: rather then adding it to the config for one machine, i made it its own module, so it could be applied to other machines trivially
<clever> yurb: i wrote this module to run plex on startup: https://github.com/cleverca22/nixos-configs/blob/master/media-center.nix
<clever> yurb: you can make a nixos module for that, and then use nixops to deploy it to several machines
<clever> Kritnich: sorta, if the name+hash have not been seen before, it will download, but once that combination is fetched, it wont re-fetch
<clever> Kritnich: thats normal, you claimed the hash of the output was the same, so it reused the old output
<clever> ah, loopback, but that only works if you have dns running on localhost
<clever> and how do you know what the local nameserver is?
<clever> dns fails hard if resolv.conf is missing, and the user will be confused if hosts isnt doing its job
<clever> yep
<clever> yeah, that file could be shipped with nix
<clever> then it wont care that its missing
<clever> you can also add `--option sandbox false` to just not create the sandbox
<clever> just copying the file over is the simplest fix
<clever> yeah
<clever> hramrach: aha, the new version of nix (in the github link) will sanely skip files that dont exist, but the version you have wont
<clever> sterni: fixed-output derivations get that file added to the sandbox
<clever> sterni: i do have had haskell tests fail for that reason, but ....
<clever> so the nix copy of libc will look where nix is expecting it
<clever> nix wont use your host libc
<clever> and for that C function to work, the file must be exposed in the sandbox
<clever> nix is creating a sandbox (like docker), to run the fetch and build under
<clever> it just reports that tcp is an unknown protocol
<clever> hramrach: some network libraries like haskell cant even open a socket if /etc/protocols is missing
<clever> hramrach: ah, i checked the source, and the path is hard-coded, youll need to just copy it over
<clever> hramrach: does `nix show-config | grep services` show anything?
<clever> matthewcroughan: pkgs/build-support/rust/default.nix -> nativeBuildInputs = [ git
<clever> matthewcroughan: yep, thats what it says
<clever> [17.0 MiB DL]"/nix/store/lfxanhgs9ij3xv2i3615ph428z1nsm10-source"
<clever> [17.0 MiB DL]
<clever> nix-repl> builtins.fetchTarball channel:nixos-unstable
<clever> colemickens: theres also channels:nixos-unstable i believe

2021-05-12

<clever> cgbrewster[m]: only if you setup min-free and max-free in nix.conf
<clever> nickeraqua12: a dumb http server can also be used
<clever> both should work
<clever> it should also work with just sqlite in buildInputs
<clever> "foo"
<clever> if you supply an arg, it works, but if you omit, it fails
<clever> $ nix-instantiate --eval --expr '{a?"default"}: a' --strict --argstr a foo
<clever> <LAMBDA>
<clever> $ nix-instantiate --eval --expr '{a?"default"}: a' --strict
<clever> kinda
<clever> numkem: since your using --expr, i'm not sure if --arg would evne work, *tries*
<clever> ah
<clever> hmmm, but line 16 would wrap differently
<clever> numkem: real_configuration = { imports = [ node configuration ]; }
<clever> numkem: in that case, you need to wrap it there
<clever> yeah
<clever> and add node to imports
<clever> you can then add `node ? {},` to the args at the top
<clever> move the quote over a bit, and yep
<clever> --arg configuration '{ lib, pkgs, ... }: { .... }'
<clever> numkem: you can also just pass an entire configuration.nix via --arg, and shove it into imports
<clever> numkem: you can just add another file to the imports on 32, and then auto-generate that file however you want
<clever> numkem: ah, thats not a true nixos configuration.nix, but lines 30-57 are the body of one
<clever> and have nix build other_file.nix instead
<clever> other_file.nix should then have `imports = [ ./configuration.nix ];` to merge with the main one, and then just set options as normal
<clever> numkem: the way nixops does it, is to basically add another configuration.nix file
<clever> numkem: for example?
<clever> MysteriousSilver: parse the nixpkgs you already have, and search for every package in `nix-env -q`, then install them all as upgrades

2021-05-11

<clever> hrnz: i think that only works if network-manager is in control
<clever> MysteriousSilver: `nix-store --verify --check-contents` ?
<clever> MysteriousSilver: what command gave the error? what is the full output?
<clever> so if nix sets those 2 vars, it will still report the version it was built from
<clever> if .git is missing, it wil default to DRONE_COMMIT and DRONE_TAG i think
<clever> or patching
<clever> is there a way to override it without .git?
<clever> read version.sh, and figure out how its querying the version
<clever> ah, it could also be version related, or even time related
<clever> once the x86 hydra builds that, the tainted x86-based $out will be in the public cache, and the aarch64 builders will just fetch it, and mask the problem

2021-05-10

<clever> doesnt really matter that much where it is
<clever> fuzzypixelz: you can just `mkdir foo ; cd foo`
<clever> fuzzypixelz: you should probably run all of the phases in a freshly made empty directory, so you can easily remove it all afterwards
<clever> fuzzypixelz: the unpackPhase copies $src to . so you always want to be modifying the source in . not $src

2021-05-09

<clever> conkker: thats also how derivations work, pkgs.hello is a set with a .outPath
<clever> conkker: if you treat a set like a string, nix will use the .outPath automatically
<clever> > let set = { outPath = "foo"; }; in "${set}"
<clever> conkker: does nixpkgs.outPath exist?
<clever> ive never seen that one before
<clever> that gives a shell suitable for building hello
<clever> fuzzypixelz: nix-shell ~/apps/nixpkgs -A hello
<clever> being a list, its hard to remove options, so mkForce tends to remove too much
<clever> simpson: i think the default videoDrivers includes ones that cant compile on arm
<clever> zeta_0: the gpu is always the same for a given model, every rpi4 has the exact same gpu
<clever> its not a pci device
<clever> zeta_0: lspci will never see the gpu
<clever> zeta_0: shouldnt matter what its plugged into, as long as it has an edid eeprom (both monitors and tv's have one)
<clever> that sounds likely
<clever> not sure what the cfg for that is, but google should help there some
<clever> you should be able to configure X to use /dev/fb0
<clever> zeta_0: `modprobe vc4` and check lsmod?
<clever> zeta_0: first, check if /dev/fb0 exists
<clever> and u-boot is the default for nixos
<clever> zeta_0: if your using u-boot, then i dont think kms can be loaded easily
<clever> if both overlays are missing, then only /dev/fb0 will work
<clever> zeta_0: the dri node only exists if you load the fkms or kms overlay

2021-05-07

<clever> chloekek: this will open <nixos> from $NIX_PATH, then eval lib.version within it
<clever> [clever@amd-nixos:~]$ nix-instantiate --eval '<nixos>' -A lib.version
<clever> "21.05pre274021.d496205cf22"
<clever> i'm also on my way to bed
<clever> and if its single-user, "connecting" just means opening /nix/store directly
<clever> and only when a build is done on a remote machine, will it connect to the local nix, and initiate a closure copy
<clever> matthewcroughan: hydra-queue-runner connects to the build machines and manages starting the builds
<clever> matthewcroughan: nixos containers share the /nix/store by default

2021-05-06

<clever> you may need to write your own package
<clever> so you dont run in cicles, fixing one error at a time
<clever> ris: the other power of `assertions =`, is that nixos-rebuild can spit out multiple errors at once
<clever> ris: yeah

2021-05-04

<clever> pennae: what if you use the deps mechanism, to make users depend on your thing?
<clever> pennae: lib.mkBefore ?
<clever> sterni: 2nd link shows what it is hashing
<clever> sterni: hashed
<clever> s1341_: the $lib has to be evaled in a bash script, placeholder is the new solution, but i can never remember how it works
<clever> s1341_: this will get evaluated by bash, and then expanded then
<clever> s1341_: preConfigure = ''cmakeFlags="$cmakeFlags -DCLANG_RESOURCE_DIR=$lib/lib/clang/12.0.0"'';
<clever> s1341_: preConfigure is a shell script snippet, so it can expand things
<clever> s1341_: the env var $lib has that path
<clever> `nix-build -A hello`
<clever> . is the default as well
<clever> SumnerEvans[m]: nix-build '<nixpkgs>' -A hello
<clever> yes
<clever> alschaapman: you can also just disable that security, and then edit anything you want
<clever> alschaapman: your router can also forward port 1234 to 22, so the exposed port is still non-standard
<clever> alschaapman: also, if your router is doing its job, it doesnt matter what port your listening on, its blocked
<clever> and how much they actually help
<clever> alschaapman: https://www.youtube.com/watch?v=fKuqYQdqRIs this talk goes over a lot of those "tips"
<clever> alschaapman: that doesnt really buy you much, enless you plan the change the port hourly
<clever> alschaapman: it only takes slightly more time to scan every port, try to connect, and probe what service is listening
<clever> you should instead disable password auth
<clever> alschaapman: changing the port does nothing to help your security
<clever> alschaapman: i think thats part of them locking down on security, in preparation to ipad-ify everything
<clever> what does `echo $SSH_AUTH_SOCK` report on a mac?
<clever> alschaapman: ssh just connets to whatever agent is on the far end of $SSH_AUTH_SOCK
<clever> s1341_: pop the right config into /root/.ssh/config i believe
<clever> 8000, oops
<clever> Frosku: what does `netstat -anp | grep 3000` say?

2021-05-03

<clever> __monty__: just edit the 2nd one to basically do `import ~/nixpkgs1/pkgs/stdenv/linux/make-bootstrap-tools.nix` in the right place
<clever> __monty__: in that case, i would just use 2 copies of nixpkgs, one to build it from a cached stdenv, the 2nd to then make a new stdenv from the bootstrap files the 1st produces
<clever> __monty__: usually, the bootstrap files are fetched with import <nix/fetchurl.nix> {, and get re-patched for the new $out
<clever> __monty__: though, the bootstrap tools are a special case...
<clever> __monty__: you can import a second copy of nixpkgs to work around that
<clever> i think builtins.storePath can work around that, but its recommended to just use the expr that made it in the first place
<clever> __monty__: nix doesnt really allow passing a pre-built storepath into an expr, it will treat it the same as ./foo, copy the whole thing back into the store, loosing all runtime deps
<clever> __monty__: i still need to sit down and learn how vim actually works, despite having used it for ~17 years!
<clever> no rollbacks when grub.conf is missing a / in just the wrong spot!
<clever> Orbstheorem: nixpkgs-unstable once had a bug corrupting grub.conf, dozens of mis-configured users started showing up, as they bricked the system
<clever> Orbstheorem: nixos-unstable does extra tests to ensure it wont brick a nixos machine
<clever> __monty__: oh, that works perfectly!
<clever> xdej: depends on if your wanting to insert a new hash, or invalidate the old one
<clever> there is a surround plugin, that will delete both forwards and backwards to the next ", so you dont have to trigger at the start
<clever> it will delete everything from the cursor to the next ", and switch into insert mode
<clever> there is also ct" to change to "

2021-05-02

<clever> ah, its buildEnv
<clever> Frosku: OPENSSL_PREFIX = buildenv { ... }; is one way
<clever> Frosku: that expr will return a path for the output, so you can then put that expr somewhere useful
<clever> buildenv*
<clever> Frosku: buildenv is simpler, builtenv { name = "name"; paths = [ openssl.out openssl.dev ]; }

2021-05-01

<clever> superherointj: check what ldd says
<clever> superherointj: if you add `-o foo`, you will instead create a symlink called foo
<clever> superherointj: the symlink called result is being updated, you can see it with `ls -l result`
<clever> it is less tested outside of x86 though, arm->vpu for example fails, but x86->vpu works fine
<clever> flip[m]: pkgsCross should just work, what error where you getting?
<clever> native arm32 building is currently broken
<clever> flip[m]: this tells nix that your cpu can run binaries from those arches, and to just allow it
<clever> extra-platforms = armv7l-linux armv6l-linux
<clever> pi@pi400:~ $ cat /etc/nix/nix.conf
<clever> flip[m]: ah right
<clever> flip[m]: try just `import <nixpkgs> { system = "armv6l-linux"; }` and skip the cross step
<clever> flip[m]: it should be as simple as just setting system= to a v6 platform, and letting it be a native build, if the cpu supports arm32
<clever> numkem: thats why it helps to `watch -d df -h`, and see where its going
<clever> `watch -d df -h` may help spot the changes
<clever> numkem: about all i can think of, is to `watch df -h`, and see which one is nearing 0
<clever> yeah, everything seems perfectly normal
<clever> numkem: mount | grep nvme0n1p2 ?
<clever> numkem: and what does both `df -h` and `df -i` report?
<clever> holes in the swap is unrelated to clock speed
<clever> numkem: and what does both `df -h` and `df -i` report?
<clever> numkem: did you run nixos-install or nixos-rebuild?

2021-04-30

<clever> numkem: http://termbin.com/
<clever> numkem: can you pastebin the full build log and error?
<clever> numkem: df -i ?
<clever> pie_: depends on what is doing the fetch

2021-04-27

<clever> any attr can add deps, not just the inputs ones
<clever> __monty__: buildInputs isnt magic, "LDFLAGS=-L${libunwind}/lib" gave it the full path with context, so its now in the closure
<clever> your condition is wrong
<clever> __monty__: if its empty, then the lib.optional received a false
<clever> __monty__: when the build fails, nix tells you which drv failed
<clever> what path does it print?
<clever> run nix-shell on the failing .drv file, then `echo $buildInputs`
<clever> i would expect the linker to just find that
<clever> __monty__: what is the full line for that expr?
<clever> ahh
<clever> sudo can sometimes mess things up
<clever> jackdk: try "sudo -i" then run things as plain root
<clever> jackdk: can `aws s3 cp` read nix-cache-info?
<clever> jackdk: try running the nix command as root, does it work?
<clever> ive not seen that recently
<clever> pie_: dont think so

2021-04-26

<clever> yaymukund: you can also just skip git, and directly diff the nixpkgs from the channel generations
<clever> [root@amd-nixos:~]# diff -ru /nix/var/nix/profiles/per-user/root/channels-8{6,7}-link/nixos
<clever> yaymukund: this will diff the final derivation for 2 generations, in my case, revealing that i only changed a single word in /etc/nix/machines
<clever> [root@amd-nixos:~]# nix-diff $(nix-store -q --deriver /nix/var/nix/profiles/system-6{29,30}-link)
<clever> you can then use git to view the diff over that range
<clever> yaymukund: this reveals that my channel moved from commit 0aeba64fb26 to d496205cf22 when i did the last update
<clever> lrwxrwxrwx 1 root root 82 Dec 31 1969 /nix/var/nix/profiles/per-user/root/channels-87-link/nixos -> /nix/store/cxk5c02yxz4njayn07xqbzy8b7fs6wra-nixos-21.05pre274021.d496205cf22/nixos
<clever> lrwxrwxrwx 1 root root 82 Dec 31 1969 /nix/var/nix/profiles/per-user/root/channels-86-link/nixos -> /nix/store/fkkaimqi0pql50pch3w2x4znd8z15jx8-nixos-21.05pre273435.0aeba64fb26/nixos
<clever> [root@amd-nixos:~]# ls -l /nix/var/nix/profiles/per-user/root/channels-8{6,7}-link/nixos
<clever> maybe?