<zeta_0>
does nixos-wsl(trundle) allow root access? I was able to set the password for root as well as my user, but whenever I try to access root by typing `su`, it throws an csent cant find process id file not found? after tinkering for a bit, I can type su and the password, but nothing seems to be happening?
shibboleth has quit [Quit: shibboleth]
<zeta_0>
could any of you clarify this thanks!
<zeta_0>
no one here has used nixos-wsl?
ddellacosta has quit [Remote host closed the connection]
<zeta_0>
I thought at least a couple of people in this #nixos channel would be using nixos-wsl, since in industry, most people use windows.
<ivan>
I run nixos in vmware workstation because from experience I know hyper-v doesn't work properly and thus WSL2 can't either
jesystani has joined #nixos
mounty has quit [Ping timeout: 260 seconds]
mounty has joined #nixos
<lunik1>
I've run nix in wsl but not nixos
<zeta_0>
ivan: currently I'm resolving this root issue, I don't know if it's an issue or by design, once I resolve this, I'm going to work on installing nixos-vscode-server and get it up-and-running: https://github.com/msteen/nixos-vscode-server
<zeta_0>
lunik1: cool, I got ubuntu working and was able to connect it to vscode with vscode's remote-wsl extension, but I decided to 1st try and get nixos-wsl to work, if I can't then I'll install nix in ubuntu.
<xAr86>
I'm new to nixos and trying to prepare an update for i3status-rust. I have copied the /usr/share files to $out, now I need to patch the path here https://github.com/MaxVerevkin/i3status-rust/blob/master/src/util.rs#L13 can anyone give me a tipp how to patch $out/usr/share/ in here? (as $out must be resolved as its only available at build?)
<matthewcroughan>
elvishjerricco: Is there a way to instruct nix to do nothing on itself?
<matthewcroughan>
I.e, don't write any files to disk, ever, anywhere other than the /nix/store
<matthewcroughan>
well.. that already happens, what I mean is "don't compile anything on me"
<matthewcroughan>
I want the device to *only* compile on a remote builder.
<pennae>
matthewcroughan: set -j0 should do that iwrc
<matthewcroughan>
I thought that just used all cores on the sytem?
<matthewcroughan>
what do I set in my config?
<pennae>
nix.maxJobs = 0
<pennae>
nixos-rebuild and some others also take -j as an argument to set it temporarily
<zeta_0>
when in nixos(nixos-wsl), I execute `sudo -i` and terminal returns: `nsenter: cannot open /proc/132/ns/pid: no such file or directory`, is this by design, or is this an issue? https://github.com/Trundle/NixOS-WSL
<pennae>
ah, wonderful. gc has collected binaries from running processes again.
<pennae>
or store optimization, come to think of it
<pennae>
yeah, probably store optimization
<Orbstheorem>
Hi, how do I use a flake in a subdirectory as an input to the flake in the parent directory?
<Orbstheorem>
I've tried 'path:.?dir=foo/bar', but it complains it's a relative path.
<Orbstheorem>
I've also tried 'path:foo/bar', but evaluation fails if I try to build from another directory.
<matthewcroughan>
pennae: what you said, doesn't seem to work.
<matthewcroughan>
it errors out, then continues and builds stuff anyway, ignoring you.
<matthewcroughan>
If I `nixos-rebuild --builders 'ssh://swordfish aarch64-linux' -j0 switch` for example, it'll just error out and say I need to increase the remote builders. Then, seconds later, it will continue as if I did not pass the -j0 option.
<matthewcroughan>
Additionally, it won't use the remote builder and I can't debug why, because `--verbose` is not verbose enough.
<pennae>
hm :( pretty sure we had it working simply with -j0 before, but didn't do cross builds then
<pennae>
maybe that's an emergency fallback if none of the builders work?
<matthewcroughan>
works as intended, I had to set boot.binfmt.emulatedSystems to armv7l-linux too though
ddellacosta has joined #nixos
<matthewcroughan>
elvishjerricco: You were so right! It's slow as hell.
<matthewcroughan>
elvishjerricco: what you provided earlier can't be done for the whole system though can it? I want to cross-compile EVERYTHING in the whole system. What you showed me has to be done to every single attribute.
<elvishjerricco>
matthewcroughan: Nixpkgs can be configured so that everything is cross compiled, but there's a couple minor issues right now that NixOS fail to build this way.
<matthewcroughan>
elvishjerricco: issues that don't occur on native hardware?
<elvishjerricco>
I think there are some patches out there that fix it, but I don't know where to find them
<elvishjerricco>
matthewcroughan: Issues like packages that fail to be cross compiled
<matthewcroughan>
oh, well I expect this
<matthewcroughan>
it can at least try right/
<elvishjerricco>
I think the main thing is a perl script that NixOS has to have
<matthewcroughan>
it can build nixos-minimal, can it?
<elvishjerricco>
You just can't build nixos without it and it doesn't cross compile
<elvishjerricco>
no
<matthewcroughan>
I'm wondering, what would the best remote builders for armv7 be?
<matthewcroughan>
raspberry pi 2's?
<elvishjerricco>
matthewcroughan: But the kernel and kernelPackages are generally the only thing you should have to compile if you use the nixos cache, so I'm not sure why you're having issues if you've got the kernel cross compiling?
<matthewcroughan>
This is a hard problem. Cross compiling is going to be great once plumbed in.
<elvishjerricco>
oh you're on armv7
<elvishjerricco>
I think there's a cache for that somewhere...
<matthewcroughan>
Yeah there is, but I have beefy servers, so I want to run the cache.
<matthewcroughan>
I'd just want to cross compile it, because emulation is ridiculously slow.
<matthewcroughan>
I can't believe how slow it is, actually.
<matthewcroughan>
Hello has been compiling for 10 mins.
ahmedelgabri has quit [Ping timeout: 250 seconds]
<elvishjerricco>
matthewcroughan: Yea you'll have to do some fixups to nixpkgs to get NixOS totally cross compiled
<elvishjerricco>
once those are fixed I think it's like two lines of nixos config to cause the whole system to cross compile
<matthewcroughan>
what are those two lines? I'd like to see the pseudo-code, even if it doesn't work
<elvishjerricco>
matthewcroughan: I *think* you'd do something like `nixpkgs.crossSystem = lib.systems.examples.aarch64-multiplatform; nixpkgs.localSystem = lib.systems.examples.gnu64;`
<matthewcroughan>
and where does that go?
<matthewcroughan>
on the remote builder? or on the client
<elvishjerricco>
matthewcroughan: configuration.nix on the aarch64 machine
<matthewcroughan>
I'm not going to get away with running `nix` on this pi with 256MB of RAM though, it's just not going to happen.
<matthewcroughan>
Even using cache and remote builders, it's just too much.
<matthewcroughan>
What are my options?
<pennae>
what's your goal?
<matthewcroughan>
Avoiding distributions that don't have a declarative config.
<pennae>
since you're here, that's pretty much a given :) for the device i mean. what's it supposed to do
<matthewcroughan>
I want to make a pihole that is plumbed into some existing nix infrastructure definitions.
<elvishjerricco>
matthewcroughan: Oh, then `nix-build nixpkgs/nixos --arg configuration ./configuration.nix` on the x86 system (with those nixpkgs.*System lines), and `nix-copy-closure` the build result
<matthewcroughan>
so I want therefore to run a pihole docker container on the device.
<matthewcroughan>
well, oci container, either way, this all fits into 256MB easily, the problem is that there's no way the device can build itself.
<matthewcroughan>
I need a way of producing an image that I can flash to an SD card that *is* the changes.
<elvishjerricco>
Ah
<matthewcroughan>
so, nix files that produce an ISO image that is flashed to the sd card, which is immutable
<matthewcroughan>
I would be really happy with that :D
<elvishjerricco>
Then still, make the image on the x86 machine with the nix file with the cross config stuff, and build the sd image
<matthewcroughan>
yeah that makes complete sense, to be able to cross compile outside
<pennae>
maybe lift some code from nixos-rebuild build-vm to create the image
<elvishjerricco>
pennae: Well the code for building the sd image is already there in nixpkgs
<matthewcroughan>
are there any minimal examples of doing this sort of embedded stuff? Yknow, making system images that you flash to the SD?
<pennae>
elvishjerricco: oh cool, didn't know that
<matthewcroughan>
Yeah I want a stateless installation basically, this would be really cool.
<matthewcroughan>
Do you think I can embed a docker container into the sd image?
<qyliss>
matthewcroughan: I usually do :a import <nixpkgs> { crossSystem = ...; }
AlpineLlama has joined #nixos
<Henson>
In the NixOS guide in section "19.1 Making patches" it says "Please avoid working directly on the master branch" but also "Rebase your branch against current master". I'm not sure I understand the latter request in the context of the former.
<qyliss>
Henson: create a branch off master, rebase it against master
<supersandro2000>
Henson: I think that refers to the git feature branch workflow
<Henson>
yeah, it says to check out a version of the nixpkgs repo that matches your local version hash, in order to fetch stuff from the binary cache. Then I guess once you're done testing your patch on your particular nixpkgs version then to rebase it against master
<Henson>
I just need to read up on rebasing again to better understand it.
<supersandro2000>
I think it is better to checkout the target branch which most likely will be master or there can be eval errors right away or the change you did does not work anymore
<supersandro2000>
especially right before a release when master moved on quite a bit
<supersandro2000>
and you probably want to rebase like `git rebase --onto=master HEAD~1` where 1 is the amount of commits you did
<Henson>
supersandro2000: ok, I think I understand. So the thing I should create the PR for is not the changes made in the branch off my local nixpkgs version, but the changes rebased onto master?
rajivr has joined #nixos
<Henson>
supersandro2000: and you're also saying it would be better for me to checkout master and work on a branch off of that, instead of a branch of my local nixpkgs version?
<supersandro2000>
Henson: the branch for your PR should be somewhat recently rebased against master
<supersandro2000>
and yes. for example we recently deprecated stdenv.lib which is still heavily used in 20.09. If you submit a PR with it ofborg will complain.
ddellacosta has joined #nixos
<Henson>
supersandro2000: but to test it on a commit close to master, will it have to build a bunch of stuff that isn't in the binary cache? Is there a way to find the commit closest to master that hydra has built stuff for?
<zeta_0>
how do I enable dbus service in nixos? this systemctl command for setting up nixos-vscode-server throwing this error: `failed to connect to bus: no such file or directory`
ahmedelgabri has quit [Ping timeout: 276 seconds]
<Henson>
zeta_0: check to see if you have dbus.service already running. If not, I think dbus might be enabled if something else needs it. You might be able to set the hidden services.dbus.enable option to enable it anyway. I'm not too sure of the answer, but those are some ideas you might investigate.
<DavHau[m]>
I have package A which has a dependency on package B, but nix doesn't catch that during the build (B doesn't show up in `nix-store -q --tree A`).
<DavHau[m]>
Is there a good way how I can enforce the dependency B being recognized?
<DavHau[m]>
Example. A program depends on gzip, but it doesn't incorporate any absolute path to gzip in its files. How can I make it depend on gzip?
<turlando>
I have a simple shell.nix installing only python3 and I'd like to add stdenv.cc.cc.lib to buildInputs in order to provide libstdc++.so to the environment. I'm not sure how to do it, I guess I have to provide stdenv as input to the nix shell lambda (?) but I'm not entirely sure how
<Reventlov>
so I wanted to switch from systemd boot to grub (in order to be able to choose specialisations)
<Reventlov>
So I now have boot.loader.grub.enable at true, and a few other things, and grub is not appearing at boot. I did the rebuild with the install-bootloader option too.
<k223>
Hi, my installation is crushing because of bug in mesa for AMD 5700xt, I found that I need to set AMD_DEBUG=nongg environment variable, but I have no idea where or how to set it before kde boots
<alexherbo2>
when updating from postgresql_12 to postgresql_13, the database was not compatible, and I removed my /data/postgresql. I was thinking it would fix with a rebuild, but it made my postgre unstartable. how can I fix it? here is the log of `nixos-rebuild switch` https://gist.github.com/alexherbo2/602caebcc0b3662913f24960904ff968
arzoc has joined #nixos
ManiacOfMadness has quit [Ping timeout: 240 seconds]
tdeo has quit [Ping timeout: 245 seconds]
diamondburned has quit [Ping timeout: 245 seconds]
tdeo has joined #nixos
diamondburned has joined #nixos
ManiacOfMadness has joined #nixos
<ehmry>
ok, ibus works with kde but not gnome
ManiacOfMadness has quit [Ping timeout: 240 seconds]
bennofs_ has quit [Read error: Connection reset by peer]
bennofs_ has joined #nixos
cyrinux has quit [Quit: bye]
Frosku has joined #nixos
ManiacOfMadness has quit [Ping timeout: 240 seconds]
unthought has joined #nixos
Qwerky_ has quit [Remote host closed the connection]
<Frosku>
Hey all, I'm on guix but I've found getting nvidia driver working on here to be essentually unsurmountable. Before I try switching to nixos, I'm on a laptop with an Optimus card, is this likely to be relatively painless (i.e. no harder than on Gentoo/Arch) to get working?
<DamienCassou>
hi everyone. I'm currently using nixpkgs+home-manager 20.09 on top of Fedora and I'm wondering what could be the best moment to switch to the next release to help testing and which branch to check
<etu>
Frosku: I guess you need bumblebee for that, I've never used or owned such hardware myself but we have options for bumblebee.
<DamienCassou>
Frosku: I don't know but the nixGL project works fine for me: https://github.com/guibou/nixGL. It has support for nvidia
stree has joined #nixos
<Frosku>
Proprietary driver? (I need 3D acceleration)
<unthought>
hi all. I have a bind mounted /nix on a fresh multi-user install on ubuntu 20.04 and nix is unusable with "error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted", suggestions?
Qwerky has joined #nixos
gianarb has joined #nixos
zebrag has joined #nixos
ddellaco_ has quit [Ping timeout: 260 seconds]
<pie_>
unthought: check the issue tracker, i think someone asked about that earlier
<DamienCassou>
Frosku: what driver were you using on Gentoo/Arch ?
<DamienCassou>
* Frosku: what driver were you using on Gentoo/Arch?
<{^_^}>
nix#3435 (by amckinlay, 1 year ago, open): error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
<pie_>
hm. well i guess i would start checking permissions, and what the processes are running as
<pie_>
maybe strace
<pie_>
also people tend to say something about needing to run as root, i think?
cyrinux has joined #nixos
exondation has quit [Ping timeout: 260 seconds]
<unthought>
The install is using sudo to elevate privileges, running as root for regular ops shouldn't be required. But ...
ddellacosta has quit [Ping timeout: 260 seconds]
xelxebar_ has quit [Remote host closed the connection]
hlz has quit [Quit: WeeChat 3.1]
exondation has joined #nixos
xelxebar has joined #nixos
<pie_>
the daemon might need to run as root but im not sure
<pie_>
the installer should handle that though i would think...
<unthought>
What completely stumps me is that it's apparently working now. And it wasn't working yesterday, no matter what. Could it be required that you need to restart the machine under certain conditions? Right now, the daemon wasn't started, but I verified this yesterday (first thing obviously).
<unthought>
daemon is running as root, correct.
<pie_>
well if a reboot fixed it a reboot fixed it...bothers me too but i dont know off the top of my head what could cause that
<unthought>
So I guess false alarm (sry), but I banged my head against it for a good while yesterday.
<unthought>
kk, nvm then. Thanks for the helping hand anyway.
<pie_>
well, i made an attempt but :p
<pie_>
half the time im just telling people to check the issue tracker x)
<unthought>
;) worked, maybe the good vibes was what fixed it
<unthought>
I've seen that issue before and went through everything I could get my hands on, but I haven't seen a restart mentioned. Maybe should add that to one of the tickets there, for the next unsuspecting soul.
Qwerky has quit [Remote host closed the connection]
<eyJhb>
If I want to test something with types.coercedTo, then is there a nice nix repl way of doing that? Ie. I can give it some sample data, and I can see what it actually outputs?
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #nixos
ddellaco_ has quit [Ping timeout: 246 seconds]
<Frosku>
Second question: can I make install media with nonfree packages on? (my wifi requires iwlwifi)
vidbina has joined #nixos
exondation has quit [Remote host closed the connection]
<Synthetica>
You could nix-copy-closure the iwlwifi to an usb stick or something and install it from there (I think)
<thblt>
Is it to be expected that `nixos-rebuild -I` using HEAD of nixos-unstable will build a lot packages from source?
ddellacosta has joined #nixos
<ToxicFrog>
Yes. Hydra takes a while to populate the cache.
whatisRT has quit [Ping timeout: 240 seconds]
<thblt>
ToxicFrog: thank you.
<ToxicFrog>
So if you're always using the latest nixpkgs checkout (or even the latest release of the nixos-unstable channel), you will quite often be building stuff before hydra has a chance to build and cache it.
<gchristensen>
that isn't right, nixos-unstable doesn't update until after hydra has finished building everything in it
<ToxicFrog>
Oh? I thought the channel updated once a set of test packages were successfully built
whatisRT has joined #nixos
<ToxicFrog>
which is large, but much smaller than the complete set of packages
TraineeScott[m] has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TraineeScott[m] has joined #nixos
<gchristensen>
that is correct, but it also has to finish attempting to build the rest of the evaluation also
<thblt>
It doesn't happen *that* often for me on the channel. I'm trying to fix the fix to the pcscd config bug, but I cannot send a PR before I've rebuilt everything because I need my smartcard (and thus a working pcscd) for that :)
<ToxicFrog>
(and AIUI it is right if you're talking about a git checkout)
<TraineeScott[m]>
I'm giving $50,000 to the first 20 persons to click on this link and join, then ask me how
<eyJhb>
But the note - `# Merge definitions of a value of a given type.`.
<srhb>
You're probably more confused about coercedTo than mergeDefinitions :D
qbit has quit [Quit: WeeChat 3.1]
<eyJhb>
Yes, that is where my initial question started, as I want to edit services.bind to not use a list, but a attrvals instead
is_null has joined #nixos
ddellacosta has quit [Ping timeout: 246 seconds]
<eyJhb>
And then got suggested to use coercedTo, to do this, without breaking everyones setup :p
<infinisil>
eyJhb: Check for existing usages of coercedTo
<infinisil>
There should be a few already converting lists to attrs
<eyJhb>
Which got me the expression above (again thanks!), where I couldn't wrap my head around the file, value and toString. But that makes sense now :D
<infinisil>
Maybe also some open PR's. I believe aanderse has been doing such changes
<eyJhb>
Grepping all around infinisil ! :D
lordcirth has quit [Remote host closed the connection]
<eyJhb>
Because at that point, I get `error: A definition for option `nodes.srrouter.configuration.services.bind.zones' is not of type `attribute set of submodules or attribute set convertible to it'. Definition values:`
<infinisil>
We should really have something like lib.types.nixType "list"
<infinisil>
eyJhb: For now I suggest `coercedTo (types.listOf types.attrs)`
qyliss has quit [Quit: bye]
<infinisil>
And then the coercion function needs to be of type `[Attrs] -> Attrs`
<infinisil>
(the types.attrs there has no effect though, you can even replace it with `types.int` without any functional difference)
<eyJhb>
Hmm... So the coercion function, is of syntax (x: something), pretty much. The x I get is ie. { name = "something"; ... }, right? Or do I get the entirety of the listOf?
<eyJhb>
Sorry for all the questions infinisil
qyliss has joined #nixos
<infinisil>
First argument is the type you want to coerce, second argument is how to convert from a value of that type to the final type, and the third argument is the final type
<thblt>
I fixed the first part of my problem, but now I'm fighting polkit. I applied the snippet described it https://github.com/NixOS/nixpkgs/issues/121121, but trying to use the card still fails with "(user: 1000) is NOT authorized for action:".
<{^_^}>
#121121 (by euank, 8 hours ago, open): pcscd's nixos module does not include a polkit policy
<thblt>
Befor that, log shows "Error in authorization: … Action org.debian.pcsc-lite.access_pcsc is not registered" Should it be registered? How?
ToxicFrog has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
ToxicFrog has quit [Quit: WeeChat 2.9]
<eyJhb>
Yay, stuff builds infinisil ! :D
<dxb[m]>
this feels kinda silly to even be asking, but is there no such thing as a loop in nix expression language? i'd like to have a function that takes a list of files and passes each one individually to some other function... do i just need to do this recursively or something?
saschagrunert has quit [Remote host closed the connection]
ddellac__ has joined #nixos
syhn has quit [Ping timeout: 268 seconds]
ddellac__ has quit [Ping timeout: 240 seconds]
syhn has joined #nixos
nixy has joined #nixos
<srhb>
thblt: No, it isn't.
<srhb>
thblt: Not if you really meant nixos-unstable
<srhb>
thblt: That is bumped _after_ hydra passes.
<srhb>
thblt: So if you're experiencing many rebuilds, maybe you have an overlay that interferes with something deep in the dep chain or something like that.
vidbina has quit [Ping timeout: 246 seconds]
<infinisil>
eyJhb: Nice!
growpotkin has joined #nixos
<eyJhb>
Just needed to change, so that it would take the default key from the attrs, and use as the value for "name" as well :D Should be done now I guess?
<kshaa>
It seems that in lib/systems/examples.nix there are loads of systems, but in flake.nix there are like 6. I want to somehow import msp430-gcc into flake'd shell, how should I go about doing that? Suggestions?
jgt has quit [Ping timeout: 268 seconds]
ddellaco_ has quit [Remote host closed the connection]
<k0ral>
Hello, I'm getting the following error when running a gnome application: "Gdk-WARNING: Settings portal not found: Error calling StartServiceByName for org.freedesktop.portal.Desktop: Unit xdg-desktop-portal.service not found"; yet I've set xdg.portal.{enable,gtkUsePortal,extraPortals} (using xdg-desktop-portal-gtk and xdg-desktop-portal-wlr, as I am running Sway); I can't find any installed systemd
<k0ral>
unit named xdg-desktop-portal; any clue as to what I am missing ?
<ris>
so.. i'm a heavy nix user, only occasional nixos user - i'm trying to nixos-infect an ubuntu system with an LVM root on an nvme disk, lsblk output as in https://gist.github.com/risicle/175f1ed8293e9cae3f9aac7784e127b2 nixos-generate-config is generating _that_ hardware-configuration.nix. upon rebooting, the kernel doesn't seem to be able to mount the root device, even after attempting to do LVM discovery... is there something
<ris>
obvious i'm missing?
ToxicFrog has quit [Read error: Connection reset by peer]
ddellac__ has joined #nixos
ToxicFrog has joined #nixos
<andi->
Is there a way to resort to nix 2.3 style error reporting on 2.4?
<ris>
the actual "bare metal cloud" product interface is ok, but the whole experience reminds me a bit of old-style ISPs who used to have 4 different web apps for different areas and you have to log in again and again to each bit
<ris>
knowledge base, invoicing... each a janky separate web app
<eyJhb>
Well, everything in NixOS is based on systemd basically. Sooo, only one way to do it. Jump into it! I can only say, that it is worth looking around in nixpkgs, for expressions that look like what you want
<radvendii>
how robust is our emscripten / wasm infrastructure? I'm seeing bits and pieces here and there but it looks like it's not going to just work out of the box, is that right?
ChessGuevara has quit [Quit: Leaving]
<simpson>
radvendii: `pkgsCross.wasi32` gives a cross-compiled package collection. Indeed many packages do not Just Work.
<radvendii>
oh, i was looking at buildEmscriptenPackage and emscriptenStdenv.
<radvendii>
I'll have to take a look at the cross-compilation stuff
<ris>
colemickens: i say more earlier ^ if you have logs
jesystani has joined #nixos
civodul has quit [Ping timeout: 260 seconds]
<jasom>
how do I get an interactive build environment for a haskell package? I tried "nix-shell '<nixpkgs>' -A pandoc" but running "buildPhase" yields "stack: command not found"
<jasom>
aha, I need to 1: install cabal-install to my current environment 2: use "nixpkgs.pandoc.env" with nix-shell rather than just "nixpkgs.pandoc" then just do a "cabal configure" "cabal build" it looks like