<yaymukund>
When I run my React app in a nix-shell, its says I should be able to reach the app (from the local network) at 10.0.0.123, but when I access that URL from my phone it hangs indefinitely. What am I doing wrong?
<samueldr>
yaymukund: assuming NixOS, nixos by default has a firewall that blocks all ports
<samueldr>
(except 22 if ssh is enabled)
<yaymukund>
yes, I'm on nixos. that sounds like exactly what's happening. thank you
<yaymukund>
I'll look up how to punch a hole temporarily :)
bitmapper has quit [Quit: Connection closed for inactivity]
<emmanuel_erc>
I'm a little miffed on the difference between docker and nix given a particular circumstance. Namely, what is better about using nix than just having a local cache (caching build artefacts) with docker?
Dr81281 has quit [Ping timeout: 240 seconds]
<tomberek>
emmanuel_erc: docker is often used to try to solve the problem of isolating packages.
<tomberek>
several problems when trying to do it in practice: layers are ordered, unable to easily reference pinned layers
<tomberek>
it is possible to do, and if you **squint** you can kind of thing that each layer is about the same as a package path. But O
<tomberek>
I've never seen it work. Then reproducibility with docker is also pretty bad.
<tomberek>
what it does well is to give you a fresh slate each time (and faster than a VM for that purpose). and it has a mechanism for easy/quick adoption. It's also "solved" the problem of cross platform support, though it's kinda of a lie because it does it by running a Linux VM on other platforms.
<supersandro2000>
emmanuel_erc: docker is a container software and nix is a package manager
orivej has quit [Ping timeout: 240 seconds]
<tomberek>
that too... people sometimes want to shoehorn Docker into being a package manager.... it doesn't end well.
<supersandro2000>
nixery?
<supersandro2000>
docker is great if you have multiple versions of something with conflicting requirements and you want to use apt as your package manager
<tomberek>
to me, nixery seems to be a compatibility layer between Nix and container orchestration systems that require Docker/containers
<emmanuel_erc>
At my previous job, one of my PMs was quite adamant that Docker was superior to Nix. He brought up the local cache thing to me. I wasn't quite convinced because you still don't get the guarantee that a particular version of a package is the one you want (you can still can one of its inputs)
<emmanuel_erc>
Unfortunately, I was relatively new to nix at the time and didn't have a cuonter argument.
<tomberek>
At first glance, Docker "seems" to solve packaging issues. But then look at any non-trivial container and you'll see things like "apt update" being used and lots of effort put into ordering layers, saving partial results, removing build-time requirements, etc. My challenge is always something like: "can you build a non-trivial piece of software
<tomberek>
from 5-10 years ago?"
<tomberek>
But it's not either-or. Use each for what it is good at.
<afreakk>
my boot partition goes corrupt after a few reboots/nixos-rebuilds, and i have to use rescue nixos to reformat the partition and rerun nixos-install.. but its obviously some issue here, I dont really think its the disk dying, because ive got root partition on the same disk, and its never had any issues. any idea what might be wrong?
gamb1 has quit [Ping timeout: 240 seconds]
<immae>
afreakk: does you partition have limited disk place and gets full?
<immae>
(/boot partition)
<afreakk>
its got 510M
<afreakk>
only use 291M of it
<immae>
And it’s not growing?
<immae>
The total used size can grow if for some reason the initrd needs to be copied inplace, and you never clean old boots
<mvnetbiz_>
Are you using uefi? maybe the boot entries are getting erased by something
rprije has joined #nixos
<afreakk>
the boot before I cant boot anymore, it gets mounted readonly for some reason
jonringer has quit [Ping timeout: 258 seconds]
<rprije>
Hi! Where can I get the running kernel's .config file in NixOS?
<mvnetbiz_>
zcat /proc/config.gz
<rprije>
Oh haha. I didn't realise linux made its kernel available in /proc. Thanks, that's convenient.
<afreakk>
i havent noticed any increase of space usage, i keep a lot of old entries in there, but I try to clean some
<Reventlov>
hey
<Reventlov>
when using nix sops, do I need to wait for some service to start to be able to read the secrets ?
<azazel>
Reventlov: no, you may have to carefully confgure access permission though
<afreakk>
mvnetbiz_: yeah, I use eufi
<afreakk>
fsck disk starts whining though, so it seems more like,, partition is failing
<mvnetbiz_>
I think if it gets remounted as RO there is probably another issue though
<mvnetbiz_>
Right
<afreakk>
I would have guessed the disk is having trouble, but then the root partition on the same disk is experiencing no issues, so i dont know
<tobiasBora>
Hello, I'd like to know what's the best solution to obtain the name of the include folder for the libraries? For instance, I was thinking that doing "gcc -I{gtk3.dev}/include" would be enough, but in fact I need to put "gcc -I{gtk3.dev}/include/gtk-3.0", which makes it a bit hard to script (I need to do that for ~10 libraries).
<clever>
tobiasBora: pkgconfig is the solution to that
tldr32 has quit [Ping timeout: 240 seconds]
<tobiasBora>
clever: my issue is that the package I'm trying to package is not using pkgconfig directly, but it expects paths to be given via project.addIncludeDir("/usr/include/gtk-3.0");
<tobiasBora>
clever: oh, I don't even need to change the makefile?
<clever>
this env var is the same way buildInputs sneak into the search path
<clever>
and how the sane packages are found
<clever>
gtk breaks the rules, by trying to solve the same problem nix is already solving
<tobiasBora>
clever: hum wait, I don't really know all these dark magic tricks ^^ They are implemented for clang as well?
<tobiasBora>
So gcc/clang will search for a variable called NIX_CFLAGS_COMPILE automaticaly right?
<clever>
yeah
<clever>
its all handled by cc-wrapper
<clever>
$ file $(which $CC)
<clever>
/nix/store/ca37d3qrydh0wpw40kswsx30j8dyzxh2-gcc-wrapper-10.2.0/bin/gcc: a /nix/store/f7jzmxq9bpbxsg69cszx56mw14n115n5-bash-4.4-p23/bin/bash script, ASCII text executable
<clever>
$CC is pointing to a copy of cc-wrapper, which will inject $NIX_CFLAGS_COMPILE into the args, so nix doesnt rely on CFLAGS surviving random makefiles
<clever>
some makefiles will set CFLAGS rather then append
<tobiasBora>
Is there any documentation for all the special variables/dark magic that nix uses?
<clever>
thats the raw clang, which doesnt respect NIX_CFLAGS_COMPILE
<clever>
its probably in the nixpkgs manual, if its documented
<clever>
_virkony_: when using nixos, you must always use a channel name starting with nixos
<clever>
_virkony_: if you use a channel name starting with nixpkgs, you risk breaking the machine
<_virkony_>
clever: yes. I have all of them in that fromat from manual except for home-mnager using github archive
<tobiasBora>
clever: ok, they do mention quickly NIX_CFLAGS_COMPILE, but I guess some examples would be great to have ^^ I'll try first to use it, and see if I can document it in some wiki. Thanks for the trick!
<_virkony_>
clever: I was wondering if I should switch to use github release archives as for home-manager
<clever>
_virkony_: ive not used home-manager much, so i'm not sure whats better for that
n-osborne has quit [Remote host closed the connection]
<_virkony_>
clever: I found NixOS/nixos-channel-scripts#46 pull request that merged 5 days ago. that link I follows was simply broken.
<ris>
absolutely - bonus points if you can keep all the bells and whistles from the 2.x package working (though TBH wine mode never worked that well in the first place)
<ris>
the qemu stuff looks like it will need to be totally rethought
<ris>
i don't know if our piggy-back-on-the-qemu-nix-package approach will work... or maybe it will work even better - wonder what would happen if we just override the src of the qemu package with the afl++ fork
<phalrax>
nixos-install shouldn't be destructive in any case, right? It'll just work pretty much like a rebuild in an already working system, is that about right?
<gchristensen>
yep
<phalrax>
cool!
<Yaniel>
you might want to run nixos-generate-config after mounting everything
<Yaniel>
it doesn't touch your actual config if you have one, only hardware-configuration.nix
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
supercoven has joined #nixos
Synthetica has joined #nixos
<maralorn>
,locate avahi-discover
<{^_^}>
Couldn't find in any packages
<maralorn>
?
davidv7_ has quit [Quit: Konversation terminated!]
cirno-999 has joined #nixos
D_ has quit [Ping timeout: 252 seconds]
D_ has joined #nixos
supercoven_ has joined #nixos
waleee-cl has joined #nixos
<tobiasBora>
clever: I'm curious: sometimes I don't need to use your pkg-config trick (for example for alsa), but sometimes I need it (for gtk, glib-2.0, pango). Is there a rule of thumb to know when I need pkg-config and when I don't?
phalrax4 has joined #nixos
supercoven has quit [Ping timeout: 240 seconds]
ahmedelgabri has joined #nixos
<phalrax4>
my grub is broken for whatever reason, it worked fine before, I suspected a kernel update, so I deleted boot.kernelPackages = pkgs.linuxPackages_latest;
<phalrax4>
from my configuration.nix, this is the error message I'm getting from nixos-install: https://pastebin.com/B3a4F79F mounted my disk on /mnt and there in the nix store I can find the derivation it complained about
<jmercouris>
hi everyone, Nixos occassionally fails to start X for me and I am just in a console and I have to keep restarting until X starts up
<jmercouris>
is there a manual way to start x? I could install startx, I just don't think that is the right way in systemd nixos
<jmercouris>
should I just be: systemctl start display-manager ?
ahmedelgabri has quit [Ping timeout: 246 seconds]
vandenoever has quit [Ping timeout: 268 seconds]
dotdotok has joined #nixos
zupo has joined #nixos
ece has quit [Read error: Connection reset by peer]
<NobbZ[m]>
Its already weird that tests are run… Why isn't it taken from the binary cache?
<davidak[m]>
If you use the latest nixos unstable (or master) and amdgpu, can you have a look at your journal if you also see this error and report in the issue: https://github.com/NixOS/nixpkgs/issues/118460
<{^_^}>
#118460 (by davidak, 1 hour ago, open): amdgpu issue with linux kernel 5.11.9
<dzwdz>
this laptop is from 2004, so the cpu is very old
<dzwdz>
maybe the binaries in the cache are only for 64-bit archs?
<dzwdz>
also i have no clue what i'm talking about, i'm just guessing
Qwerky has quit [Ping timeout: 260 seconds]
<NobbZ[m]>
i686 and x86_64 are built and cached afaik.
<MichaelRaskin>
i686 has a very limited and interesting set of things built
<MichaelRaskin>
More or less «whatever Wine needs»
<NobbZ[m]>
So no relevant bin cache for it? Never used it… even my oldest is x86_64…
n-osborne has joined #nixos
emmanuel_erc has quit [Remote host closed the connection]
<phalrax4>
forgot to add this: /nix/store/57y8xxpxjqqacninhnilm4c6n9hmj26v-install-grub.pl: installation of GRUB on /dev/disk/by-id/ata-Samsung_SSD_840_EVO_120GB_S1D5NSCF548940K failed: No such file or directory
boogiewoogie[m] has quit [Quit: Idle for 30+ days]
<{^_^}>
[nixpkgs] @FRidh pushed 35 commits to python-unstable: https://git.io/JYyp2
cub3s_ has joined #nixos
<cub3s_>
Are Hydra and NixOps still encouraged? They are clearly less prominent now on the website. Not "advertised", so to speak. Are they being phased out slowly by the community at large?
<tobiasBora>
Also, small question: in the package I'm packaging, there is lot of binaries/assets that I would like to put in a given folder before linking from $out/bin. Which name should I give to that folder?
ross` has quit [Ping timeout: 250 seconds]
<azazel>
sofia-m: to paste your config from the install disk, you can use something like "cat /mnt/etc/nixos/configuration.nix | nc termbin.com 9999" (with the hardware config too)
thc202 has quit [Read error: Connection reset by peer]
<sofia-m>
`nc: getaadrinfo for host "termbin.com" port 9999: System error`
<sofia-m>
Ahhh
<sofia-m>
Network somehow didn't come up
<azazel>
sofia-m: it misses domain name resolution
<azazel>
at least
ross` has joined #nixos
<sofia-m>
Huh, ok. The emergency shell on the actual (non-USB) system just... somehow won't connect to the WiFi for reasons I cannot tell, back to the Live CD...
<sofia-m>
My best guess is that it doesn't like the encrypted second pool, somehow
<azazel>
mmm... I've never setup encryption with ZFS... so you have the "sofia-root" pool which is normal and the "sofia-data" which is encrypted?
<tobiasBora>
And second question: where can I find the code that takes $out/bin folder and add it in the PATH?
<sofia-m>
Both are encrypted
<sofia-m>
sofia-root loads just fine
<sofia-m>
It asks for the passphrase and mounts correctly
<courajs>
Hi, I'm trying to install nixos using an existing efi partition. I get an error running nixos-install when it tries to install the bootloader. File system "/dev/block/8:18" is not on a GPT partition table. What's weird is /dev/block/8:18 is a link to /sdb2, the main partition of *the usb install stick*.
<azazel>
sofia-m: ah, so two different encrypted pools, for the security paranoid :-)... which recipe have you followed?
<sofia-m>
ZFS-on-Nix, ZFS itself which says you can just do encryption=on, and then some of https://grahamc.com/blog/nixos-on-zfs for the dataset organization
<azazel>
sofia-m: also when the boot sequence fails, the kernel log says anything relevant?
<sofia-m>
Honestly if I could encrypt them together, somehow, I wouldn't mind
<azazel>
courajs: I think that on efi a systemd bootstrap is used by default, but you can configure GRUB bootloader, and have something more known (to me at least) boot your machine
jonringer has joined #nixos
b has joined #nixos
<azazel>
courajs: the bootloader is described here:https://nixos.org/manual/nixos/stable/index.html#sec-installation-installing
<_virkony_>
are there any way to track only only booted systems in grub.cfg menu?
<_virkony_>
or at least mark them as booted
<azazel>
sofia-m: it states "[...] Note that at the moment one can only use passphrases (keylocation=prompt) for pools that are mounted as the root fs. [...]"
<sofia-m>
Doesn't matter, it boots now :D
<azazel>
oh, what have you done?
<drozdziak1>
How do I override a non-flake input to a flake? Its default.nix is a function that takes an attrset of args
<azazel>
don't tell me you haven't done anything
<azazel>
_virkony_: you mean configurations that have booted successfully? I don't think so
<sofia-m>
The kernel message logs for trying to mount sofia-data looked like this
<sofia-m>
can't import sofia-data: pool as been used by another system
<sofia-m>
Just going around in a loop (which honestly should be a bug)
<sofia-m>
Anyway, I just force imported that pool from the rescue prompt and now it's fine
<_virkony_>
azazel: yeah. for me it would be enough to indicate prev booted version during generation. I can see /run/booted-system and it is different from /run/current-system because I were using a lot of nix-rebuild test
<_virkony_>
I'm about to make a photo of hash with my phone to ensure I'll be able to find that version during re-boot
<drozdziak1>
Where should I look for the complete flake schema in nix sources?
<drozdziak1>
azazel I'm looking for a way to override a non-flake input to a flake
<drozdziak1>
The wiki doesn't seem to list that
<drozdziak1>
namely I'd like to pass the desired system to a dep's closure so that its nixpkgs pin knows what we're building for since there's no currentSystem
jmeredith has quit [Quit: Connection closed for inactivity]
<azazel>
drozdziak1: I don't know how to deal with inputs to a flakes which aren't fakes, what I do with older repos is to fork them and add a flake.nix file to them
<drozdziak1>
azazel Okay, I think I've got it. non-flake inputs seem to be taken in simply as their source path, i.e. you go `import "${theinput}" {whatever1, whatever2}` inside outputs and take it from there
<tejing>
BlackMug: I'm not familiar with qubes, but I expect people are going to need more specifics to give you a meaningful answer, such as what guide you're following, what error message you encountered, etc
<BlackMug>
grub cant be installed /dev/xvda is not a directory
<BlackMug>
thats the error message
<BlackMug>
Though in Gparted the directory showing is /dev/xvda
<BlackMug>
"such as what guide you're following" the very basic normal guide nothing fancy
<yurb>
BlackMug: not familiar with qubes, but the error message indicates you're trying to install grub into a directory while /dev/xvda is a device
<yurb>
can you share your `etc/nixos/hardware-configuration.nix`?
<BlackMug>
so nixos on HVM qubes is just goes with normal installation the only idea to take care for is using msdos instead of gpt , or gpt with separated boot path (didnt tried this one)
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<remexre>
if I'm getting this error whenever I do anything that touches nixpkgs, what'd I break...
<remexre>
error: anonymous function at /nix/store/3kfgqpp1r53lc56rdwc1824m5q7gczmy-nixpkgs-21.05pre278688.c0e88185200/nixpkgs/pkgs/build-support/cc-wrapper/default.nix:8:1 called without required argument 'lib', at /nix/store/3kfgqpp1r53lc56rdwc1824m5q7gczmy-nixpkgs-21.05pre278688.c0e88185200/nixpkgs/pkgs/stdenv/native/default.nix:128:5
<tejing>
cub3s_: it isn't really a qubes-specific problem. just an issue with mixing bios boot and gpt partitioning. apparently he repartitioned as mbr. the other option would be to include a tiny gpt partition of type 'bios boot partition' so grub has a place to put its bootstrapping code.
<{^_^}>
[nixpkgs] @SuperSandro2000 opened pull request #118513 → devilutionx: remove not required enableParallelBuilding, move unstabl… → https://github.com/NixOS/nixpkgs/pull/118513
<rmcgibbo[m]>
What's the best way to detect if I'm running inside a nix sandbox without internet?
<rmcgibbo[m]>
e.g. if i have some janky legacy tests in my project that require the internet, and i want to skip them when running within nix-build, but i can't use nixpkgs features like disabledTests because the test runner is custom (i.e. old and garbage).
<hexa->
supersandro2000: lots of packages I don't care for :(
<hexa->
pandas, ipython, jupyter is a world of packaging pain
lsix has quit [Ping timeout: 246 seconds]
Dr8128 has joined #nixos
<supersandro2000>
hexa-: I don't care about them either but the dependency chain wants them
<supersandro2000>
rmcgibbo[m]: try to access the internet and if it fails you can't :P
<supersandro2000>
or just monkey patch the test or remove it with a patch
<rmcgibbo[m]>
yeah -- try and see is probably the msot robust. i was thinking of checking the username for nixbld or something :P
<supersandro2000>
rmcgibbo[m]: not sure if that will work
<supersandro2000>
I know that when you try to access UID 1000 the sandbox says no
<supersandro2000>
prevents me from building coreutils
<knownunown>
hi! i've pinned references to specific nixpkgs revisions corresponding to my nixos system flake in the registry like so: https://github.com/knownunown/.config/blob/master/nixpkgs/flake.nix#L27-L32. with this, i can reference packages at my specific system nixpkgs revision from nix shell and nix run. everything works well enough, but i also want to use overlays with nix shell / run. is there any way
<knownunown>
that i can achieve that?
<knownunown>
(sorry if any of that was unclear and let me know if you need any clarification -- i was struggling to word it correctly)
<supersandro2000>
flakes and overlay. Does that work? Not sure.
Qwerky has quit [Remote host closed the connection]
<knownunown>
yeah, it feels kind of hacky. i've managed to apply the overlay correctly to the actual nixos and home-manager config, but i just can't seem to figure out if there's a way to ... apply it one layer higher, at the flake input level?
<knownunown>
i mean, it's not that big of a deal, the stuff i want to overlay on doesn't necessarily have to live as an overlay -- i can just stuff them in separate outputs of my system flake as well and reference that instead