<clever>
haskell has the same problem, it cant even listen on tcp or udp without that file
<clever>
rickhull: let me grab my solution...
<clever>
rickhull: that happens due to the sandbox lacking a /etc/protocols
<clever>
Graypup_: it would be better for each module to return an overlay, then combine them all into a single `pkgs = import <nixpkgs> { overlays = something; }`
<clever>
Graypup_: it will return the result of adding that overlay
<clever>
Graypup_: you can also use `pkgs.extend overlay` to add another overlay onto pkgs
<clever>
Graypup_: you probably want to look into overlays
<clever>
i have ran into problems with a new nix-instantiate and old nix-daemon
<clever>
as long as the nix-daemon is up to date, yep
<clever>
nix-hash can also hash things as well, if you know what is being hashed
<clever>
azure1: an overlay is probably simplest
<clever>
lol
<clever>
then it rounds down to the byte, instead of down to the mb
<clever>
> toString ((25 * 1024 * 1024) / 1.3)
<clever>
> (25 * 1024 * 1024) / 1.3
<clever>
just give it a number in bytes, and it will have less rounding
<clever>
>> Shorthand notation, as described in this FAQ, may also be used.
<clever>
>> When an integer is used, the value is measured in bytes.
<clever>
it may convert to int for you, when you put a float into the file
<clever>
have you tried just giving it a float and see what happens?
<clever>
and nixos-rebuild uses nix-env to create roots
<clever>
nix-env and nix-build are the main things creating roots
<clever>
depends on where the root is
<clever>
correct
<clever>
robodojo: a way to stop gc from deleting things you are using or may want to use
<clever>
and --max-freed will change what it depends
<clever>
robodojo: it also has --print-live to show what cant be GC'd
<clever>
robodojo: i believe they are the same
<clever>
robodojo: yes
<clever>
robodojo: yeah
2020-07-04
<clever>
ah, that also fits
<clever>
yes
<clever>
robodojo: because -u was taken for Upgrade, so e is used for rEmove
<clever>
,libraries rm200910
<clever>
to remove anything else, you need to give it some flags, to do more then the default
<clever>
anything else, build-time dependencies, and stuff from using nix-shell
<clever>
robodojo: anything you install with nix-env or configuration.nix is kept, even if you remove it, since you may want to do a rollback
<clever>
robodojo: by default, it will delete anything that lacks a GC root, so anything that you had ever installed with configuration.nix or nix-env will remain, even if you have since removed it (rollbacks)
2020-07-03
<clever>
nixuser: then you just run map over all PR's to create many jobsets
<clever>
nixuser: that default.nix must then contain a single job, called jobsets, which returns a json file, a set of key=spec, where each spec is similar to the spec.json from before
<clever>
nixuser: the default.nix (line 6 of my json) will then receive a list of PR's as json, on one of its inputs (the name, and which PR's is defined on line 15)
<clever>
nixuser: and you then set that as the declarative project file for the whole project, that will auto-create a jobset called .jobsets
<clever>
then you need to commit to nixos more! :P
<clever>
and you need to use nix-build eventually, when you want to deploy the program
<clever>
then nix can use cached builds, and nix knows what your binary depends on
<clever>
better to just build it with nix-build
<clever>
stuff stack builds can randomly break when nix gc's things
<clever>
stack cant use stuff hydra.nixos.org pre-built for haskell
<clever>
i always build with nix's haskell framework, haskellPackages.mkDerivation and cabal2nix
<clever>
ah, i avoid stack like the plague :P
<clever>
_d0t: so you still need to tell nix you depend on ghc
<clever>
_d0t: at build-time, the stuff from the system (such as apt-get) wont be visible to the derivation
<clever>
_d0t: so it is unlikely to work either way
<clever>
_d0t: things in the nativeBuildInputs wont be available at runtime, and system stuff (from apt-get) cant be used inside a derivation
<clever>
_d0t: are they programs you expect to find in $PATH?
<clever>
_d0t: what extra things do you depend on when on nixos? why can you not depend on them outside of nixos?
<clever>
_d0t: why do you need extra stuff on nixos?
<clever>
evanjs: use plain `if` and carefully ensure you dont have infinite recursion
<clever>
evanjs: but key1 and key2 must be valid options
<clever>
evanjs: that lets condition depend on key3, and lazyness can figure your 2 things out later
<clever>
evanjs: its a bit tricky, when you do `mkIf condition { key1 = ...; key2 = ...; }`, it will magically transform into `{ key1 = mkIf condition ...; key2 = mkIf condition ...; }`
<clever>
man pages can confirm
<clever>
grep -Lr i think?
<clever>
and nixos heavily uses symlinks in /etc/
<clever>
hexo: grep doesnt follow symlinks by default
<clever>
AmandaC: i think its already in nixpkgs proper now
<clever>
and then hydra has to copy that 20gig between build machines
<clever>
turion: that gets expensive with some (non python) packages like chromium, where unpacking the source creates ~20gig of src
<clever>
its meant to be ran from an empty directory
<clever>
turion: it will fail if you have ran unpackPhase already
<clever>
turion: ah right, the default is set within genericBuild itself
<clever>
turion: where in in the nix-shell when you did that?
<clever>
or just `genericBuild` to run all of them
<clever>
turion: `echo $phases`
<clever>
turion: `buildPhase` is a bash function, `$buildPhase` is a bash vairable, that then gets parsed as a single bash statement (and corrupts the cmd if it had newlines in it)
<clever>
turion: yeah, you have to run all of the phases in order
<clever>
then nix will continue to build as normal
<clever>
hexo: if you can find that exact file in google, you can then insert it into the store with nix-prefetch-url file:///path/to/file.tar.xz
2020-06-30
<clever>
,unstable
<clever>
yep
<clever>
vereis: then it will always be using the version that was in nixpkgs back in march
<clever>
Miyu-saki: i think thats been fixed
<clever>
Miyu-saki: ?
<clever>
ah, programs is a bit diff
<clever>
Miyu-saki: yep, with the default buildPhase
<clever>
jakobrs: ^
<clever>
Alias of services.openssh.enable.
<clever>
services.sshd.enable
<clever>
Miyu-saki: that will spawn 64 procs!
<clever>
minimal vs graphical installer
<clever>
patagonicus: the current default is that sshd is technically enabled (so you dont need to nixos-rebuild), but systemd is set to not run on bootup
<clever>
jakobrs: the problem, is the security nightmare caused by ssh being on, with a default pw
<clever>
jakobrs: you could fairly easily make a custom iso, that forces sshd to start, and has a key pe-authorized
<clever>
jakobrs: sshd is configured, but set to not auto-start, so you must run `passwd`, and `systemctl start sshd` to make it function
2020-06-29
<clever>
it maps <nixpkgs> to the nixos channel
<clever>
dutchie: ah, thats normal nixos, `echo $NIX_PATH`
<clever>
dutchie: what does `ls -ld ~/.nix-defexpr/*/nixpkgs` report?
<clever>
pax-12: usually, only root needs the channels configured, and everybody else can inherit from root
<clever>
pax-12: and the collision warning, is because you have a nixos channel on both root and pax, compare `nix-channel --list` with and without sudo
<clever>
to force it to build for 64bit linux, instead of the default (which is whatever the host is)
<clever>
bahamas: you need to set nixpkgs.system = "x86_64-linux"; in your configuration.nix file
<clever>
bahamas: and what is line 56 of that generic.nix file?
<clever>
assertion failed at /nix/store/apnn10fiqg0gz1xf87vg0qnm6gk6sd7c-nixos-20.03/pkgs/os-specific/linux/kernel/generic.nix:56:1
<clever>
bahamas: what is the full output when it fails?
<clever>
bahamas: i would expect that to work, what is the full output?
<clever>
bahamas: what is the command you ran?
<clever>
thats also why the example i gave above, used interpolation to make the 2nd string as one piece
<clever>
> ./. + ("/" + "foo")
<clever>
> ./. + "/.."
<clever>
after each concat, it removes any redundant elements and re-absolutes the path
<clever>
this can also lead to confusion
<clever>
> ./. + "/" + "foo"
<clever>
> ./. + "/"
<clever>
> ./.
<clever>
./. + "/foo" appends to a path, and keeps it as a path, so the above 2 rules can still apply, but copy a smaller subtree
<clever>
"${./.}" copies . to the store, and returns the path of the copy
<clever>
toString ./. returns the absolute path of . as a string
<clever>
not sure then, ive not had a chance to play with flakes yet
<clever>
not a string
<clever>
the result of that is still a path
<clever>
./. + "/machines/${hostname}/config.nix"
<clever>
colemickens: + works on paths
<clever>
drakonis: you can also just `nix-store -r /nix/store/q8yjc393xglp1szq7s87492pi5rjvd9f-nix-2.4pre20200623_09fc06d` to download it from any binary cache
<clever>
drakonis: --option require-sigs false
<clever>
but if its a closure, its not a nar, its a collection of several nar's with something else
<clever>
bqv: a nar is basically just a tar, with less features
<clever>
and that one does register it as valid
<clever>
--import is for a closure
<clever>
a closure uses a different arg to unpack it
<clever>
`nix-store --restore` is basically just `tar -x`, and doesnt flag it as valid
<clever>
and nix wont consider that as being a valid path in /nix/store/
<clever>
drakonis: it reads from stdin, you want `nix-store --restore destination < nix2.4pre20200623.nar`
<clever>
drakonis: what cmd did you run?
<clever>
drakonis: it expects a nar on stdin
<clever>
BellRooks: oh, but the above tarball is arm7, not arm6
<clever>
nekroze: how is cmake trying to detect python?
2020-06-28
<clever>
thats usually the safest route
<clever>
,tofu
<clever>
delroth: pkgs.fetchpatch mangles the file a lot, to make it more predictable
<clever>
typetetris: correct
<clever>
typetetris: or use -I nixpkgs=something, to affect the first run
<clever>
typetetris: and changes only take effect when you re-open the shell
<clever>
typetetris: no, nixos-rebuild reads $NIX_PATH, which is set by the value of nix.nixPath the PREVIOUS time you ran nixos-rebuild
<clever>
typetetris: 2020-06-28 04:48:02 < clever> patagonicus: simplest is to just ignore channels, and use nix.nixPath to setup NIX_PATH to point nixpkgs=/path/to/nixpkgs
<clever>
typetetris: that only looks at $NIX_PATH
<clever>
typetetris: if you want nix-env to see it, yes
<clever>
smiles: you either need an arm machine with nix already installed, or switch to cross-compiling
<clever>
and nix-daemon will run on bootup
<clever>
seven-eleven: if you do a multi-user install, it should setup root automatically for you
<clever>
dminuoso: though that is complicating it some to force specific versions of plugins, i think you just want `p = ps: [ ps.nixops-packet ];` for ex