2020-01-08

<clever> kapil_: does hetzner provide dhcp or require a static ip config?
<clever> kapil_: its a short-term fix, the long-term fix is to figure out why dns isnt being set correctly
<clever> kapil_: short-term, you can add a `nameserver 8.8.8.8` to that file to fix it
<clever> kapil_: does /etc/resolv.conf contain any nameserver entries?
<clever> kapil_: then your dns is not working, it has nothing to do with the mirrors
<clever> kapil_: what about `ping 8.8.8.8` ?
<clever> kapil_: what happens if you `ping google.com` ?
<clever> ,libraries kapil_
<clever> kapil_: a program that will source .envrc into your shell when you cd into a directory that has a .envrc file
<clever> kapil_: next time you nixos-rebuild, it will obey the new channel
<clever> kapil_: sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos ; sudo nix-channel --update
<clever> thomashoneyman: then you can browse from within the virtualbox
<clever> thomashoneyman: you could include X and a browser inside the virtualbox instance
<clever> the whole thing has to match
<clever> thomashoneyman: `hydra.mydomain.com 192.168.56.101`
<clever> you can use /etc/hosts to force that to still go to the right machine
<clever> thomashoneyman: you must use the string hydra.mydomain.com in the url bar, for `virtualHosts."hydra.mydomain.com"` to react to it
<clever> thomashoneyman: virtualHosts requires the entire host in the url to match, having the ip in there means it doesnt match
<clever> thomashoneyman: subdomains dont work with IP's, ive never seen that done before
<clever> evanjs: you probably wanted `nix-env -p /nix/var/nix/profiles/system --switch-generation 838
<clever> but your next `nix-env -i` will recreate the mess
<clever> likely because you cleaned the profile up
<clever> evanjs: it should be pointing to a profile under per-user
<clever> lrwxrwxrwx 1 clever users 45 Oct 11 2015 /home/clever/.nix-profile -> /nix/var/nix/profiles/per-user/clever/profile
<clever> evanjs: so it is the default target for all nix-env -i as your user!
<clever> evanjs: also, that updated ~/.nix-profile to point to the new profile
<clever> which starts at generation 1, system-838-link-1-link
<clever> evanjs: that created a whole new profile, called system-838-link
<clever> evanjs: that didnt switch to generation 838
<clever> evanjs: thats likely your problem
<clever> evanjs: ls -l /nix/var/nix/profiles/ into a pastebin?
<clever> evanjs: check ~/.bash_history on each user, what is every command you ran with system-838 ?
<clever> evanjs: that implies your -profile is wrong?
<clever> evanjs: you shouldnt have n-link-n-link in the names
<clever> evanjs: does the symlink point to something?
<clever> evanjs: need more context on what your doing
<clever> evanjs: it happens if you nix-env -e everything
<clever> evanjs: thats an empty nix-env -i profile
<clever> evanjs: thats weird

2020-01-07

<clever> kqb: mainly just state that cant be migrated automatically
<clever> kqb: you have to read the release nodes, or the nixpkgs source
<clever> kqb: when you want to migrate your state to the newer stateVersion, and deal with whatever changes happened
<clever> kqb: ideally, you would leave stateVersion unchanged, and only use nix-channel to update the channel
<clever> kqb: if you change the stateVersion, it will upgrade postgresql, and then psql cant read its own database files, and everything breaks
<clever> kqb: for example, which postgresql you first ran
<clever> kqb: the whole point of stateVersion, is so nixos knows what version your state came from
<clever> ,stateVersion kqb
<clever> kqb: perhaps you simply havent changed channels for 2 years?
<clever> kqb: what does `sudo nix-channel --list` report?
<clever> ptrcmd: yeah, the fhs namespacing disables all setuid, because you could replace /etc/shadow and claim to know the root pw
<clever> ptrcmd: 90% of the time, an fhs is overkill, and you can solve the problem with simpler tools
<clever> ptrcmd: the FHS wrapper is using namespaces to chroot without needing real root
<clever> ptrcmd: check nixpkgs for examples, just search the whole repo for libredirect
<clever> ptrcmd: no, libredirect is a library, that can redirect specific paths, without needing a full FHS wrapper
<clever> ptrcmd: thats what libredirect is for
<clever> ptrcmd: patching it with patchelf would also eliminate the entire need for the FHS, which makes it much much simpler
<clever> ptrcmd: you need to use security.wrappers to run a FHS wrapper around your binary, not enter an FHS env then run a setuid copy of the binary
<clever> flip it around
<clever> so you need a setuid thing, that runs the FHS
<clever> the FHS env disables setuid
<clever> ptrcmd: 1: libredirect, 2: security.wrappers
<clever> Tritlo: your user profile has priority over configuration.nix and will override things
<clever> Tritlo: i think thats the right way, that will just install it to your current users profile
<clever> Tritlo: nix-env -i -E '_: with import <nixpkgs> {}; emacsWithPackages (ps: [ ps.emacs-libvterm ])'
<clever> Tritlo: yeah, you can just put (emacsWithPackages (ps: [ ps.emacs-libvterm ])) into your systemPackages, and thats it
<clever> kqb: or if your dealing with nixos options, lib.mkMerge is better
<clever> kqb: lib.recursiveUpdate
<clever> Tritlo: and this would run emacs26 instead of the default (which happens to currently be 26)
<clever> > emacs26WithPackages (ps: [ ps.emacs-libvterm ])
<clever> Tritlo: i believe this expression will generate a bash script called emacs, that puts libvterm into the search path as it runs emacs
<clever> > emacsWithPackages (ps: [ ps.emacs-libvterm ])
<clever> Tritlo: this package contains a pre-build libvterm for emacs
<clever> > emacsPackages.emacs-libvterm
<clever> kqb: the merging when you have duplicate entires, is handled by the nixos module framework, and is based on the type of the option your setting
<clever> Tritlo: it would need to be properly packaged by nix
<clever> same rule applies to gcc, it just wont work right if installed system-wide
<clever> ,libraries Tritlo
<clever> elvishjerricco: i dont think so

2020-01-06

<clever> Enzime: i dont think there is any difference now
<clever> Enzime: nixos-unstable has extra tests ran, to make sure it cant brick a nixos machine, things like ensuring it doesnt corrupt the grub config file
<clever> probably /home/nix /nix
<clever> zimbatm: probably
<clever> freddy2001: mv /nix /home/nix ; mount --bind /home/nix /nix
<clever> mount --bind /home/nix /nix
<clever> evils: the gsc.io page has full history, for all channels
<clever> evils: 2020-01-06 06:05:48 -{^_^}:#nixos- Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/5302f600e2f (from 87 minutes ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
<clever> klntsky: you will need to edit the product, or run `callCabal2nix (lib.cleanSource ./.)`
<clever> that will exclude result when checking the source to see if it changed
<clever> klntsky: src = lib.cleanSource ./.;
<clever> klntsky: why would it?
<clever> Aleksejs: you would need to make it a shell script in $PATH, probably
<clever> lol
<clever> my memory is wonky, ive memorized a large chunk of source and can cross-reference things easily
<clever> pie_[bnc]: so, the patch has to be specially made to use that string
<clever> pie_[bnc]: all it does is replace the @libvlcPath@ within the patch
<clever> yep, thats it
<clever> pie_[bnc]: there is a nix level function of the same name, which generates a derivation that runs the bash version
<clever> thomashoneyman: this can let you pre-deploy some known hosts, there is also an option to just blindly trust the first time
<clever> thomashoneyman: ~/.ssh/known_hosts also plays a factor
<clever> thomashoneyman: ./src + "/myfile.txt"
<clever> ,pr softinio
<clever> jackdk: because nix converted it from 16->32 before printing the error
<clever> jackdk: its also confusing when nix gives an error in base32, but that hash appears nowhere
<clever> jackdk: nix accepts both base16 and base32 hashes

2020-01-05

<clever> combined, that would let you seek to an offset within the xz, partially decompress, and then seek again within that stream to a specific file body
<clever> then also parse the nar within it, and generate an index from filename to uncompressed offset
<clever> basically, it would need to parse the xz file, figure out where each xz block starts within the .nar.xz, and how many uncompressed bytes each block represents
<clever> the next major change that narfuse would need to work better, is seekable xz support
<clever> jackdk: but, you have to keep them uncompressed...
<clever> jackdk: the original idea with using fuse there, is that you can keep all storepaths as nar files, and then share them over ipfs
<clever> jackdk: thats when haskell tempted me to the dark side :P
<clever> jackdk: so `ls -l /nix/store` was incredibly expensive!
<clever> jackdk: fusenar was a project to turn a directory full of foo.nar into a directory full of foo, and the c++ parser would parse every single byte (possibly over a gig) before it knew what the type of foo was
<clever> jackdk: and thats the original c++ implementation for reference
<clever> jackdk: `nix-store --dump ./foo > foo.nar` and `nix-store --restore foo < foo.nar` will create and extract from a .nar, for test data
<clever> jackdk: if the put instances are all filled in, then you can turn a string (file contents) with the execute flag, back into a nar bytestring, then hash it
<clever> jackdk: this is some ancient code (some of the very first haskell i wrote) that can parse a nar into a tree of data records
<clever> jackdk: one min
<clever> jackdk: you would need to serialize the file as a nar, with the execute flag set, and then hash the resulting bytestring
<clever> o1lo01ol1o: `ps aux | grep nginx` and then cat the .conf its using
<clever> jackdk: the nix-hash command
<clever> and sha256sum doesnt care if its executable or not
<clever> outputHashMode = "flat" is just the dumb hash of the file, like `sha256sum $out`
<clever> outputHashMode = "recursive" will be hashing a nar, which includes directions on if it should be +x or not
<clever> __monty__: the hash and name should 100% describe how to create the file, and leaving the +x bit undefined means your not 100% describing it
<clever> __monty__: because when using flat hashing, there is no metadata to say if it should be executable or not
<clever> jackdk: if outputHashMode = "recursive"; then outputHash is the hash of the nar of $out (nar is like tar), and $out can be anything (file, directory, symlink, +x'd file)
<clever> jackdk: if outputHashMode = "flat"; then outputHash is the raw hash of the $out file, and $out must not be +x
<clever> Guest4429: an example, where you can insert your own package and override
<clever> Guest4429: try `nix-build -E 'with import <nixpkgs> { system = "aarch64-linux"; }; hello.override {}`
<clever> since its already been called with {}, --argstr has no effect
<clever> Guest4429: -p will use this nix expression, and you want the system inside the {} on that line
<clever> one second
<clever> Guest4429: i dont think --argstr works at all with -p
<clever> Guest4429: did you run that in the root of a nixpkgs checkout?
<clever> Guest4429: exactly what command did you run?
<clever> Guest4429: did the default.nix accept a system arg?
<clever> (which is in nixpkgs)
<clever> nixos can boot on the rpi4, but it needs to use the rpi fork of linux, not the upstream linux
<clever> ah, yeah
<clever> thefloweringash: and my vc4/arm development is currently from a pin
<clever> thefloweringash: currently not that bothered by it, since i can lookup the last-good rev in my hydra
<clever> thefloweringash: thats exactly what i'm seeing on my hydra, its configured to cross-compile nix to arm
<clever> Guest4429: and i dont see what error your currently getting
<clever> Guest4429: i already posted directions above on how to get nix cross-compiled to arm
<clever> wrl: short-term, you can just edit /etc/resolv.conf to get things working again
<clever> wrl: did you set networking.nameservers in your nixos config?
<clever> wrl: did you give it an interface name?
<clever> it always says that
<clever> wrl: does `dhcpcd -U enp3s0` show dns config (if you sub in the right IF)
<clever> wrl: dhcp or static ip?
<clever> but -d destroys your ability to undo things
<clever> ah
<clever> wrl: it will re-create any missing files, based on existing config
<clever> wrl: simplest option is to just boot the installer ISO, mount everything back up under /mnt, and run nixos-install
<clever> same
<clever> Guest4429: yeah, thats the one i meant
<clever> Guest4429: it can delete things your actually using
<clever> Guest4429: --force is worse
<clever> so it likely still exists in /nix/store, but doesnt have a generation# assigned to it
<clever> the one you are currently running cant be GC'd, but the generation# pointing to it can be deleted
<clever> https://hydra.angeldsis.com/jobset/nixos-configs/nixos-configs#tabs-jobs oh, and that build also began to fail 18 hours ago
<clever> Guest4429: my hydra is already configured to cross-compile nix to arm
<clever> thomashoneyman: allowed-urls
<clever> thomashoneyman: sure
<clever> yep
<clever> thomashoneyman: yeah
<clever> thomashoneyman: oh, we dont use private repos on this hydra, so no further examples, just edit the target for this
<clever> thomashoneyman: this deals with the private key it needs to ssh into build machines, if you have any
<clever> if your using nixops, you can push a pre-generated key to the same path ssh-keygen would have written to
<clever> for personal machines, yeah
<clever> i mostly go by what user `ps aux` says is running a certain component
<clever> [root@nas:~]# ps aux | grep hydra-eval
<clever> hydra 26325 0.0 0.0 182720 3052 ? Ssl 21:04 0:00 hydra-evaluator
<clever> thomashoneyman: oops, hydra runs evals as plain `hydra`
<clever> gchristensen: you would either need to re-run modify every time you import the state, or patch nixops to stop doing that
<clever> also, you can inspect that in nix repl, to understand how nix parsed $NIX_PATH
<clever> > builtins.nixPath
<clever> gchristensen: first entry has highest priority, and -I will prepend to the list
<clever> gchristensen: i think the : can be part of a var name? try ${NIX_PATH}:
<clever> thomashoneyman: i just `sudo -u hydra-evaluator -i` and then `ssh-keygen`
<clever> thomashoneyman: public github repos are much simpler to manage
<clever> thomashoneyman: yeah, on the right user
<clever> thomashoneyman: create a project, and a jobset, within the jobset, configure an input with the github url, and then tell it which input to use, and the relative path to release.nix within that input

