2021-03-04

<clever> drozdziak1: the ssh is done by root, so it has a diff ~/.ssh/config
<clever> Dr_Facepalm: i think you want wineWowPackages.base
<clever> sure
<clever> and its kind of hard to re-write the http -> https change, without it being an identical copy, lol
<clever> do such minor changes really need them to agree to the new license?
<clever> Mic92: checking the git history, the only change paumr did was http -> https in the readme, and matthewbauer just changed `rm` -> `rm -f` in linux-build-slave.nix
<clever> dang, a ~3 year old issue!
<clever> colemickens: that may be unreliable, depending on what the u-boot dtb is doing
<clever> boot.loader.raspberryPi.firmwareConfig = "dtoverlay=dwc2";
<clever> andoriyu: this shell code gets ran while building the fat32 partition on the sd image, so you can insert a `cp -r ${firmware}/overlays .` cmd
<clever> andoriyu: sdImage.populateFirmwareCommands = "shell code";
<clever> i havent made a clean way to do it right yet
<clever> just clone it, and cp -r
<clever> you need to ensure the https://github.com/raspberrypi/firmware/tree/master/boot/overlays are in /boot/overlays
<clever> oh right, i forgot a step
<clever> which the firmware will deal with for you, by loading diff dtb's
<clever> the only difference is the addition of wifi and the absence of the ethernet/hub
<clever> they are the identical SoC
<clever> maybe version=0 and _rpi1
<clever> probably
<clever> that will swap you over to no u-boot, with the firmware directly loading the rpi fork of linux, and then booting into nixos
<clever> andoriyu: line 5 and 24 must also refer to the right model
<clever> andoriyu: https://gist.github.com/cleverca22/1820062745c727343458ff6300aa88bd and make sure the fat32 is mounted to /boot before you nixos-rebuild switch
<clever> andoriyu: you can switch over to using the raw firmware
<clever> andoriyu: the dtoverlay= doesnt work when using u-boot
<clever> prsteele: you can also `nix edit nixpkgs#irssi` to view the nix expr that created those directions
<clever> prsteele: it will run builder, with args, everything in env is an env var, and the things under inputDrvs will be build, and placed in the sandbox, the things in inputSrcs are raw source files
<clever> prsteele: nix show-derivation nixpkgs#irssi

2021-03-03

