<codygman_>
I have a display-manager loop happening on my laptop (guessing because of graphics drivers missing), I'm guessing there's no way to get to a console because the display-manager restart keeps stealing focus? Here's a video of what's happening: https://youtu.be/CZsdksPh3pw
<Lears>
I have a shell script running a nix-env operation conditionally upon the user profile not being rolled back. Currently I'm doing `if [ -n "$(nix-env --list-generations | tail -n 1 | grep current)" ]; then nix-env ...` for that check. Is there a better way?
<gchristensen>
what is your end goal?
tertle||eltret has quit [Quit: Connection closed for inactivity]
<Lears>
Integrating xmonad and nix in such a way that recompiling it bumps up the user profile and rolling back will correctly use an old configuration.
<colemickens>
gchristensen: with your kubernetes adventures, are you using NixOS? And what about NixOps?
<colemickens>
I stumbled across some IRC chatter about NixOps and "scaling groups" in various cloud providers. I'm trying to figure out what push/pull/else model I want to use.
<colemickens>
On the one hand, I think I can imagine how to make NixOps works with scaling groups and expand a refernece into multiple Machines that NixOps could intuit about. But it doesn't really address an "auto-scaling" scenario where the user scales the group through the cloud platform.
<colemickens>
So then I thought about either "Gold" images, or at least Bronze images that know how to consume a configuration.nix on boot and apply it.
Supersonic has quit [Disconnected by services]
Supersonic112 has joined #nixos
<colemickens>
Anyway, curious if you have thoughts in this area and/or if you want to chat about it. And/or if you know other folks that might be interested..
Supersonic112 is now known as Supersonic
<clever>
colemickens: my general idea, is to create an AMI image of your machine using just plain nix, then upload it and configure aws to auto-scale the AMI
<clever>
colemickens: and to configure that AMI at build time to just work from the first boot
JasonGrossman has quit [Ping timeout: 240 seconds]
<colemickens>
Makes it harder for me to tweak an attr and then blast it out and make it live in a matter of seconds. Which might just be a cool demo and not actually important or practical.
<colemickens>
Plus Nix is honestly a nicer way to describe the other Infra I'll need compared to CloudFormation or ARM or even Terraform HCL
<colemickens>
But I keep coming to a similar conclusion as you.
<colemickens>
I could always build a way for VMs to inspect metadata or something and activate a new config if I don't want to always burn new images...
buhman has joined #nixos
oltoAltn has joined #nixos
<buhman>
wow, I think it's super cool that nix-generate-config figures out how to deal with luks just by it existing
<gchristensen>
colemickens: yeah the aws amis already load nix from userdata :)
<gchristensen>
colemickens: probably nicest to have the AMIs mostly ready with your stuff, and apply "last mile" changes via user data, instead of full reconfiguration
* colemickens
nods
iyzsong has joined #nixos
<colemickens>
:) I'm not targetting AWS, but I am basically redo-ing things based on the AWS images :)
<gchristensen>
cool, what is your target?
<colemickens>
Azure
<gchristensen>
aaah of coursse
<colemickens>
I'm a bit of a glutton for punishment.
mizu_no_oto has joined #nixos
<gchristensen>
I'm a massively big fan of making nixos images for semi-hostile environments :)
<colemickens>
Yeah, the other bringups for Azure tend to do lots of on-first-boot configuration that is reliant on the network, apt servers, gpp keyservers, and it slows it down. Yeah. I'm feeling this path.
<colemickens>
Also, I could probably get away without standing up a binary cache infra.
<colemickens>
(I need to find the s3 store backend and see how hard it would be to add Azure blob storage as a backend)
<colemickens>
(I guess if nothing else, I could run Minio, point Nix at it and tell it its S3... :P)
<gchristensen>
:)
<gchristensen>
have you seen cachix?
<colemickens>
:) yes indeed I did.
<{^_^}>
[nixpkgs] @orivej opened pull request #41383 → subversion_1_10: init at 1.10.0 → https://git.io/vhWYJ
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos
seafood has quit [Quit: seafood]
<buhman>
has anyone bothered to write a manual page for how to make nvidia optimus work?
<buhman>
most of the google-indexed things are either questions or incomplete answers
asuryawanshi has quit [Remote host closed the connection]
asuryawanshi has joined #nixos
<buhman>
samueldr: though I couldn't make nvidia prime work, I got bumblebeed + optirun working on archlinux ; I wonder if the hanging that happened on nixos is just an old version issue
<buhman>
it's a little hard to troubleshoot this hardware issue and learn nixos at the same time :)
leat has quit [Ping timeout: 256 seconds]
Have-Quick has quit [Quit: Have-Quick]
schoppenhauer has quit [Ping timeout: 268 seconds]
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
steell has joined #nixos
oltoAltn has quit [Read error: Connection reset by peer]
olto has joined #nixos
schjetne has joined #nixos
rauno has quit [Ping timeout: 265 seconds]
jperras has quit [Quit: WeeChat 2.1]
freeman42x]NixOS has quit [Ping timeout: 265 seconds]
gonz_ has quit [Ping timeout: 245 seconds]
asuryawanshi has quit [Ping timeout: 268 seconds]
leat has joined #nixos
blankhart has quit [Quit: WeeChat 1.9.1]
mizu_no_oto has joined #nixos
leat has quit [Ping timeout: 248 seconds]
YaZko has quit [Quit: YaZko]
<colemickens>
buhman: the beauty is, you only have to troubleshoot hte hw with nixos once!
iyzsong has quit [Ping timeout: 260 seconds]
iyzsong has joined #nixos
<jophish>
hi gchristensen, I've opened a PR for aarch64-build-box
<buhman>
colemickens: how do you mean?
schjetne has quit [Ping timeout: 265 seconds]
sanscoeur has joined #nixos
<colemickens>
buhman: once you write the nix expression, you won't have to repeat this if you ever rebuild the machine
<colemickens>
also, if you're messing with nvidia and changing drivers, I'd recommend you power off as much as possible between reboots.
<colemickens>
I've had issues where nvidia and nouvea (sp?) were behaving differently if the hw had already been initialized and it dind't power off
iqubic has joined #nixos
Rusty1_ has quit [Quit: Konversation terminated!]
rauno has joined #nixos
sbdchd has quit [Remote host closed the connection]
schjetne has joined #nixos
<buhman>
colemickens: do you use optirun/primusrun?
<buhman>
I've been using setprovideroutputsource, but my new GPU doesn't list that capability, strangely
pcarrier has quit [Quit: Connection closed for inactivity]
schjetne has quit [Ping timeout: 260 seconds]
<colemickens>
buhman: I didn't actually do the nvidia fun on my NixOS machine with an nvidia card (yet?)
<colemickens>
Just needed to bootstrap some images for Azure. All my other NixOS boxes are headless or Intel graphics.
<buhman>
so, if I know low-level what I want to do, how do I translate things like "xrandr --setprovideroutputsource" and a custom xorg.conf.d to configuration.nix ?
jtojnar has quit [Read error: Connection reset by peer]
<colemickens>
The first seems like a command you would run at runtime anyway?
<colemickens>
And the other depends on what's in xorg.conf.d.
<buhman>
well, I'd add a file there
<colemickens>
Last time I setup nvidia with either optimus or bumblebee on a laptop, it wasn't nixos, but I didn't have to write any xorg conf.
<buhman>
(the xorg.conf is required for not-bumblebee)
<buhman>
the other thing that bothered me was I expect the linux console to modeset on boot
<buhman>
is that not a thing that happens in nixos?
leat has joined #nixos
<colemickens>
weird, interesting, I'd not heard of that before. It makes it seem necessary for the dual-gpu config to work, but I had never done it before. I don't really understand any of it beyond "make it work" level.
<colemickens>
And as for modesetting, I am out of my depth officially. I don't know, sorry.
<buhman>
yeah that offload thing is explicitly a xrandr 1.4 feature, which is not the same mechanism that bumblebee uses
jtojnar has quit [Read error: Connection reset by peer]
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
jtojnar has joined #nixos
s33se has joined #nixos
endformationage has quit [Quit: WeeChat 1.9.1]
schjetne has joined #nixos
srl295 has quit [Quit: Connection closed for inactivity]
gonz_ has joined #nixos
gonz_ has quit [Client Quit]
schjetne has quit [Ping timeout: 240 seconds]
gonz_ has joined #nixos
steell has quit [Ping timeout: 256 seconds]
asuryawanshi has joined #nixos
asuryawanshi has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « aws-sdk-cpp: 1.4.40 -> 1.4.50 (#40694) »: https://git.io/vhWcx
schjetne has joined #nixos
michas_ has joined #nixos
xeji has joined #nixos
<ldlework>
Hmm, packageOverrides is different than the modules like the one that provides the znc systemd service
michas_ has quit [Client Quit]
<ldlework>
If there is a fork of nixpkgs that contains a modified module, like the znc one, then how do you integrate that fork such that you want it's znc /module/ to override the options and handling than what's provided by stable?
<ldlework>
Like I think I understand how to fetchTarball the git fork, and use the znc /package/ from the nixpkgs fork
<ldlework>
but no idea how to utilize the enhanced systemd service unit from that fork
schjetne has quit [Ping timeout: 276 seconds]
<ldlework>
I suppose I should try to be productive more early in the day while the channel is active heh
wangoe has joined #nixos
<ldlework>
let special_fork = import (fetchTarball ...) {};
thblt has quit [Quit: ERC (IRC client for Emacs 26.1)]
<infinisil>
ldlework: Am awake now :)
shabius has joined #nixos
newhoggy has joined #nixos
<infinisil>
ldlework: Either you can just git checkout my repository and the specific branch, and then build a vm with this to test it, which I'd recommend
<FRidh>
robstr: use pkgs.python36Packages.callPackage
<robstr>
FRidh: yea ty, already got it :)
<infinisil>
ldlework: Or if you really wanna use it with your current nixos system, you could also make a git checkout of the branch you're currently using, then apply my commits on top of that
__monty__ has joined #nixos
newhoggy has quit [Ping timeout: 240 seconds]
<__monty__>
Trying to install vimNox on darwin, any workarounds? http://ix.io/1c6d
saeedgnu has joined #nixos
<__monty__>
Another question. I used to use this script, https://github.com/elaforge/fast-tags/blob/master/init-tags, with vim. But since moving fast-tags into a myEnvFun, vim complains about not finding fast-tags when running that script. This vim is started after a load-env so I don't understand why fast-tags wouldn't be on the path for the script?
<saeedgnu>
i installed virtaulbox with nix, and it runs, but the vm does not, it gives this error: The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing '/sbin/vboxconfig' as root.
<saeedgnu>
i can't find vboxconfig in my nix-profile/bin
<saeedgnu>
(and no spin)
<saeedgnu>
*sbin
schjetne has joined #nixos
<symphorien>
On nixos or plain nix ?
<saeedgnu>
no, nix on opensuse
hellrazo1 has quit [Ping timeout: 248 seconds]
<symphorien>
the problem is that virtualbox needs a kernel module to be loaded to work
<symphorien>
so just installing it with nix (which means, putting virtualbox on the PATH) is not enough
hellrazo1 has joined #nixos
<symphorien>
if your kernel has one of the versions in nixpkgs, you can try to load the module manually
<{^_^}>
[nixpkgs] @FRidh pushed 44 commits to python-unstable: https://git.io/vhW4i
<saeedgnu>
my kernel is 4.4.114
<saeedgnu>
let me see if i can update my kernel to 4.14.42
<symphorien>
4.4 is in nixpkgs
<symphorien>
so: run nix-build "<nixpkgs>" -A linuxPackages_4_4.virtualbox and then try to insmod the modules in the result symlink
<vcunat>
This one doesn't have a hundred cores, right?
<gchristensen>
it does not :)
<tenten8401>
Anyone here know if there's a decent way that I could configure KWin for new users declaratively?
<gchristensen>
oh oops I was on the 2a
<tenten8401>
I'm wanting to reduce the window border size and create my own customized KDE setup for the entire machine for all new users
<saeedgnu>
i copied /lib/modules/4.4.132/extra/ from my nix to host (/lib/modules/4.4.132-53-default/), but modprobe still doesn't find the module, is there anything else i should do?
<tenten8401>
I was looking around /etc but couldn't seem to find a global "kwinrc" to write to, and I'd prefer not to execute a script for every single user
<vcunat>
tenten8401: these files are one some XDG paths?
<gchristensen>
load average: 50.53, 49.23, 44.11 for 48 cores
<vcunat>
If they are searched in standard ways and not just in ~/... that might be doable.
<vcunat>
gchristensen: that seems OK
<vcunat>
And I expect there's plenty of free memory, etc.
<vcunat>
Maybe it's just some particular derivation misbehaving (not respecting the -l for make).
<gchristensen>
57G free RAM
<{^_^}>
[nixpkgs] @jtojnar merged pull request #30037 → poppler: add nss to allow for building pdfsig → https://git.io/vdCCn
<vcunat>
I'd personally try to avoid messing with people's homedirs
leat has quit [Ping timeout: 260 seconds]
orivej has joined #nixos
<vcunat>
(as modern apps with XDG should allow to avoid that)
JasonGrossman has joined #nixos
<tenten8401>
vcunat: I'm basically wanting to define a base KDE layout and settings that are created when a new user is added
<tenten8401>
that way if I were to reinstall my system, everything would be how I set it up before, and I'd have a repeatable KDE setup
<vcunat>
yes, that's doable without homedirs
<vcunat>
it's what distributions use to differ from each other in default setups, I expect
<tenten8401>
I'm basically just trying to setup /etc/skel the "proper way", if there is one
<tenten8401>
so I can add a default setup
<tenten8401>
but useradd by default isn't told to use /etc/skel
<tenten8401>
I'm not wanting to touch individual home directories
<norfumpit>
can somebody help me with this? result of nixops deploy to another nix machine. remote expression is trivial-nixos.nix from the manual - https://pastebin.com/raw/FBprHm4w
<tenten8401>
actually, looks like they might be using an environment variable as a workaround for that
<tenten8401>
Not sure I like the way they're doing it but it looks like I may not have much of a choice
JasonGrossman has quit [Read error: Connection reset by peer]
ikitat has quit [Ping timeout: 268 seconds]
schjetne has joined #nixos
<tenten8401>
Maybe I could have a package that "installs" by overwriting home directory configs and making it a user-exclusive package for ever user I want to have the configs?
<tenten8401>
hmm.
schjetne has quit [Ping timeout: 256 seconds]
rauno has joined #nixos
rihards has joined #nixos
<tenten8401>
I am not convinced there's actually a way to configure /etc/skel so far
<tenten8401>
Nothing I do seems to want to work at all
civodul has joined #nixos
<norfumpit>
my god why is my nixos upgrade refetching everything? im seeing it download from the cache all kinds of packages same version as currently installed
Jackneilll has quit [Read error: Connection reset by peer]
Jackneilll has joined #nixos
<LnL>
that happens when one of the core libraries like glibc was updated
<symphorien>
if the glibc has been modified, then everything has to be redownloaded for example
<norfumpit>
did that happen recently?
Thra11 has joined #nixos
<gchristensen>
it happens every couple weeks or so
<norfumpit>
thats not so fun
<gchristensen>
nor is rpm hell
<MichaelRaskin>
Nix allows huge risky upgrades to run in background, and be easy to roll back, or be applied partially
<MichaelRaskin>
But you are paying for flexibility with storage space in Nix, all the time
schjetne has joined #nixos
<norfumpit>
so its safe to interrupt this? its now rebuilding a huge amount of native extensions for various python libs and whatnot
<MichaelRaskin>
Yes
<symphorien>
is there a way to nix-build --check a fixed output derivation ?
<symphorien>
it does not seem to check anything
<FRidh>
check the source
<FRidh>
nix-build -A attr.src --check
<FRidh>
as far as I know that works
<norfumpit>
anyone here now who can help me with nixops?
thblt has joined #nixos
<symphorien>
FRidh: it builds the derivation the first time, and then never rebuilds it
<gchristensen>
norfumpit: better to just ask
<symphorien>
the goal is to check that the hash is correct
<FRidh>
symphorien: do you mean that with --check it never redownloads the source?
<symphorien>
yes
<symphorien>
or rerun whatever builds the output
Neo-- has joined #nixos
<FRidh>
just now when I tried, it downloaded the source after it downloaded a bunch of other things, including mirror-list
<symphorien>
hum
<symphorien>
I wrote a fixed output drv which just touches $out
<symphorien>
then modified it to echo 3 > $out
<symphorien>
I never got nix to see the hash had become wrond
<symphorien>
*wrong
<FRidh>
so, you have a derivation that contains 3 in $out, and you have assigned it a hash, making it a fixed-output derivation. What is there to check in this case?
<sphalerite>
symphorien: you need to change the hash, otherwise it will find that it already has something wit hthat hash in the store and not build it.
<symphorien>
FRidh: the hash corresponds to an empty $out
<FRidh>
ah right
<phry>
norfumpit: this should not occur when you deploy against VMware or libvirt, but deploying against a physical machine requires additional configuration
<sphalerite>
symphorien: building with --check should trigger it though I think
<symphorien>
it does not seem so
<gchristensen>
I think changing the name will cause it to rebuild (?)
steell has quit [Ping timeout: 240 seconds]
<symphorien>
yes, but then I have to rebuild everything which depends on it
<gchristensen>
I get that this is desirable, but why do you want to do this?
<gchristensen>
do you think the hash is wrong?
<symphorien>
for example I would prevent me from submitting wrong hash for fetchurl in my PRs
<symphorien>
because I changed the url but not the hash, which is in my store
YaZko has joined #nixos
<sphalerite>
yeah but it won't build for them.
<sphalerite>
where "them" = anyone else that's testing it including ofborg
<symphorien>
true
<symphorien>
what if I want to check that all fetchurls in nixpkgs still exist ?
<sphalerite>
I think infinisil did a script for that a while back
<symphorien>
I wonder how it works
<infinisil>
Ah yeah but I never finished it because it doesn't always work
<infinisil>
It worked by parsing all nix files, then grepping for strings that look like urls in the result
<infinisil>
Then check each url for redirect, https version, etc.
<symphorien>
if nix-build --check worked it would be easy: nix-instantiate release.nix, iterate on all fixed-output derivaiton and nix-build --check them
<infinisil>
But then I need to build everything..
<symphorien>
no you still get all non fixed output things from the cache
<symphorien>
and for fixed-output things, it is usually "download it"
<infinisil>
but then it wouldn't check the urls
<symphorien>
why ?
<symphorien>
it would retry to download and then check the hash
<infinisil>
Ah yeah
rauno has quit [Ping timeout: 240 seconds]
<infinisil>
What my script does is just try the urls, not actually download it, so the hashes can't get adjusted
<symphorien>
ah I see
<infinisil>
But the advantage is that it runs decently fast and doesn't require terabytes of downloading..
<infinisil>
The -1 mean that this url doesn't exist anymore (404 i think)
MinceR has quit [Ping timeout: 245 seconds]
<infinisil>
a number above n means that the url got redirected to a new location, the lower the number, the fewer differences from the old url
<infinisil>
a number above 0*
MinceR has joined #nixos
<infinisil>
However the -1 ones can't really be used, because stuff like `https://example.com/${version}.tar.gz` would only get extracted as `https://example.com/`, which might still give a 404 even though the full one with version works
<infinisil>
Then there's also the problem: How to actually replace the urls in nixpkgs with the changed versions?
<infinisil>
sed might work, or it might have lots of problems
<symphorien>
I had not thought of this problem
rihards has quit [Quit: rihards]
Synthetica has quit [Quit: Connection closed for inactivity]
<Guest7306>
Hi guys, still fairly new to NixOS. Someone here provided a temporary workaround for using teamspeak, but I have to rerun/install it every session.
<Guest7306>
How can I make it more permanent using nix?
<tilpner>
What was the workaround?
schjetne has quit [Ping timeout: 256 seconds]
<Guest7306>
It uses NIX_PATH=... followed by nix-shell -p teamspeak_client --run ts3client
<Guest7306>
from a non-official nixpkgs git repo
<{^_^}>
[nixpkgs] @7c6f434c pushed to master « libbsd-freedesktop: re-init at 0.9.1, use for samba »: https://git.io/vhWui
<tilpner>
Guest7306 - Try it from your configuration.nix (that's better than nix-env anyway)
<infinisil>
I personally can and cannot recommend ncat, it has a bunch of nice features more than netcat, but also I think I found a super weird bug with it
<Guest7306>
tilpner: I was only using nix-env as it was intended to be a temporary work-around but I'll try it configuration.nix
<Guest7306>
I need to import the nixos-unstable-small channel in there as well right?
<ben>
I only tried to use nix to find the source for netcat so I could figure out if it can set TCP_NODELAY or something
<ben>
but I guess if there's so many netcats floating around that's not gonna work
<tilpner>
Guest7306 - Yes, as I said above (though you may need to add config.allowUnfree = true;
<ben>
I'm trying to do the equivalent of socat - tcp:blah:blah,nodelay on someone else's system that doesn't have socat on it :/
<Guest7306>
tilpner: I've already allowed unfree in my nix. There's only one thing I'm unsure about - how can I know the exact name of the teamspeak package if I can't find it in any queries?
<tilpner>
Why would the name have changed?
<Guest7306>
well in the past couple days I've seen it being referenced as teamspeak, teamspeak3, ts3client, and teamspeak_client
<tilpner>
Just use the name you used in the workaround
<tilpner>
(the manual one)
<Guest7306>
it's just odd that I couldn't find it it in any queries despite having added nixos-unstable-small to my channels
<tilpner>
I'd be guessing as well, I don't use nix-env at all
<tilpner>
You may have done it wrong, nix-env isn't the most intuitive tool
<Ariakenom>
tilpner: Thanks. Does anyone know how the versions match up against rpi zero w?
<tilpner>
You might be running into a Nix2 bug here
YaZko has quit [Quit: YaZko]
<GiGa>
Anyone else have an issue with Gnome 3 and an (older) Nvidia card in that pressing meta will sometimes crash Gnome Shell. When it does it for a second time you're demped back to the login screen
<GiGa>
?
<Guest7306>
tilpner: Oh wow that worked perfectly, thanks a ton!
YaZko has joined #nixos
<Guest7306>
I'm a little mystified and disappointed as to why the configuration.nix didn't work but oh well
endformationage has joined #nixos
hph^ has joined #nixos
<tilpner>
It would have worked just fine with fetchFromGitHub
<Ariakenom>
I've done no nix before. Is making an SD image with SSH login on a RPi0w reasonable?
<Guest7306>
I was trying the let unstable = import <nixos-unstable-small> ... method but with no luck
<tilpner>
Yes, that's a known bug
<tilpner>
Which... should probably be linked in that wiki entry
<Guest7306>
Ah ok, no problem then
<Guest7306>
yeah would help a little bit
<Guest7306>
How would I be able to tell when the fix is made on the main channel?
<tilpner>
If there was a main channel, it would be master
<tilpner>
If you're asking about 18.03, that... won't happen unless someone backports it
<tilpner>
And it should soon get to nixos-unstable
<Guest7306>
I was under the impression that someone here was working on a fix
Neo-- has quit [Ping timeout: 245 seconds]
<Guest7306>
sorry I should have been more clear, I meant what method should I be using to check whether the 18.03 package is patched (in the future)
freeman42x]NixOS has joined #nixos
<vcunat>
gchristensen: great if it is :-) (I can't really tell; it was a long-term problem.)
<vcunat>
We'll see in time if the errors stop appearing.
<Guest7306>
tilpner: not quite sure I'm understanding - what's stopping it from reaching 18.03?
<tilpner>
I'm not familiar with the exact backporting policy. Someone has to backport this fix, it will never automatically reach 18.03 (this is intended, and a feature)
knupfer has quit [Ping timeout: 265 seconds]
<samueldr>
Ariakenom: there's a bit of a chicken and egg issue if you want to rebuild the image for raspberry pi, you will need an ARM platform equivalent to the one you wan to build for, so ARMv6 for raspberry pi 1 and 0
<Ariakenom>
samueldr: Oh. No cross building? :(
<samueldr>
I may be wront, but last time I looked it looked like cross couldn't be used to build the whole systems
<samueldr>
wong*
<samueldr>
wrong*
<samueldr>
there are tricks, e.g. you could use qemu-system or qemu-user to do so, the first would be awfully slow, the latter would be more manageable as it shouldn't really need to build stuff
rain1 has joined #nixos
<Ariakenom>
well darn
<Ariakenom>
samueldr: thanks a lot. probably saved me hours
<samueldr>
though, you coule easily do it in-situ
<samueldr>
burn the image to an sd card, use either serial or hdmi+kb and change configuration.nix there
goibhniu has quit [Remote host closed the connection]
cloud-maingo has joined #nixos
blankhart has joined #nixos
schjetne has joined #nixos
newhoggy has joined #nixos
<Ariakenom>
Yes. "The base images are configured to boot up with a serial TTY" is nice. But unfortunately don't think I can connect
<gchristensen>
it would be really cool if I could add kernel modules without recompiling the entire kernel
<samueldr>
Ariakenom: why are you thinking so?
<samueldr>
if you have the hardware, it would be a bug if it's not possible to connect, and would need to be fixed :/
<Ariakenom>
just don't have any hardware
<samueldr>
ah, I would highly recommend getting the serial hardware, it's not only useful for raspberry pis, could be used for other fun projects later :)
<gchristensen>
yeah generally super important
newhoggy has quit [Ping timeout: 265 seconds]
<jophish>
Thanks gchristensen!
schjetne has quit [Ping timeout: 245 seconds]
<gchristensen>
jophish: =)
<MichaelRaskin>
gchristensen: well, out-of-tree builds of modules work in general, maybe they could be forced for some of the in-kernel modules too
<gchristensen>
MichaelRaskin: sure seems like we should be able to have the technology :)
<gchristensen>
the cool thing about mellanox nics is they're really great and nice and fast. the not cool thing is enabling them in the nixpkgs kernel config means a recompile.
<MichaelRaskin>
Maybe a trivial break-out attempt could work…
<samueldr>
solution: apply silly patches to your kernel, then you always need to rebuild anyway :)
<samueldr>
(though yeah, it would still be useful in my situation where there would be only a partial build)
iyzsong has quit [Ping timeout: 256 seconds]
hph^ has quit [Ping timeout: 240 seconds]
sauyon has quit [Ping timeout: 260 seconds]
<Plato[m]>
I have lots of directories called "/tmp/nix-shell-*". Are those for open shells, or is this some sort of leak?
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
hph^ has joined #nixos
hph^ has quit [Max SendQ exceeded]
orivej has joined #nixos
GiGa has quit [Quit: Leaving]
<rotaerk>
hmm nix-build always builds my haskell project, even if I didn't change anything; how could I determine why?
<rotaerk>
suppose I'm a bit behind on channels... 17.03
playX has quit [Ping timeout: 260 seconds]
<azazel>
hi guys, anyone knows why defining boot.loader.grub.extraPerEntryConfig doesn't work with efi boot?
majo_ has joined #nixos
<azazel>
how can i make it work?
rauno has quit [Ping timeout: 260 seconds]
<samueldr>
looking at the implementation, it seems it should work
<samueldr>
(though, as the name says, it only works if grub is used)
<azazel>
yes, I've the entry for systemd-boot enabled
schjetne has joined #nixos
<azazel>
I think that it may be the reason
<samueldr>
most probable
<azazel>
In fact, It seems to be a systemd-boot config file... I should give some money to the archlinux guys... their wiki is always the right place for an answer
camsbury has joined #nixos
<azazel>
but systemd-boot has very few config entries, and none really useful
<rotaerk>
yeah, upgrading to the latest channel made nix-diff available for me...
<{^_^}>
[nixpkgs] @xeji pushed to release-18.03 « nixos/release-combined: remove keymap tests from tested job »: https://git.io/vhWwZ
logzet has quit [Ping timeout: 265 seconds]
logzet_ has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 260 seconds]
alex`` has joined #nixos
<infinisil>
rotaerk: You probably just used `src = ./.` in your derivation, but you want `src = lib.cleanSource ./.` instead
playX has joined #nixos
<playX>
How i can install gnome builder? I can't find package
<rotaerk>
infinisil, thanks; I'll check that out. I did use src = ./src, but I overrode it with: src = builtins.filterSource (path: type: baseNameOf path != ".git") drv.src;
<andi->
playX: well there isnt one (yet)
<infinisil>
rotaerk: Ah yeah, the thing that causes it is the result symlink as previously mentioned, so you want to exclude that one too
<playX>
andi-: that's sad :( My favourite IDE for C++ and Rust
<andi->
playX: there is PR which I started in January. Due to shifts in priorities and frustration about how many dependencies it has I stoped working on it
<rotaerk>
well, I'm not sure about that; the source is in a subfolder; the result doesn't go in there
<rotaerk>
I'll try it out though
<andi->
i think there might not be a lot more to do. It did already startup but there were issues with the project templtes
periklis has quit [Ping timeout: 276 seconds]
<rotaerk>
hmm nix-diff didn't find any differences. I ran nix-instantiate on my default.nix twice, and the resulting derivation was the same for both
<infinisil>
rotaerk: Well nix-instantiate doesn't produce a result symlink so that makes sense
<infinisil>
(If that were the problem)
playX has quit [Ping timeout: 260 seconds]
<rotaerk>
oh, I guess src *is* ./., not ./src
<rotaerk>
wonder why
<rotaerk>
oh right, because the cabal file says they're in ./src, so it has to run in .
Ariakenom has quit [Read error: Connection reset by peer]
<playX>
What package i need to install for `ar` and `gcc-ar` command?
<rotaerk>
from the commandline I just tried running gcc-ar, and it told me: The program ‘gcc-ar’ is currently not installed. You can install it by typing: nix-env -iA nixos.gcc-unwrapped
<rotaerk>
well according to matthewbauer it apparently is
<infinisil>
rotaerk: nix-locate /bin/ar
schjetne has joined #nixos
<rotaerk>
ah, yeah
<rotaerk>
playX, once you get the index built, run: nix-locate -w /bin/ar
playX has quit [Quit: Page closed]
<rotaerk>
or that
<infinisil>
Oh I didn't know about -w, nice
LnL has joined #nixos
<rotaerk>
so uh, either 1) is there something like buildEnv that actually puts files, rather than links, or 2) if I did use buildEnv, what would be the appropriate way to prepare it for distribution?
<infinisil>
rotaerk: Why do you want it to copy it?
<rotaerk>
I have a haskell project derivation and a shader file derivation (it reads all the GLSL shader files and compiles them to SPIR-V)
<infinisil>
Nix builds are meant to be distributed as a set of store paths, not just one store path
<rotaerk>
I mean distribution to someone who doesn't use nix
<rotaerk>
for actual execution, I need them to be together in the same place, because the executable will be looking for the SPIR-V files in a ./shaders subfolder
<infinisil>
But normally the user needs nix to be able to run nix stuff
<rotaerk>
I was thinking of nix as just a build tool, where the final derivation output is something I could just zip up and send to someone
<rotaerk>
though, I guess they'd be responsible for resolving dependencies manually
<rotaerk>
which would suck
<rotaerk>
runtime dependencies *
<infinisil>
Nah that's not possible
<infinisil>
Nix has every dependency as a direct path to /nix/store/<hash>-<name>/...
<infinisil>
You can't change that without rebuilding
<infinisil>
generally
<joepie91>
infinisil: possibly with a chroot-esque wrapper?
logzet_ is now known as logzet
<rotaerk>
you mean when an executable needs to dynamically load a shared object, it will look specifically at that path in the store?
<joepie91>
yeah
<rotaerk>
I see
<infinisil>
joepie91: Hmm yeah, I think that's essentially what nix-bundle does
<infinisil>
But nix stuff is really meant to be run with a nix store, it all plays very nicely together with the dependencies
<infinisil>
and it's super easy to distribute stuff when you do it like this
<rotaerk>
well, I'm imagining a situation (probably not for my project, but a more sophisticated one) where the shaders would be replaceable by modders
<rotaerk>
I guess in this scenario, the modders would need to familiarize themselves with nix
<infinisil>
Nix would work really well for that, get everyone to use nix and it will be easy
<rotaerk>
lol
<infinisil>
Well not the getting everyone to work with nix part, but the one that follows :)
<rotaerk>
:P
<rotaerk>
meh, game developers define the tools the modders use; if I made a moddable game and declared they must use nix, they'll have to respect my authoritah
<rotaerk>
(or find a hack, at their own risk)
<infinisil>
It's really a joy
<infinisil>
No more "you need to install foo, bar, qux, and hope that your distro has those and the versions are correct to build this project"
<infinisil>
Just `nix-build` and it will work
<rotaerk>
thing is modders don't usually build from source
<rotaerk>
they just drop in some data files and shit
<infinisil>
You can make and serve a cache to not have everybody need to do a source build
<infinisil>
rotaerk: By e.g. using domenkozar's new Cachix: https://cachix.org/
<infinisil>
:D
<rotaerk>
k
<joepie91>
rotaerk: also, mind that 'build from source' is a transparent thing in Nix
<joepie91>
it's just what Nix does if there are no binary builds available, automatically, and with equivalent results
<joepie91>
so familiarity with build tools and such isn't needed
<rotaerk>
k
<rotaerk>
makes sense
<rotaerk>
while you can avoid building from source, with caches, is it possible to use nix for closed-source projects? (just curious; I think if I made a game, I'd actually make it open sores)
<rotaerk>
so that they can ONLY get it from the cache, or something
<MichaelRaskin>
rotaerk: you can write a Nix package that fetches binaries and installs them
<rotaerk>
k
magnetophon has quit [Read error: Connection reset by peer]
<MichaelRaskin>
Maybe also patchelf it, so that you can let the same download work on Ubuntu and on Nix, but Nix package would auto-patch the path to libraries
<joepie91>
rotaerk: 'source build' in Nix just means 'uses some sort of source data that it turns into a Nix package'; that source data does not necessarily need to actually be source *code*, it can also be a binary, or an archive with binaries and metadata, or whatever else your custom 'build' process does
<joepie91>
rotaerk: I have a few packages that use GOG installers as their 'source', for example; it extracts them and then copies over binaries and metadata to the right places, and patchelf's the game binaries to make them work under NixOS
<MichaelRaskin>
We have packages for Google Chrome, not only Chromium, after all
YaZko has quit [Quit: YaZko]
<ldlework>
infinisil: hey you aruond?
<infinisil>
Indeed
<infinisil>
I made some more changes, so it might even be testable now :P
<ldlework>
infinisil: if I wanted to add your nixpkgs fork, the branch with the znc module, to my channels, how do I do that? How do I then, inside my nixos configuration, utilize the systemd unit module that you have adjusted from your custom channel?
schjetne has quit [Ping timeout: 260 seconds]
<ldlework>
Basically, how do I test your thing, without manually cloning it?
<infinisil>
Hmm.. Do you really want to use it on your system?
<ldlework>
I understand how to get packages from your fork, using import (fetchTarball ...) {};
<ldlework>
infinisil: I mean, the same goes for nixops
<infinisil>
The chances of it not working are high
<ldlework>
but I don't know how to use /modules/ from your fork
<infinisil>
Don't think you can do that tbh
<ldlework>
infinisil: yeah I'll spin up a nixops
<ldlework>
I see.
<ldlework>
That's a shame.
<ldlework>
We have the ability to pick and choose packages from arbitrary sources, but not modules.
<infinisil>
Indeed
<infinisil>
Yet at least
<infinisil>
My vision is that eventually all package-related modules are provided by the packages themselves. Then you can mix and match modules from whatever source you need
<ldlework>
So lets say, sure, I wanted to run my whole system on your fork, just to try out the znc module, how do I do that? Or if I'm going to spin up a new nixops machine, how do I get it to use your fork?
<ldlework>
Basically, how do I test your modules at all?
<infinisil>
If you wanna use nixops for it:
<infinisil>
git clone my nixpkgs, checkout the correct branch
<{^_^}>
[nixpkgs] @orivej pushed to master « pandas: fix check with the current pytest »: https://git.io/vhWiB
<infinisil>
Create a new deployment (I think this way you can use a separate nixpkgs for your machines and the testing)
<mog>
is there something going on with unstable? i did a nixos-rebuild switch --upgrade but the newer kernel is still not showing up when i did a search for it is still showing the older version as well
<infinisil>
ldlework: Use -I nixpkgs=/path/to/my/checkout to make it use that nixpkgs instead
<infinisil>
Other than that everything should be the same
camsbury has quit [Quit: WeeChat 2.0]
<tenten8401>
Figured I'd ask again just to see if anyone had a solution, Is there a way to define a "skeleton" for home folders in NixOS?
<tenten8401>
Sort've like how other distros have /etc/skel
<MichaelRaskin>
Can /etc/skel be a symlink? Because you can definitely just add a symlink to the /etc entries
<infinisil>
tenten8401: What does /etc/skel do exactly?
<tenten8401>
infinisil: When a new user is created, the contents of /etc/skel are copied to that user's home directory
<tenten8401>
It allows for a certain setup for your NixOS desktop to be defined while installing instead of doing it manually
<infinisil>
And what MichaelRaskin suggested doesn't work?
<FRidh>
Wait, no, I would imagine it would still use root's channel in case root does an opration directly.
<infinisil>
tenten8401: If it's useradd, it might work by setting `security.pam.services.useradd.makeHomeDir = true` in your configuration.nix
<foldingcookie>
what does "does an opration directly" mean? does root not have a private nix environment like other users?
<tenten8401>
I'll mess with it for a bit
<tenten8401>
and get back to y'all
schjetne has joined #nixos
Ariakenom has joined #nixos
YaZko has joined #nixos
papika has joined #nixos
Neo-- has joined #nixos
dvim has quit [Quit: WeeChat 2.1]
majo_ has quit [Ping timeout: 256 seconds]
LnL has quit [Ping timeout: 248 seconds]
pie__ has joined #nixos
freeman42x[nix] has joined #nixos
pie_ has quit [Ping timeout: 240 seconds]
sw4n has quit [Quit: Quit]
himmAllRight has joined #nixos
FRidh has quit [Quit: Konversation terminated!]
schjetne has quit [Ping timeout: 260 seconds]
aarvar has joined #nixos
logzet has quit [Remote host closed the connection]
<{^_^}>
[nix] @volth opened pull request #2205 → straightforward implementation of 'nix copy' → https://git.io/vhW1q
knupfer has joined #nixos
logzet has joined #nixos
andymandias has quit [Ping timeout: 265 seconds]
robstr has quit [Quit: WeeChat 1.9.1]
knupfer has quit [Ping timeout: 265 seconds]
andymandias has joined #nixos
steell has quit [Ping timeout: 256 seconds]
vcunat has quit [Quit: Leaving.]
<phry>
Just a question on nixpkgs: Is there another way than adding a package to all-packages to have it be built by hyrda? I have a module that requires a package with an override, and only specifying that in the module file means that every user has to build it, or am I wrong?
<matthewbauer>
phry: that's basically how it works right now
<{^_^}>
[nixops] @srghma opened pull request #965 → Feat: aws nvme support (WIP) → https://git.io/vhW1j
<phry>
matthewbauer: okay, I guess I'll have to accept that then
SagnikS has joined #nixos
<SagnikS>
Hey!
<SagnikS>
I wanted to install Nix on a RAID setup.
spear3 has joined #nixos
<SagnikS>
In arch we added the arrays through mdadm and export the config to mdadm.conf and mdadm_udev was added to the mkinitcpio
jules has joined #nixos
jules is now known as Guest73519
<phry>
SagnikS: usually I'd say just mount everything correctly before calling `nixos-generate-config`. Your hardware-configuration should reflect everything you need
<phry>
SagnikS: https://nixos.wiki/wiki/NixOS_on_ZFS also as a setup that contains a RAIDed non-zfs partition. You might want to look at that (or use zfs zraids instead of mdadm raid, zfs is great ;) )
<infinisil>
zfs ftw \o/
<SagnikS>
I was always getting an error of /boot can't be probed or smth like that. Not sure. Will give a try to ZFS now.
<SagnikS>
Funny how I use ZFS in a production server bcz it came bundled with Proxmox
<SagnikS>
:P
<phry>
SagnikS: but when using zfs: read about zfs. For one, it is definitely different from classical filesystems, and you'll miss out on a great number of features if you "just use" it
<SagnikS>
Yep, correct. That happened to me when I was using btrfs :P
<phry>
^^
<Guest73519>
hi, i upgraded from 17.03 to 18.03 but packages like firefox, docker are not upgraded. Is there something else to do?
<symphorien>
how did you upgrade ?
<SagnikS>
IDK how I never came to know about NixOS before
<SagnikS>
Probably the most different OS I've ever tried
<phry>
SagnikS: I'll just name a few things you should know about: zraid, deduplication, compression, native encryption, snapshots, zpools, arc
<SagnikS>
The problems Nix tries to mitigate are some really irritating issues tbh.
<SagnikS>
Thanks ;)
<symphorien>
Guest73519: did you do all the nix-channel mitigation as root ?
<symphorien>
s/mitigation/manipulation/
<phry>
SagnikS: you'll get used to it. Most things can be done in a way that feels very simple once you get to know Nix. Sometimes, you'll have to pull off weird shit though ;)
<Guest73519>
symphorien: yes
<symphorien>
can you paste the output of sudo nix-channel --list ?
<symphorien>
you did nixos-rebuild switch after that ?
<phry>
Guest73519: I'll have a go at it: did you install firefox, docker etc. using "nix-env -i"? In that case, they won't update with a nixos-rebuild switch.
<symphorien>
ah right
<Guest73519>
docker is in the configuration.nix
<Guest73519>
and firefox also
<symphorien>
but are they also in nix-env -q ?
<Guest73519>
yes
<symphorien>
then remove them
<symphorien>
you don't need them in both places
<Guest73519>
so all i need is to remove them, then specify it in configuration.nix and run the command nixos-rebuild switch?
<symphorien>
yes
schjetne has joined #nixos
<Guest73519>
ok i'm going to do that
<Guest73519>
thanks
<symphorien>
to update things in nix-env , use nix-env -u --leq
<symphorien>
but (imo) I'd favor configuration.nix over nix-env
<papika>
symphorien: speaking of, how would II take changes I've made using nix-env and "save" them to configuration.nix?
<papika>
like installing a package imperatively and now wanting it declaratively. do I just need to remember and write down everything I do and then redo it all?
<papika>
infinisil: hmm ok
<infinisil>
papika: Yeah what symphorien said, you can list them like that, then you could put all of those into your configuration.nix manually
<infinisil>
,nix-env-r
<{^_^}>
A simple way to install all your packages declaratively is to use `nix-env -ir default.nix` with the file of the form `with import <nixpkgs> {}; { inherit hello; }` to install hello. Note that with the -r switch this removes all your previously installed packages
<infinisil>
However there's this ^^
<{^_^}>
[nixpkgs] @qolii opened pull request #41395 → libarchive: pull in patch to support LibresSSL-2.7. → https://git.io/vhWDv
<papika>
I see
<papika>
{^_^}: infinisil: ok thanks guys :)
winem_ has joined #nixos
Guest73519 has quit [Quit: Page closed]
LnL has joined #nixos
matthewbauer has quit [Ping timeout: 265 seconds]
<justanotheruser>
what are the typical ways of speedin gup a build?
tertle||eltret has joined #nixos
SagnikS has quit [Quit: Page closed]
thblt has joined #nixos
schjetne has quit [Ping timeout: 265 seconds]
tenten8401 has quit [Quit: Page closed]
<norfumpit>
phry: do i basically need to pull the configuration.nix file from the remote machine? hardware-configuration included?
norfumpit has quit [Quit: norfumpit]
norfumpit has joined #nixos
xeji has quit [Quit: WeeChat 2.0]
thblt has quit [Remote host closed the connection]
<phry>
norfumpit: yes, if deploying against a physical machine you will need the partition stuff from hardware-configuration and the bootloader config. most likely a few other things, too
<papika>
is anyone able to lead me in the right direction for writing code inside of a configuration.nix? a config value expects a filename, but the file doesn't exist/is changing. I'd like to have the evaluator stop, create the file with some content from another file, and return the path to the newly created file... is that possible?
dbmikus has quit [Ping timeout: 265 seconds]
<infinisil>
papika: What are you trying to do? This heavily smells like an XY problem
spear3 has quit [Remote host closed the connection]
<papika>
so I have my initrd set to start an ssh server on boot that I can connect to and decrypt the hard drive so the system can continue booting. this was actually really simple to step /but/ it uses dropbear by default. and the actual fully booted server uses openssh
<papika>
the host keys are not compatible. so I get "WARNING POTENTIAL MAN IN THE MIDDLE ATTACK" every time I reboot
<infinisil>
You maybe just want to have `the.option = ./otherfile` which reads ./otherfile at evaluation time, copies it into the /nix/store, and returns the path to it. (Well that only happens when the value uses it like "${./otherfile}", but that's pretty much always the case)
xy2_ has joined #nixos
hiratara has quit [Ping timeout: 276 seconds]
<infinisil>
Hmm..
<clever>
generate a new hostkey that works in both?
<papika>
yeah, so I can use dropbearconvert`
<papika>
yeah, so I can use `dropbearconvert`
<papika>
unfortunately I dont' think I can use one for both. they need to be converted. and it looks lke the dropbear one keeps getting deleted?
hiratara has joined #nixos
<clever>
papika: what file appears to be getting deleted?
<papika>
if I let it create one in /run/keys or copy and convert my openssh into /run/keys it always gets removed
<papika>
the dropbear host key
<clever>
ramfs on /run/keys type ramfs (rw,nosuid,nodev,relatime,mode=750)
<papika>
ah
<clever>
papika: thats a tempfs, its lost on reboot
<papika>
yes maybe I can store the two keys somewhere like `~/.keys/` where it won't get deleted
<Guest51395>
Oh, thanks! I thought the unstable channel is formed directly from nixpkgs on github.
<clever>
Guest51395: unstable only updates when the testing passes
<Guest51395>
And if I want nethack with X11 interface. Should I create a new package, or add functionality to an existing one? Now only tty interface is available.
<clever>
samueldr: id say youll need to inspect the script to see what its doing, and then analyze the logs to see why its not doing that
<samueldr>
when you say the logs, nix builder logs?
<clever>
the output it made while building, and any log files it generated in its /tmp/nix-build dir
Guest51395 has quit [Quit: Page closed]
<samueldr>
great thanks, this already helps; I now know where to look
<alexteves>
I have a derivation that's failing in _configure_. Is there a simple way to get at the config.log? I assume it's erased along with the tmp dir used for the build so I'd need to change the derivation to output it
<pie__>
do i NEED to use the symbolic names for numeric keycodes? >_>
<pie__>
for this "key" syntax
<infinisil>
Hmm, it might work if you define <1> to be key code 1
<infinisil>
Oh hold on I found something
<infinisil>
Check out keycodes/aliases
<ldlework>
Is there anyway to set channels during a nixos-install?
<pie__>
oh w00t that looks good
<ldlework>
Like if your configuration.nix is already setup to utilize a non-standard channel
<infinisil>
These's definitions for the key codes in there for certain qwerty
<ldlework>
I'm not sure how you'd bootstrap a system
<infinisil>
layouts like qwerty*
<pie__>
im guessing this is the classic "latin codepage"
<pie__>
but i mean i cant do somethng like key 123 {...}
<pie__>
geez xkb, you dont let me go high, level, you dont let me go low level, stuck in the middle with you :pp
<pie__>
infinisil, ok i fixed those but its still failing to compile with the same error. maybe it doesnt like that i put unicode characters in the config?
<infinisil>
pie__: Ah yeah you need to include them
<infinisil>
`include "aliases(qwerty)"` in the xkb_keycodes section