2019-11-06

<clever> niso: if there are no libraries of use in that dir, patchelf --shrink-rpath will remove it
<clever> o1lo01ol1o: automatic gc is off by default, you need to manually run nix-collect-garbage as needed, or set min-free and max-free in nix.conf
<clever> CMCDragonkai: they are usually set by hydra, when it imports release.nix

2019-11-05

<clever> dhess: more likely that its the evaluator, not the daemon
<clever> dhess: that can happen if your using an older nix that lacks support for it
<clever> dhess: so { nixpkgs ? sources.nixpkgs }: would work
<clever> dhess: hydra also passes nixpkgs as an argument to release.nix
<clever> dhess: ah, you want to ignore the niv nixpkgs and use <nixpkgs>
<clever> dhess: basically, dont import <nixpkgs> ever, import sources.nixpkgs
<clever> dhess: restricted urls?
<clever> aanderse: in my case, the partition is only using half the nvme disk, because i migrated from another disk using mirrors
<clever> aanderse: sadly, gparted wont let me do a simple partition growth, and refuses to touch zfs
<clever> __red__: grep has --color=never --color=always and i think --color=auto
<clever> aanderse: for lvm, you then want pvresize to expand the pv, and lvresize to expand the lv
<clever> aanderse: and then you need to find some other way to grow the fs within
<clever> aanderse: all growpart does, is grow the partition
<clever> __red__: grep itself, will use the istty() syscall to see if stdout is a tty
<clever> aanderse: ^^
<clever> ,locate growpart
<clever> noonien: you may want to look into direnv
<clever> glittershark: does `ssh user@host nix-store --version` report a version?
<clever> noonien: gcc wont find headers properly if you install it
<clever> __red__: | less -R, will make less obey the color codes, other then that, file an issue on nix
<clever> ,libraries noonien
<clever> noonien: even `nix-shell -p` will give you gcc
<clever> __red__: what if you slap a |cat on the end?
<clever> deni: nixpkgs.config in nixos, is identical to just editing ~/.nixpkgs/config.nix
<clever> deni: there is a nixos option at nixpkgs.config, which sets the config for pkgs
<clever> deni: those flags are under nixpkgs config, so you can set nixpkgs.config.kodi.foo
<clever> but that requires a central daemon that tracks who said what
<clever> ar: and only if all agree to re-enable, will it re-enable
<clever> ar: i think the main reason to involve xscreensaver and dbus, is so multiple applications can disable the screensaver
<clever> ar: there is a compile-time flag for plex, that makes it directly use x11 functions to manage power saving
<clever> deni: and i didnt install xscreensaver, so that just fails
<clever> deni: in my case, the default build of plex wants to talk to xscreensaver over dbus
<clever> deni: if you use an overlay, it will mutate the value of pkgs.kodi, and the service will just obey automatically
<clever> deni: similar to how my config is changing other things with .overrideAttrs
<clever> deni: make an overlay that changes them with .override
<clever> dminuoso: 70% of the things in that diagram are plugins! :P
<clever> deni: the machine also has 2 devices onboard, hdmi and a proper sound card, which would it default to?
<clever> deni: but i may not have mixing support, and i cant override the choice without unplugging things
<clever> deni: behind the scenes, pulse still needs to use alsa :P
<clever> dminuoso: bluetooth is absent from that graph
<clever> in my case, i wanted the ability to plug in a wireless headset dongle, and use pavucontrol to swap the default output
<clever> deni: sound.enable gets you bare alsa
<clever> deni: at the login screen, you will have a menu to choose between all enabled desktop managers, xfce, kde, gnome, kodi
<clever> deni: its a desktop manager, so you still need services.xserver.enable
<clever> inkbottle: read the `linux =` entry in `all-packages.nix` for 19.09
<clever> mwelt: read the nixpkgs manual, the section on package overrides
<clever> mwelt: --arg will set args to <nixpkgs>, not openjdk
<clever> mwelt: you need to use .override in a config.nix, not --arg
<clever> buckley310: i think both work, but i havent figured out how to do the `foo@bar` version
<clever> kolbycrouch: use an if statement that checks stdenv.system
<clever> buckley310: that creates a wan and iptv interface, based on a vlan from WANMASTER
<clever> inkbottle: you may need to plug in an ethernet cable then, do try an update to a newer or older kernel
<clever> inkbottle: do you have an older kernel listed in grub?
<clever> inkbottle: major*
<clever> inkbottle: ive also got 4.19 on my laptop and have magic bandwidth issues
<clever> inkbottle: what kernel are you on? uname -a
<clever> inkbottle: 04:00.0 Network controller: Intel Corporation Wireless 7265 (rev 99)
<clever> roots channels are available for user by all, but cant directly be listed
<clever> inkbottle: yes, every user has its own set of channels
<clever> inkbottle: thats not the wifi card
<clever> `nix-channel --list` will show which channel your currently on
<clever> i happen to be on nixos-unstable
<clever> inkbottle: nix-channel --update
<clever> inkbottle: my wifi has been crap since i last did an update
<clever> inkbottle: double-check lspci
<clever> inkbottle: intel card?