<clever> boolman: you may need to `modprobe configs` first
<clever> boolman: read /proc/config.gz
<clever> simonpe^^: and userland threads are then simple to context switch, no native stack to deal with, just save the haskell stack+PC, and jmp somewhere else!
<clever> simonpe^^: the native stack is basically unused, every chunk of ghc generated code will tail-call into the next, and maintain the haskell stack within the haskell heap
<clever> simonpe^^: its all tail-calls, thats all GHC can generate!
<clever> redmp: maybe?
<clever> simonpe^^: but haskell, is a complicated web of tail-calls of native code...
<clever> simonpe^^: for nix, the entire functional AST is just translated directly into a tree of value/thunk classes in c++, and lazy things are just a c++ function pointer and some args, forceValue then just recursively evals each thunk, until the required value is known
<clever> haskell's implementation is far more complex, due to it being native rather then more interpreted
<clever> simonpe^^: so i just tore open the nix source, and looked at the implementation!
<clever> simonpe^^: as i was learning nix, i wanted to know, how can you write a functional lazy language in c??
<clever> redmp: defaults will merge, mkForce can then override, same rules as nixos
<clever> simonpe^^: i learned nix and haskell at the same time
<clever> redmp: or use defaults to set common stuff?
<clever> redmp: use map to turn a list of things into a list of `lib.mkMerge [ common per-machine ]` ?
<clever> simonpe^^: so the same rootfs could boot on either, and nixos-rebuild switch on either
<clever> simonpe^^: i once made an SD card, that had both arm and x86 builds of the same configuration.nix, with bootloaders for both x86 and rpi
<clever> typo
<clever> oops, parens shouldnt be there
<clever> simonpe^^: you wind up with qemu's deps, not the targets deps!
<clever> simonpe^^: qemu-user also breaks ldd, if qemu was dynamic
<clever> redmp: and then you can freely use mkForce like you would normally in nixos
<clever> redmp: this lets you specify multiple nixos modules, and each one can be in the form of { config, pkgs, ... }:
<clever> redmp: machine1 = lib.mkMerge [ (module1 module2) ];
<clever> redmp: mkMerge will be a much better solution anyways
<clever> simonpe^^: originally, it was written using ldd, but ldd doesnt work for cross
<clever> redmp: for infinite recursion reasons, nixos will specially call you with exactly what you asked for and nothing more
<clever> redmp: in the nixos case, yes
<clever> redmp: since you didnt explicitely ask for pkgs, nixo(p)s didnt give pkgs
<clever> > builtins.functionArgs (args: 42)
<clever> > builtins.functionArgs ({ pkgs, ... }: 42)
<clever> nixo(p)s will use builtins.functionArgs to query what args you are expecting
<clever> { pkgs, ... }: not args:
<clever> redmp: modules in nixops must fully declare what args they are expecting
<clever> redmp: `args: ({pkgs, ... }: stuff) args` will need an `args.pkgs`, does that exist?
<clever> redmp: then the `{ pkgs, ... }:` step isnt being ran with a set containing pkgs
<clever> redmp: how is that failing?
<clever> simonpe^^: mobile-nixos and rpi-tools both need the initrd building part, with different rules
<clever> simonpe^^: there is a pending issue to rewrite half of stage-1.nix into reusable tools
<clever> redmp: yeah, i'm not using the callPackage bit in this case, just direct self.foo references
<clever> redmp: and then line 54, `self.overrideScope' (self: super: { ... })` will inject an overlay, between the return value and self
<clever> redmp: then you do `self = pkgs.lib.makeScope pkgs.newScope packages;` to spawn an instance of that, against a given pkgs tree
<clever> redmp: you use self.callPackage to load sub-components, and that new callPackage will search in this set first
<clever> redmp: line 3-51 defines the initial package set, in the form of `packets = self: { ... };`
<clever> redmp: overlays make it far simpler
<clever> redmp: sounds like you want to play with overlays
<clever> then it should do what your expecting
<clever> redmp: `{option1,option2}` is a syntax error
<clever> simonpe^^: find-libs, on line 164 of stage-1.nix
<clever> simonpe^^: and a program to do exactly that already exists
<clever> simonpe^^: also, you need to respect the rpath of each library, recursively
<clever> one minute
<clever> simonpe^^: patchelf ignores the rules and can break a lot of things
<clever> simonpe^^: the linker should refuse to even try to link a library from the wrong arch
<clever> simonpe^^: but they do depend on the x86 libc, and thats not been simple to fix
<clever> simonpe^^: ive not had any problems with the arm binaries linking to an x86 libc
<clever> simonpe^^: the wrapped one will properly respect buildInputs and knows where to find libc
<clever> simonpe^^: the cross compiler should set all of those env vars
<clever> > "${pkgs.path}"
<clever> mvnetbiz_: or pkgs.path
<clever> simonpe^^: $READELF and friends, i believe
<clever> mvnetbiz_: i dont believe it is
<clever> mvnetbiz_: yep
<clever> mvnetbiz_: but nixops and other things can add more
<clever> mvnetbiz_: remove the ... and it will error out because of unexpected args, and name them
<clever> gchristensen: is the bot having an identity crisis? lol
<clever> jawr: yes
<clever> its off by default, but the /etc/hosts entries are still made
<clever> i think ec2 also creates hosts entries for both the public and private ip
<clever> redmp: the -encrypted is a rarely used feature where nixops can create dedicated vpn links between machines
<clever> so you can just refer to them by name, and the ip is handled for you
<clever> redmp: also, nixops will populate /etc/hosts with all of the other machines for you
<clever> redmp: looks like its time to file a bug on nixops!
<clever> node.foo.config.deployment.publicIp?
<clever> redmp: there is a deployment.publicIp thing i think
<clever> redmp: ah, that explains things perfectly
<clever> only if you used --pure to wipe the env
<clever> the default NIX_PATH on nixos has that
<clever> redmp: you may need to add a `-I nixos-config=/path/to/configuration.nix`
<clever> how*
<clever> redmp: failed now?
<clever> redmp: `nix repl '<nixpkgs/nixos>'`
<clever> redmp: top-level uses requires instead of imports
<clever> andoriyu: the rpi doesnt use ahci, thats for ide drives

2021-02-28

