<colemickens>
It seems like things in flakes can still reference local files. Is it constrained to the current dir? In my current nixcfg I have a function "findImport" that will look in ~/code/{importType}/{importName} and then fallback to my pinned version if I am not currently hacking on one of my imports.
<colemickens>
Is this possible, still, with flakes?
fresheyeball has quit [Quit: WeeChat 2.7.1]
<infinisil>
Santiweight: You followed the installation steps in the manual?
<Santiweight>
For the .iso image I just loaded the image and everything was set up for me. I couldn't spot any time when I could configure anything
<infinisil>
Oh then you just booted the installer image
<infinisil>
I don't think that persists anything, and might store all things in RAM
est31 has quit [Remote host closed the connection]
Santiweight has quit [Remote host closed the connection]
est31 has joined #nixos
<infinisil>
Alright then
<infinisil>
It's almost certainly not
Santiweight has joined #nixos
<Santiweight>
Hey sorry about that
<MtotheM>
I have a path like this for my folders `./machines/machine-name/configuration.nix` then I have `./shared/common.nix` how can I step back twice in the import?
<MtotheM>
(i want to import common to configuration)
Santiweight has quit [Remote host closed the connection]
<infinisil>
MtotheM: No idea what you mean
<MtotheM>
I just figured it out `../../`
lunaa has joined #nixos
Santiweight has joined #nixos
Rusty1 has joined #nixos
<euank>
jonreeve[m]: if you didn't figure it out, `qt5.wrapQtAppsHook` is what you wanted I think
proofofk_ has quit [Remote host closed the connection]
lunaa has quit [Ping timeout: 260 seconds]
<santiweight3>
So yeah - the nix/store volume is only 4G
proofofkeags has joined #nixos
Mateon1 has joined #nixos
<cole-h>
jonreeve[m]: did you put that in your `nativeBuildInputs`?
proofofkeags has quit [Ping timeout: 240 seconds]
<Mateon1>
Hi, I recently did a swsusp (suspend to swap) to a new swap partition I've recently created, I noticed that I did not nixos-rebuild before doing `systemctl hibernate`
<Mateon1>
I've now booted into the normal system instead of resuming from hibernation
<Mateon1>
Is there any way to recover that suspended image?
<Mateon1>
The swap partition is untouched
<infinisil>
santiweight3: I can't see anything wrong there
<infinisil>
santiweight3: What makes you think it's out of space? Did you run a command and get an error? If so, post the command and error
drakonis1 has joined #nixos
tobeportable has quit [Ping timeout: 272 seconds]
<santiweight3>
I reinstalled the image hence the empty volumes. Later after installing a bunch of packages etc, the 4gb doesn;t cut it
<santiweight3>
So I would ideally want to expand that volume
<infinisil>
santiweight3: It's a tmpfs, which I'm pretty sure means that it's not stored on disk -> it's your RAM
drakonis_ has quit [Ping timeout: 256 seconds]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JfQCj
<santiweight3>
Ahhh
<infinisil>
And again, you haven't actually installed NixOS yet, all of the things you install should be gone again when you reboot it :
<infinisil>
But really, you need to actually install NixOS by following the install instructions
<santiweight3>
LOL
ConradMearns has quit [Ping timeout: 245 seconds]
<santiweight3>
Okay I think I understand better what I didn't understand
<MtotheM>
how do I deal with coc for vim? it requires that you install sub-plugins through coc itself. I don't see how I could declare that.
<ajs124>
jonreeve[m]: responded there
<santiweight3>
I think I thought things would be more out of te box than they are - I'll follow along more steps. I think I thought they were for non-NixOS distributions
<santiweight3>
Thank you infinisil for being so patient with me
<santiweight3>
<3
iyzsong has joined #nixos
<infinisil>
Install instructions for X are *always* for when you don't have X already! Otherwise you wouldn't need to install it
<{^_^}>
[nixpkgs] @Aver1y opened pull request #90271 → haskell: Make haskellPackages.callPackage overridable → https://git.io/JfQWc
drakonis1 has quit [Ping timeout: 260 seconds]
<infinisil>
The NixOS ISO is just a stepping stone for making installation easier, since ISO's are so easy to run and distribute
<{^_^}>
[cabal2nix] @maralorn opened pull request #462 → Various improvements to ./regenerate-nixpkgs.sh → https://git.io/JfQWC
<santiweight3>
That makes perfect sense. I guess my confusion was that I used the "NixOS" iso and then the installation said "install NixOS"
klntsky has joined #nixos
<santiweight3>
Probably largely my inexperience with anything like this
<energizer>
why is "transforms" not defined when i've defined it right there?
slack1256 has joined #nixos
santiweight3 has quit [Remote host closed the connection]
<energizer>
ah, needs default=
justan0theruser has joined #nixos
m0rphism has quit [Ping timeout: 256 seconds]
<jonreeve[m]>
ajs124: Thanks, but I think I'm no closer to fixing this for this particular use case. More specifically, do you know how I can change the expression under `ete3` in that default.nix, so that `python example.py` runs without it complaining about a missing QT plugin?
pamplemousse has joined #nixos
justanotheruser has quit [Ping timeout: 272 seconds]
<ajs124>
you shouldn't run "python example.py", that's not how wrapping works. but if you really need/want to, you need to set the relevant environment variables. I don't remember what those are for QT exactly. QT_PLUGIN_PATH is probably among them.
<jonreeve[m]>
ajs124: I'm not sure I understand. example.py is just my python script that runs my analysis. I use a default.nix to define the environment I need, and nix-shell to enter that environment. Then I run `python example.py` and it runs the script I want it to run. The main issue is that, since `ete3` isn't in nixpkgs, I have do define my own expression. But I can't get it to work. How would I go about adding that environment
<jonreeve[m]>
variable to that expression?
<MtotheM>
I travel a lot, can I set my timezone to change dynamically based on my location?
<MtotheM>
Or do I need to make my own function for that
ris has joined #nixos
<energizer>
MtotheM: how do you want to detect your location?
<MtotheM>
Most distros do it based on your ip adress I suppose.
_ris has quit [Ping timeout: 260 seconds]
philr_ has joined #nixos
<energizer>
MtotheM: looks like services.tzupdate might do ti
<energizer>
it
<MtotheM>
nice, thanks that saves me some effort
h0m1 has quit [Ping timeout: 256 seconds]
h0m1 has joined #nixos
cyraxjoe has quit [Quit: I'm out!]
<betaboon>
anyone knows how i can pull packages from nixpkgs-unstable into an overlay while maintaining the possiblility to crosscompile them, i normaly do it like this, but the inherited package doesnt cross-compile anymore: https://gist.github.com/betaboon/c73064271609d7080e53f7a650c7895a
pamplemousse has quit [Ping timeout: 256 seconds]
cyraxjoe has joined #nixos
<betaboon>
i guess i would have to provide `config.nixpkgs.crossSystem` to the import of <nixpkgs-unstable> but id dont know where to get that from in the context of an overlay
<infinisil>
betaboon: Possibly with `crossSystem = self.hostPlatform.system`
<quinn>
cjpbirkbeck: i don't really understand your question. are you asking what path grub-install is on your system, where the installed bootloader is, or something else?
nikita_ has joined #nixos
<MtotheM>
grub is in /boot/grub cjpbirkbeck, but you might not want to modify it directly due to how nixOS works.
<cole-h>
s/might not/don't/
nikita` has quit [Ping timeout: 246 seconds]
kleisli has quit [Ping timeout: 246 seconds]
<cjpbirkbeck>
quinn, MtotheM: i don't want to change it's manually, it's just that messed up the uefi setting one of my machines
<cjpbirkbeck>
i've got able to boot into NixOS, but it doesn't seem to want to boot with grub; instead it drops me directly into a NixOS generation
felixfoertsch23 has joined #nixos
<MtotheM>
have you specified the boot device? I had to do that.
Ralith_ has quit [Remote host closed the connection]
felixfoertsch has quit [Ping timeout: 260 seconds]
felixfoertsch23 is now known as felixfoertsch
<MtotheM>
`boot.loader.grub.device = "/dev/sda";`
dramforever has joined #nixos
<{^_^}>
[nixpkgs] @peterhoeg merged pull request #90261 → images: remove original files when using zstd for compression → https://git.io/JfQZO
<cole-h>
What do you mean it "drops me directly into a NixOS generation"? It just sounds like you turned down your timeout...
<cole-h>
Sounds like booting with grub is working fine if you're actually booting into NixOS?
<cole-h>
Unless I'm misunderstanding
Ralith_ has joined #nixos
aw has quit [Quit: Quitting.]
spacefrogg has quit [Quit: Gone.]
<cjpbirkbeck>
MtotheM: I am using uefi, and iirc, with that system you don't specify a drive with grub.
aw has joined #nixos
<cole-h>
If you're using the default uefi install (e.g. you didn't manually enable grub), you should be using systemd-boot (previously gummiboot), IIRC.
<quinn>
cjpbirkbeck: nixos does not use grub by default for UEFI iirc
spacefrogg has joined #nixos
<cjpbirkbeck>
cole-h: i checked at it seems like the timeout is still set to 10
<quinn>
cole-h: jinx you owe me a soda
marusich has quit [Quit: Leaving]
<cole-h>
I said it first >:)
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #nixos
<Ralith_>
my 20.03 system seems to have somehow lost track of its Qt platform plugins
<Ralith_>
none of the directories in QT_PLUGIN_PATH exist
<dramforever>
If you can't get into the boot menu, try hitting escape/shift/up arrow in quick succession when booting?
<cjpbirkbeck>
cole-h: i set it to use grub instead of systemd-boot within my configuration files
<quinn>
but i said it first! cjpbirkbeck: i think you do specify a boot device in configuration.nix if you are using grub (but if you are getting into a generation taht's probably not the problem)
<dramforever>
up arrow for systemd-boot, one of escape/shift for grub (I think shift but I can't remember)
<cjpbirkbeck>
dramforever: the issue is that there is no grub menu at all, i am just dropped into nixos (latest generation? i don't know)
<cjpbirkbeck>
dramforever: hmm, no but i will try, it's shift+esc?
<dramforever>
No you just tap the shift over and over while your machine is starting
<dramforever>
If that doesn't work try esc
<cole-h>
The slash means "or" -- so shift or escape
jumper149 has quit [Quit: WeeChat 2.8]
<dramforever>
It's how these bootloaders work: even if it's configured to be silent with zero timeout it still responds to key presses for a split second or something
<dramforever>
And then it shows up
<dramforever>
If you don't see grub menu or systemd-boot menu doesn't mean it isn't there.
<Ralith_>
yep, that was it
<quinn>
cjpbirkbeck: you may also be able to adjust the timeout in configuration.nix (if that is the problem)
<energizer>
i'm putting nixos iso on a usb to install from. do i need to give it some specific partition type or is GPT "8300 linux filesystem" ok?
<energizer>
i just did `dd if=nixos.iso of=/dev/sdd1` but computer won't boot from it
<quinn>
energizer: if you're on lunix, don't do that at all. either use a boot usb program or dd
<quinn>
if that's not working, the problem is elsewhere. check bios settings, make sure your usb has the right checksum, and then try on a diff. computer
<energizer>
quinn: i'm using dd but it still needs to be on a partition, no?
<dramforever>
No
<energizer>
oh
<dramforever>
Just /dev/sdd
<delroth>
has anyone implemented a way to auto-manage samba users with nixos? e.g. not requiring manual "smbpasswd -a" invocations and instead having a nixos-managed userdb
<dramforever>
*But wait*
<energizer>
too late :)
<quinn>
energizer: OH. you need to dd to the entire device, not a specific partition. the image has a partition table
<delroth>
I couldn't find anything like that, and my attempts at doing it myself failed unfortunately
<dramforever>
Uhh
<dramforever>
I mean, /dev/sdd *will* work, just I tried the copy files into a partition method and it also works *wink*
<dramforever>
What you need to do is go into two files and replace kernel options root=LABEL=..... with root=/dev/disk/by-uuid/your-partition-thing-here
<quinn>
dramforever: seriously? you made a gpt table, an ext4 fs, and then copied an iso in and it worked?
<dramforever>
Oh the partition needs to be FAT32 but the GPT type whatever doesn't matter IIRC
<quinn>
dramforever: so is this a part of the uefi standard? that is really interesting
<dramforever>
I don't know
<dramforever>
But that's what I got from what little experience with booting I had
<quinn>
spooky. i have a feeling it might have problems because nix needs to mount the store. did you test whether it could mount the store from an iso?
<dramforever>
Test? This system I'm using is installed using such a disk
<dramforever>
I think that's enough of a test for me
<energizer>
/dev/sdd working nicely
<dramforever>
Also I think copytoram is also working
<dramforever>
energizer: Yeah it's not that dd to whole device is bad or anything; it's in fact the supported method
<{^_^}>
[nixpkgs] @delroth opened pull request #90277 → wireshark: compile with QT_NO_DEBUG to avoid depending on qt*-dev → https://git.io/JfQzE
hlisp has joined #nixos
<quinn>
dramforever++ oh that's cool/magic. thanks for expanding my horizons :)
<{^_^}>
dramforever's karma got increased to 4
iyzsong has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @cole-h opened pull request #90278 → alacritty: install example config → https://git.io/JfQz2
<dramforever>
quinn: I tried this when a friend of my complained that NixOS iso doesn't work that way, whereas all other major distros have iso that work out of the box with the 'copy to fat32 method' (Haven't tested the latter)
iyzsong has joined #nixos
<quinn>
dramforever: and then nixos did work that way too? awesome
<dramforever>
And the only thing that wasn't working was finding the root device
<dramforever>
It's not like it's the root filesystem for the live system, just what's containing the iso files, so fat32 would work
drakonis_ has quit [Ping timeout: 260 seconds]
<quinn>
dramforever: did you change something in /boot in the iso?
absoluut1ly has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
<dramforever>
quinn: Yes, as I said above: go into two .cfg files (I can't remember exactly which, need checking) and replace kernel options root=LABEL=..... with root=/dev/disk/by-uuid/your-partition-thing-here
<jonreeve[m]>
Does anyone know why build dependencies wouldn't propagate to runtime dependencies?
<euank>
There has to be a reference to the store path left somewhere in the output of the derivation
orivej has quit [Ping timeout: 264 seconds]
<euank>
If you have a specific case, that could help. How it's expected that reference gets there differs a bit by language and what type of derivation it is
<dramforever>
quinn: /EFI/boot/grub.cfg and /isolinux/isolinux.cfg
<dramforever>
Oh it seems you already got that
drakonis_ has joined #nixos
<jonreeve[m]>
How do I ignore collisions again? Or resolve them?
<jonreeve[m]>
I'm getting `collision between `/nix/store/f4p5ls5jq80a33ma6w5cvrcrrh1rmsk4-python3.7-PyQt5.sip-4.19.22/lib/python3.7/site-packages/sipconfig.py' and `/nix/store/ii6w1p648q7ripixf8s334f79an5ljv4-python3.7-sip-4.19.22/lib/python3.7/site-packages/sipconfig.py`
<energizer>
i just put in a new ssd, but lsblk doesn't see it. is there some other command that might see it?
<cole-h>
euank: And it has a lot of pending ones because they're... well, automated. lol
<euank>
Anyway, jonreeve[m], there's two store paths of note here. The derivation path (which you do have, the .drv thing), and the path you end up building
kleisli has joined #nixos
<euank>
Yeah, I've looked at them before. The automation is a great idea. If we had enough tests for each automated package to also auto-merge it would be even more amazing
<euank>
jonreeve[m]: so you should have a .drv thing, i.e. 'error: build of '/nix/store/s1xwbajqbrmrr0vnvyja28kv8m0shj4a-python3-3.7.6-env.drv' failed' is what it prints for me
{^_^} has joined #nixos
<euank>
And if I `nix-store -q --tree /nix/store/s1xwbajqbrmrr0vnvyja28kv8m0shj4a-python3-3.7.6-env.drv` it tells me the tree of that, which shows what's pulling in sip I guess
<euank>
It's a lot of dependencies
<ryantm>
Dangit.
<cole-h>
x)
<ryantm>
Sorry. I made a fix for it and thought I had deployed it but was wrong.
<cole-h>
Have fun undeleting the branches and reopening all those PRs :D
Supersonic112 has joined #nixos
Supersonic has quit [Disconnected by services]
Supersonic112 is now known as Supersonic
inkbottle has joined #nixos
<jonreeve[m]>
euank: Ok so I'm looking at that tree, and am I seeing this right that it's just a dependency of Python? I'm at a loss for ideas about how to remove the extra one
zebrag has quit [Ping timeout: 256 seconds]
<jonreeve[m]>
Also incidentally ignoreCollisions doesn't seem to do anything
slack1256 has quit [Remote host closed the connection]
<energizer>
i can't detect any of three M.2 SSDs on either my laptop with the builtin M.2 slot or my desktop with a usb M.2 slot. suspect i'm doing something wrong but can't imagine what
<quinn>
energizer: did you try lspci? that's really weird. could be a kernel ish too
<jonreeve[m]>
Does anyone know where the "XCB" plugin is?
<jonreeve[m]>
And how to get it into QT?
<euank>
Looks like I'm barking up the wrong tree anyway there jonreeve[m]; grepping for the conflicting store paths in the derivation's tree output doesn't show it, so that methodology doesn't work
<euank>
There's probably a way to traverse the buildInput graph correctly to find where that's coming from, but I don't know it :(
<jonreeve[m]>
euank: Ok I managed to get it to build again now. BUt now I'm back at that old problem, `qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""`.
<energizer>
jonreeve[m]: vague recollection only: "XCB" makes me think of `xcffib`
<jonreeve[m]>
simpson: I read that, but I can't really make heads or tails out of it. Do you know how I can edit this derivation so that running `nix-shell` and `python example.py` in that directory will work?
sigmundv_ has quit [Ping timeout: 264 seconds]
<jonreeve[m]>
It builds just fine, but then when I run it I get that error about XCB
<jonreeve[m]>
energizer: I added xcffib, but that didn't seem to change anything. Any other ideas?
<quinn>
energizer: that's really strange. my guess is it's a mobo issue (but not an expert by any means)
<energizer>
that's been my feeling since i started using nix
<energizer>
there's no magic ritual to installing nvme pcie ssds is there? i turn off the computer, stick it in the slot, screw it in, turn it on
<jonreeve[m]>
So what does it mean to use a hook?
<jonreeve[m]>
`The package will need to be fixed to use [the new https://github.com/NixOS/nixpkgs/issues/65399 wrapQtAppsHook]. The hook wraps every qt application with adding QT_PLUGIN_PATH and XDG_DATA_DIRS as well as XDG_CONFIG_DIRS.See wrap-qt-hook.sh in nixpkgs`
<quinn>
energizer: considering that's not the case for any other hardware component i don't imagine so. try an ubuntu usb drive and see if it works there to eliminate nix-specific issues
<euank>
And your app in this case is you running "python example.py". The wrapper wasn't used on either of those, so there's no chance for the plugin path etc to be set
<euank>
Normally, if `example.py` were the final executable, you might wrap that instead. You potentially could also wrap `python` itself for that shell specifically.
<jonreeve[m]>
euank: Great, how can I wrap python?
<quinn>
energizer: to be clear i'm using a nvme usb enclosure, it's not some little hack i have. and no i did not need to
<simpson>
jonreeve[m]: Based on https://nixos.org/nixpkgs/manual/#python I would consider trying out buildPythonApplication, or perhaps buildPythonPackage if you need the library. I suspect, though, that if you want this as a library, then you're going to have problems just because it is the top-level package that needs the Qt wrapper and not the intermediate libraries.
<simpson>
jonreeve[m]: Yeah, but maybe buildPythonApplication is what you want. I'm not familiar with ete3 but it looks like an application that has a GUI and opinions.
<{^_^}>
[nixpkgs] @KAction opened pull request #90279 → git: make nls support optional → https://git.io/JfQgj
<quinn>
energizer: if your peg currently isn't in how about you show me a pic of yours and i will take a gander. and whisper it to me i think, this isn't really nixos related
<kayg04>
does anyone else use docker here? I run watchtower which needs access to /var/run/docker.sock and after a few hours of it running, somehow it loses access to the socket and results in: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
<kayg04>
happens with every docker container needing access to the docker socket. and only happens on nixos. :(
<euank>
kayg04: does it happen when you specifically do something, like run a nixos-rebuild switch or restart dockerd?
<euank>
Yeah, that was going to be my guess. to double-check, you're running a docker container with `-v /var/run/docker.sock:/var/run/docker.sock`, right?
<kayg04>
yes, the `docker-compose `version of that
<euank>
When docker restarts, it will, I think, replace docker.sock with a new one. However, bindmounts won't pick up a new file even if it's atomically updated because, well, the original file is what got bindmounted. The new one's a different file
<kayg04>
restarting the container, in this case: watchtower, fixes it btw
<euank>
You can verify that by doing something like `ls -i /var/run/docker.sock` or `stat /var/run/docker.sock` to see the inode, and then observe the inode inside the docker container is different
<kayg04>
oh, yeah, wait
<kayg04>
nice idea
<euank>
So, what's the solution? bindmount a directory containing the docker socket instead. dockerd doesn't replace the directory, just the file
<euank>
so either bindmount all of /var/run, or create /var/run/docker/docker.sock, bindmount that directory, and configure everything to use that path instead
<euank>
then when the socket file is updated by dockerd restarting, the bindmount will reflect that change
<euank>
Right now, you're ending up with a stale socket that no docker daemon is listening on anymore
<euank>
One alternative solution: use systemd depenedencies to cause the containers bindmounting docker.sock to restart any time that file changes
<kayg04>
both the solutions sound nicer but sadly I can't verify if that is indeed the problem since Watchtower doesn't have a shelli inside the container
<euank>
If `/var/run` is a symlink in its rootfs, you'll have to use `/proc/$pid/root/run` instead fwiw since symlinks end up pointing to the wrong place
<kayg04>
I see. I've been meaning to switch to the former.
orivej has joined #nixos
<euank>
Mine are a combination of once-off stuff and k3s-managed containers, but if I hadn't already sunk time into understanding k8s, I'd probably be using docker.containers
<kayg04>
ah, let me know (tag me) if you decide to host your config somewhere? would really help. do you think it's worthwhile to run k8s on a single machine?
<euank>
I think this isn't really #nixos related anymore, so if you wanna keep chatting, we should probably switch channels or move it to pm. I'm happy to talk more if you want to, just don't want to get too off-topic here
<cole-h>
Sucks what can't be automated, the reopening?
<cole-h>
I'm sure it could be. But it happens so infrequently, what's the point of putting in the effort for something that will only see use maybe twice a year?
<cole-h>
Maybe if it happens again, it might be worth it to safeguard the future, but for now it's fine. At least, ry*ntm hasn't complained about having to do this :P
<{^_^}>
[nixpkgs] @purcell opened pull request #90281 → fast-downward: also build on darwin → https://git.io/JfQaI
<ryantm>
Done.
<cole-h>
Phew.
<cole-h>
I was just about to ask if I could help :P
<ryantm>
Thanks; it would have gone faster but I was doing it while watching a movie :) Sorry again.
<cole-h>
Hehe. No problem. Fingers crossed it doesn't happen again.
<cole-h>
If it does and I'm around, we could trade off: you could restore the branches (since you need the write bit to do that, which I don't have), and I could re-open. Might go a little faster if you only have to click 1 button on each PR.
<cole-h>
Just next tab -> click -> close tab, repeat ad infinitum, no need to move your mouse those few extra pixels... lol
<ryantm>
It could happen again if someone deploys to the server without updating the NixOS configuration or if they rollback to the bad generation.
<ryantm>
The button is always in a different spot because of comments and other notes, I think.
<cole-h>
Oh, that's true
<cole-h>
There goes that idea
<ryantm>
Maybe the API supports reopening PRs?
<cole-h>
99% sure it does -- now if it can restore deleted branches is the other question.
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
<cole-h>
No way in the v3 API to restore it appears
<cole-h>
JK doesn't even look like you can reopen... maybe it's just a simple "open" request with the same information?
<euank>
PATCH /repo/.../pulls/id state=open should do it I think
<euank>
Maybe it's possible you can restore a branch by doing a POST /repos/../git/refs/ref against the fork for the reference in the PR's metadata; no clue if that actually would work though
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyraxjoe has quit [Ping timeout: 246 seconds]
cyraxjoe has joined #nixos
MtotheM has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @euank opened pull request #90286 → steam: switch to correct runtime tarball → https://git.io/JfQVd
cyraxjoe has quit [Ping timeout: 265 seconds]
cyraxjoe has joined #nixos
orivej has quit [Ping timeout: 264 seconds]
davidv7 has quit [Ping timeout: 246 seconds]
orivej has joined #nixos
markus1199 has quit [Ping timeout: 256 seconds]
dermetfan has joined #nixos
kleisli has quit [Ping timeout: 256 seconds]
dkjii has joined #nixos
markus1189 has joined #nixos
<dkjii>
hey folks, so I installed nix-diff and figured out why doing nix-build -E on the same derivation as when I nix-env -iE rebuilds the whole toolchain, it looks like it's ignoring but stdenv adapters which add my compile flags, any idea why?
<dkjii>
here's my nix expression, I remove the first line to use nix-build -E
<sphalerite>
dkjii: right, that's a bit of an odd expression I have to say! As euank says, you're importing nixos, not nixpkgs; and then you're bringing the package nix (containing the nix package manager) into scope, rather than the nixpkgs package set where you'll actually find what you're looking for
justanotheruser has joined #nixos
<sphalerite>
dkjii: try with import <nixpkgs> {overlays = …;}; sharutils
<euank>
Also, `nix-build --run-env` I think is deprecated in favor of nix-shell? At least I haven't used `--run-env` before
asheshambasta has joined #nixos
justan0theruser has quit [Ping timeout: 272 seconds]
<sphalerite>
Or equivalently, because use of `with` can be confusing: (import <nixpkgs> {overlays = …;}).sharutils
<ohhaimark[m]>
how do I use the alsa-ucm-conf package?
Chiliparrot has joined #nixos
mallox has joined #nixos
NeoCron has joined #nixos
<sphalerite>
ohhaimark[m]: using the `alsaucm` command line tool from alsa-utils
<sphalerite>
dkjii: ok, that's odd. In any case, especially if you're just starting off with nixos, I'd recommend (a) using an installer image and (b) not trying to enable this sort of optimisation, because it will make everything take at least 10× longer
<wedens[m]>
I have `somepkg = (import (self.fetchFromGitHub {....}) {});` in an overlay and the archive is redownloaded on every build. I have tarball-ttl set to 1 week. what's happening?
<euank>
For just installing it, I'd definitely skip the optimization bit so you can use the binary cache.
<dkjii>
I'm just evaluating nix right now not particularly just trying to use it
<dkjii>
seeing if it's worth switching to
<dkjii>
I wanna get to see how it works first
<euank>
If you feel like rebuilding the whole distro after you're done installing, you can edit it, `rebuild switch`, and it'll rebuild everything then quite cleanly, but having the binary cache is quite nice.
<energizer>
hello i think i'm hitting a nix/nixos bug, nixos-install -> error: while setting up the build environment: unable to bind mount '/path/to/store/...-alsoft.conf.drv.chroot': Permission denied
<dramforever>
It's basically what's happening in the installer image isn't it
<dramforever>
But dual booting in a VM... I just don't think it's worth it...
<dkjii>
dramforever: dual booting vms is pretty easy if you use libvirt, you can setup the boot order from virt-manager
<dramforever>
dkjii: If your goal is to try out all the interesting stuff then by all means go ahead
<ohhaimark[m]>
<sphalerite "ohhaimark: using the `alsaucm` c"> When it looks for configuration files with `listcards` then it looks in the /nix/store/*alsa-lib*. How do I get it to look in /nix/store/*alsa-ucm-conf*/?
<dkjii>
but yeah i'm just looking at how nix is with and without nixos
<ohhaimark[m]>
* When it looks for configuration files with `listcards` then it looks in the `/nix/store/*alsa-lib*`. How do I get it to look in `/nix/store/*alsa-ucm-conf*/`?
<ohhaimark[m]>
> <@freenode_sphalerite:matrix.org> ohhaimark: using the `alsaucm` command line tool from alsa-utils
<{^_^}>
error: syntax error, unexpected '<', at (string):316:1
<dramforever>
dkjii: The easiest way IMHO is still going to be two VMs
<dkjii>
i'm using gentoo's portage right now which is very good, but nix looks promising
<dramforever>
But now it's apparent that you aren't here for easy stuff, right?
<{^_^}>
#67465 (by matthewbauer, 41 weeks ago, open): Unable to bind mount on certain hard drives
orivej has joined #nixos
<energizer>
practically speaking, i need to get my computer working so if i have to buy another drive so be it
<sphalerite>
ohhaimark[m]: alsa-lib contains a symlink to alsa-ucm-conf
<energizer>
i'm honestly asking though because the last two i bought didnt work
<euank>
Didn't work as in were DOA, or as in had that error?
<energizer>
had that error
<sphalerite>
wedens[m]: no, that is IFD
<sphalerite>
wedens[m]: it's not using the function import, but it's still making evaluation dependent on a drv output
<sphalerite>
in that sense, IFD is a bit of a misnomer
D_ has quit [Ping timeout: 272 seconds]
<ohhaimark[m]>
<sphalerite "ohhaimark: alsa-lib contains a s"> Ah, I realize my mistake. I was trying to use a later alsa-ucm-conf when I should have used a later alsa-lib.
<euank>
I'm not really convinced that error is from specific ssd brands.
<ohhaimark[m]>
> <@freenode_sphalerite:matrix.org> ohhaimark: alsa-lib contains a symlink to alsa-ucm-conf
<ohhaimark[m]>
* Ah, I realize my mistake. I was trying to use a later alsa-ucm-conf when I should have used a later alsa-lib. Thanks
<{^_^}>
error: syntax error, unexpected '<', at (string):316:1
<wedens[m]>
sphalerite: alright, I suspected that it might be IFD just more implictly. thanks for clarifying
<euank>
Anyway, fwiw energizer, I didn't hit that error on an 850 (someone in there did), and I'm currently on a Sabrent Rocket 4.0 which also did not have any error
asymptotically has joined #nixos
<sphalerite>
ohhaimark[m]: aaah :)
kreyren has quit [Remote host closed the connection]
<sphalerite>
ohhaimark[m]: that said, it definitely is weird that alsa-lib gets it from its own prefix even though we have a distinct package for it. I've had some pains trying to use ucm as well because of that, and because if you modify the config package it wants to rebuild everything that depends on alsa-lib :/
<{^_^}>
[nixpkgs] @lheckemann opened pull request #90297 → manual: use less weird way of installing nixos tools → https://git.io/JfQo4
<teto>
ryantm: why the close/reopen on several PRs ?
<gordon1>
some time ago, when i upgraded my system to 20.03, plasma seemed very buggy (no icons, cursor theme not applied everywhere, some qt widget were plain gray, konsole font was ugly and buggy…), i thought that was caused by the upgrade, but now, on a brand new system, i started plasma for the first time, and the same problem applies. Is the currently stable plasma version that buggy?
<energizer>
euank: maybe you can help with some questions descriptively. boot.initrd.availableKernelModules?, what filesystem types? do you have boot.initrd.luks?
<eyJhb>
energizer: what are you doing?
<energizer>
eyJhb: trying to install nixos, hitting a possible bug
<euank>
energizer: so, dumb question. Can you check the permissions of mnt?
<euank>
Oh, and fsType = ext4 (on top of luks ofc) with vfat boot
<energizer>
drwxr-xr-x
<euank>
i.e. make sure /mnt and /mnt/nix/store and everything up to there is o+rx
<euank>
(up to the thing you're getting a permission denied for)
<euank>
Though it sounds like that's not it, okay
troydm has joined #nixos
<eyJhb>
I have gotten that same error before
<eyJhb>
I was hell
pingiun has joined #nixos
<eyJhb>
Is this a fresh install?
<energizer>
yes
pingiun has quit [Client Quit]
<eyJhb>
So you are 100% with destroying everything on the drive?
<energizer>
yes
<eyJhb>
And are you setting up luks encryption?
<energizer>
yes
<eyJhb>
Hmm. let me see if I can find anything. The permission denied I got when I did _something_ wrong at boot one time...
<eyJhb>
I would suggest you reboot, format the disk (just sudo fdisk /dev/sdXn - delete partitions and recrate)
<energizer>
i did
<eyJhb>
But I am assuming you are also doing some LVM?
<eyJhb>
ANd you get that each time? Weird...
<energizer>
yes
chloekek has joined #nixos
<eyJhb>
What commands are you exactly running at boot?
<energizer>
this isn't at boot, i'm running `NIXOS_CONFIG=/home/energizer/nixos-hosts/target/hardware-configuration.nix nixos-install --root /mnt/target/fsroot`
dramforever has joined #nixos
<euank>
And if, afterward, you manually run the `mount` command, it still fails, right? i.e. it's trying to run `mount --bind /mnt/nix/store/.... /mnt/nix/store/....`
<euank>
If we can verify that fails, that at least gets us a little closer to understanding it
<energizer>
i dont know what mount command it's trying to run
<eyJhb>
at boot => boot of installation media :p When installing
<euank>
Use strace
Thra11 has joined #nixos
<euank>
If you do something like `strace -ff nixos-install ....`, that'll give you a file-per-pid and will be handy for pinpointing the failing bindmount syscall, and what happened in that thread around it
<euank>
I'd be happy to help look through that if you upload em somewhere and see if anything stands out
<euank>
and `sudo mount --bind /mnt/target/fsroot/nix/store/9yg221lkyb3q0214gcz6i3fg9izfc2jk-append-initrd-secrets.drv.chroot /mnt/target/fsroot/nix/store/9yg221lkyb3q0214gcz6i3fg9izfc2jk-append-initrd-secrets.drv.chroot`
kenran has quit [Ping timeout: 240 seconds]
<euank>
gives you permission denied?
<{^_^}>
[nixpkgs] @timokau merged pull request #90249 → php < 7.4: Fix validation of PKG_CONFIG var → https://git.io/JfQqD
<energizer>
thanks for looking into this. i'll ping you when i'm back in
<sphalerite>
Ericson2314: as far as I understand, nix-shell -E 'with (import <nixpkgs> {}).pkgsCross.aarch64-multiplatform; mkShell { depsBuildBuild = [qemu]; }' shouldn't be building "/nix/store/qnq1pzmc0qgndw5gmf79x5p0mk78yl7k-qemu-4.2.0-aarch64-unknown-linux-gnu.drv" but getting a native qemu for the build system? Am I misunderstanding something, or is something going wrong?
<EatThem>
hey i try to create a nix file with all my scripts and import it to my cobfigursmmm
<EatThem>
ups configuration.nix, can someone point me in the right direction writescriptbin?
orivej has quit [Ping timeout: 256 seconds]
<EatThem>
i tried but only the first script was detected, with more then one it throws an error while building
orivej has joined #nixos
<euank>
how are you including them, and what error?
<wedens[m]>
writeScriptBin is for single script
<EatThem>
i first tried it with a derivation with { writescriptbin }: and import it in systempackages
FRidh has quit [Quit: Konversation terminated!]
sb0 has joined #nixos
<EatThem>
jep i definded multiple writescriptbin in my bin.nix
<sb0>
I want to override a nixpkgs module (specifically security/pam.nix). Can I do that with an overlay and how?
<EatThem>
someone got an example config with multiple bash scripts in a seperate file?
<{^_^}>
[nixos-homepage] @edibopp pushed to first-nix-dev-tutorials « Copy first tutorials from nix.dev »: https://git.io/JfQig
cosimone has quit [Quit: Quit.]
<sb0>
wedens[m]: thanks. and an overlay can't do that automatically?
<wedens[m]>
nope
<wedens[m]>
overlays and nixos modules are orthogonal
<{^_^}>
[nixos-homepage] @edibopp pushed to first-nix-dev-tutorials « Copy first tutorials from nix.dev »: https://git.io/JfQiV
ncakerlist has joined #nixos
konobi has quit [Remote host closed the connection]
<euank>
EatThem: you have two possible things you can do here: 1) a pkg per script, 2) a single pkg with each script in its bin folder. Or something in between, where there's N packages, and a meta-package that symlinks em all together into one folder
knupfer has joined #nixos
konobi has joined #nixos
<EatThem>
no possibility to include them in one nix file?
<jakobrs>
I can't seem to figure out how to use SysRq on my laptop and I was just wondering whether there's anything distro-specific I need to keep in mind
<euank>
Or manually plumb in each variable (i.e. `import /path/to/script {inherit pkgs;}`); point is just that your nix expression is a function, so you need to somehow call the function to turn it into the package it evaluates to
<jakobrs>
like keyboard drivers
<euank>
and callPackage is the usual way
<jakobrs>
Most likely I just have to dig deeper into Lenovo's manuals
<EatThem>
the {} let it compile
<EatThem>
thank you :)
<sphalerite>
jakobrs: usually it's just alt-printscr? Some of the sysrqs are disabled by default by systemd
asheshambasta has quit [Ping timeout: 272 seconds]
<sphalerite>
jakobrs: try journalctl -kf and then press alt+printscr+/ or something and see if anything shows up
<jakobrs>
Doesn't seem to be alt-prtsc, and I know that sysrq is enabled because I've manually enabled it (it works on a different machine)
<euank>
jakobrs: I read the wikipedia page for the lenovo one.https://en.wikipedia.org/wiki/Magic_SysRq_key "Thinkpad Carbon X1 the SysRq is activated by pressing Alt+Fn+S simultaneously, then releasing Fn and S while still holding Alt"
<EatThem>
so the Main Problem is the With pkgs: in my definition and the {} ignores it?
<sphalerite>
jakobrs: huh ok. It works on my thinkpad >.<
<euank>
I can never remember if I'm suposed to keep holding alt or fn or what
<jakobrs>
Yeah the manual mentions Fn+S *for the next model* but I can't get it to work on this one
<jakobrs>
I'm doing Alt-Fn-S Alt-h (holding down Alt the entire time)
<euank>
EatThem: recall that in a nix expression, `{ foo }: foo` is a function (taking an attribute containing foo, returning the attributes value in this case).
<euank>
By convention, a package in nix is a function that declares its dependencies at the top (i.e. pkgs, or writeScriptBin, or whatever), and when you call that function, you get back the derivation/package
<euank>
So `(import /path/to/script.nix)` evaluates to a function expecting an attributeset as an argument
<euank>
and adding in `{}` is you callign that function, passing it an empty set
<euank>
`callPackage` fills in default arguments for each thing in an attribute set from the current scope, so it just plumbs in `pkgs = pkgs` if there's pkgs in the current scope
<euank>
... Hopefully all of that makes some sense, and the reason you needed to do that makes sense now EatThem?
<DigitalKiwi>
sphalerite: as for the running as root what do you mean? why don't they use root instead of weechat user? you can't attach to someone elses without enabling multi user and authorizing them right?
Zetagon has joined #nixos
<sphalerite>
DigitalKiwi: right fair enough, I don't actually know tbh :p
chloekek has quit [Ping timeout: 256 seconds]
<sphalerite>
was just concerned that if just enabling that module allows attaching to the weechat user's screen, surely attaching to any other user's screen would be possible
<DigitalKiwi>
which is i think why it didn't work oob for you
<sphalerite>
right
<jakobrs>
Okay so it really does seem like Fn-S is the correct combination
<sphalerite>
that's kind of silly though
<euank>
jakobrs: other thing is to double check is that the magic sysrq key for what you're trying to do is enabled (assuming you're going for a magic sysrq)
<jakobrs>
Is there any chance that this is software-related (drivers)
<jakobrs>
I know it's enabled because the exact same configuration worked on a different computer (with a sysrq key)
<euank>
I guess, what are you trying to do in the first place?
<jakobrs>
Using boot.kernel.sysctl."kernel.sysrq" = 1;
orivej has quit [Quit: No Ping reply in 180 seconds.]
<liminal18>
hey folks I've been having some issues building mongo 4_2 which I need for work so I've made my nix config and build files a github repo. Plkease comment there: https://github.com/aljones15/nix-mongo-4_2/blob/master/README.md also any other build or config hints are MUCH appreciated. I am working from home currently and this is the first time I've had to use nix for work. Issues and comments are better than PRs, I need to understand this all better.
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos
<jav>
I have ...displayManager.lightdm.enable = true set (with autoLogin), ...desktopManager.xfce.enable = true and windowManager.i3.enable = true. Everything starts fine, but there is also a terminal being opened right after login. Could someone tell me what causes this terminal to be opened and how I can disable that?
<ar>
jav: desktopManager.xterm.enable = false;
<jav>
ar: thanks, but that should be the default anyway, right? I am not setting it to true anywhere, as far as I can tell.
kreyren has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @MP2E pushed commit from @rtldg to master « discord: add libuuid to nativeBuildInputs »: https://git.io/JfQXi
dermetfan has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 256 seconds]
<__monty__>
liminal18: Doesn't look like you're running 20.03, the channel is the only thing that determines your system version. Unless you don't rely on channels. Was this nix-channel --list run as root?
<{^_^}>
liminal18: Run and share the output from: nix-shell -p nix-info --run nix-info
<liminal18>
ok added the nix-shell info. Looks like I can remove the version 19 channel for my user's channels
<__monty__>
liminal18: Hmm, I'm having trouble understanding the error message. Could you replace "${version}" on line 47 by "blah"?
<__monty__>
Should be fine, yeah.
<liminal18>
__monty__ how about replacing it with 4.2.5?
<__monty__>
Anything's fine but something that *doesn't* make sense would be better.
Soo_Slow has joined #nixos
<liminal18>
foo it is. what command should I use nixos-rebuild switch?
<liminal18>
__monty__ got the same error: while evaluating the attribute 'nativeBuildInputs' of the derivation 'mongodb-foo' at /home/liminal18/Programs/mongo4/4_2/mongodb.nix:47:3:
<liminal18>
cannot coerce a set to a string, at /home/liminal18/Programs/mongo4/4_2/mongodb.nix:47:3
<lassulus>
maybe do scons = (callPackage ./scons/default.nix { ... }.scons_latest);
<liminal18>
Lassulus did that it is working so far
<__monty__>
I'm not sure why you pass python2Packages for scons while defining a python 3 though. If you actually want scons with python2 you might need `scons_3_0_1`.
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #nixos
<gordon1>
how can i use the unstable version of the plasma5 environment? Also, how can i run plasma-wayland? `dbus-run-session kwin-wayland` complains about a Qt platform plugin
hax404 has quit [Remote host closed the connection]
<liminal18>
gordon1 I think you need to require unstable in configuration.nix
<gordon1>
yeah i already have it
orivej_ has quit [Ping timeout: 260 seconds]
hax404 has joined #nixos
orivej has joined #nixos
<liminal18>
gordon1 that is about all I know sadly =) I believe you can passd the unstable package to some config option to use it, but I'm assuming you've done that.
<{^_^}>
nixops#1189 (by cleverca22, 43 weeks ago, open): plan for supporting custom partition layouts and custom FS's on any backend
<eyJhb>
That SHOULD be possible, as far as I know. Buth that would kexec
mlen has joined #nixos
<clever>
eyJhb: the basic idea in the above ticket, is that you create a function to boot the machine into a rescue console with ssh, then some reusable code can do the kexec and install steps
<clever>
and that rescue console function, is part of the plugin that deals with provisioning new hw over the api
<eyJhb>
Seems like a nice idea!
<eyJhb>
Would be awesowe to easily support multiple backends. How I wish I had so much more time than I actually have
<clever>
for backends like packet and aws, you can also skip that kexec step
<clever>
packet can natively ipxe boot, so you just have to provide a url to an https source you trust
<clever>
aws, you could generate an AMI that boots the kernel/initrd with grub, and runs from ram
<clever>
the benefit i can see of installing fresh on aws, is that you wont have an extra generating eating up disk space, that doesnt match your nixpkgs
<eyJhb>
But that can be set in the API some other way? I just mean, for a generic way having something like cloud-init would be nice, because then we can tweak it afterwards
<clever>
AmandaC_: https://status.nixos.org/ this links to the hydra job for each channel, when everything in the job is green, the channel updates
<typetetris>
Is ghc in nixos using dynamic linking?
dxtr_ has quit [Quit: leaving]
<clever>
typetetris: it can both staticly and dynamically link the haskell libs, and will usually link system libs dynamicly
<eyJhb>
clever: Wouldn't that implementation go a long way? Or? (curious, not sure if I am misunderstanding something)
<clever>
eyJhb: i'm not that familiar with cloud-init, to know what it can do
rsoeldner has joined #nixos
<clever>
eyJhb: but the basic idea in my ticket, is to just partition, format, mount, then use `nix copy` to shove an entire closure into `/mnt`, and fixup the bootloader
<typetetris>
clever: I got `Cannot load -prof objects when GHC is built with -dynamic` when trying to profile my haskell program ...
hax404 has quit [Quit: WeeChat 2.7.1]
<eyJhb>
It is basically a way to say whet you create a server using the API "Okay, when you start up I need you to run these commands!". (the server reads a config at boot, and execute it as pr. cloud-init)
hax404 has joined #nixos
<clever>
typetetris: you need to ensure nix builds all of the libraries with profiling also
Mateon1 has quit [Ping timeout: 264 seconds]
<typetetris>
clever: Didn't know that, thought I could just profile my program
<clever>
eyJhb: but can cloud-init function when the hdd is still blank? or does it need an OS already installed?
<clever>
typetetris: in ghc, profiling changes the size of every single object on the heap, so everything has to be rebuilt to handle the larger objects
<eyJhb>
It needs a OS, but I am thinking just basing the config on a Debian install, and then having that do kexec when it has all the requirements.
<typetetris>
clever: Thanks for clarifying that for me.
<eyJhb>
But now that I am saying this, most can be solved just using SSH I guess
<eyJhb>
(a generic SSH installer would suffice)
<clever>
eyJhb: and most of the complex commands have to be ran after you kexec
<clever>
eyJhb: pre-kexec, its only 3 commands, scp, ssh tar -x, ssh /kexec_nixos
orivej has quit [Quit: No Ping reply in 180 seconds.]
_mlen has joined #nixos
<rsoeldner>
Hi, currently struggle using the `libxml2` library from a nix-shell. Currently I have to figure out the lib path by running `xml2-config --cflags` to retrieve the include paths... Aren't they automatically attached ?
Chiliparrot has joined #nixos
orivej has joined #nixos
<eyJhb>
clever: for nixops to work, I need to have a base installation. right?
<eyJhb>
Or once I am kexec it can partition and stuff?
<clever>
eyJhb: yeah, once you kexec, just wipe the partition table, and treat it like a fresh install, according to the manual
mlen has quit [Ping timeout: 265 seconds]
knupfer has joined #nixos
knupfer has quit [Remote host closed the connection]
knupfer has joined #nixos
_mlen is now known as mlen
mallox has quit [Quit: WeeChat 2.8]
meh` has joined #nixos
<eyJhb>
clever: I just want to easily deploy things to the cloud using NixOS :(
<clever>
eyJhb: nixops should also automate that install step
<eyJhb>
Also the partitioning step?
<clever>
yeah
<eyJhb>
Guess I need to read a little up on NixOps
<eyJhb>
I have no clue how it works atm.
<clever>
that feature doesnt exist yet
<clever>
but thats part of the plans in my ticket
Soo_Slow has quit [Quit: Soo_Slow]
<eyJhb>
Which feature ?
<eyJhb>
The easy deploy thing?
zupo_ has joined #nixos
<clever>
eyJhb: partitioning and installing nixos from scratch
<eyJhb>
Wait, but if I am in a NixOS install media and have SSH access, can it then partition and install NixOS?
<clever>
thats also part of the plan in my ticket
<clever>
boot the iso on baremetal, set a pw, enable ssh, then tell nixops "do the rest for me"
<clever>
eyJhb: nixops will first use `nix-instantiate --eval --xml` to convert your deployment file into xml
<clever>
eyJhb: the sub-classes of MachineDefinition then take a subtree of that xml, and convert it into a subclass of MachineDefinition
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #nixos
<clever>
eyJhb: sub-classes of MachineState then take a MachineDefinition, and manage the actual state
<clever>
eyJhb: the nixops.util.attr_property's you see on lines 109-151 are a bit confusing, those generate special objects with a getter/setter on them
<eyJhb>
How this is done feels so confusing tbh.
<clever>
eyJhb: if you try to read or write one of those params, it automatically goes to a field in the sqlite state, specific to this machine in the cluster
<clever>
eyJhb: when you `nixops deploy`, it will run the create() function (line 1102) on every machine in the cluster
hax404 has joined #nixos
<clever>
eyJhb: line 1213 will detect that the machine hasnt been provisioned yet (the state lacks a vm_id), and then use the aws API to provision new hw
nschoe has joined #nixos
<clever>
eyJhb: and if it has already been provisioned, the create() function will instead just modify things (such as iam instance profiles, and security groups, or cpu/ram selection)
asymptotically has quit [Quit: Leaving]
<clever>
eyJhb: get_physical_spec() on line 236, will then generate a fragment of configuration.nix, that describes how to build this machine
<clever>
eyJhb: the rest is either support code to allow the above, or misc features like shutdown/terminate
<{^_^}>
[nixpkgs] @bhipple pushed to master « rippled: fix build after boost 1.72 upgrade »: https://git.io/JfQSQ
orivej has quit [Ping timeout: 260 seconds]
<EatThem>
eyJhb: true, ty!!
orivej has joined #nixos
<typetetris>
I am using overlays to add haskell packages to my package sets, like `haskell = super.haskell // { packageOverrides = super.lib.composeExtensions ...` worked so far. Now wanted to create another overlay to a package set with profiling turned on, using `p = self.haskellPackages.override { overrides = super.lib.composeExtensions ...` but that did ignore the `packageOverrides` from the other overlays, how can I do that
<typetetris>
so it combines?
<eyJhb>
Oh clever. If I have a patch for a nixpkgs thing, is it then possible to run a patches on nixpkgs to apply it?
<chloekek>
How do I know which of .xsession, .xsessionrc, .xinit, .xinitrc I need to create on NixOS?
<clever>
chloekek: one minute
<chloekek>
I think I’ll just create one and symlink all the others to that, that should work!
<clever>
chloekek: that will probably make things worse
<nschoe>
Hi everyone :-) When running nix-build on my default.nix I get "waiting for lock on '/home/nschoe/.cache/nix/tarballs/1200smrkr968klmzym6w67p8in925zh7lm3lzjcjby0w38yjrkia-file'..." and it seems to hang. Anyway I can manaully release this lock? Stop whatever worker is working on it?
<Cache>
Hi, is anyone here using awesomewm? I'm getting random errors for my config that used to work fine on Arch
<selfsymmetric-pa>
Hey, ysndr has been trying to get this merged for a while. He's also resolved merge conflicts twice. I can't help but wonder if node-packages.nix is a bad module which causes too much churn. https://github.com/NixOS/nixpkgs/pull/87766
<Cache>
All the errors end in "attempt to index local 'c' (a nil value)"
<mgdm>
i came across that node thing yesterday
<simpson>
Cache: Do the minor versions line up? Awesome's API changes between minor versions, not just major versions, so you may need to adapt your configuration.
<etu>
Cache: Is it the same version of awesome? I know that in the past (like 10 years ago when I used awesome) they tended to break the config format on every single update. I have no idea if they still break all the time.
<selfsymmetric-pa>
qyliss: What if we were to split them up into individually created nix files?
<selfsymmetric-pa>
And them loaded all modules from a directory into `node-packages.nix`?
<selfsymmetric-pa>
Then we wouldn't have merge conflicts anymore, right?
<selfsymmetric-pa>
Alternatively: make the generation of `node-packages.nix` a build step.
seku has joined #nixos
<Cache>
Interesting. noticed that Arch has 4.3-1 in the repository and Nix 4.3. So the api even changes inbetween minor versions?
<Cache>
Actually it looks like the latest release of awesome was 4.3, so they're the same
<selfsymmetric-pa>
acronym check: IFD?
<xe4>
if I have a default.nix file in my directory, what does "nix-build -A blah" do?
<energizer>
,ifd
<{^_^}>
import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<selfsymmetric-pa>
energizer++
<{^_^}>
energizer's karma got increased to 17
lunik1 has joined #nixos
<selfsymmetric-pa>
qyliss: Is there a PRINCIPLED way to split up `node-packages.nix`?
kreyren has joined #nixos
<etu>
xe4: Build the attribute blah from default.nix
<qyliss>
selfsymmetric-pa: not sure
gentauro has quit [Read error: Connection reset by peer]
<qyliss>
having everything be one big npm resolve is probably a good thing
<energizer>
what does it mean to bind mount a directory to itself?
gentauro has joined #nixos
<xe4>
etu: thanks!
<selfsymmetric-pa>
Thanks for the thoughts. qyliss++
<etu>
xe4: Putting this in a default.nix http://ix.io/2pcd/nix and then running "nix-build -A blah" in that dir will give you a result symlink to a file with the contents "1 + 1!
<etu>
s/!/"/
cosimone has joined #nixos
chipb has joined #nixos
wolfshappen has quit [Ping timeout: 272 seconds]
tester33 has joined #nixos
<xe4>
etu: again, thank you, so much!
Cache has quit [Remote host closed the connection]
<eyJhb>
It is heavily edited... A minimal example would just show what the generator makes :)
kreyren has joined #nixos
<energizer>
if you think you can solve this problem i'm happy to continue, but i think it's a nixos bug and making minor modifications to the config is unlikely to change anything
knupfer has quit [Remote host closed the connection]
<eyJhb>
I see nothing that is special about your setup
<eyJhb>
I have even put in a USB drive, formatted, created EFI, EXT4, mounted it at /tmp/mnt, made config, nixos-installed
<eyJhb>
Everything works fine so far.. :)
<energizer>
with my config?
justanotheruser has quit [Ping timeout: 272 seconds]
bhipple has quit [Ping timeout: 246 seconds]
rsoeldner has quit [Remote host closed the connection]
<eyJhb>
I don't have enough of your config, and I see no reason to use that config as it is only the hardware part - and mine is pretty much the same - https://termbin.com/g407
<eyJhb>
In the dir you tell nixos to config, it will create etc/nixos/configuration.nix and hardware-configuration.nix
<eyJhb>
Both are needed, what you have uploaded is hardware-configuration.nix
<energizer>
no, the filenames don't matter
<eyJhb>
That still does not change, it is not the complete config
<eyJhb>
Are you running the CMD as root?
<energizer>
yes it is
<energizer>
let's move on
gustavderdrache has joined #nixos
<eyJhb>
I can't really help if you are unwilling to do stuff, sorry ... I see no reason it is a fault in NixOS. My USB test works fine :) Or, at least not that error. Got some GPT instead :)
<energizer>
in the meantime, can anyone think of a workaround, or should i just install ubuntu/buy a macbook?
<eyJhb>
Workaround for what energizer ? You need to try and unmount it, remake partitions, generate config and see again. It looks like a normal setup, which should be fine
<puck>
energizer: what file system are you using on /mnt/gamma?
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #nixos
<energizer>
puck: ext4
<puck>
hrmm, interesting
<euank>
energizer: did you ever figure out what was going on?
<euank>
If you're willing to dig more, I'm willing to try
<energizer>
euank: yes
mounty has quit [Quit: Konversation terminated!]
<energizer>
gimme a couple minutes, i wanna try with just the plain nixos iso usb on the target machine
<puck>
i'm super confused by this error, tbh. i'm not entirely sure this should ever be able to occur
<euank>
Sure
mallox has quit [Quit: WeeChat 2.8]
alexherbo2 has quit [Ping timeout: 258 seconds]
<euank>
I'm also confused puck. There's a seccomp filter set before that mount call, which I guess could do it, but seems unlikely (since it works on other FSs).
<puck>
oh, right, the seccomp filter
<puck>
the seccomp filter doesn't stop mounts though
<euank>
I mostly think that's not it and want to eliminate it first by verifying we can repro without it
<puck>
euank: right, but there's another mount just before it (non-bind mount though) which works fine
<euank>
Yeah, `mount --make-rprivate /`
<euank>
selinux could do this, I don't think that seems likely. Selinux isn't enforcing / doing anything on nixos, right?
<puck>
i don't think the official iso has it, and i'm not sure a self-overlapping bindmount would cause this anyways
<risson>
Hi everyone, I'm trying to write a module that would be working inside a NixOS _and_ a home-manager configuration
<risson>
The thing is the NixOS' modules options are not available in the home-manager and vice versa
<risson>
The workaround would be to import NixOS' modules and home-manager's so the options are available even if they are not evaluated
<risson>
But that brings some additional problems, especially if some options have the same name but not the same types
<risson>
So I'm looking for another workaround if anyone has any ideas
<euank>
puck: fortunately, we still have avenues to explore with a lot of work. I'm pretty sure with enough `perf` work, we can get where in the kernel we're hitting EPERM
<risson>
kalbasit told me that clever might know something about this
<puck>
euank: it's not an EPERM, it's an EACCES
<puck>
euank: also, weirdly, and i can't tell if this is coincidence or not
<risson>
I can provide a basic non-working example if needed
<moet>
... about how to fix a broken haskell package
<moet>
does anyone here have experience with this? i understand the haskell parts, but not the nix parts
<moet>
that thread links to a youtube video (https://www.youtube.com/watch?v=KLhkAEk8I20) with very detailed instructions about how the haskell infra in nixpkgs works, but i seem to be missing a few small pieces and cannot accomplish my goal to fix the `wxdirect` package.. if anyone here can help, let me know
<moet>
here's a more concrete question: if i know when a package broke in hydra, how can i find the version of nixpkgs to pin? the hydra page seems to only have githashes for a branch of nixpkgs, not master
kreyren has joined #nixos
fadenb has left #nixos ["User left"]
Thra11 has quit [Ping timeout: 264 seconds]
<euank>
I'm not sure what you mean by 'version of nixpkgs to pin' there moet
<moet>
euank: i think i mean the githash of nixpkgs master branch for which the package last built..? does that make sense?
<euank>
Can you link the hydra job you're looking at?
<euank>
iiuc, jobsets are based on different branches, and it very well might be that you're looking at a job that is only in some branch, not in master.
<moet>
here's the history of jobs for the package, showing where it broke https://hydra.nixos.org/job/nixpkgs/haskell-updates/haskellPackages.wx.x86_64-linux .. i'm trying to "go back" in my local environment to a working version (that's the part where i'd like to find and pin a version) and then figure out how to bring that forward into master
<moet>
euank: yes, the job is in the `haskell-updates` branch .. in my understanding i'd have to make it work in master somehow, so starting from an old haskell-updates wouldn't be valuable..?
<euank>
It would give you a working thing, and I assume haskell-updates regularly ends up getting merged to master, but this also doesn't seem like the ideal approach necessarily
knupfer has quit [Ping timeout: 256 seconds]
<moet>
euank: ah, ok, maybe i'm going about this the wrong way
<euank>
It's likely that it's broken because some other packages updated, and downgrading other haskellPackages to fix that one might be the wrong solution
muslimm has joined #nixos
<euank>
Have you dug into why it's broken on master or the haskellUpdates branch?
<moet>
euank: yes, it seems like the Setup.hs has some problem locating a dependency.. i think that this _might_ just be an undeclared dependency
<moet>
euank: but the language of the overrides file in haskell-modules/common-configuration.nix has me a bit lost.. i've tried various ways to get the dependency in scope for the Setup.hs, but none have worked..
nschoe has quit [Ping timeout: 272 seconds]
<moet>
since i'm new to nix, i'm iterating very slowly.. i'm not sure how (or whether it is possible) to iterate using cabal..
muslimm has quit [Remote host closed the connection]
<euank>
So, the error in hydra is that setup.hs requires 'process >=1.1 && <1.5', and the only version of process that seems to be in hackage-packages is process_1_6_9_0
muslimm has joined #nixos
muslimm has quit [Max SendQ exceeded]
muslimm has joined #nixos
muslimm has quit [K-Lined]
<moet>
euank: yes, that's the error i'm seeing also.. i didn't see anything about process_1_6_9_0
<tnks_>
navigating Hydra always gets me lost. Right now, with the latest channel of nixos-20.03, I get a pretty bad Hydra cache miss on `nix build nixos.shell.check`. I feel pretty confident the build should have failed. But when I search hydra.nixos.org for "shellcheck" I get so many builds, I'm not sure I'm looking at the right one.
<euank>
It does look like `configuration-nix.nix` is generally where these sort of customizations happen, and it seems there's several haskell-specific library functions that may be handy in addition to usual overrides
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tobeportable has quit [Quit: Leaving]
<Bunogi>
what should I do if /boot is full and `nixos-rebuid-switch` can't copy the kernels into it? I already tried garbage collecting all older generations (nix-collect-garbage -d) but it didn't fix it
<Bunogi>
it seems to always copy them no matter what, to try to solve it I manually deleted everything in /boot/kernels but it was just copied back
<euank>
Bunogi: you probably want to delete some generations, or configure the max generations copied over. Are you using systemd-boot or grub?
<moet>
euank: the top of configuration-nix.nix seems to indicate that this particular kind of failure is out of scope: "overriding a specific version of a haskell library because some package fails to build with a newer version"
<moet>
so i guess i'll go the PR route
<euank>
What's that route?
<Bunogi>
euank: Yeah I did that already with with (nix-collect-garbage -d). Using grub on EFI
<moet>
euank: ah, sorry, i meant, i'll fix upstream with a PR that updates version bounds in the package on hackage (if that's possible)
<euank>
Yeah, that makes sense. It also might be possible to apply that patch in the nix tree before it merges
<euank>
configuration-nix does seem to have other things that are applying patches. All of this with a grain of salt though. You'll get a better answer if someone that's familiar with the nix haskell stuff is around, or if you wanted to try and get more ideas of options on discourse, someone there might be able to better help
<euank>
Bunogi: if you gc the old generations, it shouldn't be able to copy them back in. But anyway, the `boot.loader.grub.configurationLimit` option might help
<euank>
I think it defaults to 100, and that sounds like it's larger than fits on your boot partition
<moet>
euank: configuration-common.nix has a version fixing override near the top ... comment says "Needs older QuickCheck version" .. i'll look for more
<Bunogi>
Ah, I'll try that, thanks. My /boot is only 100MB. Don't remember the exact details but it's so small because of a dual boot with windows
<moet>
euank: ah, no, i misunderstood, these are just packages where test have been disabled due to changes in QuickCheck
<Bunogi>
Nice, I set the configuration limit to 1 and it completed the upgrade this time. I guess i'll have to make it really small temporarily if I get this issue again. Thanks for the pointer
<p01ar>
doing more meson port work atm, currently porting an old music player
<moet>
euank: it seems the way to allow versions is to call `doJailbreak` on the package in an overrides file.. this is defined and documented in haskell-modules/lib.nix .. however, it's a sledgehammer which lifts all version constraints from the package, and seems to actually break things worse for `wxdirect` .. i'll just try to fix upstream
<Ericson2314>
p01ar: hey!
<p01ar>
all working good in *nix but hitting problem after problem on the windows build lmao
<moet>
euank: in the meantime, do you know how i can develop against an older version of nixpkgs for my personal work?
<colemickens>
for my "all inputs pinned" setup, I have an escape hatch that will pull from ~/code/<import> if it exists to ease with local development.
<colemickens>
Is such a thing possible with flakes? It seems `inputs` have to specifically just be "references".
<{^_^}>
[nixpkgs] @Ericson2314 pushed 93 commits to staging: https://git.io/Jf7fE
amerigo has quit [Quit: Connection closed for inactivity]
user_0x58 has quit [Ping timeout: 256 seconds]
coderobe has quit [Ping timeout: 256 seconds]
__monty__ has quit [Quit: leaving]
Mrmaxmeier has joined #nixos
<{^_^}>
[nixpkgs] @thiagokokada opened pull request #90407 → bbswitch: fix build with Linux kernel version >= 5.6.0 → https://git.io/Jf7fV
<{^_^}>
mesonbuild/meson#7323 (by p01arst0rm, 39 minutes ago, open): [CMake] Meson not properly respecting CMAKE_PREFIX_PATH when searching for dependencies on windows
<MtotheM>
well everything preferably. for offline deployments. but I guess that's to complex?
<samueldr>
mirroring the *whole* cache is probably prohibitively expensive
<samueldr>
but IIRC there is a way described somehwere to cache for a particular revision of nixpkgs
* samueldr
checks
<armin>
btw i had no idea that's something i always wanted, but being able to customize the colors of the console using console.colors in nixos is super nice.
<euank>
energizer: cool, next two avenues to explore are:
<MtotheM>
I really like concept of nixOS, but if I can't host my whole cache to make deployments possible without internet. it won't really work out for what I have in mind.
<euank>
`perf ftrace -G do_mount -- <command>` which might tell us where in the kernel it's getting eacces
<euank>
And, possibly easier, just trying to replicate the combination of mkdir/chmod/mount calls the strace shows
<euank>
and see if it trivially repros _without_ all that nix stuff
<euank>
If we can get a simpler `mount --bind` repro, that might make further ftracing simpler
dermetfan has quit [Ping timeout: 256 seconds]
<euank>
MtotheM: you can, it's very much possible
<euank>
But in general, you're more likely to want to host a binary cache that just has the subset of stuff you actually deploy. Which nix is smart enough to figure out that exact subset for you :)
<euank>
Basically, all you have to do is `nix copy --to my-cache` from some machine (either one that downloads stuff from hydra to mirror it, or builds everything locally to create the binary cache). It'll transitively copy all dependencies too if you specify the specific exprssion/expressions you need to be able to deploy
<energizer>
reformatting
<MtotheM>
Yeah, the issue with that is we might want to bring in things that we weren't planning for beforehand, which wouldn't be possible.
<euank>
You can mirror the whole thing if you want, it's just probably excessive
<euank>
Let's see if reading that code makes anything clearer
<mac10688>
Anyone here use vim on nixos? I just read an article about how to use sudo vim in nixos and it was super extensive. Is anyone able to use sudo vim and regular vim with the same config files?
<armin>
hm, can i easily determine all possible values of console.font? i tried 3 fonts now but the text is still too small for my taste and i want to make it more readable.
<euank>
In the strace output, we see that nix runs `echo '1000 30001 1' > /proc/25701/uid_map; echo '100 3000 1' > /proc/25701/gid_map` right before pid 25701 tries to make this mount call
<energizer>
armin: run `setfont`, it will give you a directory containing the fonts
stiell has joined #nixos
sbetrium has joined #nixos
<euank>
Which basically states 'uid 1000 is the same as uid 30001' and 'gid 100 is the same as 30000' I think.
<armin>
energizer: perfect, thank you :)
<euank>
Since I think they're both in the same user namespace. I don't think nix does an actual user namespace unshare anywhere
<euank>
I'm a bit curious about permissions / uid ownership along that tree; can you grab that? i.e. `stat / /mnt/ /mnt/gamma /mnt/gamma/nix /mnt/gamma/nix/store`
<euank>
But can you also see if that happens to fix things just in case it's something that simple
* energizer
bows to euank
<energizer>
yes, that's it
<euank>
phew
<euank>
Okay, cool. I'm glad we figured that out. I thought I'd already verified that, so I'd already discounted it in my head, but I guess I didn't dig into that
<euank>
Thanks for bearing with me on that overly-complicated journey :)
<energizer>
how did you figure that out?
<euank>
uid/gid 1000/499 have ownership of mount, and inside the userns they're acting as uid 30k/30k+1, so without o+rx, it makes sense an inode permission check would fail.
<euank>
That combined with the ftrace showing that it's walking that path and checking permissions makes that make some sense at least.
<energizer>
euank: count me impressed and grateful. thank you.
<energizer>
any idea why it complained about the specific files it did?
<armin>
energizer: there's one font that's large enough but unfortunately it breaks german umlauts for me :(
<energizer>
most of the people in that issue had the error on NetworkManager.drv.chroot and i can repro that if i enable nm
<energizer>
armin: i dont know much about consoles...is there some reason they can't use regular fonts?
<euank>
That's the first place that it actually sets up a uid_map in the strace, so presumably those are the first things that are being built vs just downloaded from the store
<euank>
and for copying a path from the store, it ofc doesn't deal with a userns, but for that, it's starting a derivation builder.
<armin>
energizer: there likely is, as tty's are some relict of the past i don't think you can easily use truetype fonts or something, but i might be mistaken and that could well have changed over the last decades
<armin>
sad, as this font is really pretty great otherwise
<armin>
looks just like a classical 80x25 console to me
<armin>
but meh, i need my umlautz
<energizer>
armin: there might be other console fonts available, and there is a console.packages option
<armin>
energizer: good pointers (again), thanks so much for your kind help
user_0x58 has quit [Quit: Leaving]
user_0x58 has joined #nixos
<energizer>
euank: why would nm need to build a derivation? (what's wrong with the nm i already have)
<samueldr>
though it's not perfect, fonts are 1-bit bitmaps, so no antialiasing
<armin>
samueldr: pretty interesting, thanks
<euank>
energizer: if you query for info about that derivation, it might be more clear. I'd guess it somehow depends on the hostId or something, not sure.
<euank>
I assume it's not actually "network manager", but some trivialBuilder or the like that it calls