2019-11-04

<clever> exarkun: i would watch `watch -d df -h` while its building, and see which one fills up
<clever> exarkun: nixos doesnt put builds in /run/user
<clever> sondr3: try again with just pkgs.postgresql
<clever> sondr3: ah, i think it has to do with the postgresql version, i did have code here to change it, but it was messy, so i went with the older version
<clever> sondr3: one minute
<clever> ,ping
<clever> fresheyeball: give it a sane default? types.nullOr?
<clever> leo_: build-vm will generate a vm that doesnt touch the host
<clever> leo_: nixos-rebuild build-vm -I nixos-config=./configuration.nix
<clever> everything else is just a string, though it might be hidden in .outPath
<clever> paths are the only one that is really special
<clever> > let foo = { outPath = "bar"; }; in "${foo}"
<clever> fresheyeball: derivations are just sets that have an outPath attr on them
<clever> fresheyeball: paths are special, and will copy to the store when you try to coerce
<clever> fresheyeball: then you have javascript
<clever> > "${["one" "two"]}"
<clever> wedens[m]: i went thru my irc logs to find every uri, and then started to add examples
<clever> wedens[m]: partially, one min
<clever> leo_: i would try using concatLists to generate the big list from smaller ones
<clever> leo_: while this, will copy 1+2->1st, then copy 1+2+3 -> 2nd
<clever> > [1] ++ [2] ++ [3]
<clever> leo_: if you have a list of lists, its cheaper to use concatLists, that will pre-allocate room for 3 elements, then copy things from each input to the 1 output
<clever> > builtins.concatLists [ [1] [2] [3] ]
<clever> leo_: each time you append to a list, it has to copy the entire list, so it gets slower with each item
<clever> wedens[m]: you may want https://cache.nixos.org to also still be in the list
<clever> wedens[m]: that will look in /media/2nd/nix/store/
<clever> wedens[m]: --option substituters local?root=/media/2nd/
<clever> wedens[m]: https://gist.github.com/cleverca22/39815196e9cbe437a7612a7cafb8f247 lets you apply any configuration.nix you want while building the iso
<clever> wedens[m]: you can also generate an iso with an overlay applied to nix
<clever> adisbladis: i'm using the amdgpu driver on this card
<clever> 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Bonaire XTX [Radeon R7 260X/360]
<clever> adisbladis: not sure what all its impacting
<clever> videoDrivers = [ "amdgpu-pro" ]; will do a lot more, including changing kernel build flags
<clever> videoDrivers = [ "amdgpu"]; for example will just blacklist the "radeon" driver
<clever> veleiro: the nix code in this area, will detect certain magic strings in the videoDrivers array, and then change other config flags for you
<clever> Twey: you would need to strace the nix-daemon to see what its doing
<clever> Twey: hmmm, yeah, i'm not sure then
<clever> Twey: that stdenv may be horribly broken and unable to do anything
<clever> Twey: buildCommand is ran by the stdenv, which is ran by the args for builder
<clever> Twey: i'm guessing that you broke the stdenv and the stdenv is now unable to run buildCommand
<clever> Twey: then you want buildCommand
<clever> Twey: a lot of the depenency tracking is based on the contents of $out, which your changing
<clever> Twey: you probably want to use pkgs.runCommand
<clever> samueldr: .override { stdenv = ... } first
<clever> CMCDragonkai: you want nix repl '<nixpkgs/nixos>' -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix
<clever> CMCDragonkai: isoimage is only present if you do `-I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix` when you load nixos/default.nix
<clever> CMCDragonkai: you can also use https://gist.github.com/cleverca22/39815196e9cbe437a7612a7cafb8f247 to customize the image
<clever> CMCDragonkai: you need to use the nixos default.nix, nit the nixpkgs default.nix
<clever> pie_: oh, < and > can also be remapped
<clever> pie_: + cant be remapped, because it has to deal with string concat
<clever> pie_: yeah, you can remap - * and / to any binary function you want
<clever> infinisil: yeah, if you do <nixpkgs/foo> and it cant find foo, it will fail
<clever> pie_: if you redefine __sub using a let block, you can screw with math
<clever> pie_: also, `2 - 1` parses as `__sub 2 1`
<clever> pie_: "i remember whats in your sources"
<clever> pie_: i got bored and read the source
<clever> pie_: behind the scenes, <nixpkgs> parses to __findFile __nixPath "nixpkgs"
<clever> so nix can do that fetch in parallel
<clever> infinisil: main benefit of it, is that it happens at build time, but to make things pure, you must know $out before you know the value
<clever> infinisil: when the system is "builtin" and the builder is "builtin:fetchurl", nix will run builtinFetchurl() inside a normal fixed-output derivation sandbox
<clever> c00w: oh, i see what you mean, the file that the link points to, doesnt exist
<clever> so it shares the fetch code with the eval-time ones
<clever> infinisil: it calls a function within nix itself
<clever> infinisil: <nix/fetchurl.nix> forks out a worker like any other build, but doesnt actually execute a builder
<clever> infinisil: <nix/fetchurl.nix> is a builtin fetcher
<clever> c00w: an expr in nixpkgs, that generates the sd_image, also generates that file
<clever> infinisil: it may also work with <nix/fetchurl.nix>
<clever> c00w: ah
<clever> c00w: main difference, is that the hydra download link lets you fetch one file, while nix-store -r fetches the entire closure
<clever> these paths will be fetched (562.88 MiB download, 568.57 MiB unpacked):
<clever> [clever@amd-nixos:~/apps/nixpkgs-hasura]$ nix-store -r /nix/store/n8zjc58w33qr97r4vlzgid82lf6gawrh-nixos-sd-image-20.03pre200231.7827d3f4497-aarch64-linux.img
<clever> c00w: yeah, it might be a bug in hydra
<clever> infinisil: ah, that looks like a url
<clever> c00w: the build you linked on hydra does have that file...
<clever> file sd-image /nix/store/n8zjc58w33qr97r4vlzgid82lf6gawrh-nixos-sd-image-20.03pre200231.7827d3f4497-aarch64-linux.img/sd-image/nixos-sd-image-20.03pre200231.7827d3f4497-aarch64-linux.img
<clever> [clever@amd-nixos:~/apps/nixpkgs-hasura]$ cat /nix/store/n8zjc58w33qr97r4vlzgid82lf6gawrh-nixos-sd-image-20.03pre200231.7827d3f4497-aarch64-linux.img/nix-support/hydra-build-products
<clever> c00w: the links are generated by a file at $out/nix-support/hydra-build-products
<clever> > <channel:nixos-unstable>
<clever> c00w: looking...
<clever> so you dont have to replicate the code within it
<clever> the nixos release.nix already supports custom config
<clever> pie_: i was helping somebody install nixos, and we needed a way to talk while in the installer :P
<clever> pie_: i think the zfs one is a bit cleaner
<clever> pie_: https://gist.github.com/cleverca22/e2c139c30677506108c1a5bc9ec31089 is a random related gist i found
<clever> pie_: what do you want to use the iso for?