<clever> and it wont allow for native arm->arm
<clever> note though that this wont support darwin->target cross, because the host arch has to be specified
<clever> siraben: the overlay needs to dynamically switch between pkgsCross and normal pkgs, based on the chosen arch
<clever> yeah
<clever> s1341_: that complicates it more, its better to copy in that case
<clever> s1341_: `nixos-rebuild boot` will update it
<clever> s1341_: the same fileSystems."/nix" stuff you would use to mount anything else
<clever> on the next boot, it will try to respect the configuration.nix from when you `nixos-rebuild build`, and it will find where you moved it
<clever> s1341_: ideally, you would `nixos-rebuild build` with the new config for what is mounted to /nix, then switch to a livecd, and move the full contents over

2021-02-26

<clever> but if the old state was lost, then it wont have the old things you had installed
<clever> jimkooch: and .nix-profile should repair itself when you use nix-env
<clever> jimkooch: defexpr is automatically updated when using nix-channel

2021-02-25

<clever> and systemd saves the full dmesg buffer on startup
<clever> cole-h: writing to /dev/kmsg will inject things into the dmesg buffer
<clever> cole-h: those lines came from stage-1
<clever> Feb 22 20:54:46 amd-nixos stage-1-init: loading module spl...
<clever> Feb 22 20:54:46 amd-nixos stage-1-init: loading module dm_mod...
<clever> [root@amd-nixos:~]# journalctl -b 0
<clever> cole-h: i think only on successfull boot
<clever> gchristensen: but i think `nix profile` is using the flake api, and wont allow impure access to config.nix?
<clever> dont look at the list of PR's ive opened and never followed up on!, lol
<clever> gchristensen: i never got my modules into a stable state
<clever> ar: i have since played the game fully on linux as well
<clever> ar: i forget which expansion pack i was running then
<clever> thats why i now use iscsi, so windows treats it as a BLOCk device, and only sends WHOLE BLOCKS to the server
<clever> yes
<clever> so you pay a full round-trip to the samba server, for each byte in the file
<clever> then i discovered, it saves add-on state to disk, one byte at a time
<clever> in the past, i tried running WoW on samba to a linux server
<clever> ajs124: windows has nfs support?? lol
<clever> gchristensen: i also have an iscsi target for my windows boot to use, to share some disk space with it, without dealing with samba
<clever> ajs124: this module handles iscsi root in the initrd, i wrote it before the initrd had network support
<clever> gchristensen: and at one point, i was booting my laptop from iscsi, and ipxe was emulating legacy ide, so grub didnt even need netboot support
<clever> gchristensen: i did also boot some rpi's with iscsi root, because nfs has trouble with a 64bit server and 32bit client
<clever> gchristensen: for my main desktop, i use it to store games for steam, because nfs has trouble with steam
<clever> gchristensen: and this is then on the client side, how to list and connect (disconnect is -u instead of -l)
<clever> iscsiadm -m node -T iqn.2020-12.amd-steam-xfs -p nas.localnet -l
<clever> [root@amd-nixos:~]# cat iscsi_link
<clever> iscsiadm -m discovery -t sendtargets -p nas.localnet
<clever> [root@amd-nixos:~]# cat iscsi_list
<clever> yep
<clever> i didnt get that all right, so its a bit fragile, and needs manual restarts after a power loss
<clever> and targets must restart if tgtd has been restarted
<clever> and tgtd must be started, before you can start the targets
<clever> each target has to be stopped before you can stop tgtd itself
<clever> but like wireguard, the services have to restart in the right order, and i never got it right
<clever> i wanted to skip that whole mess, so i wrote a nixos module that runs tgtadm directly
<clever> tgt-admin is then a perl script, which reads the config file, and runs tgtadm repeatedly, to configure tgtd
<clever> gchristensen: tgtadm lacks support for its own config file!
<clever> gchristensen: tgtadm is the client to configure tgtd over an RPC
<clever> gchristensen: yeah, but it could use some touch-ups, based on your wireguard stuff
<clever> rauno: you must use the name listed in `nix-env -q`
<clever> ,ping
<clever> ,ping

2021-02-24

<clever> yep, thats why i asked if you had enabled gnome
<clever> i'm guessing the recent spam required the bots to be cranked up
<clever> cole-h: thats why i said pastebin, not paste
<clever> dmvianna: can you pastebin the configuration.nix file?
<clever> dmvianna: if youve rebooted, then you should only have what configuration.nix said to give you
<clever> dmvianna: how did you enable gnome?

