<zfnmxt>
So, the optimus options from 165 to 169 do work--but this disables the Intel card. I need the Intel card to work, and I just can't get anything. Happy to provide any logs, etc as needed. At the moment, when I start, I just get booted into a tty. sddm doesn't even try to open.
elgoosy has quit [Ping timeout: 245 seconds]
dgarzon has joined #nixos
dgarzon has left #nixos [#nixos]
troydm has joined #nixos
klntsky has quit [Remote host closed the connection]
<worldofpeace>
zfnmxt: Can you paste the output of nix-shell -p nix-info --run "nix-info -m" ?
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<worldofpeace>
zfnmxt: Also was intel card ever working standalone?
troydm has joined #nixos
<zfnmxt>
worldofpeace: Intel card was never working standalone. Tried many times to get just the Intel card to work.
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zfnmxt>
Myrl-saki: Thanks. The nix tooling is still pretty mysterious to me, so good to see options :D
ZaraChimera has joined #nixos
Dedalo has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhJVC
<Dedalo>
Hi guys, I have an X1 Carbon with a WQHD (2560x1440) display and I'm using the i3 window manager. I'm having trouble to scale the dpi. I'm using `services.xserver.dpi = 210` and `fonts.fontconfig.dpi = 210`. I have tried sddm and lightdm, but they don't work. With lightdm I get the following error: "Failed to start session". If I remove the line to change the dpi instead works. Why? I have tried everything.
ryantrinkle has quit [Ping timeout: 246 seconds]
<duairc>
I'm trying out NixOS for the first time on a brand new server. I want to use ZFS with encryption. I think I've understood everything on the Wiki page but I'm running into trouble.
ZaraChimera has left #nixos ["No boundaries on the net!"]
<duairc>
When I try to create my zpool, I get the error "cannot create 'rpool': invalid property 'encryption'". This makes sense, I need to set boot.zfs.enableUnstable = true;.
<duairc>
So I do that and then nixos-rebuild switch. But then when I run my zpool command again I get the error "property 'ashift' is not a valid pool property". In fact every possible option gives this error, and even no options fails too. I can only conclude that the zfsUnstable build is very broken?
<duairc>
Because I'm so new to NixOS I don't really know where to poke at to try to debug this
<Dedalo>
duairc I'm running ZFS, but I didn't configured the encryption
<Dedalo>
duairc did you partition using `sgdisk` before?
ensyde has joined #nixos
<duairc>
Dedalo: Yeah, I've done all the partitioning. The problem, if I understand the wiki correctly, is that the zfs that comes with the installer doesn't have encryption support, so you have to enable boot.zfs.enableUnstable to get that. But then when I nixos-rebuild switch after enabling that I get a seemingly completely broken zfs and can't create zpools at all.
irdr has quit [Remote host closed the connection]
irdr has joined #nixos
<Dedalo>
duairc I see. I'm afraid I can't help. I think the only OS with a complete and stable implementation of ZFS is Solaris, and maybe FreeBSD.
thc202 has quit [Ping timeout: 250 seconds]
<Ankhers>
Anyone familiar with how to deal with luarocks packages in a build?
<Myrl-saki>
Why is it that `nix build` only shows one line of logs, and `nix-build` doesn't show fetch progress? :(
<Ankhers>
I specifically need to install luautf8 and lua-yajl for this build.
ilya-fedin has quit [Quit: Connection closed for inactivity]
<Myrl-saki>
Yaniel: ZaraChimera: /etc/nixos/wpa_supplicant.conf, don't use the `networks` option unless you're willing to risk plain-text passwords readable by anyone.
<Myrl-saki>
Alternatively, you can use pskRaw.
sigmundv_ has quit [Ping timeout: 245 seconds]
<Yaniel>
you can apparently set a custom path for the config file with the networks option?
<ZaraChimera>
I just need a basic wpa_supplicant.conf so that networking.connman.enable can see the wifi card instead of tossing me a technology doesn't exist error.
<Myrl-saki>
ZaraChimera: by default, wpa_supplicant will check /etc/nixos/wpa_supplicant.conf.
<ZaraChimera>
At least that is what I remember having last time and the wifi worked.
hamishmack has quit [Ping timeout: 240 seconds]
<ZaraChimera>
Okay. Thanks Myrl-saki
<ZaraChimera>
The other question is what do I need to enter into the file?
<Myrl-saki>
Yaniel: Seems like a minor oversight, but you can't use a custom path for the wpa_supplicant NixOS module.
<Myrl-saki>
ZaraChimera: wpa_passphrase generates things for you.
<Yaniel>
I mean networking.supplicant.<name>.configFile.path
<ZaraChimera>
Okay, looks like ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=networking update_config=1 based on the wpa_supplicant.nix file.
<ZaraChimera>
I'm not using wpa_passphrase to set up my connection, that gets done through connman and Enlightenment desktop.
<ZaraChimera>
Is there a networking group in NixOS? I could go wheel otherwise.
<siraben>
Thanks clever I tried that but ./configure still complains about missing libraries
<clever>
,library siraben
<{^_^}>
siraben: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<siraben>
This tar expands to a bunch of other tars that must be installed individually
<siraben>
so I can do something like for i in *; tar -xf *; in the build phase of another .nix file?
<clever>
will need some custom code, let me write it
marsam has quit [Remote host closed the connection]
juhulian has quit [Ping timeout: 240 seconds]
<siraben>
And this build process uses configure.ac
<simpson>
siraben: Yeah. To anticipate what clever is writing, you'd use the builtin `fetchTarball` to get the outer tarball unpacked, and then you'd need to do some custom unpacking on each of the inner tarballs.
<siraben>
I'm not too sure what build tool that is
<simpson>
And then hopefully no custom build steps, just autoconf and automake, hands-free.
<siraben>
Well at least it's easy to express dependencies now rather than waiting for ./configure to complain
<siraben>
And every package in nixpkgs is written this way?
<clever>
siraben: refresh the gist i linked before
<clever>
yeah
<simpson>
Essentially every package is a derivation, yes, although many of them are *much* fancier than this. Nix is prepared to handle very weird packages.
<clever>
updated the gist again
<siraben>
clever: hm "make: *** No rule to make target 'install'. Stop."
<simpson>
clever: Nice hack with `unpackFile`. TIL.
<clever>
simpson: the default unpackPhase uses that
<clever>
siraben: fixing that now...
<siraben>
What does "lib.fix (self:" do at the top?
<clever>
self: { ... } defines a function, that takes 1 argument called self
<clever>
lib.fix will call that function, with its own return value
<siraben>
I see.
<clever>
which allows you to do self.tilibs2
<clever>
its similar to `rec { ... }` but opens up the option to do things better in the future, without having to fix a dozen things
<clever>
gist updated again
<siraben>
Something's still causing it to fail
<clever>
yeah
<clever>
the tests dont link right
<siraben>
So I have to set some environment variables it seems
<wedens>
is home-manager usable on non-nixos hosts?
<simpson>
siraben: Unfortunately, these can be a little out-of-date when it comes to exactly what's needed, so it's often faster to reverse-engineer these sorts of tiny failures after the big features of the derivation have been filled out. Still, it's a good find and might have something useful.
<clever>
i'm filling in the inter-package deps now
<siraben>
simpson: are you referring to the build script?
<simpson>
siraben: Yeah, especially the big lists of deps, first in text and then in distro-specific rows.
<clever>
ticables fails to link due to libusb issues...
<Ankhers>
Is anyone familiar with luarock? What is the suggested way to install a lua package in a build?
<simpson>
siraben: So, I looked at wabbitemu's release tarball, and it doesn't have any more extra build configuration. How have you built it before on Linux?
<clever>
wedens: ticables builds, its ticonv that fails now
<clever>
wedens: it looks like its not building its own libs, and then going right to tests
<siraben>
I'll attempt to tackle z80e because I know it works before
init_6 has joined #nixos
<clever>
aha, --enable-iconv
<clever>
so thats 2 configure flags it needs to build, and doesnt enable by default
<simpson>
siraben: Ah, sure. That stuff should build. You'll need to write expressions for all of their toolchain bits, since (surprisingly) none of it's in nixpkgs already.
<clever>
gist updated
<siraben>
It's somewhat obscure, I guess.
lassulus_ has joined #nixos
<simpson>
kind of. TI wants it to be obscure.
<simpson>
I still have a few pieces of TI hardware, and I kind of want to write code for them, but at the same time I dislike TI so much for what they've done to the market and the schools.
endformationage has joined #nixos
<siraben>
simpson: I think I've shown you my assembler?
drakonis has joined #nixos
<siraben>
Yeah it's a monopoly
Mr_Keyser_Soze has quit [Remote host closed the connection]
<simpson>
I mean that TI wants the scene to be obscure as a whole. The TI hacking scene is vibrant and diverse, which is great but also means that there's going to be many tools which just aren't packaged, even by the immense pile that is nixpkgs.
<clever>
siraben: making progress here with tilem!
<siraben>
Thanks clever !
<siraben>
This was much harder than I thought, haha
lassulus has quit [Ping timeout: 250 seconds]
lassulus_ is now known as lassulus
<siraben>
There's a lot of dependencies and flags
<clever>
most packages are far simpler
<simpson>
No worries. It gets easier.
* siraben
stares at clever's gist
<clever>
siraben: it builds!
<clever>
[clever@system76:~]$ nix-build tilem.nix -A tilem
<clever>
;;; In procedure stat: No such file or directory: "/build/smiley-os"
juhulian has joined #nixos
<clever>
siraben: does smiley-os have to be built first? or have a .scm tacked on the end?
Mr_Keyser_Soze has quit [Remote host closed the connection]
<siraben>
Ah you have to clone and cd into my repl
<siraben>
Yeah .scm at the end
<clever>
i did clone your zkeme80
<siraben>
Yes
<clever>
;;; WARNING: compilation of /build/smiley-os.scm failed:
<clever>
;;; failed to create path for auto-compiled file "/build/smiley-os.scm"
<siraben>
Ah there's no /build directory
<clever>
thats nix, it creates a /build/ and cd's into it
<siraben>
Can you past the full log?
<siraben>
Paste
<clever>
[clever@system76:~/apps/zkeme80]$ nix-build tilem.nix -A forth
<clever>
i updated the gist to include the new tilem.nix
<clever>
oh, i see a new err
juhulian has quit [Ping timeout: 246 seconds]
<siraben>
Ah by the way my assembler isn't compiled into a binary, just auto-compiled when Guile loads it
Mr_Keyser_Soze has joined #nixos
<clever>
and on to phase 2!
<clever>
[clever@system76:~/apps/zkeme80]$ nix-build tilem.nix -A runit && ./result
<clever>
siraben: this will compile everything, including the emulator, and the rom, and generate a bash script, that just opens the rom in the emulator
<clever>
then run it!
<siraben>
Does it clone zkeme80?
<clever>
the file expects to live inside zkeme80
<clever>
so you could just add it to that repo, and then its set
<simpson>
Myrl-saki: Wow, I looked right past that. Nice.
juhe has joined #nixos
jtcs has quit [Ping timeout: 246 seconds]
juhe has quit [Remote host closed the connection]
juhe has joined #nixos
juhe has quit [Remote host closed the connection]
juhe has joined #nixos
pie___ has joined #nixos
pie__ has quit [Remote host closed the connection]
ottidmes has joined #nixos
equivrel has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
equivrel has quit [Client Quit]
equivrel has joined #nixos
<simpson>
Is there a way to find/walk a directory in the store? I want to do an action for every file in a source directory, and then run `pkgs.linkFarm` on the result.
<ottidmes>
simpson: you mean from within Nix, I assume?
<simpson>
Yeah. Current plan is `readDir` and recurse.
<ottidmes>
simpson: that was my first obvious suggestion too
<ottidmes>
simpson: can't you just do it with a runCommand and calling find in there? Not sure if you are allowed though
<simpson>
ottidmes: Currently trying to get off of a Makefile.
balsoft has joined #nixos
equivrel has left #nixos ["ERC (IRC client for Emacs 26.1)"]
equivrel has joined #nixos
equivrel has left #nixos [#nixos]
equivrel has joined #nixos
equivrel has quit [Remote host closed the connection]
equivrel has joined #nixos
orivej has joined #nixos
juhe has quit [Remote host closed the connection]
juhe has joined #nixos
juhe has quit [Remote host closed the connection]
juhe has joined #nixos
Hotkeys has joined #nixos
orivej has quit [Remote host closed the connection]
orivej has joined #nixos
hotfuzz_ is now known as hotfuzz
dermetfan has joined #nixos
slack1256 has quit [Remote host closed the connection]
<Widdershin>
Hi everyone, I have a question about Nix. I have a somewhat strange setup where I'm using Ubuntu in a chroot on a Chromebook, and I've decided to look into Nix.
<Widdershin>
The reason I want to use Nix is because I want to keep the list of packages I want to have installed in version control, and be able to easily reproduce my dev environment
<Widdershin>
I have a functioning nix install, and I've successfully installed tmux with nix-env. My question is: is it possible to have a file that declares the set of packages I want to have on my system, and to edit that file to install new packages?
<Widdershin>
From what I understand, this is how NixOS works, but I'm wondering if there's an elegant way to achieve this with Ubuntu + Nix
simukis has joined #nixos
<ottidmes>
Widdershin: AFAIK this is possible by passing a attrset to nix-env
<Myrl-saki>
,locate bios.bin
<{^_^}>
Found in packages: xen, xen, qemu, qboot, qemu_kvm, xen-slim, qemu_test, multibootusb, qemu_xen_4_8, qemu_xen_4_10, qemu_xen_4_8-light, qemu_xen_4_10-light, xenPackages.xen_4_10-slim, xenPackages.xen_4_10-vanilla, xenPackages.xen_4_10-vanilla
<ottidmes>
Widdershin: let me lookup more info about that approach
<Myrl-saki>
I needed OVMF, hope I got the correct one.
<Widdershin>
Thanks @ottdidmes, I haven't encountered attrsets yet
<sphalerite>
,declarative Widdershin
<{^_^}>
Widdershin: There are multiple ways of managing declarative profiles. 1) Attrset, compatible with imperative use of nix-env https://git.io/fAQHW ; 2) buildEnv, providing more control over the paths that are linked into the profile https://git.io/fp0aU ; 3) home-manager, providing nixos-like config for your ~ https://github.com/rycee/home-manager
<sphalerite>
ottidmes: this factoid is very useful for that ^ ;)
<ottidmes>
sphalerite: yeah, I was looking for that one, just found it in the logs, but you were faster than me ;)
<Myrl-saki>
,locate OVMF.fd
<{^_^}>
Found in packages: OVMF-CSM.fd
<Myrl-saki>
Wait. I have a feeling that I was helping someone on how to do this lol
<Widdershin>
sphalerite: thanks! I'm trying the first approach. In that gist it says you're supposed to run "nix-env -f '<nixpkgs>' -r -iA userPackages"
<Widdershin>
How should I know what the value of '<nixpkgs>' should be?
<Widdershin>
Ah well in that case I got an error :) "error: undefined variable 'writeScriptBin' at /home/nickj/.config/nixpkgs/overlays/lnl.nix:8:19"
<Widdershin>
I'll google it
<sphalerite>
that's weird…
<ottidmes>
Widdershin: doing <name> in Nix, will lookup name=... in the environment variable NIX_PATH, NIX_PATH should normally always have at least a reference to nixpkgs
<Widdershin>
hmmm perhaps the curl command in that gist is out of date, I'll try to use the literal content of the gist
<Widdershin>
they differ slightly
<Widdershin>
yep that worked
ilya-fedin has joined #nixos
<Widdershin>
hmmm, now I no longer seem to have a "~/.nix-profile/etc/profile.d/nix.sh" to source on shell startup
<Widdershin>
That's not very good
<Widdershin>
Trying to reinstall and see where I get
<LnL>
hold up
<Widdershin>
Oh hi LnL, guessing that's your script :)
<LnL>
you can rollback, this was probably a single user install in which case nix itself is in that profile
<sphalerite>
ottidmes: there's nothing wrong with not using inherit, it's just longer :p
<Widdershin>
Thanks ottidmes. Using the lnl.nix approach, should I still have a "source ~/.nix-profile/etc/profile.d/nix.sh" in my .bashrc?
<Widdershin>
or is there a different way to go about that?
<sphalerite>
yes you should
<sphalerite>
home-manager would allow not needing that I think
<Widdershin>
hmmm, why does running nix-rebuild destroy that file then?
<sphalerite>
yes, unless you add nix to userPackages
<sphalerite>
hence what LnL wrote earlier LnL | so add eg. nix = self.nix; to make sure nix doesn't disappear :)
<Widdershin>
ahhhhh
<Widdershin>
of course, manage the package manager using the package manager
<Widdershin>
now I'm thinking with nix
<ottidmes>
sphalerite: should it not be nix = super.nix? but yeah, that is what LnL mentioned, it should be part of the set
<sphalerite>
ottidmes: no, packages should come from self
<sphalerite>
otherwise they can't be overridden by later overlays
<Widdershin>
the overlays idea is quite cool, I guess I can have core and work overlays
<LnL>
super could result in unexpected behaviour depending on the order of you overlays
<Widdershin>
and layer them up
equivrel has quit [Ping timeout: 240 seconds]
<ilya-fedin>
Hello! How can I remove autoinstalled dependencies of removed package in user environment?
<ottidmes>
LnL: ah, if put like that I understand sphalerite remark
periklis has joined #nixos
<ottidmes>
Is there a way to get the file defining a package? I am cleaning my shell code and the function I have to determine that is limited to most packages defined in top-level/all-packages.nix, but it would be awesome if could somehow get it through Nix code
<sphalerite>
ottidmes: unsafeGetAttrPos iirc. Doesn't sound like a nice thing to do thouhg.
<Widdershin>
Cool it seems like I'm rolling now, thanks so much ottidmes sphalerite LnL !
<Widdershin>
You've all been super helpful :)
<ottidmes>
sphalerite: if the alternative is having to grep top-level/all-packages.nix, I do not mind such tricks, thanks for the suggestion, I will see if I can somehow leverage that
<Widdershin>
one more question: can you treat a git repository as a nix package? so that I could include my dotfiles as part of my config?
<sphalerite>
Widdershin: yeah you just put a nix file in it
periklis has quit [Ping timeout: 250 seconds]
<ottidmes>
sphalerite: that answers the first question, but won't work for the second, you cannot install things to $HOME that way, right?
<sphalerite>
oh right yeah
<sphalerite>
home-manager is the most powerful option for that
<ottidmes>
Widdershin: if want to manage your home stuff through Nix, you have to take a look at the mentioned home manager I guess
<Widdershin>
Okay :)
<Widdershin>
Also with the lnl.nix approach, am I always just going to get the latest version of the software that's available in nixpkgs?
<Widdershin>
whenever I rebuild
<ottidmes>
Widdershin: with home-manager you basically get a sort of NixOS for your $HOME, so it brings a non-NixOS distro closer to being NixOS
<LnL>
you have to update the channel first, but yes
periklis has joined #nixos
<ottidmes>
Widdershin: if you want the latest version of nixpkgs you would have to use the nixos-unstable channel though (there is also nixpkgs-unstable, but I guess you will experience more breakage that way)
steshaw has quit [Quit: Connection closed for inactivity]
<Widdershin>
ah yup, I see there are multiple versions of ruby for example in nixpkgs, and that I can be specific about which one I want if I desire
sbdchd has joined #nixos
<steveeJ>
someone please help my blindness. I'm looking for a builtin to check if a string is a substring of another
<ottidmes>
Widdershin: know that keeping explicit older versions is done for only a relatively few packages though
<wedens>
"nixfmt does not retain comments in the code. This is because hnix doesn't either:" this is unfortunate :/
<ottidmes>
wedens: I am using it to format return results from evaluating expressions, but if you want to use it for code formatting I can see how thats problematic
<ottidmes>
jw358: hmm, I dont have a Nix version of it, and cannot find it in lib, so I will write one
<wedens>
btw, can I write nixos config in haskell using hnix?
<jw358>
ottidmes: thx
<sphalerite>
wedens: you probably could but I don't think it would be much fun.
jasongrossman has joined #nixos
<wedens>
if it means writing raw ast, it's certainly not fun :)
<ottidmes>
jw358: maybe it should be: "https-github.com-Gabriel439-nixfmt" instead, what do you prefer?
<jw358>
maybe either
thc202 has joined #nixos
<ottidmes>
> (name: concatStringsSep "-" (filter (x: !(builtins.isList x || x == "")) (builtins.split "[^+-._?=[:alnum:]]" (removeSuffix "\n" name)))) "https://github.com/Gabriel439/nixfmt"
<{^_^}>
"https-github.com-Gabriel439-nixfmt"
<ottidmes>
jw358: then it would be like this ^, personally I prefer the latter, so I will add that one to my personal lib and change my shell code to do the same
Lears has joined #nixos
jD91mZM2 has joined #nixos
[Leary] has quit [Ping timeout: 250 seconds]
<ottidmes>
ah, the shell version already does this, shows why you really should generally use long names in shell functions, e.g. -s vs --squeeze-repeats
[Leary] has joined #nixos
<jD91mZM2>
Ok this is going to sound strange, but is there any chance NixOS is the cause of compiling C stuff going nuts? First I tried to compile the redox prefix, and for some reason autotools tried to use a non-existent x86_64-unknown-redox-gcc binary for gcc. Worked around that with an Ubuntu docker image, which for some reason didn't get the same bug (indicates this being NixOS' fault somehow). Now I can't build
<jD91mZM2>
something else because $TARGET is wrong even though I've set it multiple times
<jD91mZM2>
I've disabled all hardening flags, isn't that all you need to do to get the C tooling to not be different from other systems?
Lears has quit [Read error: No route to host]
<balsoft>
jD91mZM2: What exatly did you do?
<jD91mZM2>
balsoft: Trying to compile a completely clean redox repository. I've done it earlier and it has worked. I don't know what's different now, maybe NixOS 18.09 even though it doesn't make sense
jomik has joined #nixos
<jD91mZM2>
Before you tell me it's weird to assume this is NixOS' fault, it compiles fine on Ubuntu and nobody else seems to have had these really odd issues
<balsoft>
jD91mZM2: what _exactly_ did you do? I mean commands/nix expressions/etc
<jD91mZM2>
jomik: Afraid I didn't gist that anywhere, will take some time to download a fresh new redox and reproduce
<jomik>
Why not make a nix-expression to build redox rather than do a shell for it though?
<ottidmes>
sphalerite: running this: map (name: nameValuePair name (builtins.unsafeGetAttrPos name pkgs.hello)) (attrNames pkgs.hello), allowed me to find what I was looking for, apparantly only the version attribute can be used to determine the package file
<jD91mZM2>
jomik: Because sometimes you want to change individual components of redox
<jomik>
jD91mZM2: So make it overrideable ? :D
<jD91mZM2>
jomik: Indeed you could nixify redox a whole lot more
<jD91mZM2>
But considering nobody has done it or even opened an issue for it yet, the demand doesn't seem there
<jD91mZM2>
A lot more pressing issues at the moment, but I can't compile redox and my question is: Where does the problem lie? Clearly not redox, it works on Ubuntu. So either my system is horribly broken, or NixOS is doing something else with gcc I should be aware of
<jomik>
I hope some more details as to why it doesn't like the C compiler would be in that config.log
<jD91mZM2>
jomik: I'm afraid not. For what I remember it was basically just "x86_64-unknown-redox-gcc: not found". And like I said, it's not even supposed to be found, it's supposed to use my system gcc
<jD91mZM2>
I believe autotools is drunk :P
<jomik>
I was pondering if that isn't just the name for the system gcc (unknown)
<jD91mZM2>
The system gcc is just called "gcc"
<jomik>
When redox talks about it?
<jD91mZM2>
?
<jD91mZM2>
I found an old clone of redox in the trash so I'll get you the config.log in a few minutes. Thanks for helping :)
<jomik>
I probably wont be much help xD
<jomik>
line 52 in your output mentions that program-prefix is x86_64-unknown-redox, isn't that why it looks for that gcc?
<jD91mZM2>
A fresh pair of eyes is always helpful, even if you doubt it
<jD91mZM2>
See, already helpful! What's program-prefix?
<jomik>
It's a flag passed to their binutils/configure.
<jD91mZM2>
Btw something I knows bypasses the first issue and gets to other build issues that once again don't reproduce on Ubuntu is using `make CC=gcc NM=nm LD=ld ...` etc etc
<jD91mZM2>
Doesn't work if I do `export CC=gcc` before either (it's already set to that anyway)
<jD91mZM2>
I think that's because the output shall be called x86_64-unknown-redox-gcc
<jomik>
This is a rather large project to debug XD
<jomik>
Yeah, it expects that at least.
<jD91mZM2>
Indeed. Afraid I need to go, thanks for the help so far!
<jD91mZM2>
Be right back in about half an hour. Sorry.
<jomik>
Good luck!
<jomik>
And merry christmas if you do that stuff
<duairc>
Has anyone installed NixOS onto an encrypted ZFS root?
<ben>
I believe I have
<ben>
It was a while ago and I don't remember a lot of details tho
<ben>
cryptsetup something something luks, zpool create on /dev/mapper/whatever
<duairc>
Ah okay, I'm referring to the native ZFS encryption, not LUKS
<ben>
aight, nevermind then :)
<duairc>
Basically the zfs that comes with the installer (0.7.x) doesn't support encryption, but if you set boot.zfs.enableUnstable you get 0.8.x, which does.
<duairc>
I don't know if I'm missing something (this is my first time using NixOS), but when I set that and nixos-rebuild switch (is that the right thing?), the version of ZFS I get is totally useless, it can't create any zpools, with or without encryption
<ben>
(id be mildly concerned whether i could access my encrypted zfs from a the installer as a rescue boot image)
tyang has joined #nixos
<ben>
hm, weird
<ben>
im not sure how nixos-rebuild switch on the installer environment works
<ben>
naively it sounds like setting that and doing nixos-rebuild switch is right
<ottidmes>
ben: given enough memory AFAIK it should work like any normal NixOS installation (the LiveCD environment, that is), and with regards to the boot image, you can create your own boot images with Nix
ZaraChimera has quit [Ping timeout: 256 seconds]
arjen-jonathan has joined #nixos
<jD91mZM2>
jomik: Indeed I do. Happy holidays to you too!
<jD91mZM2>
Oh that's interesting, it says NM='x86_64-unknown-redox-nm'
<jD91mZM2>
There is `NM=$(TARGET)-nm` in mk/config.mk, but that's not exported
vidbina has joined #nixos
balsoft has quit [Quit: Konversation terminated!]
balsoft has joined #nixos
init_6 has quit []
<jD91mZM2>
Apparently using the nixos docker image can reproduce the issue I'm having
<duairc>
For what it's worth, I installed NixOS to a ramdisk (formatted with ext4), booted into that with qemu, enabled unstable zfs in *that* NixOS, and now I can create encrypted zpools...
<jD91mZM2>
jomik: Found it! $NM is only set to x86_64-unknown-redox-nm in the config.log from NixOS, not in the config.log from Ubuntu. Same with all other variables
<jD91mZM2>
It must be something with the version of make or something
<jD91mZM2>
Right, sorry for the huge spam, but I found out the problem is due to $CC not being empty which somehow results in it being overwritten by the make file. Clearly not NixOS' fault, so sorry for spamming here :(
Dagger has joined #nixos
<wedens>
what's the current approach for managing channels from `.nix` file? I'd like to use pinned unstable and 18.09 channels so that I can explicilty use some derivations from unstable
<jomik>
jD91mZM2: Awesome! :D
<wedens>
thers is an entry in cheatsheet but it uses `nix-channel` command and no pinning
<ottidmes>
wedens: but instead of using channels you can refer directly to your own nixos unstable checkout: unstable = import /my/checkouts/nixos-unstable { };
<ottidmes>
wedens: and I would define it in an overlay
<sphalerit>
ottidmes: not all packages a have a version atrr though
<ottidmes>
sphalerit: I noticed ;)
<wedens>
ottidmes: thanks. I'll try to glue those 2 faq entries together :)
<ottidmes>
sphalerit: I was in luck that my second test already pointed this out, pkgs.git does not have a version attribute
<wedens>
I havent read yet about overlays and such
<ottidmes>
,overlays wedens
<{^_^}>
ottidmes: Did you mean overlay?
<{^_^}>
wedens: Overlays look like `self: super: { foo = ...; }`. Use the self argument to get dependencies, super for overriding things and library functions (including callPackage). More info: https://nixos.org/nixpkgs/manual/#sec-overlays-install
_d0t has joined #nixos
<_d0t>
Hello! I have a program with cmake build, and cmake cannot find boost libraries. How do I fix this?
<balsoft>
You should create nix expression with boost, cmake in buildInputs
<_d0t>
balsoft: i tried with nix-shell. `nix-shell -p cmake boost168 pkgsconfig`
b has quit [Ping timeout: 246 seconds]
<wedens>
ottidmes: seems useful. thanks
<balsoft>
_d0t: while that might work, you're probably better off with nix expression
<ottidmes>
_d0t: that will not work like you expect, nix-shell -p will not setup a dev environment for your thing
<_d0t>
balsoft: you mean I should write a default.nix file?
<_d0t>
ottidmes: oh... that explains it
<_d0t>
ottidmes: how do I make it set up a dev environment? I would really like to have a working shell here.
<Myrl-saki>
Going to need a sanity check.
<Myrl-saki>
Is there FDE for a LiveCD or not yet?
<Myrl-saki>
Since I'm implementing one right now, and I know that it tecnically can't be done fully in Nix.
<ottidmes>
_d0t: nix-shell --expr "with import <nixpkgs> { }; callPackage /path/to/your/default.nix { }" should work (the --expr "..." is because you will not have added your default.nix to all-packages.nix or an overlay yet)
<Myrl-saki>
I guess it technically can be done fully in Nix, but it theoretically can't be done fully in Nix, or something. I don't know.
<_d0t>
ottidmes: thank you
<Myrl-saki>
Anyways, that's not the concern. Is there an already-existing script.
<ottidmes>
Myrl-saki: define FDE
Anton-Latukha has joined #nixos
<Myrl-saki>
ottidmes: Full Disk Encryption, which only means a partition, lol
<ottidmes>
Myrl-saki: not sure what you mean with FDE for a LiveCD then, I have done plenty encrypted root installs and even a few actuall Full Disk Encryption installs, so could you eloborate?
<ottidmes>
Myrl-saki: you mean something like encrypting the LiveCD contents?
<Myrl-saki>
ottidmes: Yep.
<ottidmes>
Myrl-saki: consider me interested, but I am not aware of any existing attempt to do so
_d0t has quit [Ping timeout: 245 seconds]
<Myrl-saki>
ottidmes: I guess there's also the fact that ISOs is just one partition.
<ottidmes>
Myrl-saki: I was planning to add extra stuff to my custom NixOS installers, but one problem I had with it was indeed how to deal with secrets, encryption would solve that
<Myrl-saki>
ottidmes: The idea I have is to piggy-back on iso-image.nix
<ottidmes>
sphalerit: the builtins.unsafeGetAttrPos solution is not perfect because I have no way to determine what attributes are just local and what are used by e.g. stdenv, right now I have something that works for most cases though (filtering generic files)
<ottidmes>
Myrl-saki: Yeah, I am looking at that file at the moment too
orivej has joined #nixos
fusion809 has joined #nixos
<sphalerit>
ottidmes: maybe what you're trying to do is wrong :p
<ottidmes>
sphalerit: how so? I find it a perfectly valid question to ask where the package is defined
<ottidmes>
sphalerit: it certainly is better than searching the whole of nixpkgs to figure this out, what I used to do, so the use case is there
<Myrl-saki>
ottidmes: This might be a bit tsimple to operate after all. :)
<Myrl-saki>
Would take a few hours to make either way.
philippD has joined #nixos
<Myrl-saki>
system.build.squashfsStore is in the config, so the patch wouldn't be too invasive.
<ottidmes>
Myrl-saki: the easiest solution would be not to encrypt the liveCD root partition but instead just add an encrypted file that is unencrypted and copied instead
<ottidmes>
(for my use case at least)
jomik has quit [Quit: WeeChat 2.2]
pukkamustard has quit [Quit: WeeChat 2.2]
<Myrl-saki>
ottidmes: I'm more concerned about the purity of the /nix/store.
<ottidmes>
Myrl-saki: wouldn't you generally use a checksum of the installer for that use case?
perique has joined #nixos
rardiol has quit [Remote host closed the connection]
<Myrl-saki>
ottidmes: I meant in the functional purity sense.
<ottidmes>
Myrl-saki: I get the description on the page you linked, but it still does not click with me how then encrypting the nix store addresses your concern about purity of the nix store
<ottidmes>
(if its annoying to go further into it, I will take your word for it)
<Myrl-saki>
ottidmes: It's more of the fact that you'll be able to identify that 2 flash drives contain the same /nix/store, for example.
<Myrl-saki>
ottidmes: IIRC, you can ask Nix to always rebuild.
<ottidmes>
Myrl-saki: but how does encryption remove those differences brought by impurities?
<Myrl-saki>
ottidmes: What do you mean?
<ottidmes>
Myrl-saki: wouldn't doing a checksum on the /nix/store on both flash drives give you that answer as well, that if they return the same value, they were based on the same iso, because they share the impurities
<Myrl-saki>
ottidmes: I'm talking more about pre-decryption.
<Myrl-saki>
Say, if someone randomly stumbled upon 2 of your flash drives, then they shouldn't be able to conclude that both flash drives have the same /nix/store, without knowing the decryption key.
<ottidmes>
Myrl-saki: right, because of that first link
<Myrl-saki>
ottidmes: Once decrypted, they should be identical, except for the fact that nix-store.squashfs still exists.
orivej has quit [Ping timeout: 250 seconds]
siers has joined #nixos
<fyuuri>
Hi. I tried installing nix on another PC; I get the message: "Failed to create EFI Boot variable entry: No such file or directory". What can be the reason?
<fyuuri>
The version I tried installing is 18.09.
<develCuy>
Hi ottidmes! Compining palemoon is still very hard for me, so I'm working on a binary derivation
aanderse has quit [Remote host closed the connection]
vidbina has quit [Ping timeout: 250 seconds]
<ottidmes>
develCuy: hi! its annoying that I managed to build it except for the default theme. A dirty workaround would be to get the default theme somewhere prebuilt
siers has quit [Ping timeout: 250 seconds]
dermetfan has quit [Ping timeout: 272 seconds]
<ottidmes>
fyuuri: all I can think of is /boot not being mounted properly or that you have to set: https://nixos.org/nixos/options.html#boot.loader.efi.cantouchefivariables
* ottidmes
I am away for ~2 hours
<develCuy>
ottidmes: I think that we are passing too much params, seen the instructions for gentoo? It has only 4 lines. Btw, it uses a home directory
<fyuuri>
ottidmes: thx. I mounted an efi formated 500M sized partition formated with fat 32 on /mnt/boot. I also allow to touch efi variables
<Myrl-saki>
Will probably commit it tomorrow, since sleepy.
<Myrl-saki>
And this is the part where I hope the LiveCD supports LUKS.
kisonecat has quit [Ping timeout: 246 seconds]
<Myrl-saki>
Hm, crap.
pie__ has joined #nixos
pie___ has quit [Remote host closed the connection]
<clever>
Myrl-saki: it should, just run cryptsetup
<develCuy>
When installing my custom derivation, it creates links from all files and folders to my nix-profile, I only want it to link the contents of bin/
<clever>
develCuy: then only create a bin in $out ?
<develCuy>
but what will happen to the other files?
<Myrl-saki>
clever: Which goes first, boot.initrd.luks.devices or neededForBoot?
<clever>
develCuy: you could put them into a second derivation, that the bin-only one depends on, or use split outputs
<fyuuri>
Also, manually setting the the efivar with efibootmgr yields the same error. But /mnt/boot/EFI/NisOS-boot contains grubx64.efi
dontdieych has quit [Ping timeout: 246 seconds]
<clever>
develCuy: outputs = [ "out" "junk" ];, then put some stuff in $junk/foo and the rest in $out/bin
<Orbstheorem>
Hi, I'd like to make a nix function in my derivation to get packages from a channel called nixos-unstable if it's available in the system (`import <nixos-unstable> {}`) else, just get it from pkgs...
<develCuy>
clever: I did the split outputs but it fails at the very end: "cycle detected in the references of..."
<develCuy>
wait, i found the bug
dermetfan has joined #nixos
hedning has joined #nixos
<develCuy>
it works!
<develCuy>
Now I officially love <3 nix and its community!
<Orbstheorem>
How can I include in my derivation the result of `nix-shell -p mopidy-spotify mopidy-iris --run mopidy`? I tried including both packages and extending one with the other via overrideAttrs...propagatedBuildInputs, but in both cases I don't get the mopidy binary in my path :(
<Orbstheorem>
Oh, I didn't think that would be a module! Dumb me!
<Orbstheorem>
Thanks
<Orbstheorem>
I'm on nixos
* Orbstheorem
goes take a peek at the module definition
<Orbstheorem>
ottidmes: I was actually taking a look at the iris definition (that's where the idea of propagatedBuildInputs came from), but I would have expected it to compose
<develCuy>
ottidmes, clever: thanks for all your help!!
ddellacosta has joined #nixos
<asymmetric>
so basically, what are the advantages of using home-manager rather than just configuring everything in config.nix?
freeman42x[nix] has joined #nixos
wucke13 has joined #nixos
<wucke13>
Can somebody point me at a lean example for a nwjs build script?
kisonecat has quit [Ping timeout: 250 seconds]
<ottidmes>
asymmetric: home-manager is the home equivalent of what NixOS is for the system side, that is how I see it. However if all you are doing is managing a set of packages, there might not be that many benefits
arjen-jonathan has quit [Ping timeout: 250 seconds]
<asymmetric>
ottidmes: what else is there to do? apart from listing+configuring packages
<ottidmes>
asymmetric: managing files residing in $HOME, user services (NixOS can do those too, but home-manager has better support for them AFAIK)
<asymmetric>
ottidmes: good point about $HOME, but won't most programs default to a system-wide config after checking $HOME?
<ottidmes>
asymmetric: I am not using it myself, I am just using my own thing to write to $HOME, which is sufficient for me
<asymmetric>
i think the main question is how many users you have on the system
<asymmetric>
most laptops have 2, root and you - and distros like ubuntu basically blur that distinction effectively, which i think makes sense
<ottidmes>
asymmetric: even with just one user beside root you will still have things that should only be in your non-root user folder
<asymmetric>
for example?
<balsoft>
assymetric: most GUI applications don't fall back AFAIK. I use home-manager a lot, I essentially keep all my configuration in it.
<ottidmes>
asymmetric: I am not a particular good person to be asking those questions too, because I do what you do, most my things are managed system wide and I do have 2 users on all my systems except 1, so I default to assuming multiple users, but one thing is probably keys in .ssh, but maybe you can manage those in /etc too
romildo has joined #nixos
<fyuuri>
The UEFI based installation on my t440s did not work. Now I tried the MBR based but the installer says cannot find grub drive for /dev/sda1. Does anyone know how to fix this?
<asymmetric>
ottidmes: yes, ssh checks /etc/ssh/ssh_config last
<ottidmes>
asymmetric: right and I guess you can configure identity files explitly via that config per user and locate them outside ~/.ssh
romildo_ has joined #nixos
romildo__ has joined #nixos
<Ankhers>
Does anyone have experience with building a package that requires a luarocks package?
<ottidmes>
asymmetric: its the reason why I don't use home-manager, it is overkill for what I am doing, but I see how it can be useful for others though
romildo has quit [Ping timeout: 250 seconds]
<asymmetric>
ottidmes: my main concern with it is that it duplicates nixpkgs' modules
<asymmetric>
balsoft: true, but i guess some of them (e.g. chromium) accept arguments like --user-dir
<Ankhers>
Is anyone else having trouble building the latest nixops on mac? Specifically python2.7-rednose-1.3.0 is have trouble. The tests for it seem to pass, but then it hangs after the tests.
yayforj has quit [Ping timeout: 250 seconds]
simukis has quit [Quit: simukis]
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyang has quit [Quit: Connection closed for inactivity]
<fyuuri>
Did anyone have the error "cannot find GRUB drive for /dev/sdxy" ? I cannot find a solution :( Does the MBR installation still work normally?
<ottidmes>
fyuuri: MBR installations still work
<fyuuri>
thx
<fyuuri>
but there is no device.map anymore?
<ottidmes>
fyuuri: since you say /dev/sdxy did you maybe use e.g. /dev/sda1 instead of /dev/sda?
vidbina has quit [Ping timeout: 240 seconds]
vidbina has joined #nixos
<fyuuri>
No i put /dev/sda in configuration.nix. Still the message says /dev/sda1
<fyuuri>
It seems it does not know which BIOS device maps to /dev/sda1 (which is my boot partition)
<fyuuri>
but there is no device.map anymore...
<ottidmes>
fyuuri: not sure if it helps, but I use: boot.loader.grub.device = "/dev/disk/by-id/ata-M4-CT256M4SSD2_00000000120509048D65"; maybe you can try setting it by-id as well?
pie___ has joined #nixos
<fyuuri>
I will try that. The install guide and the default say /dev/sda though...
pie__ has quit [Remote host closed the connection]
yayforj has joined #nixos
<ottidmes>
fyuuri: which normally works, but since you run into these troubles, its worth a shot
<fyuuri>
yes
ma9e has quit [Quit: leaving]
<makefu>
i also pin my main disk via /dev/disk/by-id/
<fyuuri>
same problem :(
arjen-jonathan has quit [Quit: WeeChat 2.3]
<ottidmes>
fyuuri: can you maybe share the relevant configuration with some paste service (e.g. GitHub's gists)?
agander has quit [Ping timeout: 250 seconds]
<fyuuri>
It is just the default config by nixos-genereate-config
<ottidmes>
fyuuri: anything special about the disk, not like the latest and greatest type of SSD?
<fyuuri>
no
<fyuuri>
a samsung ssd 240 gb
<fyuuri>
I had archlinux on it before. in mbr mode. And it worked.
rardiol has joined #nixos
<fyuuri>
The t440s had problems running linux in efi mode. So I stopped trying that.
<fyuuri>
But the mbr mode also not working is strange...
<fyuuri>
I never saw the cannot find grub drive error anywhere before...
<ottidmes>
fyuuri: had a similar situation recently on my laptop (Arch Linux on it, replaced by NixOS, not that I had your issue), but for me it was a matter of uncommenting the grub disk line (it was /dev/sda) and it worked without issue, but it is a true MBR/BIOS system not EFI Legacy stuff
<{^_^}>
[nixpkgs] @jtojnar opened pull request #52735 → glom: init at 1.31.6 → https://git.io/fhJbQ
<sphalerite>
So I'm trying to get some vagrant machines running :( and I'm having some issues with the nfs mounting stuff. I've enabled the server using services.nfs.server.enable = true; and opened the port to the virtualbox interface, but am getting "access denied by server" when it tries to mount the shared folder inside the VM. Any ideas?
periklis has quit [Remote host closed the connection]
<samueldr>
sphalerite: it's been a while, but things worked for me at one point in nixos
<samueldr>
is vagrant asking for sudo permissions to edit /etc/exports?
<sphalerite>
yes
<samueldr>
(and you're giving 'em, right?)
<sphalerite>
it does add the exports entries correctly as far as I can see
<samueldr>
good
<samueldr>
systemctl disable firewall for a all-or-nothing test
<sphalerite>
before I opened the port it was timing out
<samueldr>
maybe more than one port for NFS? or maybe TCP+UDP?
sbdchd has joined #nixos
<samueldr>
weirdly enough it looks like I never punched holes here
<samueldr>
my vagrant file has: config.vm.network("private_network", type: "dhcp")
<samueldr>
it might be relevant here
acarrico has joined #nixos
cyounkins has joined #nixos
acarrico has quit [Ping timeout: 250 seconds]
aanderse has joined #nixos
vidbina has quit [Ping timeout: 250 seconds]
yayforj has quit [Ping timeout: 246 seconds]
dgarzon has joined #nixos
<dgarzon>
lookup nix
<dgarzon>
!lookup nix
<samueldr>
dgarzon: what are you looking for?
<ldlework>
nix, clearly
dustinm has joined #nixos
<dgarzon>
samueldr: I am building an image with dockerTools.buildImageWithNixDb and wanted to see if I can override the nix.conf being used by `nix`. I have custom binary-caches that the store cannot hit with the default configuration :(
linuxdaemon has joined #nixos
<samueldr>
I was thinking more "what should !lookup nix" give
ivan has joined #nixos
<dgarzon>
samueldr: Oh, the path in the source-code where `nix` is defined so that I can see what is overridable!
<dgarzon>
I am looking at the github repo, but cannot find where it is defined :(
imdoor has joined #nixos
<LnL>
you can set NIX_CONF_DIR to override where it should look for nix.conf by default
<LnL>
but why not just add /etc/nix/nix.conf to the image?
<dgarzon>
LnL I added the conf file to that path, but the problem is the `nix-store` is setup in the `extraCommands` stage which does not have read-access to /etc/nix.
<dgarzon>
At that point in the code, even though my .bashrc contains the exports, `nix-store` seems to be using a default configuration!
hiroshi has quit [Ping timeout: 245 seconds]
<immae>
iy everyone, I’m looking for general advices about a problem I have: I have applications (usually rails applications, but also python), that I’d like to handle in nix, but they have specificities which makes it impossible. For instance, some applications (mastodon for instance) will require "stateful" files in the directory (assets, but dependent on configuration variables), some others will have even
<immae>
their configurations or variable data in the folder of the app. I can workaround it by doing symlinks but is there "better" ways to handle that?
<LnL>
dgarzon: I don't thing that gets loaded for those commands, but sibstituters don't matter at that point
hiroshi has joined #nixos
<dgarzon>
LnL in my case substituters do matter as I have derivation paths that are not available in the public cache, and only on a custom one :(
<LnL>
no that happens on the host, not inside the build
yayforj has joined #nixos
<LnL>
that command won't even have network access when sandboxing is enabled
Mr_Keyser_Soze has joined #nixos
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos
<dgarzon>
LnL oh, I did not know that! Is there a way to enable network access? I ask because in my `runAsRoot` I have a shell script that calls the nix-store and needs network access to retrieve the derivations from a binary cache: lib.concatMapStringsSep "\n" (drv: "${nix}/bin/nix-store -r ${drv}") [derivationList])
<LnL>
do that on the build host instead of inside the container
cyounkins has quit [Remote host closed the connection]
cyounkins has joined #nixos
kisonecat has quit [Ping timeout: 245 seconds]
<dgarzon>
And just ++ the derivationList to contents? That sounds like a good idea :)
<dgarzon>
Thank you for the clarification LnL, much appreciated!
cyounkins has quit [Ping timeout: 250 seconds]
cnidario has joined #nixos
orivej has quit [Ping timeout: 250 seconds]
acarrico has quit [Ping timeout: 268 seconds]
imdoor has quit [Quit: imdoor]
petersjt014 has joined #nixos
<petersjt014>
I'm trying to make a customized install iso for aarch64. I've nabbed some stuff from the wiki, some from elsewhere and this is what I have so far. Is this on the right track?
<emily>
does cache.nixos.org ever delete old packages?
ghibe has joined #nixos
<LnL>
not so far
<samueldr>
hi petersjt014, iso or sd image?
<ottidmes>
LnL: hmm, so the reason I have to start to build from source if I use an older GHC version that was the main version a while back is just because some other dependencies have changed in the meantime, but if I were to downgrade my whole nixpkgs to a commit where it was the default version, they would all come from cache?
<samueldr>
(iso will only work if your target aarch64 board has uefi support)
<samueldr>
(you can also hop on #nixos-aarch64 and continue there if you prefer)
<LnL>
ottidmes: yep, but that means no security updates or other changes/fixes
<samueldr>
right, after taking a look at your config filw I see it should be the sd image, though the file looks wrong, `config.system.build.isoImage` won't be the sd image; the sd image builders set system.build.sdImage instead (among other things possibly)
<samueldr>
emily: so far the S3 bucket **listing** is apparently 8GiB
<samueldr>
petersjt014: just to make sure there's no mixups in the future, let's call that the sd image, as there is a new iso which is incompatible, for aarch64 :)
<petersjt014>
ah, ok then
<samueldr>
first of all, are you trying to build this using cross-compilation?
<samueldr>
I'm not sure it's yet possible, it wasn't without changes to nixpkgs a couple months back
<petersjt014>
I'd love to if I could, but I have an aarch64 machine so no need really
<ottidmes>
LnL: it was just a hypothetical. I just wanted to confirm my understanding. I can live with updating my GHC version everywhere possible and recompiling the few packages that require an older GHC. Thanks for clearing it up :)
<samueldr>
let's assume a native build (using nix) because otherwise we'll have unknowns
Dedalo has joined #nixos
<samueldr>
let me try your config and see what's wrong
<petersjt014>
I doubt it's finished at all yet, still need the driver stuff
<petersjt014>
It's a first draft
<clever>
dgarzon: the main way to cheat around that perf issue, is to have something like .bashrc do that initial setup when the user tries to open a shell inside the vm
<clever>
dgarzon: so it happens much later on, at runtime
<clever>
dgarzon: oh, and nix only needs a nixbld group if ran as root, if you drop root, but keep +w to /nix/store/, it will run in single-user mode
<petersjt014>
or was it XFS that eats tons of ram?
<Baughn>
ottidmes: Tried that. I'm not sure if it'd work, but it did increase the idle power use by 20W.
<Baughn>
petersjt014: Both really, but ZFS is tunable. I think you probably *could* get it running on a Pi.
<ottidmes>
petersjt014: ZFS with deduplicating, so people simply tend not to enable that and then memory usage is OK
<Baughn>
How much memory does it have?
<Baughn>
ZFS with dedupe requires tons of ram, but that isn't the default. (And is rarely useful anyway.)
<petersjt014>
1 gig ram, 1 gig swap
<Baughn>
ZFS without dedupe still *wants* tons of ram, but is fine down to about 2GB. Below that... right, you'll need to hit the ARC tuning parameters.
<Baughn>
Dunno if it's really worth it.
<petersjt014>
hmm. I'll toss it on the maybe pile then. But 1st up are f2fs/bcachefs
<ottidmes>
Baughn: if systemd is solely responsible for suspending, try and mask the relevant targets, but as far as I understand NixOS does not do masking
<Baughn>
It doesn't happen unless the gdm unit is running, so presumably that's at fault. Hmm.
<Baughn>
There's got to be a config option for this.
<Orbstheorem>
Is there any way to catch an error? I want to create a derivation that will build without secrets if such path is not decrypted
<ottidmes>
Orbstheorem: builtins.tryEval can catch certain categories of errors
<Baughn>
ottidmes: Saw that. It seems to be about turning off the *screen* suspend.
<Orbstheorem>
i.e. I store my secrets encrypted with my PGP key using git-crypt. If I haven't decrypted the secrets folder, the import statement will give an error
<Baughn>
I'll try masking the unit somehow. Or just remove it.
<Orbstheorem>
ottidmes: I thought on using that, but `...let trySecrets = builtins.tryEval (import ./secrets/secrets-available.nix {});` yields `error: syntax error, unexpected $end, at /home/roosemberth/dotfiles/nixos-config/secrets/secrets-available.nix:1:1`
<Orbstheorem>
Which is the kind of error I want to catch
<ottidmes>
Baughn: I would considered it relevant because of "sleep-inactive-ac-timeout 120" and "sleep-inactive-ac-type 'suspend'"
<Baughn>
...maybe. I was really hoping I could avoid registry tweaks.
<ottidmes>
Orbstheorem: seems to me you want to use builtins.pathExists instead
<Orbstheorem>
ottidmes: well, the path exists (git crypt keeps the file in place, it just changes the contents)
juhe has quit [Remote host closed the connection]
agander has quit [Ping timeout: 245 seconds]
ZaraChimera has joined #nixos
<ottidmes>
Orbstheorem: I am just brainstorming here, but maybe you could read the file contents do a sanity check, and only the import it?
balsoft has joined #nixos
<Orbstheorem>
ottidmes: I'm trying builtins.readFile, I had the idea to try to find the git crypt header (“GITCRYPT...”), but I get `error: the contents of the file '/home/roosemberth/dotfiles/nixos-config/secrets/secrets-available.nix' cannot be represented as a Nix string`
LogicAside has quit [Ping timeout: 246 seconds]
LogicAside has joined #nixos
<Orbstheorem>
the encrypted file is binary
imdoor has joined #nixos
balsoft has quit [Client Quit]
vidbina has joined #nixos
balsoft has joined #nixos
<Orbstheorem>
I guess I could use getEnv, but ugly :/
crmlt has quit [Ping timeout: 240 seconds]
imdoor has quit [Client Quit]
periklis has quit [Remote host closed the connection]
orivej has joined #nixos
<obadz>
is there a way to know what nix-builders are currently building
<obadz>
(like the name of the derivation or something/
<erictapen>
Dandellion[m]: fetchFromGitHub e.g. is a fixed output drv
<Dandellion[m]>
erictapen (IRC): so in this case where the program I'm trying to package assumes it controlls downloading the dependencies I would have to patch it to look for prefetched files rather than doing it itself
<Dandellion[m]>
erictapen (IRC): Or maybe there's some way to "fake" networking and redirect the download request to the prefetched stuff?
tzemanovic has quit [Remote host closed the connection]
<erictapen>
Dandellion[m]: I have never seen this, so I don't think the nix sandbox provides any networking at all
<Dandellion[m]>
alright thanks for all your help! I'll get to work hehe
<gchristensen>
erictapen: it uses a network namespace, and yeah actually you can run a server inside a build-- but it too is contained
<samueldr>
ptotter[m]: `myisoconfig` is a function, like /etc/nixos/configuration.nix would be; to get the evaluated config you need to add it as a parameter and use it instead of `myisoconfig`
<{^_^}>
[nix-pills] @mhwombat opened pull request #98 → Can now divide using /<space> → https://git.io/fhUeF
<samueldr>
oops
<samueldr>
petersjt014: ^
<erictapen>
Dandellion[m]: you're welcome
tzemanovic has joined #nixos
tzemanovic has quit [Read error: Connection reset by peer]
<erictapen>
gchristensen: ah interesting
<samueldr>
petersjt014: line 4 would then become `myisconfig = { pkgs, config, ... }: {` and 31 and 35 would be set back to using `config.nix.package.out`
<samueldr>
(s/myisconfig/myisoconfig/)
balsoft has quit [Ping timeout: 250 seconds]
<erictapen>
by the way, does anyone use Wireguard with nixos and is able to use crpytokey routing?
tzemanovic has joined #nixos
tzemanovic has quit [Read error: Connection reset by peer]
tzemanovic has joined #nixos
tzemanovic has quit [Remote host closed the connection]
yayforj has quit [Remote host closed the connection]
freeman42x[nix] has quit [Ping timeout: 244 seconds]
lostman has joined #nixos
<Myrl-saki>
ow is initrd-fsinfo used?
<Myrl-saki>
Oh wait, found it.
alex`` has quit [Quit: WeeChat 2.3]
imdoor has quit [Quit: imdoor]
<petersjt014>
@samueldr think I got an image successfully built. I'll toss it up on a filesharing site sometime in the next hour and throw a link up on my github
cyounkins has quit [Remote host closed the connection]
cyounkins has joined #nixos
<samueldr>
good (though I probably won't look at the image)
<samueldr>
(though I didn't mention it beforehand since anyway your goals are different)
cyounkins has quit [Ping timeout: 250 seconds]
erictapen has quit [Quit: leaving]
erictapen has joined #nixos
<ottidmes>
other than nix-locate, are there ways to go from an output or derivation path to the attribute name in pkgs?
petersjt014 has quit [Remote host closed the connection]
LogicAside has quit [Remote host closed the connection]
immae has quit [Quit: WeeChat 2.3]
Anton-Latukha has quit [Ping timeout: 244 seconds]
tdeo has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
tdeo has joined #nixos
thc202 has quit [Ping timeout: 240 seconds]
judson has quit [Remote host closed the connection]
<gchristensen>
ottidmes: why do you ask?
m0rphism has quit [Quit: WeeChat 2.2]
m0rphism has joined #nixos
tdeo has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
immae has joined #nixos
tdeo has joined #nixos
ym555 has quit [Quit: WeeChat 2.3]
<ottidmes>
gchristensen: because I have sometimes wondered that question and had to search through nixpkgs to figure it out
<gchristensen>
aye
<ottidmes>
gchristensen: so I have created a shell function that automates this to some extent
<ottidmes>
gchristensen: but it only considered top-level/all-packages.nix
tdeo has quit [Client Quit]
<ottidmes>
but at the time I did not know about nix-locate and I am in the process of rewriting those shell functions and was wondering if there are any other things I could not think of at the time
tdeo has joined #nixos
<gchristensen>
gotcha
<gchristensen>
I don't know :) interesting question, though
<ottidmes>
gchristensen: like right now I have a shell function that is able to retrieve the file defining a package, at first it too was limited to top-level/all-packages.nix but today I learned of something that allowed me to now make it work for pretty much all packages (except for things like haskellPackages)
<ottidmes>
but also: nux pkg-file bitwarden_rs ~> /wheel/proj/nixcfg/shared/pkgs/bitwarden_rs/default.nix (defined in an overlay)
elgoosy has quit [Remote host closed the connection]
Anton-Latukha has joined #nixos
<{^_^}>
[nixpkgs] @hedning opened pull request #52746 → udisks1: drop lvm2 support, fix build → https://git.io/fhUfu
<infinisil>
ottidmes: How does it work?
<ottidmes>
if I had the function going from store path to package attribute name then I could chain it with things like: nux pkg-file $(nux pkg-name $(which exe)), and get the file that defines a executable
<ottidmes>
infinisil: it has a fast path that does the original smart grep of top-level/all-packages.nix and the more accurate and complex path that uses unsafeGetAttrPos to determine the file
cnidario has quit [Remote host closed the connection]
<infinisil>
And then you just grep for `<attr> = callPackage (.*)` I guess?
<ottidmes>
infinisil: in the fast path yes, in the slow path I do not, you cannot determine the callPackage sites that way, but you can determine the actual file being called
<ottidmes>
infinisil: if you want I can gist it for you