2020-01-04

<clever> Raito_Bezarius: i'll have a look into that sometime this weekend
<clever> Raito_Bezarius: mixed content, its trying to load css over http, not https
<clever> yeah
<clever> i first joined #nixos on `Thu Jun 25 11:13:00 2015`
<clever> thomashoneyman: runCommand
<clever> zeta_0: no clue
<clever> maybe
<clever> zeta_0: 2020-01-03 22:15:51 < clever> zeta_0: try each PS1 in a shell, see what each does
<clever> zeta_0: chances are, the if statements will screw you over again
<clever> zeta_0: so you just need to put the right PS1 into the .envrc
<clever> zeta_0: all direnv does, is set env vars, when you enter a dir
<clever> but the direnv irc channel may know more
<clever> nope
<clever> zeta_0: i just dont bother
<clever> pie_[bnc]: builtins.fetchurl
<clever> pie_[bnc]: within the stdenv, pkgs.fetchpatch into patches
<clever> zeta_0: xterm is a terminal emulator, that uses X
<clever> zeta_0: try each PS1 in a shell, see what each does
<clever> zeta_0: and decide which half of the if statement you want to keep
<clever> zeta_0: and the then
<clever> zeta_0: and the condition between the if and then
<clever> zeta_0: maybe try again when you have had more sleep?
<clever> zeta_0: you didnt delete the entire if statement
<clever> zeta_0: nuke em all!
<clever> zeta_0: remove that if statement
<clever> zeta_0: $TERM was set to dumb, so the if statement turned everything off
<clever> zeta_0: add a `set -x` at the start of the string, and a `set +x` at the end, then pastebin the output of nix-shell
<clever> zeta_0: is it actually setting the new PS1?
<clever> zeta_0: add more echo's, to the if statements within the code you had to begin with
<clever> mla: so to know if a custom arg of mkIf exists, it must know the value of config, which depends on mkIf!
<clever> mla: you can add custom args to line 1, using config._module.args
<clever> mla: mkIf is part of lib, you want lib.mkIf
<clever> zeta_0: no
<clever> mla: it would be much better to do `config = mkIf (condition) { ... };` within aarch64.nix
<clever> mla: imports cant depend on pkgs
<clever> zeta_0: that should work
<clever> zeta_0: or just keep the entire string, and add the echo within the existing string
<clever> zeta_0: use '' to quote it, not '
<clever> > 'invalid'
<clever> > ''double-single''
<clever> > "double"
<clever> zeta_0: thats not a valid string
<clever> zeta_0: its not even quoted
<clever> zeta_0: thats not even inside the string
<clever> zeta_0: add an `echo foo` to the shellHook, does it echo foo?
<clever> (or add a with pkgs;)
<clever> zeta_0: you dont have a `with pkgs` anywhere, so you must use pkgs.nix-prefetch-git
<clever> steell: replace <nixpkgs> with the path to a nixpkgs
<clever> zeta_0: did the example i just gave include a ; after the ) ?
<clever> zeta_0: `in (....).overrideAttrs ...`
<clever> zeta_0: everything after the `in` up to the `.overrideAttrs`
<clever> so your cmake thing doesnt need to do anything at all, it would just work
<clever> also, nix itself adds fmt to -I and -L for you
<clever> then your project is likely ignoring the pkgconfig file
<clever> noonien: or a bug with fmt not providing a .pc file
<clever> noonien: id say its a bug with the thing your compiling, that its not using pkgconfig to figure out where the libs and headers are
<clever> pie_[bnc]: probably
<clever> zeta_0: that goes after line 36, and you must wrap 6-37 with ( and )
<clever> pie_[bnc]: you will need to decide which daemon controls the cards, and tell the other one to keep its hands off
<clever> bogdb: you could also try (fmt.overrideAttrs(old: { outputs = [ "out" ]; }))
<clever> bogdb: you could also try (fmt.overrideAttrs(old: { outputs = [ "out" ]; }))
<clever> bogdb: try adding pkgconfig
<clever> bogdb: do you have pkgconfig and cmake in your inputs?
<clever> bogdb: its a normal split output package
<clever> > fmt.outputs
<clever> zeta_0: then you want .overrideAttrs (old: { shellHook = ''....''; })
<clever> zeta_0: it looks like it should do something
<clever> zeta_0: have you tested it yet?
<clever> zeta_0: https://nixos.org/nixpkgs/manual/ ctrl+f for shellHook
<clever> zeta_0: just add it to a derivation, along with src and buildInputs
<clever> zeta_0: its an attribute on a derivation, not a function
<clever> pie_[bnc]: looks like there hasnt been any major loss
<clever> 2019-09-10 17:52:47< {^_^}> clever's karma got increased to 200
<clever> 2019-02-22 21:52:00< {^_^}> clever's karma got increased to 100
<clever> it did get reset at one point, but only lost 5
<clever> 2018-06-14 10:48:00< {^_^}> clever's karma got increased to 1
<clever> pie_[bnc]: 2018-05-04 11:16:33< {^_^}> clever's karma got increased to 1
<clever> ben: rules are always broken, lol
<clever> ben: protocols always have a :// after it, https:// http:// file://
<clever> o1lo01ol1o: file:///foo says to open "/foo" an absolute path
<clever> o1lo01ol1o: file://foo says to open "foo", a thing in the current working dir
<clever> o1lo01ol1o: try file:/// rather then file:// ?
<clever> o1lo01ol1o: nix-hash is recursive by default, so its packaging your .nar.xz up inside another nar, and then hashing
<clever> o1lo01ol1o: you may need a --flat also