2021-02-23

<clever> codygman__: just run nixos-generate-config again
<clever> not sure what could be causing that
<clever> 32bit dri support seems to be fine then
<clever> jesystani: try running "nix-shell -p pkgsi686Linux.glxinfo" and then use the 32bit glxgears within that, does it v-sync?
<clever> if nixpkgs contains a copy of nixpkgs, yeah
<clever> yep
<clever> you may need to use normal override stuff, to append to that attr
<clever> applications/misc/bibletime/default.nix: cmakeFlags = [ "-DUSE_QT_WEBKIT=ON" "-DCMAKE_BUILD_TYPE=Debug" ];
<clever> remexre: cmakeFlags
<clever> charukiewicz: every parameter to mkDerivation becomes an env var of the same name

2021-02-22

<clever> supersandro2000: yeah, but if you want chanserv, you have to register it with freenode, and play by the rules freenode has set
<clever> supersandro2000: freenode policy, its not directly managed by linux, so it gets ##
<clever> awmv: they banned all irc cloud users
<clever> 2021-02-22 12:48:55 [freenode] -!- 0 - ##linux: ban *!uid*@*irccloud* [by barjavel.freenode.net, 37226321 secs ago]
<clever> then look thru it for something that matches you
<clever> to list the bans
<clever> awmv: /mode ##linux +b
<clever> nf: because its reusing the same internal api as ${./foo.txt}, where $out is based on a hash of the contents, not a hash of how those contents got built
<clever> instead, its just a single path
<clever> nix-repl> :p builtins.getContext "${./Makefile}"
<clever> { "/nix/store/9s7ahvvzljvy5c9ik45i62rsrcc8jxln-Makefile" = { path = true; }; }
<clever> but when you do "${./foo.txt}", there is no .drv file for anything inside foo.txt
<clever> so nix must build or fetch that, before it can build anything refering to "${pkgs.hello}"
<clever> nf: this string has some context on it, stating that the string depends on the "out" output of the hello.drv derviation
<clever> nix-repl> :p builtins.getContext "${pkgs.hello}"
<clever> { "/nix/store/x9gyyf3ish15fdvdj3lx4vqxw3j9h865-hello-2.10.drv" = { outputs = [ "out" ]; }; }
<clever> nf: those only work when you do "${pkgs.hello}", where hello is a special string that has drv files attached to it
<clever> so it just isnt allowed to have deps
<clever> so there is no way for nix to be pure and build the deps properly
<clever> when you do "${./foo.txt}", it came from outside the nix store, you didnt specify any info on how to build the deps
<clever> it also saves you building a derivation
<clever> toFile happens at eval time, so it doesnt need a working stdenv to function
<clever> but it happens at build time, not eval time
<clever> nf: this one has the same api, but supports deps
<clever> > pkgs.writeText "name" "body"
<clever> nf: its using the same api as "${./foo.txt}" which doesnt allow the file to have deps, because the file came from outside the store
<clever> berber: then the port still isnt forwarded correctly, or the firewall on nixos is blocking it
<clever> berber: try with `curl -i`, what does it say?
<clever> berber: but thats pinging the router, not the nixos machine behind the router
<clever> check the port forwarding config on your router, the ip is likely wrong
<clever> berber: until you can curl it, acme wont work
<clever> berber: are you able to curl that url, from outside the router?

2021-02-21