2019-11-03

<clever> main limitation, is that you can only search your own, not other users
<clever> pie_: i use https://app.cacher.io to search my gists
<clever> if the hardware is lost, that has to change anyways, so why preserve it in git
<clever> deni: and configuration.nix only has stuff tied to the hardware, like filesystem uuid's and such
<clever> deni: personally, i do imports = [ /path/to/foo.nix ]; in configuration.nix
<clever> deni: ddclient only has one output, so both of those are identical
<clever> > ddclient.outputs
<clever> deni: merely referencing the string makes it a dependency, thats how all dependency tracking works in nix
<clever> deni: so nix must download the binary before it can build nixos
<clever> deni: the binary is just a dependency of the .service file, which is a dependency of the nixos build
<clever> deni: depends on the service, ive seen a few that dont add to systemPackages, just cant think of which
<clever> deni: cant think of one that doesnt add to systemPackages
<clever> talqu: then you need to make a new nix expr, that will merge things like buildInputs from both
<clever> talqu: why do you want to load 2 files at once, are you trying to get the deps of both, or the result of building both?
<clever> deni: and nixos then just shoves all of those .service files into a single directory, and drops a symlink in /etc/systemd/system/ pointing to that dir
<clever> deni: a service is just another derivation, that generates a systemd .service file
<clever> deni: callPackage just imports another nix file, and calls the function within, passing it arguments from pkgs.
<clever> deni: callPackage typically returns a string, saying where to find the binary
<clever> deni: basically, any string you refernece, gets copied to /nix/store, it doesnt have to be in a magic variable to be downloaded
<clever> deni: the systemd services always ignore the system wide PATH, and use their own PATH value
<clever> but you may not be able to interact with it after it starts, depending on what it is
<clever> you will never need to add something to systemPackages to make it work
<clever> for things like openvpn, you cant interact with it
<clever> for things like postgresql and mysql, its expected that you get a psql and mysql binary, so you can interact with the daemon
<clever> deni: depends on if your meant to be running it on the cli often or not
<clever> deni: you should read the module for foo, and see what it does when enable is true
<clever> talqu: zfs snapshots will just keep a copy of everything, so you can undo any changes
<clever> kraem: which is usually your configuration.nix file
<clever> kraem: which reads whatever <nixos-config> maps to
<clever> kraem: no, it evaluates <nixpkgs/nixos>
<clever> talqu: but magit wont obey that alias
<clever> kraem: <nixpkgs/nixos> refers to https://github.com/NixOS/nixpkgs/tree/master/nixos which is the nixos subdir of nixpkgs
<clever> then it will ask to confirm every time it deletes
<clever> talqu: i would just `alias rm=rm -vi`
<clever> kraem: and that root nixpkgs ignores the nixos dir, and just gives you the nixpkgs package set
<clever> kraem: it just loads the default.nix in <nixpkgs>
<clever> talqu: nixos-generate-config
<clever> romildo: yep
<clever> romildo: thats not pure, you should always use a git revision
<clever> kraem: it just looks in the -I/usr/include path, for /usr/include/foo/bar.h
<clever> kraem: think of #include <foo/bar.h> in c/c++
<clever> infinisil: but that may use a different channel then what nixos-rebuild uses
<clever> infinisil: yeah, i usually say that to make it more obvious what is happening
<clever> kraem: try to eval just plain <nixos> and <nixos/nixos> in the repl
<clever> kraem: you want <nixos/nixos>
<clever> kraem: that loaded the nixpkgs under the channel called nixos
<clever> colemickens: i dont use network manager, so ive never seen something like that
<clever> colemickens: do you see a unit like this, for the IF?
<clever> colemickens: [root@router:~]# cat /etc/systemd/system/network-addresses-enp4s2f1.service
<clever> colemickens: any 169's?
<clever> oldandwise: shell.nix cant do anything systemd based
<clever> oldandwise: thats not line 1
<clever> oldandwise: add lib to the function args on line 1
<clever> tdeo: by type, if you hit an int, add it to the list, if you hit a set, recurse
<clever> tdeo: you would need to recursively call builtins.attrValues on things
<clever> Dandellion[m]: i'm running my own bind instance
<clever> and the error is the right answer!
<clever> edef: oh, maybe caching in the dns network is causing some people to see the "wrong" info (the old ip)!
<clever> lejonet: that would cause connection timeouts, not an entirely different webpage
<clever> lejonet: thats the same IP i get, and the nameservers look right
<clever> Dandellion[m]: can you pastebin the whole output of dig freedesktop.org +trace when its failing?
<clever> freedesktop.org. 14126 IN A 131.252.210.176
<clever> $ dig freedesktop.org
<clever> Dandellion[m]: what IP does it resolve to in each region?
<clever> Dandellion[m]: works here
<clever> the uri isnt specified here, so it defaults to whatever $NIX_REMOTE is set to, and if thats not set, "auto"
<clever> tomberek: then you can just call any function on the store class
<clever> tomberek: and also ssh://user@host to query a remote box
<clever> tomberek: it will also support things like "local?root=/mnt", which reads /mnt/nix/var/nix/db
<clever> tomberek: if you open the "auto" store, it will auto-detect if you can read db.sqlite directly, or need nix-daemon, and then return a Store*, with virtual functions to deal with the differences
<clever> tomberek: you can also make a utility that links into the libstore library
<clever> arianvp: i'm not sure when apply comes in effect either
<clever> tomberek: there is also `nix path-info` to do the same
<clever> not sure, id say you want to experiment with nix repl first, to confirm what the value is after filtering
<clever> arianvp: *looks*
<clever> kraem: scattered around the source code
<clever> chris__: i think hydra is only pre-building for ghc 8.6.4, and your forcing 8.6.5
<clever> chris__: line 2 of shell.nix doesnt really do anything, does it behave any different if you switch to pkgs.haskellPackages, instead of pkgs.haskell.packages.${compiler} ?
<clever> Miyu-saki: it doesnt need to, thats more of a side-effect of the de-perling, nix-build was once a perl script that ran nix-instantiate and nix-store -r seperately
<clever> chris__: can you link a github repo with your nix exprs?
<clever> chris__: and the path doesnt match what hydra has for that rev
<clever> chris__: 404 means that directory is not in the binary cache
<clever> chris__: the storepath doesnt match up, so your either on a different nixpkgs, or you have an overlay that changes something
<clever> chris__: nix-store --query --binding out /nix/store/7011izw8f2xyvhqadrhnmapddyz61f29-HUnit-1.6.0.0.drv
<clever> chris__: hydra claims to have built it, so we need the output path to know why
<clever> chris__: are you doing any overlays? what storepath is hunit building to?
<clever> chris__: if it wasnt in nixpkgs, it wouldnt have started building
<clever> chris__: i dont think youll find much, because it must be in nixpkgs for it to start building
<clever> "20.03pre196201.07d4df59626"
<clever> [root@amd-nixos:~]# nix-instantiate --eval '<nixpkgs>' -A lib.version
<clever> [root@amd-nixos:~]# nix eval nixpkgs.lib.version
<clever> "20.03pre196201.07d4df59626"
<clever> kraem: import it and eval lib.version
<clever> chris__: nix-env is configured to ignore the haskellPackages
<clever> chris__: and which channel?
<clever> chris__: which rev of nixpkgs are you on?
<clever> arianvp: you want nix why-depends
<clever> chris__: which package? does it successfully build?
<clever> worldofpeace: that service should be similarly flagged, like display-manager, to not auto-restart
<clever> and grab a bt
<clever> arianvp: coredumpctl gdb <pid>
<clever> does coredumpctl list details?
<clever> arianvp: though its configured to not restart display-manager, so any actual restarting is a bug due to something else causing breakage
<clever> chris__: i usually just tab complete in `nix repl '<nixpkgs>'`
<clever> chris__: there is a neovim package
<clever> tomberek: and you can use the libstore library to interface to it
<clever> tomberek: not really, but the source is fairly simple
<clever> talqu: what user are you running nix-shell as? what does `id` print?
<clever> dhess: check all-packages.nix to see how perlPackages is made
<clever> dhess: does perlPackages have a .extend or .overrideScope' attr?
<clever> ilya-fedin: not sure
<clever> talqu: i think you want to just put myScript directly into systemPackages, rather then use it in another thing
<clever> talqu: line 6-9, that derivation is lacking a src=
<clever> xd1le: yeah
<clever> xd1le: you can also just add pwd and ls -lh to the commands, to see waht is happening
<clever> xd1le: the unpackPhase will copy $src to the current dir
<clever> ilya-fedin: can you pastebin the entire df -h output?
<clever> ilya-fedin: ignore that one, look at which one looses space as nixos-install downloads nerdfonts
<clever> ilya-fedin: that does also agree that it could be out of space, youll want to watch df while it fails again
<clever> ilya-fedin: try doing `watch -d df -h` in another window, while nixos-install runs again, which one is running out?
<clever> ilya-fedin: nixos-install writes to whatever you mounted under /mnt, so /nix/store doesnt matter much
<clever> ilya-fedin: also, is it the host or target that wants nerdfonts? nixos-rebuild or nixos-install?
<clever> ilya-fedin: you likely want more space on .rw-store instead