<infinisil>
This is me working towards having just generic `settings` options which can accept arbitrary config values, but also allow type checking a part of them using freeform modules
<noonien>
also, nixos is a GREAT language for build scripting, and configuration. but i'm not sure it's as great at general-purpose things. i'm not sure how this can be solved, or if it can be.
<infinisil>
This way module authors don't need to encode all settings the program support as NixOS options, but they can still do the most important ones
<noonien>
yes, that's great!
<infinisil>
But it also leaves the user free to specify any additional settings (but not typechecked then)
<infinisil>
(you can ignore the RFC as it needs to be updated. The two PRs are really the important bits)
<matthewcroughan>
noonien your script is just flawless :P
<matthewcroughan>
you even labelled the fat32 with all caps unlike the nix install docs
<noonien>
hehe, i'm glad it helped
<noonien>
i would also LOVE to be able to use nix as a configuration language in my own apps
<noonien>
i've used dhall, and i don't think i'll be using anything else if I can
smatting_ has quit [Ping timeout: 260 seconds]
alexherbo2_ has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
yui79 has quit [Remote host closed the connection]
<eyJhb>
Can fetchurl refer to a file in the nix store?
<matthewcroughan>
noonien I think NixOS is gonna become more pervasive.
<matthewcroughan>
Hopefully I can help.
<matthewcroughan>
Gonna be making a vid on NixOS and Musnix which is a configuration for a realtime audio workstatin
bqv has quit [Quit: WeeChat 2.9]
bqv has joined #nixos
* Fare
is still debugging buildImage. Something fishy happens at the step "Get the files ... *not* present in the old layer"
<Fare>
Looks like that's where it's packing the very same files a second time onto the same archive.
never_released has quit [Ping timeout: 240 seconds]
never_released has joined #nixos
<eyJhb>
Can I make a if something != "", where something might only be set sometimes, but give something, a default value?
<infinisil>
Maybe you mean `if (something.foo or "default" != "")`?
<eyJhb>
That seems about right infinisil
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JJoT5
<eyJhb>
But in general, my method of overriding is useless
<eyJhb>
Because I need to redefine all my vars :(
<M0-[m]>
is default.nix a convention? where can I learn more about it?
noudle has quit []
<eyJhb>
I need some much better than doing this - https://termbin.com/iwp3o to override. Currently doing a // on a set, which means I have to specify everything again... The data I override is loaded from a .json file
<eyJhb>
Any better ways?
* eyJhb
pokes infinisil and bqv
<Fare>
OK, looks like the problem is that the "layer" (containing /) and the "layerFiles" (containing /nix/store) are made in two passes that leave no opportunity for file sharing, even though the "layer" files are actually part of the "layerFiles"
<Fare>
so of course, everything is copied double.
Darkmatter66 has joined #nixos
<Fare>
this is very f'ed up
<matthewcroughan>
noonien After I generated my configuration `networking.useDHCP` is set to false.
<matthewcroughan>
What does that mean?
<matthewcroughan>
Oh there's a comment above it hmm
<matthewcroughan>
I got my boot and root mixed up,
<matthewcroughan>
I'm an idiot
terribleArtist has joined #nixos
twe4ked100 has joined #nixos
codygman has quit [Read error: Connection reset by peer]
maier has joined #nixos
codygman has joined #nixos
<twe4ked100>
Hey, sorry if this is answered somewhere that I haven't found. I'm running MacOS, how likely is it that packages from nixpkgs will work? Thanks
<{^_^}>
[nixpkgs] @zowoq opened pull request #94632 → buildGoModule: change doCheck default to true → https://git.io/JJoLE
justanotheruser has quit [Ping timeout: 260 seconds]
<Fare>
some people spent a lot of time writing optimizations that became pessimizations after other people did their own changes.
bqv has quit [Remote host closed the connection]
sigmundv has quit [Ping timeout: 246 seconds]
gustavderdrache has quit [Quit: Leaving.]
bqv has joined #nixos
<Fare>
This begs for a complete rewrite :-(
<infinisil>
Fare: Can you be more specific?
<Fare>
infinisil, stream_layered_image.py does its best to not create stuff on disk
<Fare>
creating a tarball twice as a stream so its can compute its checksum and contents before to create a json file and then re-creating the tarball for actual inclusion
<Fare>
this kind of optimization
<Fare>
but buildImage currently unpacks everything on disk and creates plenty of intermediate files, in O(N^2) if you chain N images with fromImage
<matthewcroughan>
noonien are you still around?
<Fare>
so any gain from the former has been dwarfed by that
<Fare>
also, the way that mkPureLayer works is defeated by buildImage
<Fare>
the former is supposed to let you create stuff without /nix/store
<Fare>
but the latter creates the /nix/store with all the transitive dependencies
<Fare>
files end up included twice
<Fare>
once by mkPureLayer, a second time by buildImage
<infinisil>
Hm I see, this does sound pretty bad
<Fare>
this is ridiculous
<Fare>
I can see how each change was suppose to fix some situation with the previous code, but the result is a big mess
Quick_Wango has joined #nixos
work__ has quit [Quit: Connection closed for inactivity]
stephaneyfx_ has joined #nixos
stephaneyfx has quit [Read error: Connection reset by peer]
<matthewcroughan>
cole-h it seems that my NixOS hangs indefinitely at Stage 1
<matthewcroughan>
Importing Root ZFS pool "Zpool" forever hangs until my screen is filled with periods
<dxb[m]>
is there a straight forward way to cross compile docker images? i wrote a simple dockerTools.buildImage expression in a .nix file and i'm building it with `nix-build --arg crossSystem '{ config = "arm64-unknown-linux-gnu"; }'` and in my buildImage config i have `architecture = "arm64";` i'm able to build the image on my laptop and load it on my raspberry pi but when i try running it i get errors because it's not able to run the
<dxb[m]>
packages in the image. i assume they're not being compiled for arm… also i'm pretty new to nix so i'm not too sure where to look from here. i've read through the stuff about cross compiling and the stuff about docker in the wiki and the manual, and i've tried googling stuff but i'm not finding anything that mentions building docker images for other architectures. i _think_ that i was also able to cross-compile just the packag
<dxb[m]>
but the pi isn't running nix (yet) so i couldn't really test that… any pointers?
<matthewcroughan>
Ashy BTRFS performs strangely worse in a lot of benchmarks.
virus_dave has quit [Quit: virus_dave]
<matthewcroughan>
Ashy DigitalKiwi noonien the docs are missing information about ZFS, can you add it?
<matthewcroughan>
boot.supportedFilesystems = [ "zfs" ]; is needed according to someone else
<infinisil>
This is added automatically if you have any ZFS filesystems
<matthewcroughan>
It was not
<matthewcroughan>
Like, I don't know what to tell you. I ran this script http://ix.io/2t7J and then generated my config, and it was not present.
<matthewcroughan>
I simply do not know what to tell you other than it must be wrong, or there is a bug.
<matthewcroughan>
I had to add this information myself.
<matthewcroughan>
anyway, the docs do not include this: boot.initrd.supportedFilesystems = [ "zfs" ];
<matthewcroughan>
I mis-typed eariler. It's the initrd bit, the docs don't say ANYTHING about this, though it's required for ZFS on Root
<infinisil>
Oh well it won't be in your configuration.nix, but boot.supportedFilesystems always implicitly contains all filesystem types from the fileSystems.* option
<matthewcroughan>
Can you help me debug this? How can we move on from here? I'm stuck.
<matthewcroughan>
The system's busted, nixos-install worked fine, so I'm screwed. I can't fix this without booting into the install media again can I?
<infinisil>
Yea probably
<matthewcroughan>
I need both boot.initrd.supportedFilesystems = [ "zfs" ]; AAAANNNDDDD boot.supportedFilesystems = [ "zfs" ];
<matthewcroughan>
What evidence do you have to suggest otherwise? The docs don't state I need the former.
<matthewcroughan>
jonringer is telling me in the discord that this is the case.
<infinisil>
You shouldn't need either. I have neither of them in my config
<matthewcroughan>
you have ZFS on Root?
<infinisil>
Indeed
<matthewcroughan>
Why can't anybody tell me the right way to do things? :(
<matthewcroughan>
Everyone so far, for the past 3 hours has given me different ways of doing this. And they're all seemingly wrong.
<matthewcroughan>
Or missing information.
<matthewcroughan>
I've read as much as I can read.
<infinisil>
What have you read and tried?
<matthewcroughan>
I'm going to have to repeat myself a lot, since I've been here for quite some hours now.
<matthewcroughan>
noonien and DigitalKiwi told me "ZFS on root is so easy here" and gave me some scripts to look at
<DigitalKiwi>
matthewcroughan: i haven't read everything yet did you fix the hangs at stage 1 that sounds like you're missing a setting
<matthewcroughan>
So, I run this, but for my disk and without a swap partition.
<DigitalKiwi>
that is not a quote i have said
<matthewcroughan>
So therefore p2 and p1 are swapped, so ignore that
<matthewcroughan>
So, that script, correctly adapted to my setup. Then, nixos-generate-config. Then apply my changes to that. Then nixos-install. Then reboot.
<matthewcroughan>
That's it.
<DigitalKiwi>
boot.zfs.enableUnstable = true;
<DigitalKiwi>
i think without that i was having hanging
<matthewcroughan>
You know what, no.
<matthewcroughan>
Remember earlier when I asked you if you ever had issues with this, and you said no?
<{^_^}>
[nixpkgs] @veprbl pushed commit from @r-ryantm to master « projectm: 3.1.3 -> 3.1.7 (#94298) »: https://git.io/JJoY4
<infinisil>
Docs aren't always correct
<matthewcroughan>
Neither are people when they say there are no bugs, issues or problems generally with ZFS under NixOS :/
<matthewcroughan>
and that they've been using it just fine and have never encountered issues.
<matthewcroughan>
Blind leading the blind.
<infinisil>
You're being rude
<infinisil>
People are trying to help you, and you're bashing their help
<matthewcroughan>
I'm frustrated.
<terribleArtist>
howdy, im trying to use node2nix to get a nix-shell that has the vue cli program, how do i go about doing that?
<Ashy>
matthewcroughan: the trick is to buy nvme and then the filesystem barely matters
<terribleArtist>
i have it running nix-build but i cant figure out how to make a shell with the cli program too
<matthewcroughan>
This is an nvme drive. And what you have said is so beside the point it can only be intended to upset me or try and make me more frustrated with the experience.
<matthewcroughan>
Speed isn't the only aspect of a filesystem.
leungbk has joined #nixos
<Ashy>
sorry, didnt mean to wind you up, i was just responding to the btrfs comment about performance
<DigitalKiwi>
21:28 DigitalKiwi: i'm not here to convince you to use it i personally don't care
<matthewcroughan>
I want to use it, and you convinced me.
<matthewcroughan>
So I did exactly what you said, and seemingly exactly what the docs said, yet I can't get it to work.
<Ashy>
and then about 12 months later the latest kernel breaking support for zfs meant i couldnt boot when i did a rebuild (although, nixos is amazing and i could just choose the previous config in the grub menu)
<matthewcroughan>
Ashy This is exactly what I posited earlier and asked DigitalKiwi.
<Ashy>
unless you plan on deploying a large zfs deployment i would personally just go with btrfs
<matthewcroughan>
He said that no, indeed it has been completely stable for him, and never has he encountered an issue like what you just described in words.
<Ashy>
note the update at the top of that blog post about it now having issues with grub
<matthewcroughan>
Then noonien came along and said he had deadlocks in some circumstances
<matthewcroughan>
Now you're telling me I'll be halted in my kernel upgrade path?
twe4ked100 has quit [Remote host closed the connection]
<matthewcroughan>
Seems like there's conflicting information. What's the real answer?
<Ashy>
zfs is not mainline kernel, you're always at risk of the latest kernel breaking support for it
<Ashy>
no matter what distro
<matthewcroughan>
I thought that 5 hours ago before going down this rabit hole.
<matthewcroughan>
But I was so convinced by DigitalKiwi that I decided to go down it.
<DigitalKiwi>
21:47 DigitalKiwi: zfs on root is maybe not recommended i may be lucky in not having problems
<infinisil>
leungbk: Feel free to ping me for merging when ofborg is green :)
<dxb[m]>
honestly why is anyone responding to this guy still? lol… he's blaming other people for his problems and not willing to continue researching any further. let him figure it out on his own, or move to another distro with this attitude.
<matthewcroughan>
dxb[m] I've asked politely for help and been left in the dark by the people who gave me the initial advice
<matthewcroughan>
after 3 hours of genuine reading.
<matthewcroughan>
I am really upset that you think I'm being a troll.
<DigitalKiwi>
well i was asleep for one
<infinisil>
matthewcroughan: People are using their free time to help you..
<DigitalKiwi>
and then i wake up and you're not being nice :(
<matthewcroughan>
infinisil At what stage have I disrespected that?
<dxb[m]>
you're no longer being polite. i didn't say you're being a troll, just being rude
<DigitalKiwi>
i get you're frustrated
<infinisil>
matthewcroughan: Now?
<matthewcroughan>
Yeah, find me the exact sentence. You're lacking context.
<matthewcroughan>
If you had the context, maybe you'd feel for me lol.
<matthewcroughan>
Same for dxb[m]
<matthewcroughan>
It's not like you've followed my experience for the last 5 hours. You're just seeing the last 5 mins of my frustration.
orivej has joined #nixos
<matthewcroughan>
What, I'm not allowed to have even one bad thought or else I'm a troll?
<DigitalKiwi>
can we get back to what's currently not working instead of blaming
<dxb[m]>
i looked into nixos for like 4 months before installing on a vm, then took 2 weeks setting up the vm, then about 2 days on hardware. just relax. nix isn't at all like other distros, it's got quite the learning curve
<matthewcroughan>
It has quite the good looking docs that aren't complete.
<matthewcroughan>
Everything looks good, but then you begin to understand that you're in uncharted territory and alone for the most part, with conflicting advice.
<infinisil>
Indeed, the docs are not very good
<infinisil>
There are efforts to improve them
<dxb[m]>
i had to boot into the install disk and re-mount my partitions like 5 times before i booted
<DigitalKiwi>
dxb[m]: :D
<matthewcroughan>
I have already rebooted several times because of Linux failing to get partition table updates because of ZFS interactions
<matthewcroughan>
yknow, partprobe not working, etc
<Ashy>
matthewcroughan: it took me 3 or 4 attempts over the space of a couple weeks (in between day job) to get nixos booting on zfs root
<matthewcroughan>
So I know that feel.
<infinisil>
matthewcroughan: How about just going for a standard zfs without luks for your first install?
lordcirth_ has joined #nixos
<matthewcroughan>
I don't see the point? My current laptop is LUKS and I didn't have to know anything about it.
<Ashy>
are you trying to learn nixos or zfs?
<matthewcroughan>
That's the funny thing. The first experience I ever had with linux was luks encrypted root, ext4 on an ssd, Arch Linux via the antergos installer.
<matthewcroughan>
And it's amazing how that was abstracted away for me.
<matthewcroughan>
The disk is configured properly, I don't see how luks is the problem?
<DigitalKiwi>
matthewcroughan: that is my zfs-configuration.nix it has most if not all of the settings i have related to zfs
<infinisil>
I'm just saying that if you don't want to get into lesser-charted territories, don't do luks + zfs
<matthewcroughan>
Who said I don't want to get into that territory/
orivej has quit [Ping timeout: 240 seconds]
<infinisil>
The reason the docs are bad is because this is lesser-charted territory
<DigitalKiwi>
oh you're using luks not zfs native encryption?
lordcirth__ has quit [Ping timeout: 246 seconds]
<matthewcroughan>
DigitalKiwi What is the relevance of `boot.loader.grub.copyKernels = true;` on a system that uses systemd-boot?
<matthewcroughan>
I did not understand this, I saw it in the official docs.
pr06lefs has joined #nixos
<DigitalKiwi>
i don't know
<infinisil>
That sure looks entirely irrelevant
<jonringer>
copyKernels is to avoid hardlink exhaustion, it's in the paragraph above the code
<jonringer>
"Using NixOS on a ZFS root file system might result in the boot error external pointer tables not supported when the number of hardlinks in the nix store gets very high"
<DigitalKiwi>
jonringer made it to irc :D
<jonringer>
Worldofpeace convinced me that the next release manager should be available in official platforms
<DigitalKiwi>
oh you're next RM nice
<jonringer>
hurray, work! :)
<DigitalKiwi>
you get lots of stickers
<jonringer>
lol
<DigitalKiwi>
...soon as i paint them :(
<jonringer>
thanks
<DigitalKiwi>
i cut the main stencil for 144+
<jonringer>
very nice
<DigitalKiwi>
but then i was like what colors do i want and ugh :( (and got busy building a deck/pool/retaining wall/helping people move)
<matthewcroughan>
I haven't been this pissed off with Linux since I was a noob 3 years ago :D
jasongrossman has joined #nixos
<matthewcroughan>
Viewing it through that lens makes me laugh haha
<jonringer>
I would slow down. ZFS is usually used for data critical applications. And it's not really meant to be the most user friendly
<matthewcroughan>
jonringer the system isn't using grub
<matthewcroughan>
What are you talking about? I want to use ZFS.
<matthewcroughan>
Therefore, I'm trying to use ZFS.
<matthewcroughan>
Telling me *don't use zfs* isn't going to make me not want to use it lol.
<infinisil>
Tbh I find zfs very user friendly
<DigitalKiwi>
i read a lot and still have to read a lot about zfs
moet has joined #nixos
<matthewcroughan>
My problem isn't with ZFS, it's with getting NixOS to run on ZFS on Root.
<matthewcroughan>
I know how to use ZFS, I use ZFS.
<ornxka>
matthewcroughan: what is the specific problem youre having?
<ornxka>
i use zfs for my root
<ornxka>
on luks too
<matthewcroughan>
Hanging at Stage1 despite successful config gen and `nixos-install`
<jonringer>
there's still a lot of subtlety with zfs though, like wrong ashift values can have horrible performance impairment
<matthewcroughan>
Using something like this script, applied to my setup, zpool is valid.
<matthewcroughan>
jonringer and that is not relevant here, at all
<matthewcroughan>
because I'm not even at the stage where we can quantify what you just said, because I can't even boot the OS, so ashift values aren't very important to me.
<ornxka>
what does it print at boot?
jasongrossman has quit [Remote host closed the connection]
<ornxka>
and, whjat does your configuration.nix look like
<jonringer>
the zfs cli is easy to use and intuitive though
<ornxka>
btw a useful kernel params is boot.shell_on_fail
pjt_tmp has joined #nixos
<matthewcroughan>
You know what else is really frustrating? Buggy Wifi hardware on a brand new laptop.
<matthewcroughan>
Intellllll
<ornxka>
you can put it in boot.kernelParams or if you boot to grub you can edit the grub entry with e and then just tack it onto the line that starts with linux
proofofkeags has quit [Ping timeout: 240 seconds]
<matthewcroughan>
is there an expression that can fix my broken wifi?
<infinisil>
leungbk: Have you tested whether this newer version works?
<matthewcroughan>
boot.intelFuckedUp = true
orivej has quit [Ping timeout: 240 seconds]
<ornxka>
ah yes
<ornxka>
(i do not know of a way to fix your wifi unfortunately)
<ornxka>
i would set boot.shell_on_fail in grub, along with one of boot.debug1, boot.debug1devices, or boot.debug1mounts (probably the last one)
<matthewcroughan>
But why, what will that let me do?
<ornxka>
depending on which one it should boot you into a shell in the initramfs environment
<ornxka>
from there, you can try mounting your root filesystem by hand
<matthewcroughan>
it was just saying it couldn't find zpool
<matthewcroughan>
something about mnt-zpool
abathur has quit [Ping timeout: 260 seconds]
<ornxka>
if for some reason youre unable to, the step that fails will tell you about the nature of the problem
<ornxka>
the specific message there would be helpful
<matthewcroughan>
alright, so how do I do this without mounting stuff in the /mnt dir on the install media
<ornxka>
if it doesnt have the zpool *binary* then that is a much different issue than if it cant mount a pool named zpool
<ornxka>
boot to grub menu, then press e
<matthewcroughan>
I don't have grub
<ornxka>
you will get to edit the menu entry
<ornxka>
oh
<matthewcroughan>
I'm using systemd-boot
<matthewcroughan>
this is uefi
<ornxka>
ah...
<infinisil>
(grub supports uefi too btw)
abathur has joined #nixos
<matthewcroughan>
ya but like, I just hate this process
<ornxka>
it is really annoying
<matthewcroughan>
like, do I really have to change my damned bootloader to debug things in NixOS? Does this really help?
<dxb[m]>
you said you're using luks but i don't see it anywhere in your config
<ornxka>
ive spent hours on dumb crap like this
<matthewcroughan>
dxb[m] nobody told me I needed to at any stage
<ornxka>
recently cryptsetup would fail by saying i had the wrong password even when it was correct when i forgot to include the kernel modules for the cipher it was using
<matthewcroughan>
blame noonien who advised me on how to use luks :P
<ornxka>
i wasted a whole damn day on that
<ornxka>
the most vague error message would have helpful in that case
<matthewcroughan>
Of course zpool is unavailable if luks isn't configured to allow it to exist
<matthewcroughan>
so, how do I configure luks?
<dxb[m]>
matthewcroughan: are you doing full disk encryption?
<ornxka>
anyway i dunno how to change your boot parameters from uefi, i still use mbr
<matthewcroughan>
dxb[m] I would really like to, yes, and I am.
<ornxka>
but that is my general debugging process for stage 1 failures
<matthewcroughan>
I mean, I have luks on the disk, I just have not configured it in my configuration.nix like you've spotted
<matthewcroughan>
since nobody told me it was necessary
<ornxka>
yeah you need to set boot.initrd.luks somewhere
<matthewcroughan>
I don't have a chat history that's large enough to get it, but I asked about this specifically, again, I have all this configured on Arch
<matthewcroughan>
"The option 'fileSystems./.device' has conflicting definitions, in /mnt/etc/nixos/configuration.nix and /mnt/etc/nixos/hardware-configuration.nix"
<bqv>
well, does it?
<clever>
matthewcroughan: what did you set it to in each file?
<infinisil>
matthewcroughan: Ah, you don't need the fileSystems."/" assignment from the manual
<infinisil>
matthewcroughan: I guess I didn't mention it explicitly, but you *only* need the boot.initrd.luks.devices.crypted.device line
<matthewcroughan>
In 10 years, will this file still build?
<matthewcroughan>
if not, why not, what do I do to make it true that it will?
<dxb[m]>
<matthewcroughan "In 10 years, will this file stil"> does it build now?
<matthewcroughan>
yes
<infinisil>
I don't know, and I don't care, I'm just here to help you right now
<matthewcroughan>
Wait, nixos-install is asking me to set my root passwd again lol
<matthewcroughan>
alright, time to reboot and try again
<infinisil>
matthewcroughan: Hold on
<matthewcroughan>
OH THAT'S INTERESTING
* dxb[m]
runs for cover
<matthewcroughan>
my old generation is here, that's epic
<infinisil>
Just to confirm, you only added this one line?
<matthewcroughan>
It worked.
<matthewcroughan>
I need to hug you.
<infinisil>
Cool :)
<matthewcroughan>
Nix Pill was half swallowed, lodged in my throat
<matthewcroughan>
it's one of those big pills that you need some water to swallow
Mateon1 has quit [Remote host closed the connection]
<dxb[m]>
i think a round of apologies to everyone is in order lol
<dxb[m]>
and go grab a snack and a nap
<matthewcroughan>
Did I not already apologise.
<matthewcroughan>
Really it's noonien's fault for not telling me that luks required that config.
<matthewcroughan>
Literally every single thing he gave me was 100% correct, except that.
<infinisil>
Stop blaming them!
<infinisil>
People make mistakes okay
<dxb[m]>
<matthewcroughan "Really it's noonien's fault for "> thus nullifying any theoretical apology
<dxb[m]>
it's your fault for not reading the docs
<matthewcroughan>
I do apologise, I'm sorry for getting frustrated lol.
<infinisil>
If you constantly blame people for making a single mistake, those people won't ever help you again
<matthewcroughan>
I did read the docs. I can't read what I didn't know existed.
<matthewcroughan>
I can't read 100% of the docs. Nobody can.
<matthewcroughan>
I did read, telling me I didn't read makes me feel just as bad as you're claiming I'm making others feel.
<DigitalKiwi>
and i don't use luks with zfs i use native encryption
<dxb[m]>
no, but you can search for keywords like "luks" "hich will _only_ hit on relevant articles
<simpson>
Computers are hard and it's time for a break.
<matthewcroughan>
Thanks Homer.
<dxb[m]>
* no, but you can search for keywords like "luks" which will _only_ hit on relevant articles
<matthewcroughan>
dxb[m] similarly, telling me "You need to configure luks in your config.nix" would also have been good :P
orivej has quit [Ping timeout: 240 seconds]
<dxb[m]>
i did :)
<matthewcroughan>
Y'all helping me for free
<infinisil>
So, I just checked out the nixos-generate-config script, and it does indeed have logic to detect luks automatically and add a boot.initrd.luks.devices entry
<matthewcroughan>
but I'm also using nixOS for free, ever thought about that :D
orivej has joined #nixos
<infinisil>
But I think it can't detect it when it's used by ZFS
<matthewcroughan>
It's not like I'm going to educate and make videos about this shit or anything.
<infinisil>
It would have to be updated
<dxb[m]>
infinisil i bust set up lvm and luks the other day and i had to config it myself. the script didn't do it for me
<dxb[m]>
* infinisil i just set up lvm and luks the other day and i had to config it myself. the script didn't do it for me
<clever>
infinisil: i think its using lsblk to track things thru the lvm and luks blocks
<clever>
infinisil: lsblk clearly shows that my tank-root is part of an lvm block on root, which is a luks block
<clever>
but its not aware of / being part of tank-root via zfs
kalbasit has joined #nixos
<infinisil>
Hm yeah, I think this could definitely use some improvements
<infinisil>
Nobody wants to write perl though hah
<clever>
rewrite it in haskell? :D
<infinisil>
I'm sure eelco will love it
<infinisil>
clever: For the future I wish for the hardware config to be in an entirely separate profile
<{^_^}>
[nixpkgs] @antifuchs opened pull request #94637 → [wip] Make gccemacs build on darwin → https://git.io/JJona
<infinisil>
So you can rollback/upgrade hardware and config separately
<infinisil>
Because currently this is pretty bad: Any filesystem change you make essentially makes a rollback fence
<matthewcroughan>
Now the question is, how do I do wayland :D
<simpson>
Is this some tour of setting up all of the hard-to-use stuff?
<matthewcroughan>
Well I do it just fine and get on with it just fine on Arch.
<matthewcroughan>
Wayland's not hard, Nix is hard, I guess.
<matthewcroughan>
I even got Sway and Wayland running just fine on Alpine (MUSL) on a laptop from 2005 (Compaq NC6120)
<matthewcroughan>
The funny thing is, I tried to use NixOS on that laptop, and it couldn't get past stage1 because it has 256MB of ram.
<matthewcroughan>
I'd have to use a VM to generate the image, then flash it. Now I realise how easy that is with nix-build I guess I can just do that.
Mateon1 has joined #nixos
<clever>
matthewcroughan: ive used nixops to deploy nixos to an eeepc 701 netbook
<clever>
that lets you trivially build on one machine, then run on another
<infinisil>
clever: I think even nixos-rebuild --target-host could be used
<matthewcroughan>
clever ah nice, I thought that's what hydra was. I thought I did not know that's what nixops was for.
<clever>
matthewcroughan: hydra is more about just pre-building packages, nixops is for building a specific configuration.nix and then deploying it to hw
<simpson>
matthewcroughan: I dunno; Nix is hard, after all~ I'm not really inclined to help, sorry. There seem to be lots of helpful hints in the README.
<matthewcroughan>
simpson not asking for help
<matthewcroughan>
I just want terminology
orivej_ has joined #nixos
<matthewcroughan>
So is nixpkgs-wayland as seen in that repo what's known as a channel?
<clever>
matthewcroughan: doesnt look like a channel to me
<matthewcroughan>
I'm not asking for direct handholding, I am asking for help :P
<matthewcroughan>
Am I supposed to put this example into a whole separate file and include it?
<matthewcroughan>
Or am i supposed to shove this alongside what I have?
<{^_^}>
[nix] @Ericson2314 opened pull request #3893 → Get rid of json.hpp and use nlohmann/json everywhere → https://git.io/JJo8L
orivej has joined #nixos
<clever>
matthewcroughan: mostly personal preference, i prefer a seperate file and then `imports = [ ./sway.nix ];` so i can turn that whole thing off with 1 comment
<clever>
and you can also reuse it on other machines more easily
<matthewcroughan>
Hmm, could you do this with secrets too?
<clever>
yeah
<matthewcroughan>
So could you have ./secrets.nix which includes hashed passwds etc
<matthewcroughan>
Man, and I thought dotfiles were cool. This is the way forward.
<daddy_james[m]>
I'll try that if I ever discover I actually need to include firmware that's not in the package manager yet
<clever>
daddy_james[m]: when done properly, youll find it in `ls /run/current-system/firmware/`
<matthewcroughan>
clever where do I learn to write configs
<clever>
matthewcroughan: i just read nixos modules
<matthewcroughan>
Well yeah me too, but I can't figure out what that thing at the top is
<matthewcroughan>
{ pkgs, ... }:
<matthewcroughan>
I can't have multiple of these in any given file, can I?
<matthewcroughan>
E.g I'm trying to shove the sway thing in the bottom lol
<clever>
matthewcroughan: thats defining a function that takes a set as an argument, and the set must contain a pkgs attribute
<clever>
a nixos module is almost always in the form of `{ pkgs, config, ... }: { stuff = things; }`
<matthewcroughan>
"set"
<clever>
but the imports key makes it much simpler to merge things
<matthewcroughan>
define set :D
<clever>
> { a=1; b=2; }
<{^_^}>
{ a = 1; b = 2; }
<clever>
a set contains multiple key/value pairs, the keys must be unique
<clever>
2020-08-04 01:19:30 < clever> matthewcroughan: mostly personal preference, i prefer a seperate file and then `imports = [ ./sway.nix ];` so i can turn that whole thing off with 1 comment
<clever>
if you do that, then nixos will merge the sway stuff for you
<matthewcroughan>
I'm close to understanding it. How would I modify my existing config.nix to include sway.nix?
<matthewcroughan>
Do I put this as a set?
<matthewcroughan>
`imports = [ ./sway.nix ];` IS a set, right?
<clever>
matthewcroughan: if programs.sway.enable is true, then line 109-133 is put into the config key, but if programs.sway.enable is false, you just get config = {};
Rusty1 has quit [Quit: WeeChat 2.3]
<matthewcroughan>
have you got any examples of importing in the default config?
<matthewcroughan>
these let's and in's are making me nervous, since I don't understand them lol
<clever>
let key1=<expr>; key2=<expr>; in <expr>
<clever>
that just creates 2 more values, key1 and key2, which the 3rd <expr> can reference
<matthewcroughan>
I have literally no idea what you're saying, I'm sorry, I lack a principal understanding :P
<clever>
have you read the nix pills yet?
<matthewcroughan>
I just need to see some dumb examples, then I can narrow in
<clever>
> let a = 42; in a
<{^_^}>
42
<clever>
> let a = 42; in a - 10
<{^_^}>
32
<matthewcroughan>
what is being printed?
<matthewcroughan>
it's so invisible
<clever>
the expression after the `in`
<matthewcroughan>
why not just say a = 42; print(a-42)
<matthewcroughan>
sorry, print(a-10)
<matthewcroughan>
like this is why I can't wrap my head around it
<clever>
because print is causing a side-effect, a functional language can only return a value
<matthewcroughan>
okay, but I don't see what is being operated on
<matthewcroughan>
print() makes it clear in its args
<clever>
the bot just parses the entire line, and prints the value out
<clever>
> 42
<{^_^}>
42
<clever>
> 5 * 10
<{^_^}>
50
<matthewcroughan>
> a - 10
<{^_^}>
value is a set while an integer was expected, at (string):318:1
<clever>
> a
<{^_^}>
{ x = 10; y = <CODE>; }
<matthewcroughan>
> in a - 10
<{^_^}>
error: syntax error, unexpected IN, at (string):318:1
<clever>
`a` wasnt a number, so you cant subtract from it
<clever>
the keys from a let block only exist temporarily
<matthewcroughan>
a = 42; a - 10
<matthewcroughan>
> a = 42; a - 10
<{^_^}>
error: syntax error, unexpected '-', expecting '.' or '=', at (string):39:12
Forkk has joined #nixos
<matthewcroughan>
I just don't get what the words do
<clever>
when you do `let a = 42; in a`, the a only exists during the `in a`, and then it stops existing
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos
<clever>
matthewcroughan: did you read the nix pills?
<matthewcroughan>
I don't get what let does, I'm sorry.
<matthewcroughan>
No, I'm busy getting instructed by you :P
<matthewcroughan>
I'm not driven by reading, I'm driven by end goals, that means I want to get sway running, and I'll only read what it takes to get there,
<matthewcroughan>
just how I'm wired
<matthewcroughan>
I'll read later if it takes it, but right now I just wanna import into a part of my config
<matthewcroughan>
and I can't understand the syntax, because the syntax is not clear, since there are words in all the examples, but none in the default config
<matthewcroughan>
there are no lets, ins or other keywords in the default config
<clever>
any time you can have a value, you can also have a `let key = expr; in value`
<matthewcroughan>
therefore I do not understand how to use import, because there are too many unknowns surrounding what is and is not required.
<dxb[m]>
and i get what you're saying about not wanting to read a bunch of stuff that's not directly related to the current goal, but your questions aren't related to that goal either, and these links answer the questions you're asking and probably do a better job than clever could do off the top of his head in a conversation
<matthewcroughan>
So, verbose learning aside, I can't do the simple thing for reasons I do not understand.
<matthewcroughan>
I placed `imports = [ ./sway.nix ];` at the end of the default config.
<matthewcroughan>
And sway.nix is a file in /etc/nixos/sway.nix of course
<dxb[m]>
because of nix's ability to rollback a broken config, or completely undo any change you make, there's not much risk in experimenting like crazy
<matthewcroughan>
So, I'm running into stuff being already defined.
<dxb[m]>
just add it to the current imports line that's already there
<clever>
2020-08-04 01:33:40 < clever> a set contains multiple key/value pairs, the keys must be unique
<clever>
matthewcroughan: there must only be a single imports = [ something ]; in the set
<clever>
matthewcroughan: if you set the provider to geoclue2, then it sets services.geoclue2.enable = true;
bsima has joined #nixos
<matthewcroughan>
for reasons I don't get on any other distribution, like logind, direct-ipc, session
<matthewcroughan>
clever that is very nice
<matthewcroughan>
that's what declarative means then, it means a lot of things..
<matthewcroughan>
options can be equivalent to other things
<matthewcroughan>
I cannot simply launch `sway` like I am used to, hmm
<matthewcroughan>
maybe there's another way
maier has joined #nixos
<clever>
ive not used sway yet, so i cant help much in that area
chipb has joined #nixos
orivej has quit [Ping timeout: 246 seconds]
<cole-h>
Why can't you just launch sway?
orivej has joined #nixos
<matthewcroughan>
permission issues cole-h
<matthewcroughan>
stuff I've never ever seen before on any other distro lol
<matthewcroughan>
having trouble getting the logs out to a file
sangoma has joined #nixos
<kini>
I guess there was some kind of disk space issue on hydra.nixos.org recently, from looking at some aborted build logs... is there an easy way to detect when this has happened, as opposed to more normal build failures? Is there some kind of status tracker for hydra that would show large upticks in failed builds, or health metrics on the build hosts, etc.?
<clever>
kini: there is a grafana monitoring all of that, and reporting alerts to #nixos-dev
maier has quit [Ping timeout: 256 seconds]
<matthewcroughan>
cole-h I cannot get that text to output to a file.. it's coming out of dbus
<matthewcroughan>
not going to stdout, this upsets me a lot lol
<chipb>
jtojnar: when trying to solve the same issue, I stumbled across irc logs where you were trying to import nixpkgs.nixosModules.notDetected way back (2020/05/27) when you were trying out flakes. I can't speak to whether it's the best way or not, but I ended up importing "${modulesPath}/installer/scan/not-detected.nix" instead. you may also need to add modulesPath to the toplevel arguments list of the file.
<{^_^}>
[nixpkgs] @zowoq merged pull request #94584 → .github/workflows/wait-ofborg.yml: double timeout if base branch is staging → https://git.io/JJwa3
<{^_^}>
[nixpkgs] @zowoq pushed to master « .github/workflows/wait-ofborg.yml: double timeout if staging »: https://git.io/JJog7
<matthewcroughan>
dxb[m] that is literally what I am following and what my sway.nix *is*
<matthewcroughan>
ah sway-session
<matthewcroughan>
I looked for sway.service
simba1 has joined #nixos
<clever>
chipb: pkgs.path returns the path to nixpkgs also
<matthewcroughan>
No, sway-session.service does not exist, the wiki doesn't contain enough info
<chipb>
clever: would that not also hit infinite recursion too? hm.
<cole-h>
sway-session isn't a service, it's a target, usually.
<clever>
chipb: ah yeah, since pkgs depends on imports
<matthewcroughan>
I don't really know enough to know what that means cole-h-h
<matthewcroughan>
I'm just used to running `sway` on every other linux distro
<matthewcroughan>
after setting XDG_RUNTIME_DIR to tmp
<cole-h>
`systemctl status --user sway-session` won't work -- you need to append `.target`
<matthewcroughan>
perms denied
tru_tru has quit [Ping timeout: 240 seconds]
<cole-h>
what
<matthewcroughan>
You heard. Permission denied :P
<matthewcroughan>
Persimmons.
pr06lefs has quit [Ping timeout: 260 seconds]
<kini>
Hmm, weird. Looking at the grafana reports, the machines where I see "no space left on device" errors (https://hydra.nixos.org/build/124705541) seem to look fine in terms of fs usage
<matthewcroughan>
Huh, it works fine over ssh but not on the system itself wtf
<matthewcroughan>
maybe it's because I `su matthew`'d
tru_tru has joined #nixos
<matthewcroughan>
oooh maybe that was the problem the whole time lmfao
<matthewcroughan>
I can run `sway` if I don't su into matthew
<cole-h>
kini: Issue was fixed earlier today I believe. No channel eval has since completed.
<kini>
cole-h: I see, but I figured I would at least be able to see the problem in grafana by scrolling back to the time of evaluation -- but no, fs usage looks low throghout
<clever>
matthewcroughan: polkit and physical terminals come into play
<chipb>
jtojnar: clever: I *think* the "correct" way is probably to import directly in the flake file instead of indirectly through a few modules/imports, but have not yet tested. I presume you did the same thing I did and were also starting from a naive conversion of an existing configuration.nix that includes a hardware.nix.
<clever>
matthewcroughan: if you login from a text console, you get different permissions from if you login via ssh, or change user with su/sudo
<kini>
cole-h: thanks for the link. I wonder if maybe the grafana dashboard excludes /tmp from the fs usage calculation, or something.
<matthewcroughan>
yes, but not on the systems I use really
<matthewcroughan>
namely arch and alpine
<chipb>
er. I guess it'd just be the module in the list in the flake.nix rather than an import there.
<cole-h>
kini: That'll be because the grafana dashboard measures the builder instances, whereas I think the problem was on the main instance of hydra (dubbed ceres, IIRC)
<clever>
chipb: scan/not-detected.nix literally only does 1 thing, hardware.enableRedistributableFirmware = lib.mkDefault true;
<clever>
chipb: you can just paste that into your config instead
<chipb>
(and I'm probably mangling terminology. I'm rather green.)
<chipb>
clever: yeah, I also realized that *after* I futzed around with it about an hour.
<chipb>
;_;
<kini>
cole-h: ahh, got it. Yes, I looked up ceres in grafana and I see the fs usage drop from ~95% to ~20% about 16 hours ago :) mystery solved!
<srhb>
frodo: Can you switch to the built system version without stack it and paste the output of nixos-version please?
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos
<clever>
frodo: line 27, your nix.extraOptions is a complete mess
itshaydendev has joined #nixos
<clever>
frodo: all of the newlines are missing
<srhb>
frodo: Oh nevermind, I just noticed it _is_ head of nixos-20.09. stack certainly builds there, so that's not it.
<clever>
frodo: having all of that junk in the extra-sandbox-paths could easily break your ability to build anything, `--option extra-sandbox-paths ''` would bypass it temporarily
<clever>
the problem is the current /etc/nix/nix.conf
<clever>
it cant make the new one to fix the problem, enless you override it with --option
wfranzini has joined #nixos
wfranzini has quit [Client Quit]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #nixos
stephaneyfx has quit [Quit: Leaving]
cjpbirkbeck has quit [Quit: Goodbye, take care]
fnlaai has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
mariatsji has joined #nixos
Alling has joined #nixos
<Alling>
Hello guys! I'm struggling a lot with Nextcloud atm. Had it working and could login at one point, but then I made more changes and now nothing works. PostgreSQL is being an absolute PITA. I just want to "start over completely". How?
<fnlaai>
idk
<Alling>
For example: `sudo -u nextcloud psql --list`
<Alling>
I see four databases. I want to see none.
<{^_^}>
[nixpkgs] @Mic92 merged pull request #91146 → nixos/zfs-replication: document expected lz4 on host system → https://git.io/JfbaP
<Alling>
clever: OK. I tried `sudo systemctl stop postgresql.service; sudo rm -rf /var/lib/postgresql; sudo systemctl start postgresql.service` but I still see the same databases.
<Alling>
All of them are owned by `postgres` which is not a user on my system so it doesn't seem like I can even delete them.
<Alling>
But I just want to "delete everything" and start over with `nixos-rebuild switch`.
<clever>
one minute
<fnlaai>
i guess nixos-rebuild switch doesn't delete data but apply config
<clever>
Alling: nextcloud might be re-creating the databases on startup
<Alling>
fnlaai: Yeah, so I want to "delete everything" manually, but I don't know what "everything" is. I basically want my system to be as if I've never done anything PostgreSQL- or Nextcloud-related.
mlatus has joined #nixos
<Alling>
clever: Ah, could be. One of the databases is names nextcloud.
<Alling>
After setting `superUser = "root"`, I get A LOT of `FATAL: role "root" does not exist` in the journal and then timeout on starting Postgres.
cizra has joined #nixos
<clever>
Alling: changing the superUser will completely break everything in /var/lib/postgresql
<Alling>
I'll try with `identMap = "superuser root postgres"`.
<clever>
thats what the stateVersion stuff is for, so it wont change when you upgrade nixpkgs
<clever>
but, if you dont have anything in the db, you can just rm -rf it again
<clever>
and it will re-make it to fit the new superUser
<rgrau>
hi everyone, since the last update of python27Package.urwid, it's failing to build for me. Added the report there, and tried it locally with latest nixpkgs repo. Is there any way I can make sure it's a general thing, not just me? https://github.com/NixOS/nixpkgs/pull/94034
<cizra>
Hello! I'm trying to set up dev environment by https://nixos.wiki/wiki/Development_environment_with_nix-shell - but I'm hitting an obstacle. SCons calls Cxxtest, cxxtest calls /usr/bin/env python, and python is NOT found by cxxtest, although it's available in shell. My shell.nix is: with import <nixpkgs> {}; pkgs.mkShell { buildInputs = [ gcc scons boost mariadb-connector-c python git ]; }
<Alling>
clever: So, all in all, what should I do? Upgrading is not an issue at all; I'm trying to set up Nextcloud for the first time.
<fps>
cizra: get yourself some stdenv package and then use the patchShebangs bash command
<clever>
Alling: not sure, i try to avoid postgres when possible
<fps>
cizra: oh, maybe not. ignore me
Mateon1 has joined #nixos
<Alling>
clever: OK, but it's explicitly recommended for Nextcloud.
<Alling>
I just want to set up a working Nextcloud. ¯\_(ツ)_/¯
frodo has quit [Remote host closed the connection]
<fnlaai>
why avoid postgres? clever it's the best sql dbms they said?
<clever>
Alling: try blowing away /var/lib/postgres and /var/lib/nextcloud again?
<Alling>
OK!
<clever>
fnlaai: all of my experience is with mysql and sqlite, and postgres is just too different
<fnlaai>
although it's learning curve is hard
terribleArtist has joined #nixos
<fnlaai>
yep that's right.
<cizra>
fps: :)
<fnlaai>
cost in learning curve
<fps>
cizra: what's the precise error message?
<cizra>
fps: sh: g++: command not found. (when compiling code)
<Alling>
clever: Bam! Deleting /var/lib/nextcloud did the trick! <3
<cizra>
fps: /usr/bin/env: 'python': No such file or directory (when generating unittest runner)
<fps>
cizra: what happens if you replace gcc with stdenv?
<cizra>
fps: same
<fps>
and if you create the shell with nix-shell -p gcc scons boost mariadb-connector-c python git
<clever>
cizra: are you using nix-shell?
<cizra>
clever: yes. Let me paste you full terminal output
<clever>
cizra: oh right, i have seen scons nuke env vars before, breaking nix builds
<clever>
if you do `type python` and `type g++`, you should see that they are available
<Alling>
clever: Thank you so much! Love this channel. <3
<cizra>
clever: Yes, they are available in shell (as mentioned before). Not through scons, though. How do I proceed? I wouldn't like to nuke scons just yet.
<clever>
cizra: read the build file that scons is using
<cizra>
clever: can't see it modifying PATH
<fps>
quote from the manpage: "scons does not automatically propagate the external environment used to execute scons to the commands"
<cizra>
ugh
<fps>
there's a section on how to propagate the environment
<clever>
been there, pulled my hair out, lol
<clever>
you need to modify something to make it NOT modify PATH, because it nukes everything by default
<eyJhb>
Just throwing it out here again, maybe clever has a suggestion as well
<eyJhb>
bqv: extend how?
orivej has quit [Ping timeout: 246 seconds]
nixuser has joined #nixos
<nikita`>
hi, this is a long shot and I can't prioritize this right now because I'm interviewing, but is Nix (and Nixpkgs) open for in-tree ports to NetBSD if they stay well-maintained? Just checking out if nix is easier to handle with this than guix.
xourt has quit [Remote host closed the connection]
cizra has left #nixos [#nixos]
turion has joined #nixos
<nikita`>
the main issue with guix was opting to not support more than one libc (glibc), which created a whole set of difficulties to expensive to maintain. I'd start looking into if this is possible differently/more liberal with nix once I have the time for this.
<srhb>
nikita`: Not to dissuade you, but I think it's unlikely that there's a strong enough consensus about this that this irc channel will know. Maybe it's a question better posed on the discourse :)
<nikita`>
rght
<nikita`>
thanks
konobi has joined #nixos
n9nes- has quit [Ping timeout: 264 seconds]
c0c0 has joined #nixos
n9nes has joined #nixos
Alling has quit [Remote host closed the connection]
<jakob_rs>
Sound doesn't work, but only on nixos-unstable, and only with linuxPackages_latest. How would I try to debug something like this?
knupfer1 has joined #nixos
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
<chrismatheson>
Hello folks!!! on my journey to a nix managed go dev env ..... what's the easiest way to install specific go packages as part of my env in my default.nix expression ? I don't feel like im up to the task of adding packages to the registry yet .... is there a way to express a set of shell commands to eval in my nix-shell ??
wallacer3 has quit [Ping timeout: 240 seconds]
knupfer1 has joined #nixos
jakob_rs has quit [Quit: WeeChat 2.7.1]
<eyJhb>
For dev in Go chrismatheson I would just use go.mods
<eyJhb>
clever: Seems like I have to use `lib.zipAttrsWith` as far as I can see
knupfer1 has joined #nixos
<eyJhb>
But not sure if it generally is the best way, I am going about doing these things. But for now I guess it has to suffice, until there comes a PR for all this stuff
terribleArtist has quit [Ping timeout: 265 seconds]
knupfer has quit [Ping timeout: 264 seconds]
knupfer1 is now known as knupfer
<{^_^}>
[nixpkgs] @moritzschaefer opened pull request #94648 → Add imagemagick-support to exwm's emacs → https://git.io/JJoQv
graf_blutwurst has joined #nixos
mixmixmix has joined #nixos
knupfer1 has joined #nixos
malook has joined #nixos
knupfer has quit [Ping timeout: 240 seconds]
knupfer1 is now known as knupfer
<mixmixmix>
Hello everyone! I'm switching to unstable and have a package which is broken (Package ‘gst-plugins-base-0.10.36’ is marked as broken). I would like to know what packages depend on it to exlude them, but stack-trace leads back to `error: while evaluating the attribute 'activationScript' of the derivation ` What does it mean?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
knupfer1 has joined #nixos
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
<jtojnar>
chipb: yeah, I considered that. In the end, I went with passing `inputs` to `specialArgs` and using `inputs.nixpkgs.nixosModules.notDetected` since I also need to import other files from nixpkgs (e.g. `"${inputs.nixpkgs}/nixos/lib/make-system-tarball.nix"`)
<cizra>
How to get the list of currently visible packages in nix-shell --pure? (I'm trying to use nix-shell for developing software, but G++ is not finding -lmysqlclient (nor -lmariadbclient), despite me having mariadb-connector-c in shell.nix / buildInputs).
knupfer1 has joined #nixos
seanparsons has quit [Ping timeout: 256 seconds]
knupfer has quit [Ping timeout: 240 seconds]
knupfer1 is now known as knupfer
seanparsons has joined #nixos
<noonien>
matthewbauer: how did i lie to you? i didn't send you any script, just a sequence of commands i used to setup my system for you to take inspiration from.
<noonien>
also, i don't appreciate you calling me a liar, because you made wrong assumptions.
knupfer has quit [Ping timeout: 246 seconds]
<noonien>
also, you keep telling people i told you what to do, or told you things about how to setup luks or zfs. i did no such thing, just gave you a paste of commands i used. if you didn't find that useful, perhaps you should ask for a refund.
<Extends>
Hi, I'm trying to package something, and so I have to create a symlink in postInstall, but no matter what I put as destination folder, nix tells me that it doesn't exist (I'm doing ln -sf $out/share/ /home/<user>/folder)
wallacer3 has quit [Ping timeout: 246 seconds]
cosimone has joined #nixos
wallacer3 has joined #nixos
<srhb>
Extends: nix cannot create anything outside of /nix/store
ggp0647 has joined #nixos
<Extends>
ah, so I have to do it manually ?
<srhb>
Extends: nixos and home-manager and co. achieve this by having nix create a _script_ that does the symlinking (so-called activation scripts) that the user may run at runtime (not build-time) or through tooling (nixos-rebuild and home-manager)
<Extends>
oh ok I see, i'll try that, thanks
sputny has quit [Remote host closed the connection]
<srhb>
Sure thing :) Incidentally, when you want $out/share, that's essentially what nix-env does in ~/.nix-profile for you, when a user is installed for the user
<TheSirC[m]>
If you only had access to a Debian host (a VM if that's of concern) and you packaged an application using Nix. How would you deploy it? Meaning how would you put it on the VM, run it, update it and manage it?
<srhb>
TheSirC[m]: I'd probably package it with our dockerTools to generate an image. There's also the run-scripts, but I don't think integrating with a foreign systemd installation is much worse than integrating with docker.
<srhb>
er, much better.
<srhb>
Either way.
domogled has quit [Remote host closed the connection]
domogled has joined #nixos
<{^_^}>
[nixpkgs] @peterhoeg closed pull request #19622 → kdeconnect: [WIP/RFC] let dbus activate via systemd → https://git.io/vPPX8
<benschza>
I have a Cachix binary cache for a project, and all packages are cached except for a Nix Node package I generated using node2nix. What would be the best way to debug why this particular package is always rebuilt rather than fetched from cache?
sangoma has quit [Read error: Connection reset by peer]
Rusty1 has joined #nixos
Aesth has quit [Remote host closed the connection]
<benschza>
I think I found the answer `bypassCache = true;`.
<CptCaptain>
makefu: You're right. Preloading libredirect makes the app deadlocks with a bunch of futex calls
<TheSirC[m]>
"srhb" (https://matrix.to/#/@freenode_srhb:matrix.org): Hmm... What are the run-scripts?
o1lo01ol1o has quit [Remote host closed the connection]
<TheSirC[m]>
I just have a grudge against Docker so if I can avoid it...I was also thinking about generating a LXC image with nixos-generator, any gotchas about them?
superherointj has quit [Quit: Leaving]
gustavderdrache has joined #nixos
<manveru>
TheSirC[m]: you could also take a look at podman...
<{^_^}>
[nixpkgs] @mikefaille opened pull request #94659 → tanka: init at v0.11.1 → https://git.io/JJKIL
sigmundv has quit [Read error: Connection reset by peer]
sigmundv has joined #nixos
<nbathum>
TheSirC[m]: I have a grudge against containers. it depends on the kind of application, the technology, etc. we deploy a few C programs to non-NixOS systems which are built on NixOS, and then fixed-up in the build to have a 'normal' interpreter
kreyren_ is now known as kreyren
<nbathum>
I'd say your notion to use nixos-generators is the right approach for anything that gets more complicated than a small program
justanotheruser has joined #nixos
alp has quit [Ping timeout: 256 seconds]
icey_ has joined #nixos
kgriffin has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alp has joined #nixos
bqv has quit [Remote host closed the connection]
bqv has joined #nixos
mixmixmix has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @xaverdh opened pull request #94660 → nixos / ISO: make squashfs compression easily configurable → https://git.io/JJKti
<noonien>
nbathum: how do you change the path to ld to work on other distros? patchelf, or do you build totally static binaries? if you use patchelf, do you patchelf in the derivation, or do you have another patched derivation?
<asbachb>
Can someone tell me more about: Failed to read oom_kill field of memory.events cgroup attribute ?
<makefu>
CptCaptain: your other chance is fhsuserenv, you can start by trying to run the app with 'steam-run' (nix-shell -p steam-run --run 'steam-run ./your-app')
<noonien>
i'm building some software that needs to be ran on other distros, and with different architectures, so i'm also dealing with this
<Mic92>
I would say the ideal case would be to build it with the native toolchain
<Mic92>
So libraries are in the same version
<Mic92>
Otherwise static builds might be the most robust alternative
<{^_^}>
[nixpkgs] @swflint opened pull request #94661 → pythonPackages.iterfzf: init at 0.5.0.20.0 → https://git.io/JJKqj
<noonien>
i go with static builds where available
<noonien>
s/available/possible
idontgetoutmuch[ has joined #nixos
<bqv>
Why?
proofofkeags has quit [Remote host closed the connection]
<noonien>
so they are easier to use on the target systems, one alternative would be tmpnix, but so far, i prefer static binaries,
<idontgetoutmuch[>
I am building a package which uses make (the nix is about as simple as it can be) but get `/nix/store/3b9hjxbz9wim69gzg41qkszwxrgnxhdn-gfortran-9.3.0/include/c++/9.3.0/stdlib.h:38:12: error: 'std::abort' has not been declared`
proofofkeags has joined #nixos
<idontgetoutmuch[>
The compilation command that is generated is `g++ -march=native -O3 -fomit-frame-pointer -mfpmath=both -fopenmp -m64 -std=c++11 -c ./BioFVM/BioFVM_vector.cpp`
<{^_^}>
[nix] @Ericson2314 opened pull request #3894 → Make JSON equality tests agnostic to ordering → https://git.io/JJKmh
nixuser has quit [Read error: Connection reset by peer]
asbachb has quit [Ping timeout: 245 seconds]
proofofkeags has quit [Ping timeout: 256 seconds]
<{^_^}>
[nixpkgs] @mikefaille opened pull request #94662 → jsonnet-bundler: init at 20200804-ada055a → https://git.io/JJKYf
eoli3n has joined #nixos
<nbathum>
noonien: the drv takes a boolean parameter 'export', and patchelf in the derivation when true
magnetophon has quit [Read error: Connection reset by peer]
<noonien>
i see, i guess that makes sense if you build all derivations your export
proofofkeags has quit [Remote host closed the connection]
ManiacOfMadness has quit [Ping timeout: 246 seconds]
proofofkeags has joined #nixos
urkk has joined #nixos
rardiol_ has joined #nixos
rardiol has quit [Read error: Connection reset by peer]
magnetophon has quit [Read error: Connection reset by peer]
proofofkeags has quit [Ping timeout: 256 seconds]
virus_dave has quit [Ping timeout: 256 seconds]
magnetophon has joined #nixos
<urkk>
when the derivation output is an executable script included in the build input of another derivation, it's automatically executed at the beginning of the build of the second derivation. Is this the expected behavior? If so, how can I prevent it?
<{^_^}>
[nixpkgs] @ehmry merged pull request #94668 → Define a i686-genode system double → https://git.io/JJKGf
<{^_^}>
[nixpkgs] @ehmry pushed to staging « Define a i686-genode system double »: https://git.io/JJKGg
karantan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<urkk>
it happens before unpack
virus_dave has joined #nixos
graf_blutwurst has quit [Remote host closed the connection]
justanotheruser has quit [Ping timeout: 244 seconds]
<balsoft>
So, I have a very strange bug: https://0x0.st/i3PZ.txt this happens on a private repo that I unfortunately can't share, and it went away after two retries (i.e. on the third try the repo started building). Can you give any pointers as to how to even approach this? Also, what do I need to delete to reproduce this?
aleph- has quit [Read error: Connection reset by peer]
<chipb>
jtojnar: oh. that's an interesting option I hadn't seen. thanks.
<chipb>
it almost seems like that should be in specialArgs by default when evaluating a flake.
magnetophon has quit [Ping timeout: 240 seconds]
knupfer1 has joined #nixos
mariatsji has quit [Ping timeout: 246 seconds]
serrvan has quit [Ping timeout: 265 seconds]
magnetophon has joined #nixos
<chipb>
I guess it makes your modules dependent on being in that same flake (i.e. directly referencing the input), but for some things, I don't think there's necessarily a way of escaping that.
<jtojnar>
chipb: I like that things are explicit with flakes, impure.nix was already too much magic for my taste
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
Adrielus has joined #nixos
superherointj has joined #nixos
<Adrielus>
Hey, anyone knows where I can find the product.json file of my vscodium installation?
xelxebar has quit [Remote host closed the connection]
knupfer1 has joined #nixos
xelxebar has joined #nixos
<chipb>
I dunno, the whole module system itself seems close enough to magic for me.
<chipb>
impure.nix is just a dirty little secret... "So *there's* the rug all the dust was swept under!"
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
<chipb>
from my limited playing around with it, I do rather like flakes though.
aleph- has joined #nixos
mallox has quit [Quit: WeeChat 2.9]
lordcirth__ has quit [Ping timeout: 244 seconds]
meh` has quit [Ping timeout: 256 seconds]
knupfer1 has joined #nixos
simba1 has joined #nixos
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
newbpassingby has joined #nixos
mrosenbe has quit [Ping timeout: 264 seconds]
lordcirth has joined #nixos
<newbpassingby>
hi all! I have a question about builds. I'm trying to build a project but its failing to find a file that is referenced directly in its own project folder, "src/keys.proto". Why can't it find this relative path?
<chrismatheson>
<eyJhb "For dev in Go chrismatheson I wo"> as in go modules ? im thinking more about how I define the go tools that the dev env needs ? (go-doc guru go-rename etc some of them are not nix pkgs yet
mrosenbe has joined #nixos
<chrismatheson>
or are you saying there is a nix function `go.mods` which I can call in my derivation and will install certain go pkgs ?
aleph- has quit [Read error: Connection reset by peer]
<chipb>
newbpassingby: try dropping your '"'s and prepend a './' to the path?
Adrielus has quit [Remote host closed the connection]
<WRMilling>
Is there a way to specify ConditionPathExists for a systmd service in nix?
<WRMilling>
I can't seem to find it in the docs.
<chipb>
oh, I'm unfamiliar with the nix rust tooling so I'm probably not helpful. I thought you were talking about a path referenced in a failing .nix expression.
<slabity>
wrmilling: `builtins.pathExists` should return true/false
<slabity>
Unless I'm misunderstanding what you are asking
lordcirth has joined #nixos
<WRMilling>
systemd has a property you can put on the unit file so that it runs if the path exists. I assume the builtin will only create the systemd module if that path exists, but I could remove the hardware between reboots for instance. (correct me if I am mistaken there).
<od1n>
how does one pin fontconfig to a previous version?
mrosenbe_ has joined #nixos
mrosenbe has quit [Ping timeout: 246 seconds]
bqv has quit [Quit: WeeChat 2.9]
bqv has joined #nixos
<chipb>
infinisil: oh dear. more magic. :-)
spudly has quit [Ping timeout: 246 seconds]
spudly- is now known as spudly
<infinisil>
Desperately needed magic!
<cole-h>
od1n: Unless you have a beefy builder, I don't think you'll want to do that. You'll have to recompile almost every piece of software you use if you override fontconfig to a previous version.
<DigitalKiwi>
infinisil: if i want to add 4 node packages should i do four commits, and for the fourth one do the ./generate.sh and then one PR?
<WRMilling>
I figured it would be something like that chipb, just a little bit of learning to be done on my part :)
<infinisil>
DigitalKiwi: That sounds reasonable yeah
proofofkeags has joined #nixos
<od1n>
cole-h: thanks, will just sit on stable
<DigitalKiwi>
ok ty
<DigitalKiwi>
i think my battery died before the last ./generate.sh i did finished lol...
<cole-h>
od1n: Keep in mind that this change will have made its way into 20.09, which is right around the corner™
<cole-h>
So you'll either be on 20.03 forever, or you'll have to find a way to fix whatever problems you're having with the new fontconfig (or ignore them)
cosimone has joined #nixos
<od1n>
cole-h: the issues will probably be fixed by then
knupfer1 has joined #nixos
newbpassingby has quit [Remote host closed the connection]
<infinisil>
DigitalKiwi: Maybe try to help get another node packages update PR merged first
<DigitalKiwi>
infinisil: how do i do that just test them or?
<cole-h>
od1n: Maybe. Only if the issues are known, however. Maybe now would be a good time to file an issue on the Nixpkgs tracker? ;^)
<infinisil>
DigitalKiwi: I just build it, ask the author whether they tested it, and make sure ofborg is successful
<DigitalKiwi>
like that one is probably going to need to be rebased on haskell-packages...again. and i'm very bad at doing it
lordcirth has joined #nixos
<DigitalKiwi>
i end up like spending 20 minutes mucking around not knowing what i'm doing and by the time i'm done i don't know what was the right way so the next time i do it...same
magnetophon has quit [Read error: Connection reset by peer]
<DigitalKiwi>
i think somehow i end up cherry picking it in the end
<DigitalKiwi>
the default was the root/channels/nixos one
magnetophon has quit [Read error: Connection reset by peer]
evanjs has quit [Read error: Connection reset by peer]
<infinisil>
That just makes it use channels
knupfer1 has joined #nixos
<infinisil>
I think you probably just want `nixPath = [ "nixpkgs=/..." "nixos-config=/etc/nixos/configuration.nix" ]`
zupo has joined #nixos
evanjs has joined #nixos
<infinisil>
If you want multiple different nixpkgs version you could add a "nixpkgs-alt=/path/to/alt/nixpkgs"
magnetophon has joined #nixos
<DigitalKiwi>
i think we maybe tested it and it worked how i wanted at the time :( i remember we had to change the options.nix.nixPath.default to be at the end
magnetophon has quit [Read error: Connection reset by peer]
magnetophon has joined #nixos
knupfer has quit [Ping timeout: 264 seconds]
knupfer1 is now known as knupfer
<DigitalKiwi>
idk i'm over it :(
proofofkeags has quit [Remote host closed the connection]
ddellacosta has quit [Ping timeout: 256 seconds]
<infinisil>
I'm not sure what your goal is
<DigitalKiwi>
forensics i guess :(
c0c0 has quit [Quit: WeeChat 2.7.1]
knupfer1 has joined #nixos
<DigitalKiwi>
i don't know what that does or if it did what i want even or why i did it (was a long time ago)
<DigitalKiwi>
16:28 <DigitalKiwi> (i'm actually really really bad at nix i only figure stuff out through brute force and tenacity and the wiki/manuals/blogs)
<{^_^}>
[nixpkgs] @justinas opened pull request #94673 → prometheus-sql-exporter: init at 0.3.0 → https://git.io/JJKB5
<ramses_>
Hey guys, how does nix deal with parallelly running builds creating the same store paths? Is it gracefully handled? Is there a notion of atomicity or such?
magnetophon has quit [Read error: Connection reset by peer]
<immae>
ramses_: there is a lock file created so I guess concurrence is handled correctly (I "think" the symptom I saw is that one of the processes will just sit waiting until the lockfile is gone)
<samueldr>
ramses_: it'll run one build at a time, and if it's a dep for two concurrently building derivations, it waits as expected
lordcirth has quit [Ping timeout: 272 seconds]
<samueldr>
and yeah, within one of the builds it'll look like it's doing nothing
<ramses_>
And the lock is per derivation? Or you can have only one build active?
<samueldr>
per derivation, you can have multiple builds in parallel (as long as nix is configured to run things in parallel)
<samueldr>
if it's not, it'll be waiting for a build slot
<ramses_>
But I am launching multiple nix processes, or is this handled by the daemon?
<samueldr>
by the daemon
<ramses_>
And on a non NixOS system?
knupfer has joined #nixos
<ramses_>
Basically, I want to evaluate 80-something nixos configurations in a github action, to make sure that they all build without error. So it will be running on a github-provided ubuntu on which nix is installed
<samueldr>
there is an equivalent option, for the daemon
<samueldr>
but the defaults are fine
<ramses_>
But most of those system profiles share 80% of their config and will thus evaluate the exact same store paths
<samueldr>
everything should work just fine
<ramses_>
Cool, I'll give it a go!
maier has quit [Ping timeout: 264 seconds]
knupfer1 has joined #nixos
knupfer has quit [Ping timeout: 256 seconds]
knupfer1 is now known as knupfer
mariatsji has joined #nixos
CptCaptain has quit [Quit: WeeChat 2.9]
arjen-jonathan has joined #nixos
mariatsji has quit [Ping timeout: 240 seconds]
kreyren has quit [Remote host closed the connection]
kreyren has joined #nixos
<{^_^}>
[nixpkgs] @lucperkins opened pull request #94675 → wapm: init at 0.5.0 → https://git.io/JJKEw
<noonien>
hmm, can i force a package to be rebuild?
rajivr has quit [Quit: Connection closed for inactivity]
<noonien>
`nix build -f channel:nixos-unstable pkgsCross.raspberryPi.zmap` doesn't work for me, `/nix/store/...//nix-support/setup-hook: line 4: unzip: command not found` is what i get
<noonien>
and i'm trying to see if this has anything to do with cross-compiling, or the package just doesn't build
alp has joined #nixos
<zerocostabstrac4>
what's the easiest way to spin up an Ubuntu VM in NixOS
<zerocostabstrac4>
i'm talking persistent storage, not sure how I'd do that with docker easily
lordcirth has joined #nixos
camsbury has joined #nixos
matthewcroughan has quit [Ping timeout: 240 seconds]
<{^_^}>
#94576 (by sk33z3r, 1 day ago, closed): tor-browser-bundle-bin mirror for 9.5 is down
<daddy_james[m]>
anyone know when this will get pushed to the official repo?
mariatsji has joined #nixos
mariatsji has quit [Read error: Connection reset by peer]
<DigitalKiwi>
daddy_james[m]: the fix has been merged into nixpkgs master
<noonien>
hmm, is the problem with libjson? does it not cross-compile?
<DigitalKiwi>
so ... soon? or now, if you're willing to use master
lordcirth_ has joined #nixos
<daddy_james[m]>
DigitalKiwi yeah I noticed, but when will this actually get uploaded to the official nix channel?
<DigitalKiwi>
i don't think anyone really knows when nixos-unstable will get updated it's whenever builds pass, it might hit nixos-unstable-small first
lordcirth has quit [Ping timeout: 260 seconds]
<daddy_james[m]>
hmm ok
<daddy_james[m]>
I guess I'll just have to manually install tor for now until that gets fixed
<daddy_james[m]>
well, not install but just use the portable version
<DigitalKiwi>
i'd say <1 week is a good estimate for when nixos-unstable gets updated (it varies)
<noonien>
or is it a bug with nixpkgs? i can't figure it out, why would there be an error in nix-support/setup-hook
<DigitalKiwi>
you could cherry pick it
<daddy_james[m]>
cool, thanks for the info
<DigitalKiwi>
or install only that package from git
mariatsji has joined #nixos
<DigitalKiwi>
with nix-env and nixpkgs=/path/to/NixOS/nixpkgs
mariatsji has quit [Read error: Connection reset by peer]
<DigitalKiwi>
with nix-env and -I nixpkgs=/path/to/NixOS/nixpkgs
lordcirth has joined #nixos
lordcirth_ has quit [Ping timeout: 244 seconds]
lordcirth_ has joined #nixos
lordcirth has quit [Ping timeout: 244 seconds]
<grfn>
uh
knupfer has quit [Ping timeout: 260 seconds]
<grfn>
I just had a hash for a fetchTarball of a nixpkgs commit change out from under me?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @lsix to staging « gettext: 0.20.1 -> 0.21 »: https://git.io/JJKax
<cizra>
How to get the list of currently visible packages in nix-shell --pure? (I'm trying to use nix-shell for developing software, but G++ is not finding -lmysqlclient (nor -lmariadbclient), despite me having mariadb-connector-c in shell.nix / buildInputs).
<cizra>
In nix-shell with mariadb-connector-c, g++ -o output this.o that.o -lsomethingelse -lmariadbclient - fails to find libmariadbclient.so. If I add -L /nix/store/.../lib/mariadbclient, then it finds it but barfs on pthread and glibc. Ideas?
<dvorak>
Does anyone here run ZFS natively as their rootfs with some sort of swap enabled? According to the NixOS wiki, it seems that swap has to be a seperate logical volume or parition, because "You shouldn't use a ZVol as a swap device, as it can deadlock under memory pressure."
knupfer1 has joined #nixos
sangoma has joined #nixos
knupfer has quit [Ping timeout: 246 seconds]
knupfer1 is now known as knupfer
magnetophon has joined #nixos
<jasom>
dvorak: I've used it without swap on NixOS and with swap (on a dedicated partition, not a ZVol) on a non-NixOS system
knupfer1 has joined #nixos
<jasom>
dvorak: No reason I couldn't run swap on a dedicated partition on NixOS, I just stopped using swap before I switched to NixOS
<dvorak>
jasom: I'm actually doing it the other way around, I haven't used swap for a while but soon will be
<jasom>
dvorak: just do it exactly like you would for e.g. ext4 or reiserfs; setup a swap partition separate from the ZFS partition.
<dvorak>
jasom: I assume that there are no stability issues with that?
<dvorak>
I've never actually used a swap partition on my physical machine, only VMs
malook has joined #nixos
<jasom>
dvorak: I've not run into any. This was a while ago on Gentoo.
orivej has quit [Ping timeout: 260 seconds]
<dvorak>
alright
orivej has joined #nixos
<jasom>
the stability issues are quite simple when using a zvol; your system needs to write to swap in order to free memory, but ZFS nees to allocate memory to read from the zvol
<{^_^}>
[nixpkgs] @jonringer pushed commit from @skykanin to master « dotty: 0.23.0-RC1 -> 0.26.0-RC1 »: https://git.io/JJKrd
knupfer has quit [Ping timeout: 265 seconds]
knupfer1 is now known as knupfer
<jasom>
dvorak: what's the use-case for swap, if you don't mind sharing?
<dvorak>
Occasionally my real system will freeze and requrie a force-restart when my programs use up too much RAM and CPU
knupfer1 has joined #nixos
<jasom>
dvorak: swap often (but not always) makes that worse
<dvorak>
I assume that earlyoom would prevent this issue? I was also planning on enabling that
<dvorak>
I was under the (apparently wrong) impression that having swap space would also alleviate it though
<jasom>
it's complicated
<jasom>
swap reduces the RAM in use to the active working set in the steady-case (pages not accessed ever get stored on disk).
phreedom has quit [Ping timeout: 240 seconds]
phreedom has joined #nixos
<jasom>
however, once you hit contention with swap, the system gets painfully slow while it swaps things in and out of swap, so the OOM won't kick-in until the swap has filled up. Having a small swap is probably a good compromise
<dvorak>
How big would a "small" swap be on a system with 8GB ram?
knupfer has quit [Ping timeout: 264 seconds]
knupfer1 is now known as knupfer
<dvorak>
2-4GB?
<jasom>
I haven't tested this with a PCIe backed swap, which might be better, but even early SATA SSDs were painful
<infinisil>
I have 32GB swap for my 16GB RAM :)
<jasom>
no more than 1GB would be my recommendation
<infinisil>
I actually only needed this much swap once for a super wasteful haskell program I made
knupfer1 has joined #nixos
<jasom>
dvorak: have you tried tuning the ZFS ARC size to be smaller? That will also allieve memory pressure (at the expense of performance with larger working sets)
<jonringer>
the zfs arc should free memory usage as memory pressure increases
<dvorak>
I do not currently have ZFS installed natively, its a dual-boot system which I will probably overwrite in a day or so
<jonringer>
I don't use swap on my desktop, but I have 256GB ram on the server, with 256GB swap
<jasom>
jonringer: when I last ran an 8gb system it was a bit slow to free, but that was like 5 years ago
orivej has quit [Ping timeout: 265 seconds]
<dvorak>
This is a relatively low-end machine
orivej_ has joined #nixos
knupfer has quit [Ping timeout: 265 seconds]
knupfer1 is now known as knupfer
<bqv>
dvorak: interesting name...
<dvorak>
I might end up not using swap due to the thrashing problem you mentioned, and because disk accesses will actually be passed through LUKS before reaching the disk
<dvorak>
bqv: I figured it was better than qwerty :P
<jasom>
dvorak: you can try using a small amount of zswap as well
<jasom>
or zram; whatever the current thing is for doing that
Diogo7 has joined #nixos
<dvorak>
The goal is really just to keep the system responsive enough for me to be able to kill the offending program (which earlyoom seems handle automatically)
<dvorak>
The filesystem itself will be ZFS because it offers a nice snapshot feature (and incremental snapshots AFAIK)
<jasom>
dvorak: more than 1GB of swap will make that *worse* in my experience. I cut way back on swap when I had a program go off into the weeds and it took 10 minutes for me to be able to type the kill command in my console because the system was so slow
<dvorak>
Yeah, I don't have the patience to wait 10 minutes to kill a program
<dvorak>
Should I have swap at all?
<jasom>
at 8GB a small amount of either zram swap or SSD backed swap makes sense (a fairly large amount of RAM sits untouched, and that will free it up in the steady-state)
<tpw_rules>
i don't think there's any flaws but you are probably right that it's not hard to make a mistake
orivej has joined #nixos
<dvorak>
I'm no expert on ZFS but apparently some things are leaked. The thing is I have no idea what but with LUKS it's essentially a guarentee that there won't be any (since it blindly encrypts each block)
knupfer1 has joined #nixos
<dvorak>
I would also assume that with native ZFS encryption an attacker would be able to tell that it is a ZFS partition?
<DigitalKiwi>
it doesn't encrypt the name of either/both of pools or datasets
<tpw_rules>
yeah there's not even a hope of plausible deniability. you can encrypt different datasets with different keys or not at all
<tpw_rules>
yeah it couldn't. otherwise you wouldn't be able to identify them when providing keys
orivej_ has quit [Ping timeout: 256 seconds]
<jasom>
tpw_rules: sure it could, it would just require decrypting every name with the provided key and ignoring failures
<DigitalKiwi>
(i'm not sure about which one(s) it is but that's the major meta data i know of)
thc202 has quit [Ping timeout: 244 seconds]
<dvorak>
Does anyone know if systemd-boot supports LUKS partitions? I haven't tested it yet in a VM
knupfer has quit [Ping timeout: 240 seconds]
knupfer1 is now known as knupfer
<DigitalKiwi>
i'm more concerned with someone having access to my data (thief, loss) than whether or not they can tell what the name of my zpool is
<tokudan>
it's kind of reliable: anytime I use pkgs.writeShellScript(Bin) I waste 15 minutes figuring out the error cannot "coerce a function to a string"... then I give up, login to irc and before asking, figure out that I forgot to provide the script name. :/
sangoma has quit [Quit: WeeChat 2.9]
<DigitalKiwi>
tokudan: i keep notes.txt files or skeleton.nix or bash aliases that tell me stuff like that
<tokudan>
DigitalKiwi, pkgs.writeShellScript is so simple that I wouldn't look these up...
<DigitalKiwi>
function nixhs-tip-adhoc() { echo 'nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [mtl pandoc])"'; }
<{^_^}>
[nixpkgs] @jonringer pushed commit from @pstn to master « gnunet-gtk: init at 0.12.0 »: https://git.io/JJK6v
petar has quit [Ping timeout: 244 seconds]
argc has joined #nixos
pr06lefs has joined #nixos
<argc>
I think something has gone fairly horribly wrong with my NixOS rig today, and was hoping for some potential insight. I had a few processes randomly freeze and so rebooted; after the reboot, things came up but when I went to connect to my work VPN (via some scripts managed by NixOS) I got some errors about missing data. Forced fsck on / didn't reveal anything, but there are clearly missing files and an attempt to rebuild my configuration yields an error that
<argc>
wasn't happening a few days ago with no changes to the configuration: https://pastebin.com/9TuhV05A -- does this happen to look familiar to anyone?
alexherbo2_ has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 256 seconds]
maier has joined #nixos
gv has joined #nixos
bqv has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @jonringer opened pull request #94689 → gnunet{,-gtk}: bump to 0.13.1 → https://git.io/JJK6r
bqv has joined #nixos
matthewcroughan has quit [*.net *.split]
turlando has quit [*.net *.split]
growpotkin has quit [*.net *.split]
rgrau has quit [*.net *.split]
judson has quit [*.net *.split]
hspak has quit [*.net *.split]
MightyJoe has quit [*.net *.split]
AlpineLlama has quit [*.net *.split]
tobiasBora2 has quit [*.net *.split]
stree_ has quit [*.net *.split]
cransom has quit [*.net *.split]
m4ts has quit [*.net *.split]
jhuizy has quit [*.net *.split]
sjourdoi- has quit [*.net *.split]
otti0815 has quit [*.net *.split]
deni has quit [*.net *.split]
dfgg has quit [*.net *.split]
<{^_^}>
[mobile-nixos-website] @samueldr pushed to master « Add July 2020 round-up »: https://git.io/JJK69
asymptotically has quit [Quit: Leaving]
maier has quit [Ping timeout: 256 seconds]
rgrau has joined #nixos
turlando has joined #nixos
AlpineLlama has joined #nixos
hspak has joined #nixos
judson has joined #nixos
growpotkin has joined #nixos
WeblordPepe has joined #nixos
reivilibre has joined #nixos
jhuizy has joined #nixos
cransom has joined #nixos
tobiasBora has joined #nixos
stree_ has joined #nixos
m4ts has joined #nixos
drewc has joined #nixos
tobiasBora2 has joined #nixos
sjourdoi- has joined #nixos
statusbot has joined #nixos
MightyJoe has joined #nixos
matthewcroughan has joined #nixos
avn has joined #nixos
dweller has joined #nixos
dminuoso has joined #nixos
phI||Ip_Alternat has joined #nixos
vuko has joined #nixos
otti0815 has joined #nixos
runciter has joined #nixos
dfgg has joined #nixos
djanatyn has joined #nixos
deni has joined #nixos
Unode has joined #nixos
oleks has joined #nixos
woffs has joined #nixos
nbathum has joined #nixos
pie_ has joined #nixos
switchy has joined #nixos
electrocat has joined #nixos
tpanum has joined #nixos
lewo has joined #nixos
Philonous has joined #nixos
AlpineLlama has quit [Max SendQ exceeded]
hspak has quit [Max SendQ exceeded]
hspak has joined #nixos
AlpineLlama has joined #nixos
<{^_^}>
[nix] @Ericson2314 opened pull request #3895 → WIP: More templated STL support for the daemon protocol --- contains #3859 → https://git.io/JJK6b
erasmas has quit [Quit: leaving]
orivej has quit [Quit: No Ping reply in 180 seconds.]
nckx has joined #nixos
orivej has joined #nixos
<lightandlight>
Is it okay to ask plain nix questions here? I'm wondering if there's a simple way to query the output path hash of an expression. `nix-build expr.nix` prints a string of form `/nix/store/<hash>-<name>` to the terminal, is there a nix command that will take `expr.nix` as an argument and print `<hash>` for me?
<dvorak>
Another relative noob here, but I believe you can get the derivation path by evaluating the expression in `nix repl`
<dvorak>
It should not build the expression unless you use `:b`
<lightandlight>
Unfortunately that doesn't help me. In my case, I've already built the derivation and I want to obtain the hash in the output's store path
<infinisil>
lightandlight: The best you can do is just modify the resulting string
<dvorak>
Just curious, how can you import the expression for lib in `nix repl`?
<infinisil>
Oh and then you can't nix-build that directly, but you'll have to `nix-instantiate --eval` that
<infinisil>
lightandlight: Why do you need this though?
orivej has quit [Ping timeout: 246 seconds]
<infinisil>
dvorak: :l <nixpkgs>
<infinisil>
Or start it with `nix repl '<nixpkgs>'`
orivej has joined #nixos
smatting_ has quit [Ping timeout: 260 seconds]
<lightandlight>
infinisil: I'm using `nixpkgs.dockerTools.buildImage` which by default tags the image with the nix store hash (I think that's a good tagging strategy) (the buildImage builder uses `cut` to extract the hash). So, after building the image I want to invoke `docker load -i image:<hash>`.
terribleArtist has joined #nixos
<infinisil>
lightandlight: Ah, then I'd just do `nix-build expr.nix | cut -d/ -f4 | cut -d- -f1` or so
xelxebar_ has joined #nixos
xelxebar has quit [Ping timeout: 240 seconds]
<lightandlight>
yep
<energizer>
i want to ask my admin to install nix on a many-user machine. should i ask for single-user or multi-user mode?
<lightandlight>
Thanks for the help maties
<infinisil>
energizer: multi-user!
<infinisil>
Otherwise only them or you (but not both, assuming you have a different user) could use it
<energizer>
infinisil: on this machine i normally have to pay for storage >20G. if the nix store gets large, i'm not sure how that works. i've paid for my own directory in /users/energizer/ , but obviously that's not the right location for the store.
<infinisil>
Oh this is not for work?
<energizer>
infinisil: this is for work, there is a storage allocation system that involves charge accounts
<infinisil>
So yeah I'd ask for a bind mount or a linux update, that would be the easiest. Or alternatively if they can make an exception for paying of /nix storage, ask for a multi-user installation
camsbury has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos
<chipb>
energizer: one potential option is to use a non-standard /nix location in your own storage. you'll end up needing to build *everything* since the mirrors won't have them built for your path, but it's certainly doable.