<clever> colemickens: swap can mask that issue
<clever> and now you have a confusing mess of quote spew
<clever> indent = "''${color:brown}''${if...
<clever> aleph-: you need to use ''${ to escape it properly, not \
<clever> aleph-: it tends to get real ugly when you have that many ${'s to escape
<clever> without any parsing
<clever> aleph-: it can also help to just ".weechat/buflist.conf".source = ./foo.txt; to just use the file as-is
<clever> ,escape ${foo}
<clever> iqubic: nix-env -f ~/apps/nixpkgs -iA hello

2021-02-20

<clever> Thra11: i think?
<clever> Thra11: pkgs.haskellPackages.extend (self: super: { aeson = pkgs.haskell.lib.overrideCabal super.aeson (old: { src = ./.; }); })
<clever> yeah, that should work
<clever> zn60: you need to run a `chmod -R +w` over it to fix that
<clever> zn60: $src is read-only, so the copy in $out will also be read-only
<clever> ,callPackage sshow

2021-02-19

<clever> sterni: sometimes, but ive found it to be buggy
<clever> attila_lendvai: it also tells you to :? on startup!
<clever> attila_lendvai: as-in, `:p foo` in the repl, `:?` shows all cmds
<clever> attila_lendvai: :p
<clever> attila_lendvai: `nix repl` caches the contents of any file it parses
<clever> attila_lendvai: you may need to restart `nix repl` after each change
<clever> attila_lendvai: did you enable the service in the configuration.nix you supplied?
<clever> you have to restore it one window at a time, then reboot chrome
<clever> but if session buddy restores tabs, it loads EVERY SINGLE ONE
<clever> the main problem, is that if chrome auto-restores tabs, they arent loaded, so it restores quickly
<clever> i tried one-tab, and it failed at its ONE BLOODY JOB, and all of its state is reset after each startup, lol
<clever> colemickens: i use session buddy in chrome to back that up
<clever> if you close without restoring, its toast
<clever> chrome does that too
<clever> so the ram usage doubles on the spot
<clever> colemickens: to make things worse, chrome tends to restore all 4000 of my tabs when that happens
<clever> *
<clever> steam and discord&
<clever> colemickens: ive had even worse problems, chrome and discord will either fail to spawn chrome entirely (the sandbox breaks it), or the new chrome process fails to contact the old one, then double-opens my profile, corruption all cookies
<clever> configuration.nix can then set options to make the module do something
<clever> then you can just eval `config.foo` to see what all of the config contains
<clever> that will load a local checkout of nixpkgs, and load a configuration.nix from a custom path
<clever> attila_lendvai: you must instead do something like `nix repl ~/apps/nixpkgs/nixos --arg configuration ./configuration.nix`
<clever> attila_lendvai: modules cant be loaded with callPackage
<clever> `--option repeat 0` can be passed to nixos-rebuild to force it back off, incase you find yourself unable to rebuild
<clever> then nixos-rebuild will do it for you
<clever> attila_lendvai: nix.extraOptions = "repeat = 1";
<clever> attila_lendvai: there is also `nix repl`
<clever> attila_lendvai: you should also never edit anything in /nix/store/
<clever> attila_lendvai: you can also add `repeat = 1` to /etc/nix/nix.conf, to make nix build everything twice, and fail if it cant product bit-identical results
<clever> any non-valid files are ignored when checking if it exists, and are silently deleted upon starting a build
<clever> attila_lendvai: nix wont register the product as valid in sqlite until the download completes and it matches the sha256 you claimed
<clever> attila_lendvai: that shouldnt happen
<clever> attila_lendvai: correct
<clever> attila_lendvai: if you claim the sha256 didnt change, it uses the old build, because you said the contents are the same
<clever> attila_lendvai: it computes $out based purely on the sha256
<clever> matrix'd once more!
<clever> if you use {} then you dont have to indent
<clever> tpw_rules: indenting is just to let you skip using { and }
<clever> and it just works
<clever> correct, you can just throw toJSON output right into a yaml parser
<clever> yaml is a superset of json, so any yaml parser will also accept json
<clever> > builtins.toJSON { key = "value"; }

2021-02-16

<clever> veleiro: i use `nix build` if i want progress reporting
<clever> bqv: i have no idea what that bind is doing, i just remembered that :v shows how a value was defined
<clever> thats the bind you wound up with
<clever> > :v bind
<clever> eyJhb: just fetch the right branch from the start!
<clever> eyJhb: fetchgit doesnt fetch other branches, so that will already fail
<clever> yeah
<clever> that whole kind of mess, is what https://github.com/mcpkg/ was trying to solve as well
<clever> ahh
<clever> eyJhb: how does that fail when everything is writeable?
<clever> why does the build care about things staying readonly?
<clever> nix simply doesnt allow the +w bit to exist once a build is finished
<clever> eyJhb: you need to copy the source to . and `chmod +w -R` it
<clever> eyJhb: nix always makes everything read-only
<clever> eyJhb: +x, +w, or +r?

2021-02-13

<clever> adisbladis: tldr, the file doubles in size every time you boot, until the perl script OOM's
<clever> adisbladis: ive also seen it horribly break if any username contains unicode
<clever> cinimod: the expression was probably just renamed then