<Guest57550>
Hmm, the live cd did a good job of detecting things, but the resulting hardware configuration didn't include modules for my wireless network card
<Guest57550>
I think, anyway
<Guest57550>
I guess I have to boot into the installer again
nuncanada has joined #nixos
jrolfs has joined #nixos
<Guest57550>
Hmm, where do I put "firmwareLinuxNonfree"?
<tomberek>
clever: yeah, i've been doing a lot of hacking, i was hoping to have the option to only override the dtbs, not the rest.
<Guest57550>
dang it
<Guest57550>
I have iwlwifi loaded
ThatOtherGuy has quit [Quit: OI GIT, WHERE YA GOIN?]
martingale has quit [Read error: Connection reset by peer]
ThatOtherGuy has joined #nixos
martingale has joined #nixos
<Guest57550>
ok, maybe I'm just missing whatever components of KDE show the network management interface
<Guest57550>
oh, networking.wireless and networking.networkmanager are mutually exclusive >_>
simukis has quit [Ping timeout: 264 seconds]
Ariakenom has quit [Quit: Leaving]
_t_a_ has joined #nixos
<_t_a_>
Howdy, could someone using bspwm and / or home manager send me their config to have a look through?
chessai has quit [Remote host closed the connection]
knupfer1 has joined #nixos
knupfer has quit [Ping timeout: 252 seconds]
knupfer1 is now known as knupfer
freeman42]NixOS has joined #nixos
freeman42x]NixOS has quit [Ping timeout: 256 seconds]
freeman42]NixOS has quit [Ping timeout: 256 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs has joined #nixos
thblt has quit [Remote host closed the connection]
thblt has joined #nixos
Tritlo has joined #nixos
knupfer has quit [Ping timeout: 260 seconds]
<Tritlo>
Greetings! How can I upgrade from 1.11 to 2.0 while keeping things intact?
<vaibhavsagar>
Tritlo: which OS are you running?
<Tritlo>
OS X 10.11
<vaibhavsagar>
AFAIK you can run `nix-env -i nixStable2`
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs has joined #nixos
mbrgm has quit [Ping timeout: 260 seconds]
<Tritlo>
hmm, I get `>>= nix-env -i nixStable2 \n error: undefined variable ‘placeholder’ at /nix/store/20dnjvnp91wk58sw33z8ri9vqh59n33r-nixpkgs-18.09pre133932.ee28e35ba37/nixpkgs/pkgs/development/libraries/pipewire/default.nix:37:46`
<Tritlo>
Do I need to fetch from some pre-2.0 channel}
<lejonet>
siiigh, I've gotten a nscd and dhcpcd service that seems to be stuck in some idiotic infinite loop, they'll try and start, fail, try again, repeat ad infinitum, so I cannot get into my sodding system
<Tritlo>
Ok sweet, it worked. I managed to install nix-2.0, and then ran nix upgrade-nix, which I guess installed a more fitting version?
<rotaerk>
how do I make it such that vulkan-loader will be installed from the perspective of a nix-shell shell
<lejonet>
oh, apparently its a new systemd that is messing with stuff
<rotaerk>
vulkan-loader is a system dependency of the vulkan-api haskell package ... so it should be there
<rotaerk>
but within nix-shell, if I run vulkaninfo, it tells me it's not installed, and that I should do nix-env -iA nixos.vulkan-loader
<rotaerk>
but I don't want to depend on something being installed outside my default.nix
<clever>
rotaerk: nix-shell -p vulkan-loader
<clever>
rotaerk: or add it to your buildInputs
<rotaerk>
hmm thanks, lemme lookup buildInputs
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has joined #nixos
lukec has quit [Ping timeout: 276 seconds]
xcmw has joined #nixos
<Tritlo>
uh oh
<Tritlo>
I ran nix-collect-garbage -d, and now my .nix-profile is missing
<rotaerk>
hmm clever, any suggestions as to *where* I should add it to buildInputs? I tried wrapping that last clause (lines 37 through 41) in parentheses, and then doingg this after it: .overrideAttrs (oldAttrs: rec {buildInputs = oldAttrs.buildInputs ++ [ pkgs.vulkan-loader ];}) doing
<rotaerk>
didn't work
<rotaerk>
(minus that "doing" ... typo)
<clever>
rotaerk: can you gist your full default.nix file?
<clever>
Tritlo: what does .nix-profile point to?
semilattice has quit [Remote host closed the connection]
<Tritlo>
.nix-profile points to .nix-profile-1-link which points to /nix/store/fyfd2wccmfdj8s1sdj1j43hi5419i1h3-user-environment, which doesn't exist
<clever>
Tritlo: thats not what it should have been pointing to
<clever>
Tritlo: the profile link is supposed to point to a numbered profile link, which then points into the store
jperras has quit [Ping timeout: 268 seconds]
<Tritlo>
right, but how does that get created? I can't install anything, since nix-env -qa can't find anything to install
<clever>
that means you need to add a channel
<Tritlo>
and nix-channel --update doesn't seem to fetch anything, even though I have a channel in nix-channel --list
<clever>
what do you have in ~/.nix-defexpr/ ?
lord| has quit [Ping timeout: 264 seconds]
<Tritlo>
a channels and channels-root
<Tritlo>
*channels_root
<clever>
and then inside each of those?
<Tritlo>
inside channels is `binary-caches manifest.nix nixpkgs-18.03-darwin` and inside channels_root links to `/nix/var/nix/profiles/per-user/root/channels`, which is non existent
schoppenhauer has joined #nixos
<clever>
Tritlo: try using nix-channel --remove and --add to remove that nixpkgs-18.03-darwin channel, then re-add it with just the name nixpkgs, then --update
lord| has joined #nixos
pkill9 has quit [Ping timeout: 256 seconds]
<clever>
Tritlo: also, scripts exist that just auto-install and configure everything
<Tritlo>
clever: right, I was trying to upgrade my 1.11 install without nuking it
contrapumpkin has joined #nixos
<clever>
that can be done with just nix-env -iA nixpkgs.nixStable2 i believe
<Tritlo>
that's what I did
<Tritlo>
then I ran nix upgrade-nix, then nix optimise-store and then nix-collect-garbage -d and then my .nix-profile had disappeared
<clever>
its possible that your .nix-profile had never been right, and this is the first time you did a GC?
<Tritlo>
hmm, maybe
<Tritlo>
But I don't think so, I was using the .nix-profile/bin/zsh path to start my shell
<clever>
that can work even if the profile is in the wrong place
<Tritlo>
I don't remember fiddling with it
<Tritlo>
but I was running version 1.11.4, so I must have set this all up quite a while ago
owickstrom has quit [Remote host closed the connection]
<rotaerk>
hmm weird... with that change, vulkaninfo goes from showing that vulkan-loader is not installed, to displaying a bunch of vulkan information, but that information says that no validation layers are available
owickstrom has joined #nixos
<rotaerk>
but if I go outside the nix-shell, and do nix-env -iA nixos.vulkan-loader, and then run vulkaninfo, it *does* show the validation layers are available
krey has joined #nixos
<rotaerk>
I wonder how vulkan-loader inside nix-shell is incomplete
<clever>
rotaerk: strace, and other debug logs may explain that
blankhart has quit [Read error: Connection reset by peer]
<rotaerk>
which says "You can further customize the installation directories by using the CMake variables CMAKE_INSTALL_SYSCONFDIR to rename the etc directory and CMAKE_INSTALL_DATADIR to rename the share directory."
<rotaerk>
so it thinks SYSCONFDIR is etc and DATADIR is share, it goes to the former for the explicit_layer.d, so that's where nixpkgs should put it
jperras has quit [Ping timeout: 268 seconds]
jb55 has joined #nixos
<unlmtd>
can I get nix operations to output download speed ?
tt has quit [Quit: WeeChat 2.0.1]
<rotaerk>
unlmtd, I just ran a nix-build, and I see a bunch of downloads listed in the output
<rotaerk>
one of the pieces of info it indicates is tthe speed
lambdamu has quit [Ping timeout: 264 seconds]
<tomberek>
what is the right way to test a package that will connect to a port? other ecosystems provide a port via a PORT env variable. Is something like that available?
<unlmtd>
rotaerk: then youre probably not using nix v2
<rotaerk>
nope, nix-build's version is 1.11.14
<rotaerk>
pretty sure I did a system update since 2.0 was released though ...
<unlmtd>
the new version did away with a lot of output (which I like) but living with unstable internet bw, its good to know wether I should sometimes wait or not.
<rotaerk>
is it not in nixos yet?
<unlmtd>
although within a few weeks Ill be running my own binary cache locally
<unlmtd>
not a big deal
<unlmtd>
rotaerk: nixos has many channels
<unlmtd>
are you on unstable?
<rotaerk>
nope
<rotaerk>
guess that's why
<unlmtd>
theres a nixos option to choose your nix version
Fare has joined #nixos
<{^_^}>
[nixpkgs] @jwiegley pushed to master « Mark some Emacs packages as no longer broken »: https://git.io/vx6V4
ericsagnes has joined #nixos
srdqty has quit [Quit: WeeChat 1.9.1]
srdqty has joined #nixos
semilattice has joined #nixos
<semilattice>
So, if I have quassel in my system packages, I can use it just fine, but when I use krunner, krunner can't start it. But even if it's there and I then run nix-env -iA nixos.quassel, suddenly it works with krunner
jb55 has quit [Ping timeout: 256 seconds]
hamishmack has quit [Quit: hamishmack]
<semilattice>
so I'm a bit confused what the difference is there, it seems like it's because the ownership is different?
<rotaerk>
Forking NixOS/nixpkgs. It should only take a few seconds. ... ... "Holy shit!" -- GitHub
<clever>
semilattice: all packages installed with nix are owned by root
kerrhau has quit [Ping timeout: 248 seconds]
<semilattice>
yeah... I don't know how owners work with symlinks though
<clever>
semilattice: its not likely that the owner is at play
<semilattice>
Okay, thanks.
jperras has joined #nixos
jperras has quit [Ping timeout: 268 seconds]
<elvishjerricco>
Is there a good way to force Nix to use a specific remote builder for a build?
<elvishjerricco>
aside from copying the .drv and running nix-store -r manually
<clever>
none that i know of
<clever>
other then the supported feature stuff
<elvishjerricco>
Asking because I'm interested in making `nixos-rebuild` use `nix build` in order to get the nice one-line output, but it needs to support building on a specific machine
<elvishjerricco>
semilattice: That will make those builders available, but won't force it to use them if it doesn't have to
<semilattice>
it looks like you can use the features for that
<semilattice>
you'd add requiredSystemFeatures = [ "somearbitraryname" ] to the derivation, then add the feature "somearbitraryname" to the remote machine?
MP2E has quit [Remote host closed the connection]
<edef>
also see nixos-rebuild --build-host
<clever>
semilattice: though that would require an override to every single derivation, causing new issues
<semilattice>
yeahhh
<semilattice>
I'm not sure what it considers your current machine to be at, but maybe you can set the speed factor of the remote machine to 2
<edef>
build-host is my favourite feature of all time, it just nix-copy-closure's the drv and builds the whole system derivation remotely
alhariel has quit [Ping timeout: 240 seconds]
Rusty1_ has quit [Quit: Konversation terminated!]
sanscoeur has quit [Remote host closed the connection]
alhariel has joined #nixos
alhariel has quit [Remote host closed the connection]
<elvishjerricco>
edef: `--build-host` is exactly what I'm trying to facilitate :P I'm looking into making `nixos-rebuild` use the new one-line output of `nix build`, but `--build-host` means I need to find a way to force the build to run on another machine and still give that nice output
<lostman>
is it possible to use nix to statically link musl? does it guarantee that there isn't something somewhere that is going to get linked against glibc?
<lostman>
I'd like to produce statically linked executables like if I was building in alpine
jperras has quit [Ping timeout: 264 seconds]
<vaibhavsagar>
lostman: this is actively being worked on
<elvishjerricco>
sphalerite: What NixOS version are you on? Ever since switching to 18.03 I can't seem to get rid of screen tearing
<sphalerite>
elvishjerricco: I'm still on 17.09 and probably won't have that issue anyway since this is a laptop where the primary graphics are integrated intel stuff
<sphalerite>
sorry :p
<elvishjerricco>
no worries. Must be something specifically different between 18.03 and 17.09, so can't be that hard to track down
alex`` has joined #nixos
<{^_^}>
[nixpkgs] @vbgl opened pull request #38319 → ocamlPackages.ocamlnet: fix build with OCaml 4.06 → https://git.io/vx6is
jqq has joined #nixos
<jqq>
When I look at `localeEncodingName` in `GHC.IO.Encoding.Iconv` in a nix-shell, I see `ANSI_X3.4-1968` despite the fact that `locale` returns all `en_US.UTF-8`. Does that make sense to anyone?
<jqq>
Curiously, the `hGetContents` that throws an error when invoked in a nix-shell does work during a nix-build
ma27 has joined #nixos
jperras has joined #nixos
<clever>
jqq: try running locale from nix-build?
<jqq>
Same as nix-shell (i.e. `en_US.UTF-8`)
<jqq>
err, not quite the same
<jqq>
LANGUAGE is unset and LC_ALL is also set
<jqq>
I'll try changing those
<clever>
you might also need glibcLocales in the inputs
<jqq>
Making those final adjustments also didn't fix things
<jqq>
Did try glibcLocales. Didn't seem to make a difference
<jqq>
Though I guess I can try it in tandem with these env var tweaks
jperras has quit [Ping timeout: 276 seconds]
<jqq>
Nope. `nix-shell -p glibcLocales stack` consistently gives me `ANSI_X3.4-1968` from `localeEncodingName` in `stack ghci --nix`
<clever>
nix-shell leaks a lot of things
<clever>
and stack --nix calls nix-shell already
sanscoeur has joined #nixos
ashgillman has joined #nixos
<jqq>
ooh. Maybe that last part is why?
<jqq>
Maybe the shell stack is creating doesn't have a properly set locale
<vaibhavsagar>
jqq: which OS are you using?
<vaibhavsagar>
"Note: On macOS shells are non-pure by default currently. This is due soon to be resolved locale issues. So on macOS you'll need to be a bit more careful to check that you really have listed all dependencies."
<norfumpit>
anyone else running unstable channel having issues with gnome extensions? specifically, user themes extension doesn't work for me, says schema could not be found
<tilpner>
How do you verify it isn't being updated?
<pstn>
I messed up the command initially (no ${pkgs.pass} and it's still in the logs this way. Also when I do a switch, the drv files are being updated, but not the actual units: https://share.xndr.de/Iepho7tahhoo0aiThee4rah1ahf6th/switch
ericsagnes has quit [Ping timeout: 260 seconds]
<tilpner>
Oh. I was going to point at systemd.services.<name>.reloadIfChanged
norfumpit has quit [Quit: Lost terminal]
<pstn>
restartIfChanged is set to true by default anyway.
<tilpner>
So when you build two system generations, $SYSTEM/etc/systemd/system/offlineimapPhilipp.service matches each other?
<tilpner>
(Also, you are aware of services.offlineimap, right?)
<tilpner>
I guess it doesn't allow setting the config yet
<pstn>
Yeah, services.offlineimap doesn't cut it for me.
vidbina has quit [Ping timeout: 276 seconds]
GiGa has joined #nixos
GiGa has quit [Changing host]
GiGa has joined #nixos
<GiGa>
Hi all
<pstn>
Also: Yes, when I build a new system, the service doesn't change.
<GiGa>
Looking at updating the Jetbrains packages
<GiGa>
There's a script that updates the default.nix
knupfer has joined #nixos
jperras has joined #nixos
<GiGa>
As a result, is it necessary to commit each update as a single application update, or can they all be submitted as one please?
<pstn>
Got it. My offlineimap fell back to .offlineimaprc because the args didn't do what I though.
<pstn>
+t
jrolfs has quit [Ping timeout: 264 seconds]
taktoa has joined #nixos
ma27 has quit [Ping timeout: 252 seconds]
Turion has joined #nixos
<tilpner>
That doesn't explain why it didn't get rebuilt
<tilpner>
Or reloaded
<Turion>
I got a ten year old mac book from a friend, and I want to install something like nixos on it. I don't really understand, what options I have. I can somehow install nix on macOS. I could somehow put a linux kernel on the machine, but I don't know whether it works like on a PC, or I could go with darwin somehow, but I can't find a decent manual for that.
ma27 has joined #nixos
<tilpner>
What architecture does the CPU have?
alex`` has quit [Remote host closed the connection]
<pstn>
Any idea what the most clean systemd service definition for "user has a running desktop session" is?
<tilpner>
pstn - Enabling a user service, maybe
alex`` has joined #nixos
<pstn>
tilpner: I moved away from those because they are notoriously fickle.
<tilpner>
They are? I didn't get that impression so far
mounty has quit [Ping timeout: 256 seconds]
<Yaniel>
ten year old macbooks would be x64
<pstn>
There seems to be a `user@uid.service` which is approximately what I want.
<Yaniel>
so nixos should be a piece of cake
<Turion>
Yaniel: So I could just install it like I did on any other laptop?
<Turion>
(Which would be great already)
<Turion>
Then why does darwin exist, and how does it work?
<Turion>
I mean I know darwin exists independently of nixos, i mean why does nixos support darwin (somehow)?
<Yaniel>
it might work directly or you might have to set up a partition via bootcamp first
<Yaniel>
you can install nix on macos AFAIK
justanotheruser has quit [Ping timeout: 276 seconds]
<Yaniel>
and darwin is just for building nix packages for macos
<Turion>
Yaniel, so darwin + nix doesn't give a usable laptop?
<jluttine>
what do people here use for ripping audio CDs to Flac?
<Yaniel>
darwin is just a build target AFAIK
<Turion>
jluttine, k3b
<Yaniel>
jluttine: XLD (mac only though), would use morituri but it always fails on the last track
<Yaniel>
or maybe whipper if someone replaced morituri in nixpkgs with it
<Turion>
ok, I see :) I somehow believed it's like nixos with the linux kernel and some basic services replaced
<jluttine>
perhaps i can just manually copy paste that command from K3b source
<Turion>
I basically want a free system where all packages are managed through nix, with kde or xmonad as graphical desktops
<Yaniel>
jluttine: what about morituri? or do you need a gui
<jluttine>
i'd like gui
<Turion>
So it seems like darwin + nix doesn't give that? Then nixos on a macbook it shall be
<Yaniel>
well nix on macos gets kinda there
<Yaniel>
no kde and no kernel though
<{^_^}>
[nixpkgs] @rvl opened pull request #38326 → nixos/buildkite-agent: fix variable expansion in hook scripts → https://git.io/vx67Y
<Turion>
Yaniel, but isn't most stuff in macOS proprietary, though?
<Yaniel>
depends on what stuff you mean
<Yaniel>
there's a lot of standard(ish) *nix tooling
<jluttine>
Turion: how have you configured K3b to use Flac as an encoder?
<Turion>
jluttine, I don't remember whether I ever ripped CDs to FLAC under nixOS... I did that back with Gentoo
<Yaniel>
oh, even launchd is opensource it seems (from BSD world)
<Turion>
Yaniel, the graphical desktop environment
<jluttine>
Turion: ah, ok!
<Yaniel>
yeah the desktop is proprietary
<Turion>
So if I couldn't get rid of that, I'd rather go with nixos all the way
alexteves has joined #nixos
<Turion>
(I don't know whether darwin would be faster than linux, but I would have expected it)
Guanin has joined #nixos
<Yaniel>
sure, that should be possible much in the same way as on any machine
<Yaniel>
just read up on the UEFI on those machines first
<Yaniel>
IIRC it has some pecularities
qknight has quit [Quit: Lost terminal]
<Turion>
Very good, thanks Yaniel :) I'll try it
alex`` has quit [Ping timeout: 256 seconds]
<Turion>
Oh no... that's something I don't understand well yet
<Yaniel>
the arch wiki has some good info on that I think
<Turion>
OK, will have a look!
alex`` has joined #nixos
<Turion>
jluttine, can you somehow run k3b with a lot of verbose flags in order to see whether it finds flac in its path?
<jluttine>
Turion: i added the encoding command manually and got an error: "Could not load libcdparanoia."
<Yaniel>
you could also check what PATH the wrapper script sets
jperras has joined #nixos
<Yaniel>
ohh wait, the fixup phase does not add flac to the binpath
<Yaniel>
not sure if that is necessary
<Yaniel>
see lines 35-40 in the nix expression
jperras has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @Ma27 opened pull request #38327 → react-native-debugger: init at 0.7.18 → https://git.io/vx67y
mounty has joined #nixos
GiGa has quit [Quit: Leaving]
orivej has quit [Ping timeout: 264 seconds]
ericsagnes has joined #nixos
<bkchr[m]>
Pascal Bach: my raspberry pi bootloader is working :)
vidbina has joined #nixos
<taktoa>
is it possible to build `haskellPackages.base` with a modified `mkDerivation`?
<taktoa>
I know that `base` is a boot package so it's set to `null`
Guanin has quit [Ping timeout: 260 seconds]
jperras has joined #nixos
jperras has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
orivej has quit [Ping timeout: 268 seconds]
xcmw has joined #nixos
coot has quit [Quit: coot]
Turion has quit [Ping timeout: 256 seconds]
das_j has joined #nixos
<das_j>
Hey everyone, I'm trying to overlay the zfs package (linuxPackages.zfsUnstable) with a custom src. Does anyone know how to override this attribute?
<das_j>
It's a little more complicated because zfsUnstable just calls 'common', which contains the src
* tilpner
thinks common should be used via lib.makeOverridable
<tilpner>
But overrideAttrs on src should work too
xy2_ has joined #nixos
Turion has joined #nixos
<tilpner>
You would use linuxPackages.zfsUnstable.override { rev = ...; sha256 = ...; } vs linuxPackages.zfsUnstable.overrideAttrs { name = ...; src = fetchFromGitHub { ... }; }
<tilpner>
But you might have to update Mics patches either way, so it gets more annoying
ShalokShalom has joined #nixos
<ShalokShalom>
hi there
<ShalokShalom>
how does nix solve the issue around multiple DEs?
<ShalokShalom>
since I am today on KaOS, a distro which focuses on one DE, which really pays off
<tilpner>
The issue?
<ShalokShalom>
yeah
<tilpner>
NixOS has modules for several DEs, which you can combine at will
<pstn>
ShalokShalom: Nix itself is cli only, so it doesn't care about DEs and doesn't need integration. Other than that: They are there and kept pretty close to upstream. Also nix is the only distribution that handles *removing* DEs well.
<ShalokShalom>
and what do you do, when, let's say package version 1 works fine with Gnome and while version 1.1 is fine with KDE and both show issues with the other version around?
<{^_^}>
[nix] @AmineChikhaoui opened pull request #2036 → Make the TTL for disk cache configurable → https://git.io/vx6F3
<ShalokShalom>
there are literally hundreds of packages who interact
<ShalokShalom>
to test them all with different DEs seems questionable
migy has quit [Ping timeout: 264 seconds]
<pstn>
Never seen that problem arise and the proper place to fix it would be upstream IMHO. Other then that: nix is collision free, so you could have both packages in your system at the same time.
<MichaelRaskin>
GUI software that doesn't work with IceWM is garbage anyway, so it gets fixed in whatever configuration someone is willing to fix it.
<ShalokShalom>
oh fine
<ShalokShalom>
so I can use nix packages also in other distributions?
<ShalokShalom>
I read that in your homepage
<das_j>
tilpner: Thank you, but now it complains that configFile is missing. Where would I define that?
<MichaelRaskin>
ShalokShalom: yes, for sure
<ShalokShalom>
Currently, Disnix includes a SSH wrapper which can be used to access remote machines through a SSH connection.
<ShalokShalom>
its useful for scenarios where a broken pipe is critical: https://mosh.org/
<ShalokShalom>
since it copies/caches/mirrors :)
<ShalokShalom>
MichaelRaskin: thanks a lot
<MichaelRaskin>
Why would a broken pipe be critical
<MichaelRaskin>
I mean, Nix _tries_ to work on improving atomicity.
<ShalokShalom>
because it nerves you ;)
<MichaelRaskin>
ShalokShalom: if you want GUI packages that depend on OpenGL, well, first of all remember to search the Nixpkgs manual in case of problems.
<tilpner>
das_j - configFile is not a derivation attribute
<ShalokShalom>
So, in order to use NixOS packages on my distribution, I can simply install the manager and thats it?
<MichaelRaskin>
There are some tricks to do to make sure OpenGL works.
<ShalokShalom>
I see
<MichaelRaskin>
For CLI stuff and simple GUI stuff — yes, for sure, I have used it like that.
<tilpner>
das_j - And it's just the name. Just remove it :/
<tilpner>
ShalokShalom - You can use Nix package on your distribution. Using NixOS modules will be a lot harder
<MichaelRaskin>
If OpenGL is critical — the problem is that you sometimes need to load proprietary libGL imlementation, and there is a question of what glibc it is linked against
<ShalokShalom>
you mean OpenGL applications on other distributions tend to make some effort to implement?
<ShalokShalom>
I see
<MichaelRaskin>
The problem is that libGL is a library, but the choice of implementation is _actually_ hardware-dependent. Sometimes.
<das_j>
tilpner: So where else do I take the attribute from? I don't want to hardcode it because I also need the userspace components later
<tilpner>
das_j - You don't take it from anywhere, just remove it from the name
<MichaelRaskin>
If you want to use local builds, please do a full install with nix-daemon as root and enable sandboxing.
<avn>
ShalokShalom: if you load libGL built with glibc (and libstdc++) into app built with musl and libc++, you need to be ready to suprises
<ShalokShalom>
ok..
<tilpner>
das_j - The actual derivation will still be the same, you're just overriding the name
<MichaelRaskin>
Well, unless you are willing to submit patches for builds that are looking in /usr/include even when explicitly told not to do that
<ShalokShalom>
is it sane to suggest, that such packages get a note in their build script?
<tilpner>
das_j - Your value of configFile for the name has no influence on what will be compiled
<avn>
MichaelRaskin: fyi, we need to have safe offscreen libgl configuration, safe to include to buildInputs, if any package want to render something on build phase
<ShalokShalom>
is there a online package viewer?
<tilpner>
das_j - It's not pretty, but it's less ugly than copying all of zfs/default.nix and overlaying that
<ShalokShalom>
it seems impossible to reach the package viewer at all
<ShalokShalom>
at least from mobile
<MichaelRaskin>
Another gotcha is that there are three manuals: Nix, Nixpkgs, NixOS
<MichaelRaskin>
Re: using NixOS services on non-NixOS distributions: this is actually not that hard for simple services, once you know Nix well and find the magic incantation
<MichaelRaskin>
(without knowing Nix language well the magic spell won't be easy to use)
<ShalokShalom>
is there some way to politely suggest upgrades?
<infinisil>
ShalokShalom: Open an issue if you can't do it yourself
<ShalokShalom>
this here seems even maintained by you:
<das_j>
tilpner: Sorry, but now it cannot find spl. I put 'spl = super.linuxPackages.spl;' into the callPackage call, but it's ignored. But the package takes an spl parameter. Do I specify it at the wrong location?
<ShalokShalom>
ok
<ShalokShalom>
4.2 is out since over a years or so
<ShalokShalom>
what is the general update policy?
<unlmtd>
who knew recompiling libinput would take all day? I suddenly get this urge to purge qt out of my sytem again
<ShalokShalom>
:)
jperras has quit [Ping timeout: 240 seconds]
<tilpner>
das_j - Try with name = "zfs-trim"; and without specifying spl
Turion has left #nixos [#nixos]
<das_j>
tilpner: I specified a name without any variables, and no spl, and it fails at '"--with-spl=${spl}/libexec/spl"' because spl is null
<infinisil>
ShalokShalom: People need to update stuff themselves (up to recently at least, there's a bot now that opens PR's automatically), so stuff gets updates whenever people are annoyed over having a too old version
<MichaelRaskin>
And even when, someone needs to look at bot's output
<ShalokShalom>
I see
<ShalokShalom>
dotnetcore seems absent at all yet
<MichaelRaskin>
For some packages I actually have scripts to update, but still, requires dedicating some time to pick what reverse dependencies to check…
<ShalokShalom>
its the new mono
Turion has joined #nixos
<ShalokShalom>
build and maintained by ms itself
jophish_ has joined #nixos
<ShalokShalom>
I see
<ShalokShalom>
the casual issue with packaging :)
<infinisil>
Oh and the bot doesn't cover every package, "only" 66% from what I've heard on the mailing list
<ShalokShalom>
I see
<Turion>
How do I *cleanly* use xmobar under nixos? (Haskell dev, nixos newb, still confused after half an hour of reading about xmonad & xmobar)
<infinisil>
Turion: Using it myself
blankhart has joined #nixos
<ShalokShalom>
so, the NixOS itself also gets updated when people are annoyed with the old versions?
<tilpner>
das_j - Use linuxPackages.callPackage instead of pkgs.callPackage
<Turion>
infinisil :D yay do you have your configuration.nix and/or xmonad.hs online by any chance?
<ShalokShalom>
at least Elm is current :D
<tilpner>
das_j - Or actually, why are you callPackaging in the first place? Shouldn't super.linuxPackages.zfsUnstable work?
<Turion>
(All guides I could find do horrible things like building xmobar in home)
<infinisil>
Turion: I do, hold on, linking to the relevant parts..
<das_j>
tilpner: It should, but I'm planning on replacing zfsUnstable
alex`` has quit [Quit: WeeChat 2.1]
<ShalokShalom>
also Erlang and there is even lfe in the repos ^^
<das_j>
But for now I changed the name so I can see if my code is actually being used
<MichaelRaskin>
Yeah, by the fact that 4.0 is still the default even though 4.1 is packaged and 4.2 is out upstream, you can deduce how much it is used…
<ShalokShalom>
what I mean
<ShalokShalom>
:)
asuryawanshi has quit [Remote host closed the connection]
<Turion>
infinisil, ah, well, here it's already getting complicated :/ Do I want/need home-manager?
<ShalokShalom>
I just suggested to switch from Slack to something like Matrix with a bridge between them
<ShalokShalom>
some responded nice and with a no
<Turion>
I mean, it sounds good, and eventually I'm going to check it out, but what if I only want a status baar?
<ShalokShalom>
some responded like I planed a thread against their family
<infinisil>
Turion: You can just have xmobar start in you ~/.xprofile or something, just needs to be running for this to work
ma27 has quit [Ping timeout: 256 seconds]
<ShalokShalom>
they have obviously no clue, how many talented hacker they keep out with this attitude :/
alexteves_ has joined #nixos
<ShalokShalom>
thats the difference between free software and open source
ma27 has joined #nixos
<ShalokShalom>
their source is open, while not their mind..
<infinisil>
Turion: Oh, and my xmobar segfaults/crashes every so often, that's why i put it into a systemd service, so that I can easily restart it when it does
<infinisil>
Haven't seen it crashing in a while though, maybe that's fixed
<Turion>
infinisil: Wow. Isn't xmobar written in Haskell? How does it crash?
<infinisil>
Yeah.. No idea, but it does. Quiet disappointing
<Turion>
I don't have an xmobar executable, I can't even start it from the console
alexteves has quit [Ping timeout: 256 seconds]
<Turion>
(Also I don't really understand why things like these aren't part of xmonad proper... I mean why a separate application?)
<infinisil>
Unix philosophy! "Do one thing and do it well"
goibhniu has joined #nixos
<infinisil>
xmonad is a very good example, just a couple thousand lines of code, all extensions and stuff are in xmonad-{contrib,extras} and others can integrate with it
Tarinaky has joined #nixos
<infinisil>
Turion: Just installing xmobar might be the easiest thing: `nix-env -iA nixos.haskellPackages.xmobar`
<Turion>
infinisil, great idea not to bake a status bar into xmonad monolithically, but I find the integration of status bars poor
<infinisil>
Turion: What integration is there to it? xmonad just needs a way to tell xmobar what to display, and there's plenty ways to do that
<Turion>
Ah, yes, installing that package certainly improves things! I thought xmobar is installed when I have enableContribAndExtras = true
<infinisil>
Yeah it's not part of xmonad
<Turion>
infinisil, something like launching and restarting xmobar when it crashes ;)
<infinisil>
Eh that's not xmonad's job, xmonad is just a WM
<infinisil>
And people might want to use different status bars
<Turion>
Yes sure, that doesn't contradict what I mean
<tilpner>
Is there any way to override/shim a module during module evaluation?
<tilpner>
I'm trying to raise the override level of that entire modules config without copying it into my tree
rihards has joined #nixos
<infinisil>
Again, unix philosophy: It's not the WM's job to restart stuff, but rather the init system's job (imo at least)
silver has joined #nixos
<infinisil>
A window manager does one thing: manage windows
<infinisil>
That's why xmonad's source code is just 2656 lines
alex`` has joined #nixos
<MichaelRaskin>
init system does one thing: takes over the system…
Tarinaky has quit [Quit: Changing server]
Tarinaky has joined #nixos
<Turion>
well, then there should be at least a nixos thing like enableXMobar = true..?
<infinisil>
I could've said systemd, but init systems probably shouldn't take over everything :)
<tilpner>
My current attempt is tx0.co/f , but it fails with "cannot coerce a function to a string"
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Turion>
infinisil, but a lot of desktop environments have status bars and launch some startup apps
<MichaelRaskin>
I would say that ideally a supervisor for user services should be separate from the init system (even if using the same daemon monitoring program)
<infinisil>
Turion: It's a bit hairy, because NixOS really can only manage system wide things, but your X session is per-user. The most it can do is run a default DE/WM if the user hasn't set it themselves. xmobar and other user space stuff is supposed to be per-user
<unlmtd>
infinisil: well most people pull some contribs
<Turion>
infinisil, ok that makes a lot of sense. Maybe I should use home-manager. But even then it seems like such a big mess to just get a clock displayed in Xmonad.
<infinisil>
Xmobar*
<unlmtd>
I just use a script to symlink my dotfiles in place
<infinisil>
I think you can just put `xmobar &` in your ~/.xprofile and use the xmonad and xmobar lines i linked earlier to make it work
<Turion>
Well, probably ;) but then, I'm using Linux for more 10 years and things like these are still an issue? Gotta go back to KDE maybe...
<{^_^}>
→ 4c21180a by @dezgeg: nixos/sd-image: Make it more similar to iso-image.nix
<{^_^}>
→ 181e0675 by @dezgeg: nixos/release.nix: Add Hydra job for AArch64 SD image
<infinisil>
Well yeah, if you want a super big DE where everything is made to work with everything else, then sure. But if you want to customize everything then you need to set it up
<Turion>
I can't get a clock statusbar to be displayed without installing a lot of extra things I don't understand
<Turion>
Sure, and I'll gladly do that, and I greatly appreciate your help
sigmundv has joined #nixos
<infinisil>
That's part of linux, understanding how to set up new programs to do something you want
<Turion>
It's just, I moved to nixOS because I hoped I could somehow organise my system without cluttering up things
<tilpner>
The documentation for types.optionSet suggests to use configOf, but nixpkgs doesn't contain that word. What does it mean?
<tilpner>
The trace suggests to use submodule, but I don't know how to add options to a submodule from a foreign module
<infinisil>
Turion: I mean, I have all my configuration in that repo i linked, user stuff (with home-manager) and system stuff, all deployed with a single nixos-rebuild
<infinisil>
tilpner: You can't, submodules are closed in a sense (I'm pretty sure)
<Turion>
And that's pretty impressive!
<tilpner>
infinisil - nixos/modules/services/networking/ssh/sshd.nix adds e.g. authorizedKeysFiles via the deprecated "options" argument to mkOption
<Turion>
I guess I'm gonna try home-manager, although it says "it may fail catastrophically"
<tilpner>
infinisil - I'm trying to find out what the non-deprecated way is
<infinisil>
Turion: And I could write an xmobar home-manager module so it would be even easier to get it to work
<das_j>
tilpner: Thank you, now it works
<tilpner>
das_j - Was it just linuxPackages.callPackage?
<das_j>
Mainly, yes
<das_j>
wait
<Turion>
infinisil, it sounds like that would be the right way to go!
<infinisil>
Turion: Yeah I think this warning could be taken out, it's been working great for a lot of people so far, and I never heard of anybody having a "catastrophical failure"
<Turion>
If there was any documentation about the inner workings of home-manager, I might try that
<das_j>
Of course, I also had to fix the patch....
<infinisil>
tilpner: Oh interesting, I might be wrong then
<Turion>
This is a general problem (at least one that I experience in nix*): One can install it, yes, use it, yes, but how the package repository works, is poorly documented
<tilpner>
das_j - Huh, I feel like that shouldn't work. o.configFile shouldn't be a thing O.o
<das_j>
Btw, that second part with the userspace components. It's an attempt to not copy down everything from above. Do you think this is somehow possible (not like this of course)
<das_j>
o.configFile works just great :)
<Turion>
So if I want to create or fix a nontrivial package that interplays with other stuff, I have to read barely documented source code and github issues
<das_j>
I don't know why
<Turion>
infinisil, thanks a lot for your help! I'm AFK now, might try all of the stuff later
<infinisil>
Turion: Yeah that's a good point, docs are something to improve
<infinisil>
But I find Nix code to be pretty easy to read and understand
<infinisil>
nixpkgs is a bit of a mess though
<infinisil>
Turion: Sure, ask me if you have trouble :)
<{^_^}>
[nixpkgs] @abbradar opened pull request #38333 → wireguard service: use scripts instead of ExecStarts/Stops → https://git.io/vxie3
rauno has joined #nixos
blankhart has joined #nixos
jperras has joined #nixos
Turion has joined #nixos
<vcunat>
tazjin: not a specialized one for this, I think
<vcunat>
there's `removePrefix` and `removeSuffix`, but that's probably not directly useful for your case
<tazjin>
vcunat: seems like it, I only need it for trailing newlines so I used `lib.removeSuffix`
<tazjin>
which worked fine
<tazjin>
thanks :)
<vcunat>
well, you need to "iterate" it to remove multiple occurences
<tazjin>
vcunat: fortunately this is to deal with one shitty CLI tool that insists on adding a single trailing newline to its output, so it's a predictable use-case
<tazjin>
"fortunately"
<vcunat>
right, seems good enough in this case
jperras has quit [Ping timeout: 240 seconds]
erasmas has joined #nixos
sigmundv has joined #nixos
zarkone has joined #nixos
pxc has joined #nixos
<Turion>
Why does home-manager not have a channel, like e.g. musnix does?
<Turion>
Or why is it not a package in nixpkgs?
<infinisil>
Turion: it is in nixpkgs
sigmundv has quit [Ping timeout: 256 seconds]
<infinisil>
Turion: But the modules aren't
<infinisil>
They change quiet often, and having to make PR's for every single change would be awful
<Turion>
infinisil, ah ok... why does it not show up in https://nixos.org/nixos/packages.html? (I vaguely remember this happening for other packages
<infinisil>
Turion: Yeah that site only updates every half year, on every major release
<Turion>
Ahhhh
<Turion>
Ok, explains a lot, thanks ;)
<infinisil>
:)
<Turion>
Although the weather is nice I'm going to try and fix my system proper today, so don't be surprised if there are going to be a lot of completely different questions
<{^_^}>
→ 4a3881ed by R. RyanTM: veracrypt: 1.21 -> 1.22
<{^_^}>
→ cace5017 by @7c6f434c: Merge pull request #38331 from r-ryantm/auto-update/veracrypt
Adluc has quit [Ping timeout: 256 seconds]
John882 has joined #nixos
<deltasquared>
ok, just built minetest from it's nixexpr for testing purposes (I intend to modify it shortly), the resulting binary can't start because it can't load the DRI modules (this is hosted nix on another distro), what would I do here to encourage it to start?
<vcunat>
I mean, in some cases it probably can't be solved this simple.
<{^_^}>
[nixpkgs] @bjornfor pushed commit from R. RyanTM to master « woeusb: 3.1.4 -> 3.1.5 »: https://git.io/vxiLG
<vcunat>
Actually, no 100% solution exist so far, due to libGL forcing load of some libraries - and there you may run into collisions with other versions from the process that wants to load libGL.
<{^_^}>
→ 7ec2c549 by @marsam: sbcl: 1.4.4 -> 1.4.6
<{^_^}>
→ a4f03e9c by @7c6f434c: Merge pull request #38338 from marsam/feature/update-sbcl-1.4.6
abrar has quit [Quit: WeeChat 2.0]
<vcunat>
The X server is typically provided by the host OS as well.
<vcunat>
(so presumably it's compatible)
<clever>
and the nix libc has to be compatible with the opengl libs
<deltasquared>
I would have thought the interface between the xorg server and the client would be separated in terms of libs, as long as say the protocol versions are the same
ryanartecona has quit [Quit: ryanartecona]
<deltasquared>
"what's the worst that could happen?" "your machine halts and catches fire" hmm
<vcunat>
I haven't seen worse than some crashes.
<vcunat>
Usually just symbol mismatches instead of real crashes.
<deltasquared>
so which package on nix contains i965_dri.so in this instance then? the generic loaders are there but I can't find the *_dri.so modules anywhere
<vcunat>
That's distro-specific, I think.
<deltasquared>
vcunat: no, I mean nixos
<deltasquared>
(let's continue and see what happens)
<vcunat>
Ah :-) `mesa_drivers`
<{^_^}>
[nixpkgs] @vandenoever opened pull request #38340 → rsibreak: init at 0.12.8 → https://git.io/vxiq6
<deltasquared>
vcunat: welp. that's not in nixpkgs, is that a nixos specific one
<vcunat>
deltasquared: it is there
<vcunat>
nix-repl> mesa_drivers.name
<vcunat>
"mesa-noglu-17.3.6"
<vcunat>
deltasquared: be sure to identify packages by the _attribute_ names
<vcunat>
(e.g. -A flag for nix-env)
<deltasquared>
ey, I've been out of the loop a while, gimme a break ;)
das_j_ has joined #nixos
<vcunat>
:-)
<deltasquared>
hmm, mesa and mesa-noglu conflict on /etc/drirc...
<deltasquared>
I could probably take mesa out of being an explicit part of the profile
<deltasquared>
vcunat: ok, that's in place, I'm going to link the relevant store path at /run/opengl-driver and see what happens
asuryawanshi has quit [Remote host closed the connection]
civodul has joined #nixos
jperras has joined #nixos
<deltasquared>
hey, that works!
<deltasquared>
for now
<vcunat>
great
<vcunat>
periklis: OK, reported the account to github
Neo-- has joined #nixos
jrolfs has joined #nixos
jperras has quit [Ping timeout: 260 seconds]
<das_j_>
Okay, I've been able to isolate my override problem. If I override linuxPackages.zfsUnstable and use `boot.supportedFilesystems = [ "zfs" ];`, it does not use the overlay
<das_j_>
However, when using `boot.extraModulePackages = [ pkgs.linuxPackages.zfsUnstable ];`, everything works
<das_j_>
Is it possible that the override only kicks in *after* the zfs module was run?
<das_j_>
s/override/overlay/
jrolfs_ has quit [Ping timeout: 264 seconds]
<periklis>
vcunat: thx :)
<vcunat>
das_j_: there might be problem with interaction between aliasing and overrides IIRC, e.g. we have linuxPackages as alias for linuxPackages_4_14
freeman42x]NixOS has joined #nixos
jmeredith has joined #nixos
Guanin has joined #nixos
<das_j_>
vcunat: Thanks, but using linuxPackages_4_9; instead of linuxPackages doesn't work either :/
digitus has joined #nixos
<vcunat>
das_j_: and if you just set boot.kernelPackages to the overridden value instead of overriding it in nixpkgs?
<vcunat>
(that would feel a more natural approach to me)
<das_j_>
vcunat: The problem is that I'd like to use boot.SupportedFilesystems so I also get the other stuff like automatic scrubbing and snapshotting
justanotheruser has joined #nixos
acarrico has joined #nixos
ma27 has quit [Ping timeout: 256 seconds]
<vcunat>
I can't see how that conflicts, but I don't really know much about these parts.
<deltasquared>
vcunat: yep, it appears to work mostly as expected. no weird x protocol errors while I ran around in minetest
<vcunat>
:-)
<deltasquared>
not the best solution for some, as you'd need admin privileges to create the /run link
<vcunat>
I think this is a little easier with the free drivers that come with mesa.
ma27 has joined #nixos
<das_j_>
vcunat: do you know anybody or something who/that can help me?
<deltasquared>
vcunat: yeah, I imagine the proprietary ones would be a nightmare
<vcunat>
das_j_: if noone helps you here, I'd file a github issue in the nixpkgs repo
<vcunat>
I think more people watch those.
<vcunat>
And it's easier to find for anyone having a similar problem.
<das_j_>
Okay, thank you :)
<Tritlo>
what does "unpackPhase" and "buildPhase" mean in the manual? Are they keywords, or just convention?
<infinisil>
will contain the source of it, unpacked
<deltasquared>
infinisil: I won't have to declare builtins in the argument list of the expression right?
<infinisil>
Nah, that's a language builtin (as the name implies :))
* deltasquared
tries this
<deltasquared>
welp, something's happenin'
<infinisil>
As such it's fetched during evaluation, which means it's not a nix derivation, so the sandboxing restrictions don't apply
<deltasquared>
infinisil: hence the impurity I see
<infinisil>
Yea
<deltasquared>
in this case I'm just playing around with it. I might submit a proper minetest -dev expr later
<deltasquared>
it wouldn't be that hard, just change the commit. though naturally it'd have to be updated to follow the head commit
ma27 has quit [Ping timeout: 256 seconds]
<infinisil>
What are you trying to do?
<deltasquared>
infinisil: compile minetest from git master (0.5.0-dev) using nix. I wanted to become familiar with nix's (usually) reproduceable nature again
<deltasquared>
granted this one won't be, but oh well
ixxie has joined #nixos
vidbina has quit [Ping timeout: 256 seconds]
chessai has joined #nixos
<infinisil>
I see
<infinisil>
deltasquared: An alternative would be to use nix-prefetch-git
<deltasquared>
infinisil: perhaps, but I didn't want to get too involved with it just yet
<infinisil>
Which when invoked e.g. like `nix-prefetch-git https://github.com/foo/bar` will output a json file with the latest commit and sha256 hash, so you can import that from your nix code
sanscoeur has quit [Read error: Connection reset by peer]
<infinisil>
What does #nixos think of adding a NixOS assertion that makes sure that no 2 services try to bind to the same port, such that they don't fail at runtime?
<infinisil>
I'm currently implementing this, but thought I'd ask before getting too deep into it
<deltasquared>
on the surface it sounds potentially useful, though I guess the devil is, as always, in the details
<infinisil>
The devil with this is that it might be very expensive to check
<deltasquared>
if it were a case of things being called and passed a port capability (instead of them randomly binding whatever they feel like within permissions), then I guess it'd be easy to determine, because then it'd have to be explicitly configured in one place
<infinisil>
Ah yeah, every nixos service would declare which port it will bind to
<deltasquared>
infinisil: if anything, it'd be on configuration derivations to declare which port will be used for a given config
<foldingcookie>
that sounds like an unalloyed good
<foldingcookie>
make ports capabilities
<deltasquared>
foldingcookie: make everything capabilities if I had my way, but... :P
<deltasquared>
alas most programs aren't written to be e.g. inetd services
<infinisil>
foldingcookie: What do you mean?
<foldingcookie>
I'm waiting for the day when nixOS can swap out the kernel and clean up all the dead code ;)
<deltasquared>
nix-seL4
<foldingcookie>
infinisil: services should be passed the port they bind to as part of their configuration
sanscoeur has joined #nixos
<infinisil>
Yeah, but the config is often managed by nixos itself
<foldingcookie>
yes, that sounds ideal
<infinisil>
Or a lot of them have a standard port anyways
John882_ has joined #nixos
<deltasquared>
I guess it would be the responsibility of the relevant nixexprs to determine which port will be bound dependent on input config
<deltasquared>
"if not set in config.nix this program defaults to X port"
<infinisil>
This declaration of ports would only be done with services that have their config managed by nixos
<deltasquared>
fair enough
<deltasquared>
I mean you couldn't really go beyond that sanely
<infinisil>
Yeah
<foldingcookie>
one thing I've wondered about nixOS is why it doesn't support algebraic datatypes
<foldingcookie>
er, rather about nix itself I guess
<deltasquared>
would it be a function of input configuration perhaps? then it just returns an int
telent has quit [Ping timeout: 264 seconds]
John882 has quit [Ping timeout: 264 seconds]
dan_b has quit [Ping timeout: 240 seconds]
<infinisil>
foldingcookie: It does! It's just a matter of implementing them
<foldingcookie>
it seems like there are many places where there are multiple bools that aren't orthogonal, and really a sum type should be used
<infinisil>
foldingcookie: yeah
<foldingcookie>
is it practical to do this kind of refactoring today?
<infinisil>
deltasquared: Eh, kinda hard to parse all config files and hope you get the port of it right
<deltasquared>
infinisil: I mean the input config.nix
<deltasquared>
I would not recommend parsing random config files if avoidable
<infinisil>
foldingcookie: Well it needs to stay backwards compatible, but otherwise I'd love a sum type movement in the options
<foldingcookie>
re: port allocation, I would say that the enables for port-using services should require a port as an argument, and "default ports" should be forbidden
<deltasquared>
hmm, so re: nix ADTs, dynamic duck typing to the rescue it seems
<infinisil>
deltasquared: Each service would set an option such as `networking.tcpServicePorts`, e.g. `networking.tcpServicePorts.nginx = 80`
<foldingcookie>
if nix had linear/affine types, they could seamlessly provide a "no port reuse" guarantee
<deltasquared>
oh, more type theory I haven't discovered yet
<foldingcookie>
(i.e., ports come from a predefined allPorts array rather than being mere integers)
<foldingcookie>
deltasquared: it's just the idea of a value being used at most once (affine) or exactly once (linear)
<deltasquared>
it's amazing what you get into when the FP bug gets you and you start playing with haskell -_-
<foldingcookie>
static analysis is a fundamental idea, nixOS makes it possible to apply it to your OS config ;)
<deltasquared>
"will this config file explode"
<infinisil>
foldingcookie: I think a default port should be allowed when this port is hardcoded in the service
<foldingcookie>
infinisil: as long as it's still statically checked for conflicts somehow, that seems fine
<infinisil>
Alright, I'm gonna try to implement it now
<{^_^}>
→ 98d3404f by R. RyanTM: praat: 6.0.37 -> 6.0.38
<{^_^}>
→ 2f0e2376 by @gebner: Merge pull request #38335 from r-ryantm/auto-update/praat
coot_ has joined #nixos
blankhart has quit [Ping timeout: 264 seconds]
jperras has quit [Ping timeout: 260 seconds]
<infinisil>
deltasquared: foldingcookie: One more question, regarding usability: Would it be okay to use it like `networking.tcpServicePorts."80" = "nginx"`?
asuryawanshi has quit [Remote host closed the connection]
<infinisil>
Because then the implementation is super easy, but it's not as nice as `ports.80 = "nginx"` (which is not possible in nix) or `ports.nginx = 80` (possible but hard to implement)
asuryawanshi has joined #nixos
<infinisil>
Maybe `ports.tcp80 = "nginx"`? Would work well with tcp/udp
<gchristensen>
what about enp2s0tcp80 = "nginx" and enp3s0tcp80 = "varnish"
<ogle>
Shameless self plug... If you are interested in using nix in production we are hiring devops and sre roles, please check us out https://angel.co/standard-cognition
Judson1 has joined #nixos
<infinisil>
gchristensen: I don't think port bindings are per interface, right?
<gchristensen>
they are
<infinisil>
Oh
<gchristensen>
or even, enp2s0:0 and enp2s0:1 can have different bindings
<infinisil>
What's that :0?
<gchristensen>
you can have multiple IPs per nic
<gchristensen>
or 0.0.0.0:80 vs 10.5.3.1, which are on the same nic and cover the same address space, but would be hard-to-impossible to prevent in the type system
<gchristensen>
or 0.0.0.0:80 vs 10.5.3.1:80, which are on the same nic and cover the same address space, but would be hard-to-impossible to prevent in the type system
<MichaelRaskin>
You still use ifconfig?
<gchristensen>
doesn't matter if I use it
<infinisil>
gchristensen: I haven't mentioned it, but I do check for ip address
<MichaelRaskin>
With ip you can have multiple addresses without :0 :1 suffixes
<infinisil>
gchristensen: So either "any" ip, or a specific one
<MichaelRaskin>
ip address
<gchristensen>
cool, MichaelRaskin
bpa has joined #nixos
<infinisil>
gchristensen: Checking for no overlapping ip addresses per port should be enough though, right? In the output of `ss -t` it doesn't seem to be able to distinguish between interfaces
ThatPako has joined #nixos
<ThatPako>
is it possible to write bash scripts on nixos? What would go into the hashbang?
<gchristensen>
not sure, infinisil ! maybe so!
<infinisil>
Alright :). But the `ports.tcp80 = "nginx"` looks pretty nice and is fast and easy to implement, so I think I'll go with that
<infinisil>
Maybe
<infinisil>
ThatPako: #!/usr/bin/env bash
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ThatPako>
inifinisil: oh, I see. Thanks!
ogle has left #nixos [#nixos]
John882_ is now known as John882
dingotux has quit [Ping timeout: 256 seconds]
<samueldr>
that's also what you should use everywhere, as it's a linuxism to use /bin/bash; freeBSD (and others) have it at /usr/bin/bash
blankhart has joined #nixos
ma27 has joined #nixos
endformationage has quit [Ping timeout: 248 seconds]
<tokudan[m]>
is there something that's blocking hydra from advancing the release-17.09 channel to include the firefox-bin security updates from 6 days ago? i don't see anything failed there
<foldingcookie>
is it possible to use binfmt_misc or something to avoid the extra fork/exec overhead of 'env' shebangs by evaluating them in-kernel?
jrolfs has quit [Ping timeout: 256 seconds]
endformationage has joined #nixos
jb55 has joined #nixos
<infinisil>
foldingcookie: You can use /run/current-system/sw/bin/bash if you really want to. Or you can build your script with nix so you can use `#!${pkgs.bash}/bin/bash`
<gchristensen>
or, even better, just use /usr/bin/env bash then run patchShebangs on it in your build step
i-am-the-slime has quit [Remote host closed the connection]
Sonarpulse has joined #nixos
rauno has quit [Ping timeout: 260 seconds]
lambdamu has joined #nixos
<infinisil>
I just thought of a way to have random numbers in Nix :O
<gchristensen>
get out while you still can
<infinisil>
Will be useful if you want to assign a random port to a service
<infinisil>
gchristensen: No it's pure I swear!
<gchristensen>
is it a randomness monad?
<infinisil>
Yeah
jb55 has quit [Ping timeout: 256 seconds]
<infinisil>
Actually I'm not 100% sure if it's possible to implement
ixxie has quit [Ping timeout: 255 seconds]
<infinisil>
Yeah it should work
<deltasquared>
monads in nix now, I'm doomed
ThatPako has quit [Quit: Lost terminal]
<infinisil>
Next up the IO monad!
<deltasquared>
no, bad infinisil! IO is not pure! :P
<gchristensen>
get out while you still can, infinisil
<deltasquared>
or else it'd be monads all the way down...
<deltasquared>
or something
<deltasquared>
right, I'ma going now, dinner's ready. cheers for the help earlier.
deltasquared has quit [Quit: SEGMENTATION FAULT]
<infinisil>
See ya!
jrolfs has joined #nixos
<Turion>
infinisil, but at some point, you still need to handle the effect, so you'll still need to use IO, or manually set a random seed
lonokhov has quit [Quit: leaving]
ixxie has joined #nixos
<infinisil>
Turion: I can use builtins.currentTime as a seed heh
<infinisil>
Yeah but setting a seed manually would be needed to make it pure
<infinisil>
I think if random numbers were truly useful, the nixos-generate-config script could generate one and put it in your configuration
<infinisil>
A seed i mean
rauno has joined #nixos
<Turion>
infinisil... wait... you can use the time when generating a derivation? That feels very wrong
vaninwagen has joined #nixos
<infinisil>
Turion: Nix has a couple escape hatches to purity, such as that one, or builtins.fetchurl which doesn't need a hash
<gchristensen>
there are a few impure things Nix can do but aren't talked about much
<Turion>
Are there many bugs related to those impure things? Or are nixers (nixists? nixians?) civilized enough not to use them?
<Turion>
infinisil, concerning one generated random number at the beginning: https://www.xkcd.com/221/
<infinisil>
Turion: Heh, classic
<gchristensen>
Turion: they aren't used
<gchristensen>
* this is a bit of a simplication, they are used, but only in very specific cases
mbode has joined #nixos
<infinisil>
Certainly not in nixpkgs, I hope at least
<vcunat>
Should have filed a PR yesterday to add such pure random generator to nixpkgs lib.
detran has quit [Remote host closed the connection]
<infinisil>
gchristensen: Ew
<gchristensen>
infinisil: hrm? it is used appropriately
<infinisil>
vcunat: You have a good usecase?
<infinisil>
gchristensen: Hmm.. alright yeah
<gchristensen>
the chrome updater one should probably be rewritten to be python or something, but it is a work of art.
Mateon2 has joined #nixos
detran has joined #nixos
<infinisil>
gchristensen: Whoa, not sure what it does, but it looks intricate
<vcunat>
infinisil: it would surely find its use. For example the release codenames - they're random words, really, but you still want them always to evaluate to the same value.
<phry>
I think I'm having a syntax problem. maybe someone can give me a pointer on that? I'm trying to compose two nixos configurations (for deployment with nixos) together.
<phry>
my attempt was `withDefault = someMachine: (args: lib.recursiveUpdate (defaultMachine args) (someMachine args))` and my definitions of defaultMachine and someMachine follow `{pkgs, ...}: {foo}`
<phry>
but now I'm getting `anonymous function [...] called without required argument 'pkgs', `. I guess just using an argument is not enough here - is there a better way to do what I'm trying?
<vcunat>
aarch64-linux will most likely be announced later, separately, as there's more work to do and much less uptake from contributors
<vcunat>
phry: apparently your "args" sets don't contain a "pkgs" name
<samueldr>
release for the 33rd or 34th of march, I see :)
<gchristensen>
vcunat: I can takle that in an hour or so!
<vcunat>
s/name/attribute/
<gchristensen>
thank you for holding the release :o
<phry>
vcunat: it's being called by nixops and if I use just defaultMachine or someMachine instead of `withDefault someMachine`, it works
<vcunat>
OK, so tentatively we might release tomorrow. I don't feel like it for today anyway.
<vcunat>
phry: ah, I know nixops too little
<phry>
vcunat: so I can't see where the pkgs attribute goes missing. a function should be a function, I guess
<infinisil>
phry: Combine nixos modules with imports if you can
jperras has joined #nixos
<phry>
infinisil: can I do that combination on a lower set level, too?
<phry>
infinisil: I had only been using that on top-level
<phry>
infinisil: but here, I'm within a set attribute
<infinisil>
phry: Ah then you probably want mkMerge
<infinisil>
Oh but you wanna pass the args? Hmm
<vcunat>
phry: the `{ pkgs, ...}: ` signature denotes that `pkgs` attribute must be present in the argument
<infinisil>
phry: I think your best bet is to make defaultMachine and someMachine actual modules, everything else won't be very nice
<phry>
infinisil: I guess you're right. I had hoped to put everyting into one file for now
<infinisil>
phry: Oh you can
<infinisil>
imports can take either paths or nix expressions directly
<infinisil>
orbekk: Yeah, has been discussed before, I like the idea. Maybe not docstrings, but just a nix attribute that contains the doc as a normal string, integrate it somehow
<deltasquared>
gchristensen: eh, maybe I'm being a little cynical, it's just what I've come to expect in open sauce projects
ij has joined #nixos
ij has quit [Changing host]
ij has joined #nixos
<{^_^}>
[nixpkgs] @matthewbauer closed pull request #38280 → libseccomp: only on Linux → https://git.io/vxKSe
<gchristensen>
deltasquared: there are two ways it can be said, one in a "go away" way, the other in a genuine "well, someone has to do it" way
zybell_ has quit [Ping timeout: 256 seconds]
<gchristensen>
I agree with the value of it
<deltasquared>
gchristensen: indeed. thankfully I don't think I've ever had it in the "!@#$ off" sense
<gchristensen>
I've only said it that way a couple times, to people who wanted the project in question to be something it wasn't
<deltasquared>
gchristensen: well I guess you have to draw a line sometimes
<deltasquared>
I'm curious now as to what those would have been, but it's fine if you don't want to talk about it
<gchristensen>
yeah... ocean madness is no reason for ocean rudeness, though.
spear2 has joined #nixos
<MichaelRaskin>
For documentation things, there is also sometimes the third side. «Everyone who knows enough knows too much to write a good introduction without overwhelming the reader»
<Turion>
MichaelRaskin, yes, very true.
<MichaelRaskin>
Not in the sense of it being strictly impossible, but not efficient compared to someone good at writing asking a lot of questions and writing down the things actually needed for th efirst steps.
lambdamu has joined #nixos
<orbekk>
infinisil: How about functions? IIUC those can't have attributes
<orbekk>
Also constants and other non-tuple values
<Turion>
MichaelRaskin: There should be a documentation team then that asks newbies to read the stuff written by the pros, and make it newbie-friendly
<Turion>
I'll happily play the newbie part in that game
thblt has quit [Remote host closed the connection]
dingotux has joined #nixos
<infinisil>
orbekk: Yeah, not sure what to do about that
<infinisil>
orbekk: I actually have a crazy idea that would allow you to do that, but it's too crazy to be practical
rauno has quit [Ping timeout: 256 seconds]
<orbekk>
infinisil: one of my primary usecases would be, "I wonder how this function works... :doc makeWrapper"
<clever>
orbekk: i think there is a magic attribute you can put in a set, that makes it act like a function
<infinisil>
orbekk: Yeah, would be pretty nice
<deltasquared>
clever: it wouldn't be called operator() by any chance? :>
<MichaelRaskin>
Turion: I think if you want something to move forward, a better bet could be to note everything useful you read — paragraphs of the manuals, IRC messages, parts of nix-pills
<gchristensen>
can Nix connect to a remote store over SSH on a non-port-22 port?
<clever>
deltasquared: cant remember the name
<Turion>
MichaelRaskin, I don't understand... you mean for me as a learner, or for the nixos project? If the latter, what do you mean by "note" and how does it help?
<orbekk>
clever: Presumably that syntax is uglier than just using functions. Would we want to rewrite everything that way in order to document it?
<clever>
orbekk: there is also builtins.unsafeGetAttrPos which tells you where an attr was defined
<MichaelRaskin>
Turion: I mean you as the learner could try to record «oh, this was actually useful» (as opposed to «interesting, but I should learn it later»)
<clever>
orbekk: this reveals the exact file&line that pkgs.makeWrapper was assigned at
<MichaelRaskin>
It might be nice to have a few people have their lists «why could you not just give me a document with … these … points in the beginning»
zybell_ has joined #nixos
<MichaelRaskin>
Basically, a list of points for a quickstart that you were not lucky enough to find.
<foldingcookie>
that would be nice
<deltasquared>
first rule of user experience testing, always have it be done by people who don't know the system inside and out
<MichaelRaskin>
Not sure, it is not really sorted by the order of acquiring the knowledge
<orbekk>
clever: Nice, I didn't know about that. Still, I think we should do a little better. Any thoughts about what would be the best way to insert documentation strings?
<abrxs>
one part that's tricky about that is that it's hard to tell what part just makes sense immediately, and what only made sense because i read everything up to a certain point and just put up with being confused for a while...
dustmote has joined #nixos
<clever>
orbekk: not at the moment
<abrxs>
for instance, I found that the portion of the 'first derivation' pill where you start exploring attributes was where things clicked, but was it because I read the other pills, or because that one was particularly intuitive?
<abrxs>
also hi everyone, very new but i'm daily driving nixos on my laptop and really enjoying it
<MichaelRaskin>
Turion: a list of things in the order you would like to have had them shown to you could be an interesting guide. I wonder if just copy-pasting them together could provide an interesting text.
<Turion>
MichaelRaskin, well yes, but then helpfulness and order of aquiration are two conflicting sorting criteria..?
<MichaelRaskin>
More like independent.
<Turion>
Yes
dustmote has quit [Client Quit]
<MichaelRaskin>
Complicated things should be in a non-linear documentation in any case.
<MichaelRaskin>
I think there are people who care about the wiki and work on maintaining it.
matthias_wahl has joined #nixos
<Turion>
It's still quite individual. I mean, the vanilla installation probably runs great for most people, but then there are a few people who would have found it immensely helpful if someone had told them about proprietary b43 firmware. Or that the live environment systemd doesn't properly start if there's no trivial internet. But then, most people wouldn't have cared, so it shouldn't show up in a newbie guide
ma27 has quit [Ping timeout: 256 seconds]
<MichaelRaskin>
It's a good question how many skippable parts there should be in the introductory text (after all, a «click if you have no internet» in the margin could unhide whatever is not universally useful)
rauno has joined #nixos
ma27 has joined #nixos
<MichaelRaskin>
Peronally, I learn programming languages by reading reference manuals, use a very old wpa_supplicant.conf that I just take from system to system etc.
<MichaelRaskin>
Maybe a few perfectly customised introductions that various newcomers would prefer given a chance could tell something new about the current situation.
<MichaelRaskin>
I mean, there are nix-pills, after all, so there is some introductory text.
<Turion>
MichaelRaskin, and that's great. I for my part am usually stuck in this loop: 1. Encounter problem 2. Vow to solve problem and to write nice article on the wiki documenting the solution 3. Scourge internet and bother people on #nixos 4. General confusion, don't find clean solution (or no solution at all), don't write the article because I didn't learn enough
<MichaelRaskin>
Well, dirty solutions could still be useful.
<MichaelRaskin>
Some cleanups require Nix knowledge but no knowledge of your specific situation, so if you dump what you found during debugging, it is better than precisely nothing.
mbode has quit [Quit: Page closed]
JosW has joined #nixos
<Turion>
MichaelRaskin, +1 for skippable parts in the manual. I first found the manual scarily long, and then many parts frustratingly irrelevant to what I was doing. (Don't read me wrong, I think the manual is a great, well-written resource.)
<gchristensen>
that seems generous in some cases ;)
<MichaelRaskin>
I think all three manuals are closer to a reference
<Turion>
gchristensen, I admit I haven't come far in the manual yet ;)
<Turion>
But the installation part and the first few things that come after it are great
hakujin1 has joined #nixos
<Turion>
MichaelRaskin, I don't want to lower the wiki standards by writing "this blurb of config solved an arcane problem on my 10-year old machine, though I don't understand fully why"
<Turion>
If people are very active on the wiki and edit/purge/move this, that's great
<foldingcookie>
is that actually lower than the current standards
<Turion>
foldingcookie, :/ in that case I wouldn't want to keep the low standards
pxc has quit [Ping timeout: 256 seconds]
<foldingcookie>
I think documenting accurately when and where things worked, in cases where *how* isn't known, is better than nothing
<MichaelRaskin>
Maybe ask on #nixos-wiki do they have a standard way of denoting infodumps?
<lostman>
how do I add additional public keys to /etc/nix/nix.conf? if I set trusted-public-keys then it removes the key for cache.nixos.org. I want to keep that one but add my own key to my own cache
<foldingcookie>
it might be good to have some sort of wiki triage
<Turion>
But how about whenever I have a problem, someone very knowledgeable writes a wiki entry that in principle solves it but requires too much background knowlegde, and then I go and simplify, extend etc. it?
<clever>
lostman: you need to also manually include the cache.nixos.org key
hakujin has quit [Ping timeout: 276 seconds]
<lostman>
clever: that's a shame :( would've been cleaner if there was some way to add a key. how do I get the key from cache.nixos.org
<Turion>
MichaelRaskin, thanks, didn't know about the channel
<tomberek>
I'm noticing large gcc rebuild right now due to a difference in what seems to be rooted in "stdenv-linux-boot" vs "bootstrap-stage3-stdenv-linux" and I'm not sure where that difference came from. Any ideas or ways to track down the source of the difference?
<MichaelRaskin>
«solves it» «on my ten year old machine» — remind me again how any other person even knows if it solves the problem?
<MichaelRaskin>
Turion: well, that and loading acpi_cpufreq seems to work for me…
vaninwagen has quit [Quit: WeeChat 1.9.1]
<gchristensen>
can nix-shell's '-p' flag be used with non-<nixpkgs> channels?
<MichaelRaskin>
Maybe use nix run instead?
JosW has quit [Quit: Konversation terminated!]
<gchristensen>
hmm ok
jperras has joined #nixos
<{^_^}>
[nixpkgs] @grahamc opened pull request #38351 → Add user channels to the default nix path → https://git.io/vxia1
wangoe has joined #nixos
<Turion>
Am I the only one who can't type certain capital letters in xterm (+ xmonad) since they seem to be captured as hotkeys for something?
<Turion>
And am I the only one where arrow keys don't work in konsole?
jperras has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 256 seconds]
<vcunat>
xmonad+xterm are OK for me
<maurer>
Turion: Are you using a foreign kbd layout? I'm trying to guess why that could happen (I too use xmonad, though not xterm anymore, and expect I'd see similar behavior)
<Turion>
maurer, yes, nearly forgotten about that. Indeed I use neo2
<Turion>
Everything works well in all other applications, problems only appear in xterm and konsole
<maurer>
Turion: Yeah, I'd try using xev and seeing what the keystrokes look like
<maurer>
e.g. maybe for some reason there is a modifier being pressed at the same time you're not aware of
<dumbl3d0re>
Does Nix Pills contain information that the Nix manual doesn't?
<Turion>
Ah yes, I'll have a look
jrolfs has joined #nixos
ma27 has quit [Ping timeout: 240 seconds]
<Turion>
maurer, xev gives me what I would expect
<{^_^}>
[nixpkgs] @abbradar pushed to master « nodePackages.parsoid: pin service-runner to 2.3.0 »: https://git.io/vxiwW
MP2E has joined #nixos
ma27 has joined #nixos
<maurer>
I dunno then, that was just my best guess
dingotux has left #nixos ["Konversation terminated!"]
<dumbl3d0re>
Or is there any other learning resource that is better?
<maurer>
dumbl3d0re: Nix Pills is written in a more tutorial style, the manual in a reference style
<maurer>
dumbl3d0re: In theory, the manual should be complete, sometimes things are missing. nixos.wiki is a good supplemental resource
<Turion>
Is the current linux kernel version documented anywhere?
<vcunat>
Turion: the default is announced on each stable release
alex`` has joined #nixos
<vcunat>
in general we tend to use the latest kernel with longterm support
<Turion>
ok, thanks :)
<vcunat>
(even on unstable/master, but don't switch during release being stable)
<dumbl3d0re>
maurer: I'm very new to Nix and it's ecosystem. If I understand you correctly that Nix Pills is the recommended starting point for Nix beginners?
<vcunat>
4.14 on unstable and 18.03 now
<vcunat>
4.9 on 17.09
<vcunat>
dumbl3d0re: yes, I've heard good references on the pills
<vcunat>
(from multiple people)
<foldingcookie>
is there a good reference page for understanding nixOS versions?
<dumbl3d0re>
vcunat: Do you know if they are actively updated?
jensens has quit [Remote host closed the connection]
krey has joined #nixos
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
[nixpkgs] @abbradar pushed 3 commits to release-18.03: https://git.io/vxirs
<{^_^}>
→ ecb39c43 by @peterromfeldhk: nodePackages_8_x.swagger: init at 0.7.5
<{^_^}>
→ 5bcdc867 by @tiramiseb: nodePackages vue-cli: init at 2.9.3 (#36391)
<{^_^}>
→ 47caeb12 by @abbradar: nodePackages.parsoid: pin service-runner to 2.3.0
<foldingcookie>
tilpner: thanks. is there another page with more context or more oriented toward beginners? ("what to backport" is a rather confusing first section)
<{^_^}>
→ 503f8efb by @dtzWill: epoxy: explicitly search libGL path as fallback
doyougnu has joined #nixos
detran has quit [Ping timeout: 256 seconds]
<{^_^}>
→ f48197ea by @dtzWill: Merge pull request #38168 from dtzWill/fix/epoxy-libgl-path
<foldingcookie>
that one does answer my question I guess (I should use nixos-unstable if I want similar stability/freshness to Arch?) but isn't the kind of thing I'd like to send to folks I recommend nixOS to
<tilpner>
Note that you can use all channels at once, if you like. You don't have to limit yourself to just one :)
<samueldr>
oh, wrong user
<samueldr>
I mixed up the questions of two users together :/
ryanartecona has joined #nixos
<Turion>
tilpner, but I can't really specify which channel to use in different parts of my system-wide config, right?
<tilpner>
Not really
ma27 has quit [Ping timeout: 256 seconds]
<tilpner>
You can hack it together, but it's not meant to be combined. The modules sometimes work together, and that doesn't work well if you mix versions
ajp_ has joined #nixos
<tilpner>
I recently tried using NixOS with baseModules = [], and I noticed how many things make assumptions about the presence of other things :/
<infinisil>
tilpner: Such as?
ma27 has joined #nixos
detran has joined #nixos
<Turion>
So if I want the latest kernel from nixpkgs and otherwise go with an lts, that doesn't work? (Except if I fork nixpkgs and cherry pick the kernel update commits)
ajp has quit [Ping timeout: 240 seconds]
abbradar has quit [Remote host closed the connection]
<tilpner>
infinisil - I forgot the exact module, but I included a module and that only worked after importing a bunch of gnome modules, even though I didn't want to use gnome
<maurer>
Turion: You can do it, though it will be tricky
<maurer>
Turion: basically, you tell your configuration.nix about a specific nixpkgs you want to use, and set the kernelPackage parameter
pxc has joined #nixos
<tilpner>
infinisil - I was hoping the module would import gnome itself, so that I only need to specify direct dependencies
<maurer>
Turion: This may cause problems if any system daemons make assumptions about kernel revisions, so use at your own risk
<Turion>
maurer, yes, and I still have to fork nixpkgs for this, right?
<infinisil>
tilpner: Ah yeah, but that's kinda what makes nixos work, modules can set any options of other modules. But yeah the dependencies aren't specified at all, which should be improved
<tilpner>
Turion - Oh, I was talking about NixOS modules. You can combine packages freely
<elvishjerricco>
Turion: I have my `<nixpkgs>` pointed at a stable channel, then in my `configuration.nix` I have `let unstable = import (pkgs.fetchFromGitHub { **nixos-unstable** }) {}; in ...`
<maurer>
Turion: you do not.
ShalokShalom has joined #nixos
<elvishjerricco>
Then I can use `unstable.foo` to refer to unstable versions of packages
<elvishjerricco>
It should be possible to _try_ this with the kernel, but I have no idea how reliable that would be
<elvishjerricco>
`boot.kernelPackages = unstable.linuxPackages;` I guess?
<Turion>
Well, a nixos-rebuild switch needs to take place to install the new bootloader config, right?
kerrhau has joined #nixos
kerrhau has quit [Changing host]
kerrhau has joined #nixos
jrolfs has quit [Ping timeout: 240 seconds]
alex`` has quit [Quit: WeeChat 2.1]
<elvishjerricco>
Turion: yea, but that's going to be necessary anyway
<Turion>
Right
<tilpner>
infinisil - It would be enough to modify the module system so that a module can't access options it didn't (indirectly) import. This could be opt-in, so that a system configuration doesn't have to import the world
<tilpner>
That would make baseModules = [] much more feasible, and could cut down on evaluation times too
<infinisil>
tilpner: yeah, but there's no automatic way of doing this (well actually there is, but you'd have to use a nix grammar analyzer)
sanscoeu_ has joined #nixos
<infinisil>
But yeah that should be doable
<tilpner>
Yes, I was saying lib/modules.nix could grow that feature. Don't know how hard it would be
<elvishjerricco>
tilpner: I wouldn't be upset about needing explicit imports, as long as diamond import graphs aren't a problem. Actually I think that'd be better, with a bonus of being faster to evaluate
<tilpner>
I ended up aborting that experiment because maintaining a custom module list was too tedious for the little time it saved at evaluation, but it could be done properly in nixpkgs
lord| has quit [Ping timeout: 264 seconds]
<{^_^}>
[nixpkgs] @jmackie opened pull request #38353 → elm-oracle: init at 1.1.1 → https://git.io/vxiox
<infinisil>
I had this idea of having 1 file per option, so e.g. `networking.firewall.allowedTCPPorts` would be in `nixpkgs/nixos/options/networking/firewall/allowedTCPPorts.nix`, so it could just look up the path of the option as a file path and be super fast
<tilpner>
elvishjerricco - But how would that work with infinisils proposed system? It would be a weird hybrid if not all files followed that rule
<elvishjerricco>
Ohh I see
<elvishjerricco>
parent modules? Like one parent module that imports its dozen children, so that users only have to import the parent?
<infinisil>
tilpner: You wouldn't import options, but rather declare that you need them as dependencies
<infinisil>
Which allows you to use them
<elvishjerricco>
Oh. That's nice
<infinisil>
Something like that
<tilpner>
This is not about using options, it's about defining new ones in my user config
<dumbl3d0re>
samueldr: I assume that you didn't mean me?
<tilpner>
It could work with multiple roots, first look in $nixpkgs/foo.nix, then in $usermods/foo.nix, etc.
<samueldr>
well, I thought your question "do you know if they're actively maintained" was about kernels, but, yeah, I conflated two conversations together :/
<infinisil>
tilpner: Hmm I see, maybe just putting them into your own options directory, good point though
jperras has quit [Ping timeout: 240 seconds]
<infinisil>
tilpner: Yeah multiple roots
<infinisil>
I haven't fully thought it through, there are a couple holes with it
<infinisil>
But the thought of using paths to look up options seems nice
<dumbl3d0re>
samueldr: No problem, was just little confused :P
<tilpner>
infinisil - Have you thought far enough to plan for submodules?
<infinisil>
tilpner: I have not, that's indeed another problem
<tilpner>
:/
<infinisil>
Well I did think about it, but haven't come to a good solution
<lostman>
I'm trying to do `nix-build --no-out-link '<nixpkgs/nixos>' -A 'config.system.build.units."nix-serve.service".unit' --arg configuration '{ services.nix-serve.enable = true; }'` to generate nix-serve service description file. how can I override the service User?
<elvishjerricco>
gchristensen: Diverted store? That sounds interesting.
<infinisil>
lostman: I'm not sure why you're trying to put everything in a single command line. You can override the user like systemd.services.nix-serve.serviceConfig.User = "paul";
doyougnu has joined #nixos
<infinisil>
oh and you might need mkForce for that
<lejonet>
anyone using spotify and pulseaudio on nixos and can give me pointers why I get no sound, whatsoever from it? It would seem like it tries to use alsa, which gets plugged into PA, which I think could maybe be the problem, but I'm probably missing something lol :P
<infinisil>
Judson1: You should remove that extraneous commit
<lostman>
@infinisil I tried doing that but it complains that User is defined multiple times. I'm setting up nix-serve on Ubuntu, just want to have one command to generate the config file. What's the alternative? I'm still learning nix
<infinisil>
lostman: lib.mkForce
<infinisil>
Hold on I'll make a complete example
<Judson1>
The merge with master?
<maurer>
Judson1: Usually if you're submitting a PR, you rebase onto master rather than merge with it
<{^_^}>
→ 434722ba by @dezgeg: raspberrypi-tools: Init at 2018-02-05
<{^_^}>
→ b59f9497 by @dezgeg: raspberrypifw: Drop all non-firmware parts
<{^_^}>
→ 1e5cb384 by @dezgeg: nixos/sd-image-*: Raspberry Pi firmware no longer falls under unfree
stphrolland has joined #nixos
<{^_^}>
[nix] @grahamc opened pull request #2037 → List the features a derivation requires when it cannot be built locally → https://git.io/vxiDd
justanotheruser has quit [Quit: WeeChat 1.9.1]
jperras has quit [Ping timeout: 264 seconds]
justanotheruser has joined #nixos
<stphrolland>
Hi! Does any one of you use androidi-studio ? Which channel version are you using ? I have tried 17.09, unstable and 17.03, but I cannot even build an empty activty default project. It complains it cannot find android-27. I tried changin it to lower version 24, but that changed nothing.
<Ralith>
my /etc/nix/nix.conf has a "substituters" line, but the nix manual references "binary-caches" instead; which should be used?
isidore has quit [Quit: WeeChat 2.1]
carter has quit [Read error: Connection reset by peer]
<lostman>
infinisil: one more question, how can I delete NIX_DAEMON from default config? I'm not running in multi-user mode
rodarmor has quit [Read error: Connection reset by peer]
<infinisil>
Ralith: I think binary-caches is only stuff like the nixos cache, but substituters also includes ssh ones and maybe others
carter has joined #nixos
rodarmor has joined #nixos
<infinisil>
lostman: Not sure what you mean, there is no disadvantage to using the daemon
<infinisil>
afaik
<Ralith>
infinisil: "only stuff like"?
<lostman>
infinisil: I'd have to set the daemon up :)
<lostman>
infinisil: generated file has NIX_REMOTE="daemon". I'd like to remove that from the environment
<infinisil>
Ralith: http caches probably, not sure :P
<lostman>
infinisil: that'd work for what I want to do now and I'll worry about other config later
vidbina has joined #nixos
<infinisil>
lostman: So you're not using NixOS, right?
<Ralith>
the `nix.binaryCaches` config option modifies `subsituters`
<lostman>
infinisil: no, I'm on ubuntu
<{^_^}>
[nixpkgs] @dezgeg pushed 5 commits to release-18.03: https://git.io/vxiyx
<{^_^}>
→ c5145902 by @dezgeg: nixos/release.nix: Add Hydra job for AArch64 SD image
<{^_^}>
→ ac447b05 by @dezgeg: nixos/sd-image: Make it more similar to iso-image.nix
<Ralith>
do either of these things relate to `trusted-public-keys`?
<{^_^}>
→ d93b08e6 by @dezgeg: raspberrypi-tools: Init at 2018-02-05
<infinisil>
lostman: I haven't touched Nix on non-NixOS systems, so not sure. How did you install Nix? I would have thought it would set up a single-user installation. Only recently has gchristensen created an installer for multi-user with the daemon
<infinisil>
Ohhhhh, you mean the env var in the nix-serve.service file
<lostman>
adding this `systemd.services.nix-serve.environment.FOO = "foo";` results in FOO="Foo" in output .service file. But I can't change or remove NIX_REMOTE which is defined in nix-serve.nix. Or I just don't know the syntax to do it
<lostman>
go to learn more nix :)
<lostman>
*got
<infinisil>
Should just be NIX_REMOTE="foo";, but I'm not sure what value for foo to use in single-user mode
<Dezgeg>
unset, but maybe empty string would work as well
<lostman>
infinisil: but setting NIX_REMOTE has no effect. It doesn't change the value in output file
<infinisil>
lostman: Oh i see..
<lostman>
can I somehow unset it?
<infinisil>
Yeah it should be an empty string for single user mode
<infinisil>
Gonna check, but I have the suspicion it can't be changed
asuryawanshi has quit [Ping timeout: 248 seconds]
<Dezgeg>
you could mkForce it
John882 has quit [Ping timeout: 252 seconds]
xy2_ has quit [Quit: WeeChat 1.9.1]
<Dezgeg>
systemd.services.nix-serve.environment.NIX_REMOTE = lib.mkForce ""; I guess
<infinisil>
Doesn't seem to work
orbekk has quit [Quit: WeeChat 1.9.1]
<{^_^}>
[nixpkgs] @dotlambda pushed to master « pythonPackages.mock-open: init at 1.3.1 »: https://git.io/vxiSD
Neo-- has quit [Ping timeout: 240 seconds]
<LnL>
what about NIX_REMOTE = mkForce "local";
matthias_wahl has quit [Quit: WeeChat 2.1]
<mfiano>
gchristensen: Where did you rent your thunderx?
<infinisil>
LnL: It seems to ignore NIX_REMOTE completely
kquick has joined #nixos
<gchristensen>
mfiano: packet.net
<mfiano>
gchristensen: I can't find it there
<infinisil>
LnL: Well only the one you set on your own, setting a different env var works no problem
<infinisil>
1) Get a copy of this file: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/nix-serve.nix (you might want to get your channel's version, select the branch nixos-17.09 or so), remove the `NIX_REMOTE` setting from there, include that module by adding `imports = [ ./path/to/the/file.nix ]` to your configuration, and disable the old nix-serve module by adding `disabledModules = [
<infinisil>
2) Clone nixpkgs (at your version), then edit the file nixos/modules/services/networking/nix-serve.nix directly, and use your clone for building by adding `-I nixpkgs=/path/to/nixpkgs/clone` to the command argument
<infinisil>
s
<infinisil>
Kinda annoying but I'm afraid those are the best options
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<Ralith>
why is `nix copy` eating up all my RAM and pegging my CPU
<Ralith>
more than 3GB resident and climbing
<dtz>
Ralith: build and install latest Nix from git :/
hiratara has joined #nixos
Ariakenom has quit [Quit: Leaving]
<Ralith>
:|
<gchristensen>
vcunat: is there an IRC channel for kresd?
<Ralith>
literally in the process of adopting this in production
<infinisil>
lostman: Oh I found the problem, I'm gonna submit a PR to fix it
<Ralith>
was that a mistake
<Ralith>
dtz: do you have a link to the issue or commit in question?
<gchristensen>
Ralith: probably not a mistake. the commit fixes nix to not be such a memory hog when hashing files
<infinisil>
LnL: Oh yeah that would work too, but the PATH and the other default ones are kind of a problem
goibhniu has joined #nixos
<LnL>
infinisil: hmm, maybe there's a difference between types.attrs and types.attrsOf types.any?
<infinisil>
Indeed, the former doesn't support deep overriding
<infinisil>
lostman: That's the mistake, and the reason for the # FIX ME
jperras has joined #nixos
<Ralith>
ah, it appears it's finally started the upload
<Ralith>
some progress feedback would really be nice
<infinisil>
LnL: I'm not sure if types.any is the right thing though, I'd use types.str instead, but then it also needs types.path
<LnL>
paths are strings
<LnL>
but the implementation might also handle integers
<infinisil>
LnL: Ah, but derivations aren't and that's why it's needed, some options set an env var to a derivation, which of course can get automatically converted to a string, but the option doesn't handle that
<LnL>
vcunat: ^ is that something we should/want to fix before 18.03?
<lostman>
NIX_REMOTE=local doesn't work. Really need to unset it. infinisil: cool, will try that. it's useful to have it in one file so I can just symlink the .service to where systemd can find it
<infinisil>
I think it would make sense to restrict that type to only allow things that make sense, and not unspecified which includes attrsets, lists and functions
ashgillman has joined #nixos
<LnL>
vcunat: so basically systemd.services.<name>.environment can't be overridden because it has the wrong type
jtojnar has joined #nixos
<LnL>
infinisil: sure, I have no idea if anything depends on that
hamishmack has quit [Read error: Connection reset by peer]
hakujin2 has joined #nixos
<vcunat>
Sounds like fixing the type should break nothing, but I can't really think today anymore.
vidbina has quit [Ping timeout: 256 seconds]
knupfer has quit [Remote host closed the connection]
<electrocat>
how long does it take for git to reach the unstable channel?
<infinisil>
vcunat: Yeah
<justanotheruser>
Is there a more comprehensive book on nixos than the manual?
hakujin1 has quit [Ping timeout: 276 seconds]
hamishmack has joined #nixos
<justanotheruser>
Or a book on the nix language
<electrocat>
justanotheruser: what have you read?
<infinisil>
electrocat: About 30 hours if tests pass
<vcunat>
electrocat: that varies. For small channels it's usually hours.
<vcunat>
(they link to commits, but that doesn't easily show "average" speed from push to channel)
<MichaelRaskin>
justanotheruser: vcunat's use of singular «manual» was a typo. Nix manual, Nixpkgs manual and NixOS manual are three different manuals, and all three are useful.
<justanotheruser>
ok, will read those as well
hiratara has joined #nixos
<justanotheruser>
ty
jperras has joined #nixos
<MichaelRaskin>
At some point reading just the comments and function names in the nixpkgs/lib/*.nix could be a good idea (to know what is available)
<MichaelRaskin>
Not before the three manuals, of course.
<gchristensen>
vcunat: has the knot gitter been busy since CF?
averell has quit [Quit: .]
<vcunat>
it wasn't a typo really (not unintentional at least, except for the missing comma), more like an unclear formulation
<vcunat>
gchristensen: nothing related there for now
<vcunat>
Twitter exploded
blankhart has quit [Ping timeout: 256 seconds]
<gchristensen>
I bet :D
<vcunat>
and a local (CZ) unix-article web
jperras has quit [Ping timeout: 256 seconds]
<vcunat>
maybe it's too soon and more consequences will come later
averell has joined #nixos
<{^_^}>
[nixpkgs] @Infinisil opened pull request #38356 → nixos/systemd: Fix environment type -> allows overriding → https://git.io/vxiFq
<infinisil>
lostman: LnL: vcunat: Here's the PR to fix the environment thing
<vcunat>
Thanks. I'll try to have a look during tomorrow.
doyougnu has quit [Ping timeout: 264 seconds]
<lostman>
infinisil: great. thanks!
vcunat has quit [Quit: Leaving.]
lambdamu has joined #nixos
hellrazor has joined #nixos
alexteves has quit [Ping timeout: 240 seconds]
jperras has joined #nixos
ericsagnes has quit [Ping timeout: 246 seconds]
paraseba has quit [Ping timeout: 240 seconds]
goibhniu has quit [Ping timeout: 240 seconds]
paraseba has joined #nixos
<taohansen>
I'm having difficulty reading variables from Vault into environment variables. The strings I write resolve to secrets in a bash prompt but when written into my .nix spec are read and output as the command itself and not the secret I desire
<taohansen>
Is this not the kosher way to do it in Nix? Do I need to resort something like vaultenv or consulenv instead?
xy2_ has quit [Ping timeout: 264 seconds]
xy2_ has joined #nixos
<taohansen>
"Notice that we did not tell Nix to print the string. Explicit output is not part of the language. In fact, there are no commands at all. You cannot write to a file or call an external command," writes James Fisher.
<taohansen>
So I guess what I'm aiming for is impossible?
<infinisil>
taohansen: I see the api_key is directly written to the config file
<infinisil>
So not interepreted by bash
<infinisil>
So the module expects you to put it there directly and doesn't provide a different (secure) way to load it
<taohansen>
infinisil: How do I compose such that it is interpreted by bash and its output is passed to the value?
hakujin3 has joined #nixos
<infinisil>
Ah, there is a way
ericsagnes has joined #nixos
<infinisil>
taohansen: Maybe, depends on whether this vault can be made to work in the nix sandbox
<infinisil>
You probably don't want to load all your secrets in the nix-store though..
<infinisil>
Ah no it works
jtojnar_ has joined #nixos
hakujin2 has quit [Ping timeout: 260 seconds]
jtojnar has quit [Read error: Connection reset by peer]
<infinisil>
taohansen: The idea is that you put in a bogus key, such as "THIS_IS_THE_KEY", then you add some code to activationScripts that changes the config file (which is in /etc) by running sed on it to replace the bogus key with the actual key
<taohansen>
infinisil: Do you have an example I might peek at?
<taohansen>
Okay well this certainly helps orient me in the right direction. Thank you so much
<samueldr>
there, net zero, closed two PRs, opened two PRs, I did my part :)
<infinisil>
taohansen: You need to set `system.activationScripts.dd-agent-key = lib.stringAfter [ "etc" ] ''<script that changes the string THIS_IS_THE_KEY to the actual one in /etc/dd-agent/datadog.conf>'';
<infinisil>
You can use sed in this script, and ${pkgs.thevaultpackage}/bin/vault
<{^_^}>
[nixpkgs] @pbogdan opened pull request #38359 → [18.03] tdesktop: use wrapGAppsHook → https://git.io/vxiN7
<infinisil>
samueldr: Unfortunately I often end up like that heh. Mostly it's fixing stuff though, not introducing new things, so I don't feel that bad
<taohansen>
Ah so a script is valid in pair values
alhariel has joined #nixos
<infinisil>
taohansen: Pair values?
<samueldr>
(in my case, software revision updated while PR was still open)
<pbogdan>
heh, the pr bot consistently posts the notices faster than my own browser manages to reload the page upon hitting the submit pr button :D
blankhart has joined #nixos
<taohansen>
infinisil: `lib.stringAfter [ "etc" ]` Can you clarify what the etc part is doing here?
ryanartecona has quit [Quit: ryanartecona]
<taohansen>
`system.activationScripts.systemd = stringAfter [ "groups" ]` I am looking at this systemd module derivation and I can see immediately after it specifies the commands of a bash script
<taohansen>
So stringAfter appears to be my escape hatch to running bash scripts
<infinisil>
taohansen: activationScripts isn't just a linear script that you append to, but rather an (almost) directed acyclic graph (DAG). You can say that certain phases must happen before or after others using the string{After,Before} functions. Since you want to modify a file in /etc, the "etc" phase (declared as activationScripts.etc = ...) must be run before your script, otherwise you wouldn't have /etc at all
<infinisil>
taohansen: It's not an escape hatch, it's a script that gets run when the system starts, used to set up stuff like /proc, /etc, PATH, and more
ambro718 has quit [Quit: Konversation terminated!]
<taohansen>
So the output of the string evaluation is what is assigned to systemd?
<infinisil>
Check out /run/current-system/activate to see what the resulting script looks like
<taohansen>
I see. Man this is confusing! Sometimes it feels like I'm fighting the pure functional nature of Nix
<infinisil>
And this gets executed when starting the machine or after a nixos-rebuild switch
<infinisil>
It is an escape hatch, but that's needed for things that you don't want to end up in the world-readable /nix/store
<infinisil>
nix only has purity guarantees for /nix/store
erasmas has quit [Quit: leaving]
uptime has quit [Excess Flood]
uptime has joined #nixos
krey has joined #nixos
<taohansen>
I feel like maybe I'm going about this the wrong way. That I'm trying to cheat the system to do what I want it to. Is there a more Nix appropriate way or is it just that secrets are by their nature a tricky thing that must be worked around?