2020-01-03

<clever> makefu: `nix-build /path/to/my/checkout -A package-name` would be one fix
<clever> makefu: the -I wont really have any effect, a file hasnt been specified, so it will try to load default.nix from the current dir
<clever> zeta_0: correct
<clever> zeta_0: no clue, i dont use home-manager
<clever> o1lo01ol1o: `man nix-hash` to see how to convert hash types, and how to just hash a file
<clever> o1lo01ol1o: the narinfo also holds the hash in base32, not base16
<clever> o1lo01ol1o: the narinfo contains 2 hashes, for the .nar and for the .nar.xz
<clever> 14360 bluetoothSupport = true;
<clever> 14356 pulseaudioFull = pulseaudio.override {
<clever> 14358 jackaudioSupport = true;
<clever> 14357 x11Support = true;
<clever> pie_[bnc]: to the source!
<clever> pie_[bnc]: ive not tried jack in a few years
<clever> pie_[bnc]: there is also accelerometer keyloggers
<clever> zeta_0: probably
<clever> jared-w: id have to check the irc logs, lol
<clever> pie_[bnc]: systemctl --user --reload, i think
<clever> zeta_0: programs.bash.interactiveShellInit
<clever> pie_[bnc]: then it simply hasnt been restarted yet
<clever> pie_[bnc]: what about `which --all pulseaudio` ?
<clever> pie_[bnc]: compare ps aux to the unit file
<clever> zeta_0: displayManager.sessionCommands is the wrong one, thats before your terminal window even opens