<ToxicFrog>
How do I buildPerlPackage something that depends on a C library (in this case db4)?
selfsymmetric-mu has joined #nixos
<ToxicFrog>
I have `buildInputs = [ pkgs.db4 ];` and that gets it to build, but the tests fail with "undefined symbol db_env_create in BDB.so", indicating that it can't find libdb at runtime.
ayerhart has joined #nixos
nDuff has quit [Quit: zzz]
<DigitalKiwi>
maybe propagatedBuildInputs
ayerhart_ has joined #nixos
<ToxicFrog>
DigitalKiwi: nope.
ayerhart has quit [Ping timeout: 248 seconds]
<ToxicFrog>
Also, no matter where I put it, I get a "Warning (mostly harmless): No library found for -ldb" earlier in the build.
johnny101m has joined #nixos
<DigitalKiwi>
checkInputs didn't work either?
<ToxicFrog>
It looks like the 'BerkeleyDB' perl module solves this by writing LIB= and INCLUDE= lines to configure.in that point to pkgs.db during preConfigure, but that doesn't work for BDB -- possibly it doesn't use configure.in?
<ToxicFrog>
I'll try that.
Xal has quit [Ping timeout: 258 seconds]
<ToxicFrog>
Nope.
<ToxicFrog>
For reference, here's the compilation line emitted by the build process:
<ToxicFrog>
cc -shared -O2 -L/nix/store/iykxb0bmfjmi7s53kfg6pjbfpd8jmza6-glibc-2.27/lib -fstack-protector-strong BDB.o -o blib/arch/auto/BDB/BDB.so
<ToxicFrog>
There should be a -ldb4 and -lpthread in there, at least :/
<DigitalKiwi>
idk then :(
Xal has joined #nixos
johnny101m2 has quit [Ping timeout: 250 seconds]
betawaffle has quit [Quit: Oh noes, my ZNC!]
MarcWeber has quit [Ping timeout: 246 seconds]
<ToxicFrog>
Solution turned out to be NIX_CFLAGS_COMPILE and NIX_CFLAGS_LINK
rouma has quit [Ping timeout: 245 seconds]
justan0theruser has joined #nixos
<ToxicFrog>
Now a new problem: the thing I'm trying to build depends on Coro::EV. According to CPAN, installing Coro should automatically get me Coro::EV -- but it doesn't. :/
<ToxicFrog>
Argh, it looks like it's in the same tarball but isn't actually part of the same module?
<ToxicFrog>
This is the same maintainer who keeps uploading stuff to CKAN that has a META.yml that's actually JSON >.<
justanotheruser has quit [Ping timeout: 245 seconds]
owickstrom has quit [Quit: Connection closed for inactivity]
justan0theruser is now known as justanotheruser
orivej has quit [Ping timeout: 258 seconds]
<samueldr>
alienpirate5: you're in luck, someone is looking into fixing this, see #65758
<samueldr>
>> Read and write a subset of YAML for CPAN Meta files
<ToxicFrog>
Specifically, CPAN::Meta::YAML failed to classify line '{' at /nix/store/wzn5g91zj8ajqzdwwlyxcwaw4y1bj04h-perl-5.28.2/lib/perl5/5.28.2/Parse/CPAN/Meta.pm line 47.
<samueldr>
yeah, found the "issue", by design it doesn't handle full YAML it seems like
<samueldr>
(sorry though, it's not really helpful in the end)
selfsymmetric-mu has quit [Remote host closed the connection]
Mister_Magister has quit [Ping timeout: 258 seconds]
iyzsong has quit [Read error: Connection reset by peer]
englishm has quit [Excess Flood]
englishm has joined #nixos
MarcWeber has quit [Ping timeout: 268 seconds]
phaebz has quit [Remote host closed the connection]
sb0 has joined #nixos
<iqubic>
adisbladis: are you here?
MmeQuignon has quit [Ping timeout: 248 seconds]
zacts has quit [Quit: WeeChat 2.4]
Supersonic has quit [Ping timeout: 250 seconds]
sushi_ has quit [Read error: Connection reset by peer]
<rajivr___>
Is there a derivation that is equivalent to "build-essential" in Nix?
<gchristensen>
stdenv
<gchristensen>
but yo ushoudn't install it, instead just write nix expressions.
Supersonic has joined #nixos
<rajivr___>
I see... I just tried installing it! :-)
<rajivr___>
and was wondering why I am not able to get gcc ar etc.,
domogled has joined #nixos
<rajivr___>
What derivation will give me gcc, ar and other tools?
wfranzini has quit [Remote host closed the connection]
<rajivr___>
That I can use in my environment.
wfranzini has joined #nixos
sushi_ has joined #nixos
<simpson>
You can create nix-shell environments with those tools. Making nix-env environments is a little harder. You might want to write some Nix expressions instead of trying to build your project like you're on Debian.
<{^_^}>
#18315 (by domenkozar, 2 years ago, open): Remove myEnvFun
<iqubic>
No.
<iqubic>
It really isn't
<iqubic>
Easier, maybe. Better, no.
<tomberek>
what problem are you trying to solve?
<simpson>
rajivr___: What are you actually trying to build? Are you trying to set up a development environment, or install something not in nixpkgs, or something else?
<rajivr___>
So, I am trying to get a basic haskell, emacs, dante development environment going (BTW, I am pretty new to Nix)
MarcWeber has joined #nixos
<iqubic>
Good lord. That combination is the worst. I recall spending such a long time trying to get that to work. I don't recall if I ever got it working.
<rajivr___>
I can pretty easily get build-essential rolling (because the underlying disto is debian), but I wanted to see if there was a canonical Nix way of doing it.
<tomberek>
rajivr___ does adding that resolve the cabal issue?
<rajivr___>
yes. I seem to be getting a different error.
<tomberek>
what's next?
<iqubic>
joebobjoe: I know that claims it's for nixos, but it will work for nix-darwin.
<joebobjoe>
iqubic: ok thanks
<iqubic>
rajivr___: If you've got another terminal error that you can pastebin for use, that would be wonderful.
<rajivr___>
that I need to figure out. Its got to do with Haskell modules. :-) Attempting to learn haskell has sent be down the Nix rabbithole in a good way.
<joebobjoe>
can we merge #nix and #nix-darwin? there are only 36 users there
<joebobjoe>
and I get much faster answers to questions here
<tomberek>
learning curve is steep, but i promise that it can become a secret super weapon for you
<infinisil>
joebobjoe: #nix is not a thing :)
hellrazor has quit [Quit: WeeChat 2.5]
<joebobjoe>
I guess #nix is a redirect
<simpson>
joebobjoe: Presumably #nix-darwin is for questions specific to nix-darwin or general Darwin support for Nix.
<iqubic>
rajivr___: You claim there is another issue. How do you know there is another error? Do you have an output claiming there's another error?
<simpson>
rajivr___: $(nix-shell -p ghc --run ghci) will get you a GHC prompt. You may be overthinking Nix.
<iqubic>
we can't help you if we don't know what the errors are.
<iqubic>
simpson: The issue comes from when you want to use libraries from hackage.
<rajivr___>
Let me try and look at if first. :-)
<iqubic>
That's the hard part.
<iqubic>
rajivr___: Sure. Attempt to solve your issue on your own is a great way to learn.
<rajivr___>
Thanks a lot for the help :-)
ericsagnes has joined #nixos
meteo has quit [Remote host closed the connection]
<iqubic>
So, in my configuration.nix, there's this section labelled imports, where I'm importing ./hardware-config.nix What other things can I import?
hellrazor has joined #nixos
<samueldr>
the simple explanation is "any other nix file"
<samueldr>
they'll be handled just like configuration.nix is
<samueldr>
so this allows you to split your configuration in multiple files
<samueldr>
e.g. you could have a "topic" configuration file for emacs, one for erm... anything else you use
<samueldr>
so, it's all up to you
abathur has quit [Ping timeout: 244 seconds]
<samueldr>
technically, you're not beholden to have a hardware-config.nix being imported, you could also have it all in the one configuration.nix file, but it's a bit messy that way
<iqubic>
Right. I see.
<iqubic>
And what sort of inputs should those .nix functions take that import?
<infinisil>
samueldr: I'm wondering if flattening all modules like that might make NixOS evals faster
<samueldr>
infinisil: what do you mean?
<samueldr>
iqubic: the same as configuration.nix
<infinisil>
samueldr: Inlining all `imports`
<infinisil>
Recursively
<infinisil>
Flattening all NixOS modules into a single file
<iqubic>
I notice that my main configuration.nix is function that takes two arguments: config and pkgs.
<samueldr>
it will receive more, but the ellipsis `...` makes it so they're ignored
<samueldr>
pkgs is the final package set, so nixpkgs + your overlays and other misc. overrides
<samueldr>
config... a bit more complex to explain, though that chapter I just linked has the necessary info to understand it
<iqubic>
But isn't that a bit recursive? Where pkgs is the very thing I'm creating?
<samueldr>
but are you?
<samueldr>
:)
<joebobjoe>
I need help. nix-env -u completes but does not update any packages. currently, irssi-1.1.3 is the latest package, but nix-env --query returns irssi-1.1.2
<iqubic>
samueldr: I'm not sure.
<joebobjoe>
also, I'm on darwin if that makes a difference
<samueldr>
iqubic: you're likely not, nix evaluation is lazy, so order doesn't have much importance
<samueldr>
it's at that point that I grok (understand) the subject less, so I generally don't try to explain how and why :)
<joebobjoe>
I'm still new to nix, you can do nix-env -u to upgrade packages updated on the nixpokg repo right?
<iqubic>
samueldr: I also don't really understand overlays either.
<iqubic>
I've tried to understand them several times but I just can't.
<simpson>
joebobjoe: What have you read so far? https://github.com/LnL7/nix-darwin#updating is how to update nix-darwin itself, I think, and similarly there's a channel for nixpkgs, IIRC.
<iqubic>
samueldr: Also, I'm quite familiar with Haskell. I know what lazy evaluation is, and how to harness it.
<iqubic>
Well, how to harness it in Haskell.
<infinisil>
simpson: They didn't mention they use nix-darwin though
<iqubic>
actually, infinisil I think they did.
<infinisil>
Ah, it's way up there
<iqubic>
Yeah. It's hard to manage multiple conversations in IRC.
<infinisil>
joebobjoe: Have you updated your channel?
<joebobjoe>
simpson: hm, never used that man before. when I do nix-channel --list I get nothing
<joebobjoe>
I tried updating nix-2.2.1 to nix-2.2.2 using nix upgade-nix but I get lockfile errors
<joebobjoe>
oh the perils of a multi user install on darwin I guess
<clever>
joebobjoe: run `sudo -i` then `nix-channel --list`, dont use `sudo nix-channel --list
<simpson>
Oh yikes, multi-user on Darwin sounds horrible. Two terrible flavors.
<joebobjoe>
clever: what's wrong with the later command?
<iqubic>
What exactly does import do?
<clever>
joebobjoe: sudo on darwin sets the wrong $HOME, so nix-channel doesnt act on root
<joebobjoe>
uh, how could a posix os like darwin "set the wrong home"?
<clever>
joebobjoe: its a config option in /etc/sudoers
<iqubic>
$HOME is just a variable that is set when you launch a terminal.
<clever>
joebobjoe: darwin choose to use the "wrong" value
<iqubic>
what value does darwin default to?
<clever>
iqubic: the one that perserves $HOME when you `sudo foo`
<clever>
iqubic: so foo doesnt have roots HOME
<iqubic>
Actually, I don't use darwin, so I don't really care. Sorry.
<joebobjoe>
hm, that is strange, sudo doesn't change $HOME, it's still my user dir
<joebobjoe>
running nix-channel after doing sudo -i worked btw
<joebobjoe>
it's not in the nix-darwin readme, I guess they assume single user installation
<iqubic>
infinisil: The nixos manual states you can use "nix-env -u '*'" to update all packages installed with nix-env.
<iqubic>
Should I convert my multi-user nixos install to a single user nixos?
<clever>
joebobjoe: what does `type nix-env` return, in both a normal and root shell?
<clever>
iqubic: nixos doesnt support single-user
<infinisil>
iqubic: Why are you telling me this?
<iqubic>
I don't know.
<iqubic>
The first line ({ config, pkgs, ... }:) denotes that this is actually a function that takes at least the two arguments config and pkgs. (These are explained later.)
<iqubic>
I'm reading the nixos manual and looking for the location where those things are explained.
<iqubic>
I can't seem to find it.
<joebobjoe>
nix-env is hashed (/nix/var/nix/profiles/default/bin/nix-env) and nix-env is /var/root/.nix-profile/bin/nix-env
<joebobjoe>
clever: ^
<clever>
joebobjoe: both of those are roots profile, so it should be good there
<iqubic>
if my entire nixos config is a function, then when is it called?
<iqubic>
And what values are passed in as the parameters?
<clever>
joebobjoe: what is the ocmmand that fails?
<joebobjoe>
clever: nix-env -u
<clever>
joebobjoe: what error does it give?
<joebobjoe>
doesn't update irssi to the latest version shown on nixpkgs. nothing, no error
wfranzini has quit [Remote host closed the connection]
<clever>
joebobjoe: what does `nix-env -iA nixpkgs.irssi` report?
wfranzini has joined #nixos
<iqubic>
How exactly does import work?
<clever>
iqubic: it will parse whatever file you point it at, and return the top-level value of that file
<joebobjoe>
clever: ****, I accidentally did it while in sudo -i
<joebobjoe>
how do I remove the nix profile for the root user?
<iqubic>
But what if that top-level thing is a function?
<clever>
joebobjoe: nix-env -e irssi
<clever>
iqubic: then you must call that function with the right arguments
<joebobjoe>
clever: can I safetly remove all the .nix* in /root?
<clever>
joebobjoe: no, thats where nix itself comes from
<clever>
2019-08-03 01:28:50 < joebobjoe> nix-env is hashed (/nix/var/nix/profiles/default/bin/nix-env) and nix-env is /var/root/.nix-profile/bin/nix-env
<iqubic>
clever: execpt I'm not actually using the import function.
<iqubic>
Instead I'm just adding things to the list of imports in configuration.nix.
<clever>
iqubic: the module system in nixpkgs will import it for you
<joebobjoe>
clever: I'm on a multiuser installation though, and the -iA added a bunch of symlinks it said
<joebobjoe>
which did not get removed when I uninstalled the package
<joebobjoe>
because I installed it again and it said nothing about creating symlinks
<iqubic>
Except that it's not quite working the way I want it to.
<clever>
joebobjoe: those symlinks it added are in an older generation
<clever>
joebobjoe: they will only be removed when you do garbage collection
<iqubic>
anonymous function at /etc/nixos/wm.nix:1:1 called with unexpected argument 'config', at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:170:8
<clever>
iqubic: the ... makes it ignore any other arguments it doesnt want
<clever>
joebobjoe: version 1.1.2 is the latest one in your copy of nixpkgs
<iqubic>
right, but what arguments is it being called with? I never specified any arguments ever.
<clever>
joebobjoe: did you `nix-channel --update` correctly (within `sudo -i`) ?
<clever>
iqubic: the module system passes config, pkgs, lib, and others, to every single module
<clever>
iqubic: everything in imports is a module
<joebobjoe>
clever: my copy of nixpkgs? nix doesn't update its package list automatically, like brew?
<iqubic>
Is there a way to get a list of all the arguments passed int the module system?
<clever>
joebobjoe: correct, you must `nix-channel --update` to update the package set
<clever>
iqubic: add each one it complains about to the function, until it stops complaining
<joebobjoe>
so in a multiuser environment, the users must rely upon the admin to update nixpkg channel?
<joebobjoe>
that worked by the way clever, thank you! I can now upate
<iqubic>
Also, it seems weird that the order of the arguments doesn't matter, but only the names.
<clever>
joebobjoe: that is why nix-channel also works as your own user
<clever>
joebobjoe: so you can ignore what root's channels are, and manage them yourself
<joebobjoe>
so a multiuser installation is near pointless
<clever>
joebobjoe: but if you do have root, that feature causes confusion, because users tend to wind up with duplicate copies of the channel setup
<iqubic>
the first line of hardware-configuration.nix is "{ config, lib, pkgs, ... }:" which causes no issues.
<clever>
iqubic: 2019-08-03 01:40:00 < clever> iqubic: the ... makes it ignore any other arguments it doesnt want
<iqubic>
That seems to imply that config and lib must be added first, but that doesnt see right.
<clever>
joebobjoe: multi-user setup still protects /nix/store from corruption
<clever>
joebobjoe: on a multi-user setup, you must go thru nix-daemon to modify it, and that enforces the rules
<iqubic>
Usually when you have a function like: "{x, y}: x - y" the order of the arguments matters.
<clever>
joebobjoe: but on a single-user, you can just edit anything you want
<clever>
iqubic: the order of arguments doesnt matter when its a set
<joebobjoe>
I would never put a directory meant for one user in the root location
<iqubic>
"{x, y}: x - y" must surely be different from "{y, x}: x - y"
<clever>
iqubic: they are identical
<iqubic>
Right. I see.
<joebobjoe>
so a single non-root user installation of nix requires root privileges?
<joebobjoe>
to write a nix store to /nix?
<joebobjoe>
I ditched homebrew on mac to avoid those shennanigans
<iqubic>
So the module system just passes in a set and I just pick which of the parts of that set I want to use?
<clever>
joebobjoe: if you own an empty /nix/, the single-user install can act without sudo
<clever>
iqubic: yes
<pie_>
clever: hi ^.^/ *trods off back to writing a "distro"
ddellacosta has quit [Ping timeout: 244 seconds]
<clever>
joebobjoe: if you dont own /nix then it will use sudo to make you own it
<joebobjoe>
clever: yea but no single user should own anything in /
<joebobjoe>
I don't set up my systems that way I'm not retarded
<joebobjoe>
user files belong in /homes
<joebobjoe>
or whatever
<joebobjoe>
$HOME
<clever>
joebobjoe: changing the directory of /nix/store requires rebuilding every single package from source
<clever>
joebobjoe: and darwin doesnt really support chroot or namespaces, so the linux work-arounds dont help
Rusty1 has quit [Quit: Konversation terminated!]
<joebobjoe>
why are packages that can't be dynamically relocated allowed?
<clever>
joebobjoe: the length of the path is in compiled binaries
<joebobjoe>
I guess that's just how software is built on posix systems?
<clever>
joebobjoe: changing that path will upset the offset of every other value in the binary and just make it corrupt
<joebobjoe>
so multi-user nix is the only sane nix
<tomberek>
joebobjoe you can put them elsewhere, but then you won't be able to use the existing caches
<joebobjoe>
if I build a program, I can copy its binary to any folder I want and it still runs. linux programs must suck
<clever>
joebobjoe: its the changes nix makes to give you every benefit of nix
<simpson>
joebobjoe: Single-user Nix makes a lot of sense in certain restricted contexts. A personal laptop (nearly every Darwin user!) or a Docker-compatible container, for example.
<clever>
joebobjoe: normal linux binaries load libc from /lib/libc.so
<clever>
joebobjoe: but now upgrading libc can break things
<pie_>
clever: if only unprivileged bind mounts were a thing (Without possibly getting rooted onoes)
<clever>
joebobjoe: nix sovles that by loading libc from /nix/store/hash-libc/lib/libc.so
<clever>
joebobjoe: but now, if the store isnt in /nix/store, the binary breaks, same if you try to use it outside of nix
<joebobjoe>
so nix hashes libc
<clever>
joebobjoe: nix hashes every single dependency
<joebobjoe>
programs shouldn't be designed to only work with a specific implementation of libc anyway
<joebobjoe>
libc should be considered part of the os
<joebobjoe>
does nix hash the os?
<clever>
joebobjoe: nix just applies those same basic rules to every single dependency, so it doesnt care what the host OS is
<joebobjoe>
so on linux libc is delivered by the package manager?
<simpson>
Yes, on NixOS, Nix manages the kernel.
<joebobjoe>
oh so it's full circle
<clever>
joebobjoe: always, but most linux distros only give you a single libc, but nixos gives you many
<simpson>
joebobjoe: Actually, yes. Are you new to Linux in general? That'd explain a bit. In general, a Linux distro is a collage of packages, assembled without the assent of upstreams.
<simpson>
A libc is just another pile of code, really.
<joebobjoe>
hm that makes sense, thanks guys
<iqubic>
What the heck is emacsPackagesNg?
dansho has joined #nixos
<joebobjoe>
how do I switch my channel from unstable to stable?
<clever>
joebobjoe: run `nix-channel --add` with the right params, as root
<clever>
joebobjoe: you can confirm what has happened with --list, there should just be a single entry named nixpkgs
<clever>
then --update to apply the changes
<joebobjoe>
oh wow it replace the unstable ok thanks
<iqubic>
What is emacsPackageNg? What does that even do?
<clever>
joebobjoe: you could use both at once, but you said switch
<joebobjoe>
clever: yea that's what I wanted, just didn't know add was destructive
<clever>
joebobjoe: -add will overwrite if the name collides
<joebobjoe>
looks like nixpkgs-unstable is the right channel after all, there is no nixpkgs-stable chan
<joebobjoe>
clever: convenient
<clever>
joebobjoe: the stable channels are named after the year and month of release
<joebobjoe>
um, was it a good idea to do a nix-env -e '*' under root? now when I run nix-env in my user I get -bash: /nix/var/nix/profiles/default/bin/nix-env: No such file or directory
<joebobjoe>
oops
<joebobjoe>
but I also just updated nix under root so I don't know
<clever>
joebobjoe: as i said, nix itself is in roots profile
<clever>
joebobjoe: you just uninstalled nix!
rouma has joined #nixos
<clever>
joebobjoe: what does `ls -lh /nix/var/nix/profiles/default` report?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @xrelkd to master « font-awesome: 5.10.0 -> 5.10.1 »: https://git.io/fj9No
<joebobjoe>
clever: figure out where the next generation is at in /nix/store?
<joebobjoe>
it's full of a bunch of packages
<clever>
joebobjoe: ls -l ~/.nix-profile
<hyper_ch>
iqubic: from what I gather home-manager just manages the dot-filesin your user home. so there's no conflifct with normal nixos configuration.nix
<clever>
its just not the default version of python3 currently
<joebobjoe>
clever: then why is my nix-env -u wanting to upgrade my python3-3.7.2 to python3-3.8.0b2
<clever>
joebobjoe: i dont trust -u, and prefer -i
<joebobjoe>
nix sucks
<joebobjoe>
I give up
<joebobjoe>
going back to brew
<clever>
joebobjoe: nix-env -iA nixpkgs.python38 is what you want
<joebobjoe>
I want the latest stable version of python 3
<joebobjoe>
there is no way to specify that?
<clever>
python38 is version python3-3.8.0b2
<joebobjoe>
I don't want python38 if it's a beta
<clever>
joebobjoe: then you want python3, which is 3.7
<joebobjoe>
clever: how do I find out what name I installed a package under
<joebobjoe>
I'm pretty sure I installed python3 and now it is updating to 3.8
<clever>
joebobjoe: thats what home-manager can solve
<clever>
nix-env -i cant track the attribute names
<joebobjoe>
clever: so what is it doing?
<joebobjoe>
I installed as python3
<clever>
nix-env tracks the name of the package, not the attribute path
<joebobjoe>
not python37
MarcWeber has quit [Ping timeout: 248 seconds]
<clever>
and -u searches for things with a similar name
<joebobjoe>
oh god
<clever>
and it gets confused when you have a dozen versions to pick from
<clever>
2019-08-03 02:24:51 < clever> joebobjoe: i dont trust -u, and prefer -i
<clever>
hence why i dont use -u
<joebobjoe>
so it just chooses the most newest version number, including betas?
<clever>
probably
<clever>
i prefer -i, so i know exactly what is happening
<joebobjoe>
so that sounds like an improvement I can make to nix-env then
<joebobjoe>
clever: I don't get it though. if my python is currently python3-3.7.2, and nix searches by name, if I do a nix-env -i python3 I get 3.7.2, but if I then do a -u it immediately upgrades to 3.8b0?
<joebobjoe>
the reason I'm upset about nix-env -u trying to install the beta versions is now I am getting an installation error and now all my other pkgs won't update
<joebobjoe>
and now I don't know whether to blame nix or python beta
ericsagnes has quit [Ping timeout: 276 seconds]
<FRidh>
well, here we could improve the names of the Python derivations actually. But there are many other cases where you would encounter this.
<pie_>
do you guys know any good software defined networking "stuff"? im interested in managing network stuff for containers - but unrelated to that, I heard from a prof about _one_ SDN tool that turned out good, flow-somethingorother? or something-flow?
MarcWeber has joined #nixos
<srhb>
pie_: OpenFlow?
<pie_>
yeah thanks!
<srhb>
Most of the k8s stuff is basically all tied together magically on top of iptables, ipvs, lvs, ...
<srhb>
For better or worse.
<pie_>
isnt there something more ergonomic
<pie_>
or is there some fundamental reason that thats the best we can do
<srhb>
I don't know enough of networking to really answer that convincingly. I will say that it gets you a very long way.
<pie_>
well obviously you can do everytihng with it, thats not really what i meant
* srhb
nods
<pie_>
i havent been attracted to learning it because all that stuff looks ugly and meh :(
<pie_>
but i guess i might just have to
<srhb>
At the very least in order to know why it's worse than some more grounds-up SDN approach, I suppose :-P
<joebobjoe>
are there any newer or competing projects that think they're better than nix for package management on linux?
<srhb>
joebobjoe: guix is newer (given that it's based on Nix)
<srhb>
joebobjoe: I don't think it's necessarily better though.
<clever>
srhb: does guix even work on darwin?
<joebobjoe>
does it have the nix-env issues?
<srhb>
clever: No idea, but I'd expect not.
<clever>
srhb: thats what i suspected
<srhb>
joebobjoe: What nix-env issues?
<clever>
srhb: -u matching by name
<srhb>
Ah. I don't know. But I wouldn't use -u or nix-env for general package management anyway.
<joebobjoe>
then why does it exist
<joebobjoe>
to deter new users?
<clever>
legacy code i'm guessing
<srhb>
joebobjoe: You're being unnecessarily facetious, please don't. It was probably felt it was a good idea at the time to provide a "normal package manager"-like approach to package management :)
<jackdk>
this seems likely to me too
<srhb>
It then turned out to be not really that great compared to more declarative approaches.
<srhb>
So the issues, that are fixable, went largely unfixed.
<joebobjoe>
has no one found a proper bijunction?
<joebobjoe>
or overlay or whatever
<srhb>
joebobjoe: What do you mean by that?
<joebobjoe>
to overlay old behavior on top of the new, maybe with a few assumptions or additional specifications by the user should anything go awry
<joebobjoe>
the traditional package manager behavior, like pacman, on top of nix
<srhb>
I would say no, not really.
<joebobjoe>
maybe nix-env can be improved
<srhb>
The declarative approach is deemed better in most cases.
<srhb>
And people are sort of waiting around to see what kind of things might be "neat" with nix flakes.
<srhb>
I think we're mostly in agreement that the problem with traditional package managers is what makes the *traditional* package managers.
<srhb>
them*
<rawtaz>
joebobjoe: what do you need a non-declarative package manager for?
<srhb>
And we just tend to not use Nix in that way, because we feel we have a better approach :)
<rawtaz>
im just trying to follow along
<joebobjoe>
then why is there no way to simply declare a list of packages in a text file in my home directory that is kept up to date automatically, or on update command?
<iqubic>
I'm having a bit trouble installing home-manager.
<srhb>
joebobjoe: There is.
<joebobjoe>
if declarative is better^
<srhb>
Plenty of ways, in fact..
<joebobjoe>
built-in
<joebobjoe>
without third party addons
<FRidh>
buildEnv...
<srhb>
That's the monolith vs. unixy tools argument over again.
<srhb>
There's nothing wrong with using nix-prefetch-git to update a json file which nix then uses.
<iqubic>
I just tried running `nix-shell '<home-manager>' -A install` in a shell.
<FRidh>
although that's not even needed either, just a list is enough
<iqubic>
I just got "error: file 'home-manager' was not found in the Nix search path (add it using $NIX_PATH or -I)" return.
<joebobjoe>
then why is nix called a "package manager" if there is no simple built in way to declare a list of packages without doing the whole "my package" bs
<srhb>
iqubic: Did you add that path to your NIX_PATH?
<srhb>
joebobjoe: yes, that's probably a mistake.
<srhb>
Nix is not really a package manager :)
<sphalerite>
joebobjoe: `with import <nixpkgs> {}; { inherit tmux vim nethack; }` in a file called packages.nix, and install using nix-env -f packages.nix -ir
<srhb>
There's definitely arguments for rebranding.
<joebobjoe>
sphalerite: where should packages.nix go?
<sphalerite>
joebobjoe: doesn't matter.
<joebobjoe>
what is nix then? a channel manager?
<srhb>
iqubic: Is your channels path in your nix path?
<clever>
iqubic: you need to relog the first time you add a non-root channel
<srhb>
joebobjoe: I find it difficult to say. It's still, in the history of software management, a new thing. I find it hard to come up with an appropriate term.
<iqubic>
clever: I see
<rawtaz>
joebobjoe: could you please stop being so critical or unfriendly in your tone? calling stuff here bullshit isn't exactly coming across very nicely. please be less frustrated in how you write.
<iqubic>
I was hoping I wouldn't need to do that.
<rawtaz>
joebobjoe: its an interesting discussion, but would be nice not to read condecending wordings
<joebobjoe>
ok but this was sold to me as something amazing, and I tried it on mac and have hit software quality issues ever since
<FRidh>
sphalerite: list and attribute set actually still cause -u to use names, so it seems buildEnv is needed afterall
<sphalerite>
FRidh: well, the idea is not to use -u ;)
<rawtaz>
joebobjoe: that goes for about every other software too. its just what $computing is..
<srhb>
joebobjoe: That *is* frustrating, of course.. But we're all just volunteers. We welcome all help :)
<clever>
FRidh: -u will always use names, but if you -i a list/set, it will install just the things in that list/set
<joebobjoe>
FRidh: exactly
<sphalerite>
FRidh: so the same -ir command should be used for updating too
<clever>
FRidh: and if it was already installed, then it updates to whatever the expr gave
<rawtaz>
joebobjoe: if do you have any ideas how things can be improved?
<joebobjoe>
I guess one thing the "functional declarative" style still hasn't fixed about programming is integration with posix
<FRidh>
I know it uses names, but there are ways to use -u despite that, e.g. by using a buildEnv. it will only use name resolution for the buildEnv, but not for its contents
<joebobjoe>
things still are stateful
<iqubic>
I was hoping I wouldn't have to relog, because I have a ton of tabs opened in Firefox related to my current project, and I don't want to lose them.
<srhb>
joebobjoe: Yeah. In a similar vein, there's a reason we threw FHS out the window on NixOS.
<srhb>
joebobjoe: Some packages play really nice with immutable concepts, and some really, *really* don't.
<DigitalKiwi>
i think a lot of things that seem broken with nix are just broken things that when used with nix shows how broken the systems really are
<DigitalKiwi>
if that makes sense
<joebobjoe>
DigitalKiwi: yea sure does
<srhb>
Often, at least. I do find most packaging would be superior if they packaged for nix constraints first and everything else second.
<joebobjoe>
like the headache of terminals
<joebobjoe>
termcap
<srhb>
When a build starts requiring internet access just to determine its dependencies I cry a little :-)
<clever>
srhb: *eyes go*
<srhb>
:/
<joebobjoe>
srhb: wait, you through out FHS? :( is that why you install in my / ?
<clever>
joebobjoe: thats why nixos doesnt use /bin and /lib at all
<joebobjoe>
but where does I put my resources? images and such?
<srhb>
joebobjoe: There's no reason /nix couldn't live in /var/lib/nix or something.
<iqubic>
clever: Is there a way to do this without relogging?
<joebobjoe>
srhb: can I do that on install?
<srhb>
joebobjoe: No, you'd lose all binary caches
<clever>
iqubic: [clever@amd-nixos:~]$ ls ~/.nix-defexpr/channels/
<clever>
iqubic: is home-manager in there?
<srhb>
joebobjoe: Since we link to full paths into /nix, you would change every package by doing that.
<iqubic>
Yes.
<srhb>
joebobjoe: So... Yes, but no. ;-)
<iqubic>
It is.
<iqubic>
Home-manager is there.
<clever>
iqubic: use that path instead lf <home-manager>
<iqubic>
and a manifest.nix
<joebobjoe>
so sphalerite's solution of ultimately using a packages.nix with -ir for maintaining a list of updated packages in an env is agreed as a good idea?
<{^_^}>
There are multiple ways of managing declarative profiles. 1) Attrset, compatible with imperative use of nix-env https://git.io/fAQHW ; 2) buildEnv, providing more control over the paths that are linked into the profile https://git.io/fp0aU ; 3) home-manager, providing nixos-like config for your ~ https://github.com/rycee/home-manager
<srhb>
joebobjoe: Yes.
<sphalerite>
joebobjoe: ^ these are the 3 "best" options for managing a declarative user setup
<clever>
iqubic: single quotes stop ~ from doing its job
<iqubic>
I see.
<srhb>
joebobjoe: I find having just one thing "installed" in the traditionel sense is the way to go.
<srhb>
joebobjoe: (In my case, that's my system profile)
<iqubic>
There we go. It's building now.
<srhb>
joebobjoe: Which ultimately and uniquely determines every package in my system that is not transient.
<joebobjoe>
sphalerite: which of the three are built-in to nix
<joebobjoe>
srhb: where do you put your system profile?
<sphalerite>
joebobjoe: the first two
<joebobjoe>
or how do you maintain the packages
domogled has quit [Quit: domogled]
<srhb>
joebobjoe: it's just a list, I edit the list.
<clever>
joebobjoe: 1 is directly part of nix, 2 make use of nixpkgs (you almost never use nix without nixpkgs), 3 is a 3rd party extension
<joebobjoe>
sphalerite: when you used that packages.nix, was that the attrset method?
<sphalerite>
joebobjoe: yes
<joebobjoe>
ok I liked that, more unixy
<clever>
i also prefer 1 over 2
<sphalerite>
joebobjoe: I think the part missing in srhb's explanation is that she's using nixos, so she configures the system declaratively as a whole anyway :)
<clever>
2 creates a single massive package in nix-env, and you must update it all at once
<clever>
1 just tells nix-env to install each thing seperately
<iqubic>
how important is it to read all the home manager news? I seem to have 71 unread messages.
<clever>
so you can temporarily ignore this advice, and `nix-env -iA nixpkgs.python38` to update just one thing, rather then updating it all at once
<pie_>
teto: i see you wrote the package for mininet, I dont suppose you know much about SDN stuff?
<joebobjoe>
sphalerite: how do you emulate the nixos way most closely on darwin? method 1? attrset?
<clever>
or `nix-env -e python3` to remove it temporarily, without also updating everything else at the same time
<srhb>
joebobjoe: nix-darwin probably :)
<iqubic>
Also ~/.config/nixpkgs/home.nix seems like a terrible place for the config. Can't I just put it in ~/home.nix ?
ottidmes has joined #nixos
<joebobjoe>
clever: or you could just edit your package file
<iqubic>
I can just make a symlink, right?
<clever>
joebobjoe: but to apply that new package file, you need to atomicly update everything listed in it
<clever>
joebobjoe: and sometimes you may run into issues where you have to update 20 things just to remove 1 thing
<joebobjoe>
oh I didn't realize your package file wouldn't be frozen
<srhb>
iqubic: Yes, but import resolution might surprise you at times if you do that. It might be nicer to have it be a file with a nix import
<joebobjoe>
ok I like this
<iqubic>
srhb: How might I get suprised?
<joebobjoe>
is there a blog post or article or something that explains the justifications of abandoning FHS on nix?
<{^_^}>
nix#2109 (by Infinisil, 1 year ago, open): imports don't resolve symlinks absolutely, leading to unexpected behaviour
<joebobjoe>
er, ehm prs or something
<iqubic>
srhb: do those issues exist in home-manager?
<srhb>
joebobjoe: I don't know of one, but for example we use it to avoid accidental impurities (like a package somehow picking up /bin/bash from the environment)
<srhb>
iqubic: It's a nix issue, so yes.
<iqubic>
I see.
<srhb>
joebobjoe: So, one reason is isolation and purity.
<iqubic>
I guess I'll just use the .config location for home.nix
<joebobjoe>
I just realized nix is written in c++
<srhb>
joebobjoe: Since.. Recently :-)
<clever>
joebobjoe: when i was on gentoo, some packages would enable featues i didnt say to enable, because it auto-detected X installed, and enabled support for X
<clever>
joebobjoe: and then when i remove X, the package breaks hard
<joebobjoe>
clever: that doesn't happen on nix right?
<clever>
joebobjoe: correct
<iqubic>
how long has nix been based on C++?
<joebobjoe>
ok that's how every package manager should behave
<joebobjoe>
like nix
<srhb>
iqubic: Since nix 2 basically.
<clever>
joebobjoe: because X is at /nix/store/hash-x, you cant auto-detect it without nix giving you the whole path to it
<srhb>
iqubic: really 1.12 or something...
<iqubic>
What was it written in before then?
<srhb>
Mostly perl.
<clever>
joebobjoe: there is also the optional sandbox, which basically builds things in a container, so you cant even be naughty and look in /nix/store/*/ yourself
<joebobjoe>
clever: they could search for it
<srhb>
Hence the sandbox. :)
<clever>
joebobjoe: the sandbox is basically a container, it changes what / maps to, so you cant search!
<joebobjoe>
does the sandbox only work on nixos?
<srhb>
No, any Linux. Partially on Darwin, iirc.
<clever>
joebobjoe: on darwin, the sandbox is implemented with ACL's, that cause error codes if you look at something you shouldnt
<joebobjoe>
that sounds just as secure as on linux?
<srhb>
The sandbox just more than just limit filesystem access.
<srhb>
does more*
<clever>
joebobjoe: it means darwin cant remap paths, only block access
<joebobjoe>
oh
<clever>
joebobjoe: on linux, /bin/sh can differ between builds
<joebobjoe>
does macos's built in sandbox feature only work with app store apps?
<iqubic>
srhb: Perl is the embodiment of the quote "The art of doing twice as much as you should half as well as you should"
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
<iqubic>
I know that quote describes multitasking, but that's my opinion on Perl.
<iqubic>
It's got the whole kitchen sink, and then some.
<srhb>
Well, you know, opinions... :)
<joebobjoe>
clever: isn't that gentoo packager issue you described a bug?
<clever>
joebobjoe: yeah
<clever>
joebobjoe: it could be solved by adding more --disable-x flags, to every single package in the system
<clever>
joebobjoe: but the problem is finding those bugs, and fixing them, endlessly
<iqubic>
joebobjoe: I used to use Gentoo, two years ago, before switching to Nixos. That same bug plauged me back then too.
<clever>
the nix store just automatically prevents it from ever happening
<srhb>
It's not a bug as much as a class of bugs that we've just eliminated.
<iqubic>
it was one of the reasons I migrated to nixos.
<srhb>
Which is the coolbeans part.
<iqubic>
yeah. I love how the nix store works.
<joebobjoe>
why can't gentoo just run the nix store as part of its bug identification process?
<joebobjoe>
or anyone run it
<srhb>
They absolutely could.
<srhb>
That's basically what I meant when I said: People should package for Nix first, everything else second.
<srhb>
That gives you a ton of benefits.
<srhb>
But at some point you've just reimplemented Nix.
<srhb>
Er, NixOS :)
<iqubic>
if you must have that one package that relies on an old version of Qt, you can still run that package, and update Qt to the latest version at the same time.
<joebobjoe>
but why is it worth abandoning the FHS
<clever>
joebobjoe: conflicting packages in /lib and /bin
<joebobjoe>
why do you combine /lib and /bin
<joebobjoe>
it's not posix?
<clever>
joebobjoe: combined, as in, they both have the same problems
<joebobjoe>
oh
<clever>
joebobjoe: there are 2 node binaries, one is nodejs, the other is a ham radio program
<clever>
joebobjoe: which one gets to win the /bin/node path?
<rawtaz>
joebobjoe: stuff are linked from the usual places into the nix store, so what does it matter? :o
<joebobjoe>
oh, so nix is basically a symlink manager
<iqubic>
You're right. Nix/NixOS is not posix compliant.
<joebobjoe>
is there something like nix/nixos, that is posix compliant?
<iqubic>
joebobjoe: It's much more than a symlink manger.
<iqubic>
joebobjoe: No. Because those two concepts are complete opposites.
<joebobjoe>
I don't get why you can't just symlink packages into /bin /lib as appropriate and still be fhs compliant
<clever>
joebobjoe: buildFHSEnv basically does that, thats how steam works on nixos
<iqubic>
What is so important about having a FHS compliant system?
<srhb>
Have you read the POSIX standard? :)
<joebobjoe>
srhb: no, no I haven't
<joebobjoe>
but parts of it are beautifyl
<joebobjoe>
and they are working on it
<srhb>
Yeah. Some aren't :D
<joebobjoe>
I just care about FHS because everyone is doing FHS
* srhb
shrugs
<joebobjoe>
it's cool having a standard for where files should go
<srhb>
But as shown above, it breaks immediately when you have two files of the same type with the same name
<joebobjoe>
or maybe you're saying nix's standard is better (er, nixos's?)
<srhb>
I don't want to lose that feature
<srhb>
I am, yes.
<iqubic>
Nix doesn't do FHS, but still has a rock solid standard for where each file goes.
<srhb>
I _need_ to have multiple versions of the same program available at all times
<rawtaz>
wait, is it just in NixOS that nix symlinks into the store, so things look like they would on a regular system?
<srhb>
rawtaz: *almost*
<rawtaz>
i mean, if it does symlink, then there will be files in the FHS places, so whats the difference?
<rawtaz>
it *looks* FHS compliant
<srhb>
rawtaz: NixOS is really one nix profile that creates something that sort of looks like a regular FHS system almost. Plus systemd, plus activation scripts.
<clever>
but its mainly rooted under /run/current-system/
<iqubic>
The difference is that there will always be that one application that doesn't respect the symlinks.
<joebobjoe>
nixpkgs.<package> should always point to the current version
<srhb>
*usually* the old package gets the name with the suffix.
<srhb>
joebobjoe: Yes.
<srhb>
(Which is why I invited you to PR a fix!) :)
<joebobjoe>
ok, so some people do agree it can be chagned ok
<srhb>
yeah.
<joebobjoe>
maybe will create upstream work to integrate packages?
<srhb>
There are reasons to sometimes not do the change immediately
<joebobjoe>
or would that just be rejected
<srhb>
As in, multi version packages?
<srhb>
I would probably hold off a bit as the nix flakes concept might significantly influence how we do versioning. At least, you may risk wasting some work currently, things are in flux.
<joebobjoe>
idk like if a package relies on the attribute botan but not the specific version and then botan-2.whatever breaks that package
<srhb>
joebobjoe: Usually, packages require "botan" and are fed the specific version as an argument.
<joebobjoe>
what if they require a specific range of versions themselves
<joebobjoe>
what kind of packages are there
<srhb>
joebobjoe: Sorry, i did not understand that.
<joebobjoe>
ok nix flakes sounds interesting then I'll try to read about that
<joebobjoe>
like, is the reason nixpkgs.botan refers to version 1 of botan because botan 2 breaks a lot of packages that depend on it?
<srhb>
joebobjoe: Probably yes. Another example is boost. We have many versions of that because we cannot easily avoid it.
<srhb>
joebobjoe: So packages will say, { boost = boost155; }
<srhb>
Considering how few packages rely on botan I'm more inclined to say the main attribute pointing to the old version is likely a mistake that's easily fixed.
<joebobjoe>
but on nix, different versions will not conflict
<srhb>
but I didn't check the commit history.
<srhb>
joebobjoe: Right. But they will clutter, and require maintenance, and security concerns, and {...}
<joebobjoe>
ok I'll check
<srhb>
joebobjoe: Our main issue is really time and effort on the part of contributors and maintainers.
<joebobjoe>
oh I see
<srhb>
nixpkgs is... huge. :-)
<joebobjoe>
is there a way to see which of my packages are being "held back" from updating by other packages?
<joebobjoe>
srhb: yes but in nix you have to refer to the channels by date
<joebobjoe>
on repology's website they just havea a "current" stable
<srhb>
joebobjoe: There is only one stable, and that's the latest of the .03 and .09 releases.
<joebobjoe>
yea but there is no channel that tracks the latetest release
<joebobjoe>
sorry I'm high
<srhb>
It's just a name. :)
<rawtaz>
hm. wikipedia says "
<rawtaz>
GNU Guix - another declarative package manager for Linux distributions, built on Nix but which uses the more ubiquitous GNU Guile for configuration and customization, instead of the domain-specific language of Nix"
<rawtaz>
is that really accurate? i wasnt aware guix being "built on" nix
<srhb>
Yes, it's accurate.
<joebobjoe>
probably some european translation mistake
<srhb>
No, it is indeed built on Nix.
<rawtaz>
meh. whats the point then, hehe
<joebobjoe>
ugh
dansho has quit [Ping timeout: 248 seconds]
<srhb>
Some people like guile.
<joebobjoe>
I don't get how using nix .03/.09 releases provide more security?
<clever>
rawtaz: the 2nd is more of an embeded os, that doesnt contain systemd
<joebobjoe>
I want 1) a posix-compatible nix, 2) it written in c, or haskell, 3) it be seamless multi-user/single-user, and uh a whole bunch of other things I forgot
<clever>
rawtaz: its also small, but not single-binary small
<srhb>
joebobjoe: Good luck :-P
linarcx has quit [Quit: WeeChat 2.5]
<rawtaz>
srhb: my feeling is that, ok, maybe scheme is very nice. but is it NICER ENOUGH to justify spending all this time and energy on building Guix, when there's already Nix and nix being nice too.
<clever>
joebobjoe: have a look at the haskell-init above, and say goodbye to posix compat, because you can now live in forkIO children! :P
<srhb>
rawtaz: Yeah. What I was trying to say is that for these people it's the end-goal, not something you can trade off.
<srhb>
I know the feeling, I had a scheme period in my life too :P
<clever>
joebobjoe: rewrite every single util you ever plan to use, in haskell, and forkIO them, rather then createProcess!
<rawtaz>
srhb: so how come youre not scheming today too? how come you didnt continue with guix instead of nix?
<rawtaz>
if youre a schemer i mean
<rawtaz>
or do you like nix more?
<srhb>
rawtaz: I ended up being more enamored by purity than by the ADT-niceness.
<srhb>
rawtaz: So, Haskell.
<srhb>
rawtaz: Then I wanted a pure package manager. So, Nix.
<srhb>
rawtaz: Then I wanted a pure OS. So, NixOS.
<srhb>
Now the extreme niceness of Nix + Haskell is hard to let go of.
<pie_>
/ with your qubes experience, would it be worth looking into?
<pie_>
i mean would it be worth thinking about porting
<pie_>
packaging / whtever
<clever>
pie_: there was a talk at the last nixcon about redoing the networking stuff in nixos
<pie_>
clever: i know, that was with systemd networkd
<pie_>
i dont know much about that
<pie_>
Ill probably have to try it myself anyway I just dont want to waste much time on it if people say its not good
asymptotically has joined #nixos
linarcx has quit [Quit: WeeChat 2.5]
linarcx has joined #nixos
meteo has quit [Remote host closed the connection]
meteo has joined #nixos
logzet has joined #nixos
srid has quit [Remote host closed the connection]
linarcx has quit [Quit: WeeChat 2.5]
<ToxicFrog>
More perl questions!
linarcx has joined #nixos
<ToxicFrog>
I now have a package that builds and emits a mix of binaries (that depend on libperl and a bunch of perl modules) and perl scripts (that also depend on a bunch of perl modules).
<ToxicFrog>
The build works fine, but none of the binaries actually run because they can't find their perl modules in @INC.
boothead has joined #nixos
<Miyu-chan>
makeWrapper is the first thing that comes into mind.
<ToxicFrog>
How do I get the perl modules that are depended on by the build to be available at runtime too? Putting them in propagatedBuildInputs doesn't help.
<boothead>
Hi folks what's the preferred way to nixify a python module with a requirements.txt at the moment? I see 3 alternatives and the pypi2nix option I tried didn't work...
srid has joined #nixos
<Miyu-chan>
I don't knwo what environtment variable Perl uses, but let's just assume PERLLIBS.
<ToxicFrog>
PERL5LIB, I think.
<ToxicFrog>
But I'm not a perl programmer.
<clever>
*looks*
<Miyu-chan>
You can use `wrapProgram ./foo.pl --prefix PERL5LIB : libraries`.
<clever>
if its done with env vars, then a setup hook can probably also do it
<ToxicFrog>
clever: in this case, postFixup seems to be fixing the shebang path but not adding the `use lib perl_includes`, and I'll look into that in a minute
<ToxicFrog>
But that doesn't help with the binaries -- they have no shebang but still need to be able to find perl modules.
<ToxicFrog>
So I'm going to need makeWrapper regardless
<clever>
ToxicFrog: ahh, yeah
meteo_ has joined #nixos
meteo has quit [Read error: Connection reset by peer]
zaninime has joined #nixos
<ToxicFrog>
(it's a game server written in C++ that supports perl scripts attached to maps/items, so)
<clever>
ahh
emery has quit [Quit: leaving]
<zaninime>
Hey everyone! I'm new here. I'm a NixOS user for a year or a bit more, and I have a question regarding 19.03. Since I last rebuilt my system with `nixos-rebuild switch` it can't boot properly anymore. It fails when running the init script with `systemd: command not found`
<clever>
zaninime: activation scripts can cause that problem if they have an error
<clever>
zaninime: did you have any custom ones?
vcunat has joined #nixos
<zaninime>
clever: yes, but it has a `do my thing || exit 0`
<zaninime>
clever: I can nonetheless disable it
<clever>
zaninime: are you still able to boot an older generation? or try removing it
<tilpner>
sphalerite: I always agreed they're dangerous!
<clever>
zaninime: i think nixos unstable also wraps every script for you, to prevent problems
<clever>
zaninime: so || exit 0 will make it worse
<zaninime>
clever: looking forward unstable then ;)
<clever>
ever since i helped debug that first guy that lacked systemd, ive been saying, just use a systemd script
<tilpner>
sphalerite: But it can mostly be circumvented by calling generated scripts instead of inserting code directly
noudle has joined #nixos
<zaninime>
clever: you mean a unit with `Type=oneshot`? That would also make sense
<clever>
zaninime: yeah
<clever>
zaninime: what is the script doing?
<zaninime>
clever: printer setup in a brutal way. It fits better in a `systemd` script actually
<zaninime>
clever: just calling `lpadmin` and accepting the fact that it will fail from time to time
<clever>
zaninime: cups isnt even running when activation scripts happen, so its more likely to fail 100% of the time
<zaninime>
clever: no no, it actually works when you run `nixos-rebuild`
<zaninime>
clever: but I agree at boot it makes no sense. I will just move it to a `systemd` unit
<clever>
yeah, nixos-rebuild will re-run activation scripts, to apply changes
<clever>
and thats the exact same problem the 1st guy with activation problems had
<clever>
he was doing network in his activation script, and hadnt rebooted in years, so it always worked
<clever>
then after years of not rebooting, he rebooted, and it failed on bootup
<clever>
and he had also GC'd older generations, because it was running fine for years
<zaninime>
yeah, lesson learned.
<zaninime>
what could you do, in that case? recovery boot from USB?
<clever>
if you change the kernel cmdline in grub to `init=/bin/sh` you can force a single-user shell
<clever>
(this works in any linux distro, even nixos)
<clever>
then you have root, without systemd, and can do whatever you want
<zaninime>
right, so you can mount your disk and chroot into it
<clever>
no need to
<clever>
the disk is already mounted to / when it runs "init"
<zaninime>
true dat. I guess I never had to do it
<clever>
nixos just has some extra requirements
<clever>
1st, stage-1 will claim /bin/sh doesnt exist (its an absolute symlink, and its testing relative to the wrong root), tell it to continue anyways
jgt has quit [Ping timeout: 264 seconds]
<clever>
2nd, /bin is empty!, youll want to export PATH=/nix/var/nix/profiles/system/sw/bin/
<{^_^}>
[nixpkgs] @peti pushed 4 commits to haskell-updates: https://git.io/fj9p5
<zaninime>
Ah yeah, nice. Next time I will try it. ;)
linarcx has quit [Quit: WeeChat 2.5]
linarcx has joined #nixos
iufgoiwhfouihohd has joined #nixos
jgt has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fj9pd
jmeredith has quit [Quit: Connection closed for inactivity]
MmeQuignon has quit [Ping timeout: 245 seconds]
o1lo01ol1o has joined #nixos
<infinisil>
GiGa: lutris-free is without steam support, lutris-unwrapped is the raw lutris build without any libraries available you need for running it decently
<GiGa>
infinisil: cool, thanks
ng0 has quit [Quit: Alexa, when is the end of world?]
o1lo01ol1o has quit [Ping timeout: 258 seconds]
cinimod has joined #nixos
<GiGa>
This is cool, it can pull in my Linux Steam games list
<GiGa>
I'll have to install Windows Steam for some other bits too I'm guessing
* GiGa
thinks it's time to go and read the docs
<Yaniel>
proton works for most windows games either out of the box or with some tweaks
<marius851000[m]>
{^_^}: I want to update dolphin-emu-master (broken), and the actual version is 5.0-9976. Want mean 9976 and how I find it for the latest commit ?
<marius851000[m]>
I want to update dolphin-emu-master (broken), and the actual version is 5.0-9976. Want mean 9976 and how I find it for the latest commit ?
<Yaniel>
marius851000[m]: that is a bot
<GiGa>
Yaniel: Do I need to install that separately?
<Yaniel>
the linux version for steam downloads it if you enable steam play
<GiGa>
OK, that's already done
<Yaniel>
also check "enable steam play for all titles" in steam settings
<Yaniel>
then all windows games should show up in your steam library
<GiGa>
Yaniel: Yep, although some things like Magicka don't work
<Yaniel>
not sure how exactly this interacts with lutris
meteo_ has quit [Remote host closed the connection]
meteo_ has joined #nixos
cinimod has quit [Ping timeout: 272 seconds]
noudle has quit [Read error: Connection reset by peer]
noudle has joined #nixos
cinimod has joined #nixos
drakonis has joined #nixos
<infinisil>
Athas: Yeah evince for some reason changed their .desktop file, breaking it for many people..
<infinisil>
,mime btw
<{^_^}>
btw: `xdg-mime query filetype <file>` to get the mimetype of <file>, see available .desktop files in /run/current-system/sw/share/applications (or others from $XDG_DATA_DIRS), use `xdg-mime default <programname>.desktop <mimetype>` to change the default program, e.g. `xdg-mime default firefox.desktop text/plain`. Mime type for HTTP and HTTPS is x-scheme-handler/http and x-scheme-handler/https
<davidak>
(it would be helpful to have a simple maintainance site instead)
<gchristensen>
specifically: a few weeks ago we got a larger server for hydra.nixos.org. its larder root made the filesystem be abl eto have many more files inthe nix store. this hit the bmaximum number of entries in /nix/store, so we're working on tuning the fs
<clever>
gchristensen: zfs!, zfs!
selfsymmetric-mu has quit [Remote host closed the connection]
<hyper_ch>
what clever said.
<kreisys>
When I use the output of nix-prefetch-git with nixpkgs's fetchgit I end up with different store paths (i.e., nix-prefetch-git outputs one store path and nix-build does the git fetch all over again and ends up with another store path) even though the hash is the same and the contents of the store paths are otherwise bit-identical (according to `diff -qr`). Is that expected? I'm asking because I've been struggling to get my
<kreisys>
nix builds to hit my hydra cache and I traced it down to this issue.
<kreisys>
@clever please tell me you know exactly what's going on :P
<kreisys>
oh I forgot to mention, hydra uses a different nix-prefetch-git which comes up with yet another different store path...
<clever>
kreisys: are the names identical?
<clever>
kreisys: the name is part of what gets hashed
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fjHkc
wildtrees_ has joined #nixos
<kreisys>
My issue is that builtins.fetchGit and hydra's variant of nix-prefetch-git are only compatible for repos with no submodules. once you have submodules, builtins.fetchGit doesn't fetch them while hydra's nix-prefetch-git does
cinimod` has quit [Ping timeout: 246 seconds]
<clever>
kreisys: i believe only iohk's fork of hydra will fetch submodules
<kreisys>
I switched to upstream yesterday and sure as hell that submodule was there
<kreisys>
I even went as far as enabling deepClone and then `builtins.fetchGit ./.`
zacts has quit [Ping timeout: 276 seconds]
npmccallum has quit [Quit: npmccallum]
wildtrees has quit [Ping timeout: 246 seconds]
<kreisys>
I still don't understand why that didn't work
<kreisys>
I mean it did *work* as in it built, it just wasn't the same hash my other machine produced
<clever>
kreisys: deep clone is the reverse of shallow clone, its to do with history, not submodules
<kreisys>
if you look at the GitInput perl module you'll see that enabling deepClone also enables keepDotGit.
<clever>
kreisys: and .git is often a source of impurities
<kreisys>
and confusingly if you run hydra's nix-prefetch-git it suggests that deepClone actually controls whether it fetches submodules or not (that's incorrect)
<kreisys>
so you mean that if I were to `builtins.fetchGit ./.` from 2 different clones that differ only in.. idk.. local config? then they'd produce a different store path?
<clever>
the version of git, and the state of unrelated branches, will impact what git puts in .git
<clever>
so something as simple as an unrelated branch getting pushed, can result in a different .git
davidak has quit [Quit: Leaving]
<kreisys>
oh yes of course! but that's why I'm doing the additional `builtins.fetchGit ./.` from within the source fetched by hydra (after getting it to not delete .git from it)
<worldofpeace>
colemickens: did i confuse you in #65843?
<kreisys>
does the source of builtins.fetchGit affect the resulting store path?
mexisme has joined #nixos
<kreisys>
does it matter whether I've gotten the repo via https, ssh, local directory or a store path?
<clever>
kreisys: i think it mainly impacts the name
<iqubic>
Is there anywhere I can go to read all the options home-manager gives me.
<kreisys>
Is there any conventional way to handle this issue with repos that have submodules? My game plan was to use niv sources and "inject" the submodules in one of the phases
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<clever>
kreisys: my idea, was to make a json file in the repo, that describes the submodules, and then use runCommand to merge things together, using multiple fetchFromGithub (deepfire/serge has implemented it)
<iqubic>
Because there's this one option, home.file.".emacs".source, and I don't know what type that thing is asking for.
<clever>
iqubic: .source is usually a path to a file
<clever>
(or directory)
<iqubic>
I see.
<kreisys>
@clever yeah but can I make hydra use fetchFromGithub instead of nix-prefetch-git?
<iqubic>
My next question is, how does nix handle the character '~' in paths?
<clever>
kreisys: the release.nix would have to fetch the submodules that ./submodules.json defines, then merge ./. with the submodules
<clever>
kreisys: the nix-prefetch-git script is bash
<iqubic>
thanks.
<kreisys>
yeah I'm thanking the lawd for that.
zacts_pi has quit [Quit: WeeChat 2.4]
<kreisys>
I'm contemplating just axing this submodule and vendoring it in. It's just a few files and the submodule repo isn't very active. Do you think they'll notice? :D
<clever>
kreisys: give it a try!
<kreisys>
Also random thought... I'm going through all the workaround instead of looking this in the face. Wouldn't it be more wholesome a solution to just patch builtins.fetchGit to support submodules?
<kreisys>
Like enhance Nix instead of crippling Hydra in a sense.
<kreisys>
I'm just asking to know whether there be dragons
<clever>
kreisys: thats fairly complicated, let me link it
<clever>
kreisys: its cloning/fetching to a bare repo, then clone again to a non-bare one
<clever>
then deleting the .git folder
<ToxicFrog>
For Perl modules, what's the preferred way to structure the PR? One commit per module, one commit for all of them, or put them in the same commit as the thing that depends on them?
<Edes>
I asked this a few days ago but was busy and forgot I asked this
<Edes>
I switched from i3 to gnome and the brightness control no longer works
<Edes>
I'm on xorg
halfbit has joined #nixos
<Edes>
the brightness doesn't work on the slider on the menu, on the media keys or through xbrightness
<Edes>
I'm on a thinkpad x260 if that helps
<niso>
Edes: what's your output of "cat /sys/class/backlight/*/brightness" ?
drakonis_ has joined #nixos
<Edes>
272
drakonis1 has quit [Ping timeout: 268 seconds]
<kreisys>
@clever I don't think I understand what's preventing builtins.fetchGit from following the same routine nix-prefetch-git follows? what's up with feeding the output of `git archive` to tar in the first place?
wfranzini has quit [Remote host closed the connection]
alloy has joined #nixos
wfranzini has joined #nixos
ddellacosta has joined #nixos
pukkamustard has quit [Ping timeout: 258 seconds]
<alloy>
I'm quite a novice to NixOS, maybe it's my fault not finding the right option: But why is nix search so much faster than nix-env -qa?
<Yaniel>
probably built completely differently
ottidmes has joined #nixos
<alloy>
Okay, thanks for the awnser! I was just wondering why nix-env -qa takes like 5 seconds to complete
<hr[m]>
alloy: When I run nix search I get `warning: using cached results; pass '-u' to update the cache` along with the result. The cache could be the reason for the speed improvement.
drakonis1 has joined #nixos
<Yaniel>
nix search is from nix 2.0
<Yaniel>
I think
<Yaniel>
and nix-env -qa is a separate application AFAIK, from the nix 1.x days
<Yaniel>
so yeah probably cache was added where nix-env has to evaluate the entire derivation tree
mexisme has joined #nixos
drakonis_ has quit [Ping timeout: 264 seconds]
<alloy>
The timing makes sense now :D Is there an 2.0 alternitive to nix-env for multi-user package-managment?
<Baughn>
I like home-manager.
<Baughn>
It can even be hooked into the system configuration, if you'd want that.
<alloy>
Okay, will have a look at it. Thanks!
<Baughn>
alloy: Strictly speaking the answer to your question is no. They're still debating how `nix install` should work.
<Baughn>
But home-manager will do the job.
<Baughn>
(And also rather more.)
<alloy>
First impression looks good! I always wondered about the lack of declarative managment for users
<wildtrees_>
how come using custom open port list with nix firewall default to enabled, but not specifically enabled is broken, and default the hostname of avahai services was broken as well, more so how come defaulting for nixos seems somewhat broken?
wildtrees_ is now known as wildtrees
<lambda-11235>
How do I rollback to a specific revision?
<lambda-11235>
`nixos-rebuild switch --rollback` does take a generation.
<infinisil>
lambda-11235: Go to /nix/var/nix/profiles and choose a generation
_kwstas has joined #nixos
<infinisil>
Then call sudo /nix/var/nix/profiles/system-XXX-link/bin/switch-to-configuration switch
<infinisil>
,declarative alloy
<{^_^}>
alloy: There are multiple ways of managing declarative profiles. 1) Attrset, compatible with imperative use of nix-env https://git.io/fAQHW ; 2) buildEnv, providing more control over the paths that are linked into the profile https://git.io/fp0aU ; 3) home-manager, providing nixos-like config for your ~ https://github.com/rycee/home-manager
<alj[m]>
Can someone explain to me how to make a module for some strings, that i can import in the main config?
chloekek has quit [Ping timeout: 245 seconds]
joebobjoe has joined #nixos
<alj[m]>
I want to be able to set service.something.key = options.mystrings.somethingkey (or something close to this) in the main configuration.nix
<alj[m]>
if options is even the right place for that
<alj[m]>
* I want to be able to set `service.something.key = options.mystrings.somethingkey` (or something close to this) in the main configuration.nix
<alj[m]>
* if `options` is even the right place for that
fusion809 has joined #nixos
Palpares has quit [Remote host closed the connection]
<evanjs>
Okay so... Not sure what info to provide, but sorta confused right now. systemd-boot-builder is failing and I can't rebuild. There's a system link that isn't a valid system link (just contains a manifest.nix?) so it'll try to switch to it but it can't find the kernel, because, well, that's not a valid system profile in the first place. Happy to provide whatever info is needed, just totally lost right now
<evanjs>
haha
xkapastel has quit [Quit: Connection closed for inactivity]
<infinisil>
I'm just experimenting a bit with the module system
<infinisil>
Would be nice to have assertions and warnings you can turn off
<alj[m]>
@in
<jumblemuddle>
Is there a way to make NixOS automatically create a raid array on boot if it doesn't exist? I'm trying to deploy to GCE using NixOps, and I'd like for the mdadm raid0 array to be automatically generated. All I can find for NixOS options is `mdadmConf` though, and it doesn't look like that'll automatically create the array.
<alj[m]>
infinisil: Can I insert sub-divisions like config.mystrings.sub.foo ?
Edes has quit [Ping timeout: 245 seconds]
alloy has quit [Quit: leaving]
<infinisil>
alj[m]: Yeah by changing the type to e.g. `attrsOf (either (attrsOf str) str)`
jumble has joined #nixos
<timokau[m]>
f
<alj[m]>
right now its `attrsOf str;` what do i have to change?
jumble has quit [Remote host closed the connection]
<tazjin>
if anyone has a better idea for how to deal with retrieving attributes in a case-insensitive way, please ping me: https://github.com/google/nixery/pull/22
<iqubic>
The default option for home.keyboard.module is "pc104" how can I verify if that is the right layout. If it's not the layout, how can I find the right layout option?
<iqubic>
I'm using the ANSI layout.
<qyliss>
iqubic: if you notice a key not doing what it's supposed to, it's not the right layout :P
MmeQuignon has joined #nixos
kreisys has joined #nixos
<iqubic>
I see. I'll just set the variant to "qwerty" and see what happens.
<iqubic>
home-manager doesn't seem to have any sort of libinput settings. Will I have to manage that in my configuration.nix?
<iqubic>
I'm talking about laptop trackpad options.
<clever>
iqubic: first, you need to figure out if those options are controlled via a config file, or if they can be changed by a command after you login
<iqubic>
Really all I'm doing setting the option "services.xserver.libinput.enable" to true in my configuration.nix.
<DigitalKiwi>
https://twitter.com/ArchKiwi/status/1157794447494717440?s=20 new batch of nix logos. made the paint too thin i think so it bled and the first stencil was too sticky (new adhesive, not used to it)... next one's will be better i hope