2020-09-06

<clever> numkem: and nixos-rebuild boot --install-bootloader
<clever> numkem: boot.loader.grub = { enable = true; efiSupport = true; };
<clever> yep, no idea at all
<clever> and check `echo $?` ?
<clever> numkem: add `| cat` to the end
<clever> id abandon systemd-boot and use grub :P
<clever> numkem: `bootctl status` is printing the status, then exiting with status 1
<clever> numkem: seems like systemd-boot has just lost its mind
<clever> numkem: you may also want to add `-s 3000` to it, so the message isnt truncated
<clever> write(1, "System:\n Firmware: UEFI 2.00"..., 2201) = 2201
<clever> ah, but that one didnt fail
<clever> exit_group(0) = ?
<clever> numkem: why is it getting permission denied to pid 1? was it ran in a container?
<clever> openat(AT_FDCWD, "/proc/1/environ", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
<clever> numkem: possibly `-ff -o logfiles` to make it more readable
<clever> numkem: id say strace then, do `nixos-rebuild build` then `strace -f ./result/bin/switch-to-configuration boot` and see what fails
<clever> > lib.makeLibraryPath [ stdenv.cc.cc.lib ] "/nix/store/snc31f0alikhh3a835riyqhbsjm29vki-gcc-6.4.0-lib/lib"
<clever> > lib.makeLibraryPath [ stdenv.cc.cc.lib ]
<clever> nix
<clever> when generating the nix file
<clever> because it just does ${key} = "${value}";
<clever> and yep, it did exactly what i expected
<clever> thats much more readable
<clever> evanjs: that doesnt even look like a .nix file, the quotes are all over the place
<clever> yeah, that wont make a manifest
<clever> so even if you escape it right, nix doesnt escape it internally
<clever> evanjs: i think the problem is when nix tries to serialize the string back into a .nix file, for the manifest
<clever> evanjs: and what is the contents of that env-manifest.nix ?
<clever> evanjs: can you pastebin the file?
<clever> so if you get a prompt when your not expecting it, youll know
<clever> some ssh agents can be configured to confirm each use of the key with a gui prompt
<clever> hpfr: just be aware, that root can also use your agent, while that ssh session remains open
<clever> hpfr: and then it can use your local agent
<clever> hpfr: i would use agent forwarding for that, just `ssh -A` into the vps
<clever> hpfr: it asks for the passphrase with a gui as normal
<clever> ,escape" Manage cargo cache (${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively
<clever> hpfr: i have gpg acting as my ssh agent, so it stores the ssh keys in the gpg keyring
<clever> hpfr: indirectly, i run ssh-add over ssh agent forwarding, to load it into gpg
<clever> but you can try another channel
<clever> it should still have the critical tests ran
<clever> thats weird, not sure what the problem is then
<clever> numkem: what command did you run?
<clever> the sandbox wont even let the build know if its an efi machine or not
<clever> nope
<clever> not sure then
<clever> numkem: and with the version nixos ran?

2020-09-05

<clever> numkem: it may also help to try and manaully run `bootctl --path=/boot status` and see what it says
<clever> numkem: more likely that you just changed configuration.nix in a non-compatible way, like turning on efi
<clever> numkem: if its missing, then your trying to configure efi when you didnt boot with efi
<clever> efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
<clever> numkem: mount | grep efi
<clever> numkem: are the efi vars mounted?
<clever> numkem: what user did you run that as?
<clever> nf: nix-build '<nixpkgs/nixos/release.nix>' -A options -o options
<clever> not config = { allowUnfree = true; };
<clever> the file must contain allowUnfree = true;
<clever> theres your problem
<clever> no, just run that cmd exactly as-is
<clever> KarlJoad: nix-instantiate --eval '<nixpkgs>' -A config
<clever> KarlJoad: what does `ls -l $NIXPKGS_CONFIG` say?
<clever> KarlJoad: you can also just `nix repl '<nixpkgs>'`
<clever> and then what in the repl?
<clever> KarlJoad: what command did you run?
<clever> KarlJoad: what problems?
<clever> infinisil: nix-env silently drops that error, its a relatively new bug
<clever> KarlJoad: it should just be { allowUnfree = true; } i believe
<clever> asbachb: you can just run iptables to change the firewall manually
<clever> ixxie: that attribute didnt exist to begin with, so nothing tries to read it
<clever> > pkgs.xf86-input-wacom
<clever> .script will write the whole thing out to a file, shove a #! on the front, and then set ExecStart to the path of that file
<clever> .script goes one level up, not under serviceConfig
<clever> aleph-: you want systemd.services.foo.script
<clever> aleph-: ExecStart must be an absolute path to a script/binary, not a shell script

2020-09-04

<clever> samueldr: pi2 has 32kb each of L1i/L1d, then 512kb of L2, with the GPU L2 being isolated and GPU only
<clever> samueldr: pi1 has 16kb each of L1i/L1d, and no L2 on the arm itself, but it can leech off the 128kb of GPU L2
<clever> samueldr: ive been digging into the rpi caches lately, and i now see how big the caches are on each stage on each model
<clever> unknown
<clever> SuaveDandy: i have seen ext4 break nix before, because nix recorded a package as existing, then ext4 truncated the file to 0 bytes
<clever> even with 32gig of ram, zfs is only using 800mb, because chrome is a hungry hungry hippo, lol
<clever> 10:23:47 2.8K 0 2.7K 99 2 166 2.6K 0 2.8K 1.1G 95 4 0 2 2.8K 2.8K 99 2 99 0 869M
<clever> time read dmis dhit dh% mrug mru mfu mfug mread c ph% pm% mm% miss hits mhit mh% mmis hit% eskip arcsz
<clever> adisbladis: try running this
<clever> arcstat -f time,read,dmis,dhit,dh%,mrug,mru,mfu,mfug,mread,c,ph%,pm%,mm%,miss,hits,mhit,mh%,mmis,hit%,eskip,arcsz 10
<clever> and will use less based on other factors
<clever> zfs automatically limits itself to using a max of 50% of your ram
<clever> i use zfs on my laptop
<clever> SuaveDandy: nix doesnt make snapshots, it just has a list of packages that act as versions for a given thing, and you can delete anything thats not used
<clever> SuaveDandy: you can make /nix a seperate dataset without zfs snapshots
<clever> that is required for the rootfs and /nix
<clever> iqubic: nixos can only mount (via fstab and fileSystems) zfs if mountpoint=none
<clever> atime=off can improve read performance
<clever> zpool create -o ashift=12 -o altroot=/mnt ${cfg.poolName} $ROOT_DEVICE
<clever> zfs create -o mountpoint=legacy ${cfg.poolName}/home
<clever> iqubic: you can also tell `zpool create` to set mountpoint at creation time

2020-09-03

<clever> inkbottle: eval time warnings from the nix code arent held in the `nix-store -l` logs
<clever> each path has its own logs
<clever> but things it depends on may have
<clever> then that specific path didnt have any warnings when building
<clever> inkbottle: you can run `nix-store -l /nix/store/foo` on a given path, to see the full logs from building that path
<clever> inkbottle: sudo nix-channel --add https://nixos.org/channels/nixos-20.03 nixos
<clever> inkbottle: --upgrade just gets the latest for your current channel, you need to change the channel first
<clever> sonercirit[m]: when you build things that you want to have obey master
<clever> sonercirit[m]: you dont have to change the channel, just git clone master, and use `-I nixpkgs=/foo` to point things to the checkout
<clever> inkbottle: `sudo nix-channel --list` ?
<clever> that will tell you what kernel your going to be getting
<clever> inkbottle: `nix repl '<nixpkgs>'` then eval `linux`
<clever> inkbottle: try running it again, its probably just a random error
<clever> so you need to be aware of those changes, and manually migrate the state before you change the stateVersion
<clever> yes
<clever> V: upgrading involves dumping the entire db to .sql format while the old daemon runs, then switching the daemon out, and re-importing the entire db
<clever> V: then you would have to ship 2 versions of the postgres binary to the end machine, and somehow swap which one is in the global $PATH based on the file
<clever> V: it has to be done from your configuration.nix, because you might be building for another machine (nixops)
<clever> inkbottle: because the new version cant read the old db files, and upgrading would break postgresql hard
<clever> inkbottle: the only case i can think of where it stops things from upgrading is the postgresql version
<clever> it should just be left at the previous value
<clever> so it continues to work as before
<clever> inkbottle: thats what stateVersion is for, to minimize the breakage when you upgrade without reading the release notes
<clever> inkbottle: and youll only know the state has changed if you read the nixos release notes closely
<clever> inkbottle: you need to specify it if your using things where the state has changed, such as the ssh hostkey type, or the default postgres master user
<clever> zebrag: sudo nixos-rebuild boot --upgrade
<clever> dbe2: i prefer just doing createHome = true; on that user
<clever> Baughn: only if that shim is trusted by the secureboot
<clever> Baughn: you would need to make a backup of the ssd to another machine, then turn off secureboot
<clever> Baughn: if the secureboot is doing its job properly, not really
<clever> sephii: now insert that new and correct hash into the expr
<clever> sephii: you need to invalidate the hash, change a few digits to 0's
<clever> sephii: why do you want to remove it?

2020-09-02

<clever> jlv: fileSystems."/foo" = lib.mkIf (config.something) { ... };
<clever> jlv: use mkIf to allow it to be optional

2020-09-01

<clever> it builds all i believe
<clever> so nix has to rebuild all outputs
<clever> and the cache doesnt have it
<clever> and the new drv needs that output
<clever> Miyu-saki: you probably garbage collected one of the outputs of the kernel
<clever> Miyu-saki: was linux.drv based on an override?
<clever> Miyu-saki: what was the error?
<clever> dsal: services.nginx.enable = true;
<clever> Miyu-saki: --force has major side-effects, avoid it whenever possible

2020-08-31

<clever> that is required if you are not using -p
<clever> yes
<clever> moet: you must run nix-shell on a derivation that has ghcWithPackages in its buildInputs
<clever> moet: because your likely in a shell meant to build the ghcWithPackages wrapper
<clever> moet: that will give you a derivation with ghc, that has lens&brick
<clever> moet: haskellPackages.ghcWithPackages (ps: [ ps.lens ps.brick ])
<clever> moet: yeah
<clever> moet: nix cant merge the development environment of multiple packages, it can only give you a compiled copy of all of them at once
<clever> moet: can you pastebin your nix expr and explain what your trying to do?
<clever> moet: echo $paths
<clever> moet: you must put the buildEnv into the buildInputs of another derivation, and shell into that one
<clever> moet: your likely opening a shell suitable for building the buildEnv, not using it
<clever> Raito_Bezarius: or just `mount /nix/store -o remount,rw`
<clever> damjan: if you build an expr like this, youll get a tar file, if unpacked to / then you get a complete /nix/store with the given pkg
<clever> damjan: there is also a nix function to generate a tar file for you
<clever> same way `nix build` works (not nix-build)
<clever> you can also give it an expression, `nix copy --to local?root=/folder -f '<nixpkgs>' findutils`
<clever> yep
<clever> damjan: you want `nix copy --to local?root=/folder /nix/store/foo`
<clever> DamienCassou: then you need to remove home-manager with something like nix-env -e, to create 17
<clever> nefix: probably
<clever> DamienCassou: nix-env --delete-generation 16
<clever> DamienCassou: you cant repair that path until you close those 4 PID's and delete generation 16 from your profile
<clever> nefix: mount --bind something to ~/.nix-defexpr/
<clever> nefix: it needs to be created before home becomes read-only
<clever> nefix: ~/.nix-defexpr could be a symlink to a mutable place
<clever> DamienCassou: run it on one of the broken paths
<clever> DamienCassou: nix-store -q --roots?
<clever> DamienCassou: then `nix-store --repair-path` on each one and see what happens?
<clever> DamienCassou: try using `nix-store --delete` on each, but dont force things
<clever> last time i used it, it would only print if you dont ask to --repair
<clever> thats new, last time i delt with this, you couldnt delete until you removed all roots

2020-08-30

<clever> so i thought it was on my end
<clever> i was also having cache.nixos.org problems, but ipv6 was acting up due to other stuff at the time
<clever> oh
<clever> it has already recovered for me
<clever> i was just having issues reaching the rpi forums, but it was between cloudflare (newark) and the backend servers
<clever> jlv: and if you set substituters to "", then it has no caches to consult
<clever> jlv: `--option` can be used to dynamically change anything in nix.conf
<clever> setting the remote to daemon causes it to go via nix-daemon, which uses /tmp/
<clever> NobbZ[m]: if ran as root, it will spawn the builds directly, and respect $TMPDIR, which can break some things
<clever> jackdk: what happens if you use `NIX_REMOTE=daemon nix-build ...` ?
<clever> jackdk: are you running the build as root or a normal user?
<clever> jackdk: is /tmp on its own fs?
<clever> omasanori[m]: nix should be able to do all of those easily
<clever> omasanori[m]: which cpu arch are you targetting?
<clever> omasanori[m]: with nix, its not recommended to install any compiler with nix-env, just use nix-shell to load an env with that compiler

2020-08-29

<clever> jackdk: its in `nix eval --help`
<clever> To evaluate a Nix expression given on the command line:
<clever> $ nix eval --expr '1 + 2'
<clever> symphorien[m]: many config options may also be unset, and will throw if you try to read them
<clever> symphorien[m]: config also contains the entire pkgs tree, including lib
<clever> wpcarro: you can either use nix-copy-closure to copy that path between machines, or `nix-store --delete` to remove it from the cache
<clever> wpcarro: nix-store --query --binding out /nix/store/f70hw0g9rd2hkcfyivxivg3nrlczip3n-source.drv
<clever> wpcarro: what derivation is failing?
<clever> wpcarro: but one machine has it cached
<clever> wpcarro: its possible that the website the file came from has simply deleted it
<clever> wpcarro: or modifying the package to not do network, and use pkgs.fetchurl to pre-fetch things
<clever> wpcarro: by declaring the hash of $out upfront in the nix expression
<clever> wpcarro: network should never work during a build, if it is working, then the sandbox was off and not doing its job
<clever> wpcarro: is the sandbox on? what is the actual error?
<clever> if you make them match up, and get the same .drv from both machines, does have the same outcome on both?
<clever> wpcarro: depends on what the build is then doing with that elisp
<clever> wpcarro: ah, now run `diff -r` on those 2 paths, nix-copy-closure already copied them over too
<clever> wpcarro: what difference did it find?
<clever> flox: trying to build master locally to confirm what is happening
<clever> wpcarro: nix-diff will reveal exactly what differs, and then it should be a lot more obvious what the cause is
<clever> wpcarro: if you dont force `overlays = [];` then nixpkgs will load the user overlays from the path immae gave
<clever> wpcarro: what does nix-diff say the difference is?
<clever> wpcarro: use nix-copy-closure to get both drv's onto the same machine, then use nix-diff to compare the 2 drv files
<clever> flox: yep, i can reproduce the mbuffer fault locally
<clever> wpcarro: does `nix-instantiate` give the identical .drv for both machines?
<clever> can you pastebin your expression?
<clever> flox: is configure trying to do both x86 and aarch64 builds, for utils used at build-time?
<clever> flox: nix will automatically point that towards the right version for the current target
<clever> aarch64-unknown-linux-gnu-objdump
<clever> [nix-shell:~]$ echo $OBJDUMP
<clever> [clever@amd-nixos:~]$ nix-shell '<nixpkgs>' -A pkgsCross.aarch64-multiplatform.hello
<clever> flox: you want to use $OBJDUMP when cross-compiling
<clever> if you used -q, then you wont see any http errors
<clever> jackdk: what did wget print when it fetched that file? any http status codes?
<clever> only lines 4/5 get some changes
<clever> jackdk: the only change nix does to those lines, is the '' will strip 2 spaces from the start of each
<clever> jackdk: but there is no ${ in that line, so nix doesnt make any real changes to it
<clever> that looks like its entirely in the bash area, not nix
<clever> grep
<clever> peelz: i just read the source for them in nixpkgs, and look for examples of how they are used
<clever> peelz: yeah, patchShebangs will replace #!/usr/bin/env with the output of $(which env)
<clever> c4rc4s: they might be using qt5.callPackage

2020-08-28

<clever> that runs all phases, and deals with var vs function
<clever> arianvp: the simplest way to do everything, is to just run genericBuild
<clever> arianvp: you need to eval "$configurePhase" (the override from the expr) not run configurePhase (the bash function of the same name, which is the default)
<clever> arianvp: oh, right, i see your problem
<clever> arianvp: when you run configurePhase, what directory are you in?
<clever> arianvp: what does `echo $phases` say?
<clever> arianvp: after unpackPhase, you must `cd $sourceRoot`
<clever> redmp: yep
<clever> or use pkgs.fetchzip, it works on tar files
<clever> runCommand "help" { src = something; } "unpackPhase ; mv -vi $sourceRoot $out"
<clever> only option then is a derivation
<clever> but then what?
<clever> bqv: what is the use-case?
<clever> redmp: so when you try to run what i gave, it winds up giving you a shell suitable to build: stdenv.mkDerivation { name = "shell"; buildInputs = [ (import ./.) ]; }
<clever> redmp: `-p` will generate a derivation for you, and shove each argument into the buildInputs
<clever> or `nix-shell -p '(import ./.)'` which will dynamically generate one
<clever> redmp: you want default.nix to return a derivation that has buildEnv in the buildInputs
<clever> redmp: that gives you a shell suitable for building the buildEnv, not for using it

2020-08-26

<clever> cole-h: so ./. is already in the store to begin with
<clever> cole-h: i think its because nix copied the flake into the store before parsing the nix
<clever> ah, then you want to `unstable = import <nixos-unstable> { inherit config; overlays = [ (self: super: { qtquickcontrols = master.qtquickcontrols; }) ]; };`
<clever> so the main nixpkgs (that the overlay is added to) gets that one pkg from unstable
<clever> hazel[m]: it would make qtquickcontrols be the version from unstable
<clever> qtquickcontrols = self.unstable.qtquickcontrols; in the overlay

2020-08-25

<clever> dminuoso: lib.recursiveUpdate can behave weirdly with derivations, // is safer
<clever> dminuoso: then you need to do { haskell.packages = super.haskell.packages // { ghc865 = super.haskell.packages.865.extend ...; }; }
<clever> dminuoso: you dont have the name the new thing the same way, you can just { myHsPackages = super.haskell.packages.865.extend ...; }
<clever> Extends: ./. doesnt end in a / so `./. + "foo.txt" in a bar dir, winds up pointing to /path/to/barfoo.txt
<clever> check my github, nixos-configs/netboot_server.nix
<clever> i just edit the main dhcp server directly
<clever> such as fstab creating and other things
<clever> various tasks that get ran on nixos
<clever> pie_: dont have that part memorized, and chrome is currently not responding

2020-08-24

<clever> hexagoxel: ah, i'll have to look at that later, it never works for me either in xterm
<clever> liminal18_: you can just set services.mongodb.extraConfig to populate that
<clever> liminal18_: best to do it all in configuration.nix
<clever> sphalerite: currently stuck on things like this
<clever> cp-demangle.c:(.text+0x660a): dangerous relocation: call8: call target out of range: strlen
<clever> sphalerite: :D
<clever> sphalerite: too many cross-compile targets? lol
<clever> Ericson2314: have you seen https://github.com/NixOS/nixpkgs/pull/96131 yet?
<clever> saschagrunert: it seems to be in the linux headers
<clever> ,locate ns_common.h
<clever> alexherbo2: the eval itself will run as the user doing the eval, and have the vars from that shell
<clever> but the sshd.service is still generated and in the right spot
<clever> then its not wanted by multi-user.target, so it wont run on boot
<clever> just mkForce the wantedBy to an empty list
<clever> the install iso does that with sshd for example
<clever> you can still configure things to not start on bootup

2020-08-23

<clever> maybe
<clever> not sure, i dont use python much
<clever> siraben: either tell python to shut up and use what nix gave it, or fix the versions of things
<clever> siraben: you need to either tell it to stop doing that, or add `preBuild = "export HOME=$NIX_BUILD_TOP";`

2020-08-20

<clever> grub defaults to 100 i believe
<clever> yes
<clever> Default: null
<clever> null means no limit i.e. all generations that were not garbage collected yet.
<clever> bqv: yes
<clever> if you delete some, and set that, it will copy fewer into the dir, and not overflow the partition
<clever> it defaults to all
<clever> elux: boot.loader.systemd-boot.configurationLimit controls how many generations nixos will try to copy into /boot/ when you switch
<clever> elux: which bootloader are you using?
<clever> but worldofpeace thinks your name is something else...
<clever> JJJollyjim: i'm seeing you on irc just fine
<clever> JJJollyjim: ${toString ./.} will interpolate the absolute path of ./. without copying it into the store

2020-08-19

<clever> i need to get to bed, but i could have a look in the morning, if i dont forget
<clever> siraben: you likely just need an older nixpkgs, replace the <nixpkgs> at the top with a (builtins.fetchUrl ...)
<clever> srhb: looks like the glibc is the wrong version for libtilemcore
<clever> /nix/store/a759kbr0kgccsxl6lfx0xv5i3c9x9bw9-binutils-2.31.1/bin/ld: /nix/store/aqq6367snc1zh3fs1pc4j4zm5h80vkkz-glibc-2.31/lib/libm.so.6: error adding symbols: DSO missing from command line