justanotheruser has quit [(Ping timeout: 248 seconds)]
<adisbladis>
ghostyyy: You probably want rust.rustc (or just "rust" which is an alias for rust.rustc)
<ghostyyy>
thank you! that works great
<ghostyyy>
i would be interested though to know why it prints such a nonsensical error
<adisbladis>
ghostyyy: rust is an attribute set which has both rustc and cargo :)
<ghostyyy>
ahh i see
<adisbladis>
nix-shell -p rust gives a less nonsensical error: "error: cannot coerce a set to a string"
<ghostyyy>
ah so it does!
Lisanna has joined #nixos
acowley is now known as acowley_away
tempeh has joined #nixos
mutagenfork has quit [(Ping timeout: 255 seconds)]
tempeh has quit [(Client Quit)]
mutagenfork has joined #nixos
<ldlework>
Hmm how do you create a new profile?
<Lisanna>
The notes for runInLinuxVM says that: "Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc." Is it possible to mount something like that anyways, e.g., by specifying an offset to the mount command? I'm trying that and I'm getting operation not permitted errors from mount.
<cocreature>
is there some special support for derivations that are only intended for running tests and don’t produce outputs or should I just use runCommand and write a dummy output?
<ldlework>
ah ok
<Lisanna>
cocreature: you could have the output be the stdout :)
<ldlework>
needs to be writable I guess
<cocreature>
Lisanna: sure coming up with some kind of output is easy but it feels a bit hacky so I’m wondering if there’s a better solution
et4te has quit [(Ping timeout: 240 seconds)]
<Lisanna>
Nix's sandbox features ARE really nice... I can understand why you'd want to use it for non-build related purposes :)
justanotheruser has joined #nixos
<ghostyyy>
hm, i am trying to build a program in nixos, written in vala (which compiles to c), when it tries to compile the .c file, it complains about missing headers
<adisbladis>
What missing headers?
<ghostyyy>
glib.h
<ghostyyy>
i have glib installed obviously
<ghostyyy>
i tried setting CFLAGS to $NIX_CFLAGS_COMPILE but no dice
<Lisanna>
ghostyyy: are you using stdenv.mkDerivation?
<ghostyyy>
yes
<adisbladis>
ghostyyy: Can I have a look of the derivation?
<Lisanna>
ghostyyy: try putting glib in your buildInputs
<ghostyyy>
its already in there (that is from earlier, when having rust in there was giving me an error)
<Lisanna>
and you don't need gnumake or gcc in your buildInputs
<ghostyyy>
setting CFLAGS to $NIX_CFLAGS_COMPILE also gives a gcc command which includes -isystem /nix/store/l3hl4mgpba3266v81vfn1irzvfnyviha-glib-2.52.3-dev/include
<ghostyyy>
so i am rather confused as to why it doesnt find it in there
<ghostyyy>
Lisanna, ah, thanks
<Lisanna>
in fact, try removing those... I'm suspicious that including gcc directly might be clobbering the stdenv gcc, which is what you really want to run
<ghostyyy>
ah, ive found the problem, it glib-2.0/glib.h
<Lisanna>
oh, okay, that's good :)
Aexoden has quit [(Quit: No Ping reply in 180 seconds.)]
aneeshusa has quit [(Quit: WeeChat 1.9.1)]
<ghostyyy>
ah, but glib.h references a file glibconfig.h, which is apparently in another package...
Aexoden has joined #nixos
dieggsy has quit [(Ping timeout: 252 seconds)]
Zer000 has joined #nixos
<ghostyyy>
wow, environments get *huge* with nix-shell
<Zer000>
hey guys my wifi card stopped working. It stopped showing up in ifconfig -a but lspci says Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter
<ghostyyy>
doesnt that get copied into memory whenever you run a program in the nix-shell subshell?
xd1le has joined #nixos
justanotheruser has quit [(Ping timeout: 260 seconds)]
ma27 has joined #nixos
pie_ has quit [(Ping timeout: 240 seconds)]
hellrazo1 has quit [(Ping timeout: 255 seconds)]
mizu_no_oto has quit [(Quit: Computer has gone to sleep.)]
iqubic_ has joined #nixos
iqubic has quit [(Read error: Connection reset by peer)]
iqubic_ has quit [(Remote host closed the connection)]
pie_ has joined #nixos
iqubic has joined #nixos
srdqty has joined #nixos
<ldlework>
How can I specify a buildInput as a remote tarball?
justanotheruser has joined #nixos
<ldlework>
nm
<fearlessKim[m]>
ldlework: buildInputs should be derivations so a tarball won4t do it imo
<ldlework>
fearlessKim[m] the various fetch helpers work
michaelpj has quit [(Quit: ZNC 1.6.5 - http://znc.in)]
michaelpj has joined #nixos
ma27 has quit [(Ping timeout: 246 seconds)]
grumble has quit [(Quit: world)]
grumble has joined #nixos
<fearlessKim[m]>
ldlework: how did it work ? like you put the derivation folder in the tarball ?
<ldlework>
fetchFromGit in this case, but same thing
<Lisanna>
Is there a way to make nix-collect-garbage smarter? e.g., if there's a derivation that I build regularly, I'd like its buildInputs to not be garbage collected all the time :)
<Lisanna>
(other than dumping all of them in my system packages)
MercurialAlchemi has joined #nixos
<ldlework>
How can I call nix-env against an function that expects pkgs?
<ldlework>
as an argument
reinzelmann has joined #nixos
<ldlework>
nm
zzamboni has joined #nixos
JosW has joined #nixos
mrkgnao has joined #nixos
jacob has joined #nixos
endformationage has quit [(Quit: WeeChat 1.9.1)]
Mateon2 has joined #nixos
<ldlework>
Is there a trick for reinitializing a profile?
contrapumpkin has quit [(Quit: My MacBook Pro has gone to sleep. ZZZzzz…)]
zraexy has quit [(Ping timeout: 258 seconds)]
<etu>
ldlework: Like getting rid of old versions and more or less "start fresh" or?
Ivanych has joined #nixos
<ldlework>
yeah
<ldlework>
nix-env -e '.*' I guess?
Curiontice has quit [(Remote host closed the connection)]
griff_ has joined #nixos
glenn has quit [(Remote host closed the connection)]
glenn has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] primeos pushed 1 new commit to master: https://git.io/vFfPh
<NixOS_GitHub>
nixpkgs/master 6951604 Michael Weiss: sshfs: 3.3.0 -> 3.3.1
mutagenfork has quit [(Ping timeout: 248 seconds)]
<MasseR>
I could probably move /nix away, mount a separate drive to /nix and then move the files back. Or just reinstal
b has quit [(Quit: Lost terminal)]
<xd1le>
MasseR: nix-store --repair ?
<etu>
MasseR: I would probably mount the other drive, rsync the content with -a to keep permissions the same... to begin with.
<Lisanna>
..this might sounds a bit spooky, but has anybody ever had files referenced by a derivation disappear?
<Lisanna>
like, the derivation says to use ./path/to/file, and then you wake up one morning and specifically those files are gone
glenn has quit [(Ping timeout: 255 seconds)]
kiloreux has joined #nixos
ylwghst has quit [(Ping timeout: 240 seconds)]
ylwghst has joined #nixos
elninja44 has joined #nixos
kiloreux_ has joined #nixos
kiloreux_ has quit [(Client Quit)]
xd1le has quit [(Quit: Toodaloo padawans! 👣)]
vandenoever has quit [(Ping timeout: 248 seconds)]
zzamboni has joined #nixos
leat has quit [(Quit: WeeChat 1.9.1)]
<ArdaXi[m]>
MasseR: I just recently created a new dataset (/partition), copied over my nix store (rsync -a) and mounted that over /nix
<ArdaXi[m]>
Worked fine for me, just need to make sure on NixOS that you do a nixos-rebuild boot rather than a switch, and do another rsync before rebooting
vandenoever has joined #nixos
<etu>
ArdaXi[m]: I guess you can mount your / partition somewhere else when you're up and running with /nix on a new partition to clean out your /nix folder as well so it doesn't take any space :)
<ArdaXi[m]>
Aye, mount --bind / /mnt/oldroot; rm -rf /mnt/oldroot/nix
<ArdaXi[m]>
Though, you know, do reboot first to make sure everything works
p4cman has joined #nixos
<ArdaXi[m]>
But hey, got a compressratio of 2.22x on my nix store now
pie_ has quit [(Remote host closed the connection)]
pie_ has joined #nixos
civodul has quit [(Quit: ERC (IRC client for Emacs 25.3.1))]
riclima has quit [(Ping timeout: 240 seconds)]
riclima has joined #nixos
leat has joined #nixos
<kiloreux>
LnL, I have been using your docker image late and it's so helpful. Thank you. I wanted to ask a question about it, can I use it as binary-cache server ? I didn't really understand the remote builder thing.
elninja44 has quit [(Ping timeout: 258 seconds)]
<samae>
JosW: use nix-channel --remove?
<samae>
If you added with the same name as the former one, then I will just be replaced
mrkgnao has quit [(Ping timeout: 248 seconds)]
goibhniu has quit [(Ping timeout: 240 seconds)]
mrkgnao has joined #nixos
<sphalerite>
clever: you mentioned a trick to get menuconfig working?
elninja44 has joined #nixos
jgertm has quit [(Ping timeout: 260 seconds)]
<LnL>
kiloreux: depends what you're looking for, but I guess you cold
<kiloreux>
LnL, Have been struggling with it for the last two days. If you have any hint about it, it would be very much appreciated.
riclima has quit [(Ping timeout: 248 seconds)]
ertes-w has joined #nixos
pxc has joined #nixos
FRidh has joined #nixos
a6a3uh has joined #nixos
pie_ has quit [(Ping timeout: 246 seconds)]
<LnL>
there are a couple of tools to create caches like nix-push and nix-serve
pxc has quit [(Ping timeout: 255 seconds)]
<LnL>
distributed builds will also substitute builds from the remote store if it exists already, but nix will also try to compile stuff there if there's no cache for it yet
ma27 has joined #nixos
betaboon has joined #nixos
MoreTea has quit [(Ping timeout: 248 seconds)]
<hyper_ch>
Harekiet: ping
<hyper_ch>
sphalerite: zfs root encryption is so much simpler on nixos than debian...
<Harekiet>
hyper_ch pong
<hyper_ch>
Harekiet: how is it going with zfs encryption on nixos?
<hyper_ch>
you've been silent for a long time
pie_ has joined #nixos
<Harekiet>
hyper_ch I've been busy a bit, been trying to get ubuntu working with it since I was too lazy to get nixos installed, but ubuntu grub scripts weren't happy in finding out dm crypt was active on my zfs partition
<hyper_ch>
Harekiet: I managed to get it running on debian
<hyper_ch>
needed to adjust initrd and grub entries
MP2E has quit [(Remote host closed the connection)]
<hyper_ch>
dm crypt? not zfs encryption?
<Harekiet>
yeh that's what I didn't really wanna resort to, I hate having to add custom shit like that since you forget about it with upgrades
pie_ has quit [(Remote host closed the connection)]
pie___ has joined #nixos
<hyper_ch>
well, I think I can solved the grub entries by editing the /etc/default/grub file to provider proper options
<Harekiet>
well I heard ssomething about dm crypt being faster
<hyper_ch>
and for modifying the initrd.... maybe with something as incron you can apply changes everytime the initrd changes
<Harekiet>
and I'd just be happy to just have something working :)
<adisbladis>
I haven't benchmarked but native crypto certainly feels faster
<hyper_ch>
Harekiet: encrypted root zfs is easy on Nixos ;)
<adisbladis>
It's really the same as any other partition setup on nixos :)
<adisbladis>
Set it up once and stop thinking about it :)
<hyper_ch>
adisbladis: I don't really notice a difference between mdadm raid1, dmcrypt/luks, ext4 and encrypted zfs
<adisbladis>
hyper_ch: btrfs on my laptop have noticable slowdowns on lots of io (like building)
<Harekiet>
I just want it to work without too much customisation
<adisbladis>
pie___: You probably want overrideAttrs
chrilves has joined #nixos
mutagenf1rk has quit [(Ping timeout: 246 seconds)]
<pie___>
ah well for starters i mwaawsd up my paths heh
thc202 has joined #nixos
<pie___>
if i have unstable and stable how do i tell which one to apply the overide to?
<sphalerite>
hyper_ch: I have better things to do :p
nh2 has joined #nixos
<sphalerite>
pie___: it will apply to either
<sphalerite>
That is, both
<pie___>
ah
<hyper_ch>
sphalerite: better things like ...? :)
<pie___>
why is it so hard to find good examples on google? :/
<pie___>
i think i want overridederivation?
grumble has quit [(Quit: "In other words, whenever one attempts to comb a hairy ball flat, there will always be at least one tuft of hair at one point on the ball." -- https://en.wikipedia.org/wiki/Hairy_ball_theorem)]
<sphalerite>
Just the installation command was wrong
<pie___>
im doing nix-env -viA nixos.pkgs.chicken
ma27 has quit [(Ping timeout: 246 seconds)]
<pie___>
it runs but its still getting 4.11.0 instead of 4.12.0 and it hasnt even compained about the sha256 yet
<JosW>
Wow easy, remove the name, not the full url from the channels list.
<seequ>
Any clue why `sudo nix-collect-garbage -d` doesn't delete old generations from the UEFI boot menu?
<JosW>
now running 17.09
<JosW>
great
nschoe has quit [(Quit: Program. Terminated.)]
<JosW>
this nixos install is running on a kvm virtual machine. Is it possible to use nixops with this machine or should one use Nixos as KVM host?
<JosW>
The host is now running Debian
a6a3uh has quit [(Ping timeout: 248 seconds)]
<infinisil>
seequ: Try a nixos-rebuild boot/switch
<seequ>
That's.. counterintuitive :D
<seequ>
Will do.
<infinisil>
nix-collect-garbage only deletes generations from /nix/var/nix/profiles, doesn't touch /boot
<pie___>
sphalerite, i switched the stuff back to "chicken" and the install command works but its still the old version: nix-env -viA nixos.pkgs.chicken
<pie___>
installing ‘chicken-4.11.0’
<seequ>
infinisil: Yup, you were right. Thanks.
<infinisil>
:)
<pie___>
i wonder if its even using the config? (~/.nixpkgs/config.nix)
<infinisil>
pie___: Check with nix-instantiate --eval '<nixpkgs>' -A config
<goibhniu>
infinisil: hell yeah! it's a react/electron app AFAIK, and they'll be releasing it when it's more polished
<goibhniu>
JosW: well, the videos will be recorded anyway, so you shouldn't have to worry about that
<infinisil>
JosW: And you can easily download them with youtube-dl when they're online
<goibhniu>
I'd also like to put them on archive.org
<infinisil>
IPFS would be cool too :)
<goibhniu>
ah, sure!
nschoe has joined #nixos
erictapen has joined #nixos
erictapen has quit [(Remote host closed the connection)]
erictapen has joined #nixos
erictapen has quit [(Remote host closed the connection)]
erictapen has joined #nixos
erictapen has quit [(Remote host closed the connection)]
erictapen has joined #nixos
erictapen has quit [(Remote host closed the connection)]
erictapen has joined #nixos
<JosW>
goibhniu: youtube-dl can also do the stream i just checked
<goibhniu>
nice
nschoe has quit [(Ping timeout: 255 seconds)]
<JosW>
but will get you that in trouble perhaps?
<sphalerite>
Downloading the stream from YouTube?
<infinisil>
lots of lots of people are using youtube-dl, I've never heard of anyone get in trouble, and youtube videos have been getting downloaded for as long as i can remember
<hyper_ch>
youtube-dl is great
<JosW>
yeah but what about live streams
<infinisil>
why would live-streams be different, it's really just a live-upload to youtube
<infinisil>
This file there checks if I added a new video to my playlist, downloads it, adds it to the library, and plays it with mpd through the http stream :)
__Sander__ has joined #nixos
frankqux1 has joined #nixos
<hyper_ch>
I don't believe in playlists :)
<infinisil>
Well I wouldn't know how to do it otherwise
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] LnL7 pushed 2 new commits to release-17.09: https://git.io/vFfbZ
<NixOS_GitHub>
nixpkgs/release-17.09 48cde01 Andreas Rammhold: cockroachdb: enable build on darwin...
<sphalerite>
JosW: everybody who's watching it is downloading it too, it's the same from the server's perspective. The only difference is if it gets played back and thrown away or saved to disk :)
chrilves has quit [(Remote host closed the connection)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] LnL7 pushed 2 new commits to master: https://git.io/vFfb9
<NixOS_GitHub>
nixpkgs/master 32d6259 Andreas Rammhold: dnstracer: fix build on darwin
<clever>
you can even do: nix-instantiate '<nixpkgs>' -A google-chrome --arg config '{ allowUnfree = true; }'
<clever>
which puts the entire config.nix file in the argument
nschoe has joined #nixos
<pie___>
says undefined variable fetchurl, how do i need to scope that?
<clever>
pkgs.fetchurl
Lisanna has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Mic92 pushed 1 new commit to master: https://git.io/vFfhx
<NixOS_GitHub>
nixpkgs/master ed0f558 Brian McKenna: uvcdynctrl: init at 0.2 (#30806)...
NixOS_GitHub has left #nixos []
<Lisanna>
Are there any up-to-date guides on how to publish a custom nix-channel with a web server? I naïvely did nix-push to the web server's directory, but I can't add the channel on another machine since it can't find nixexprs.tar.xz
<clever>
Lisanna: the channel is managed seperately from nix-push
<clever>
Lisanna: a channel is just a directory with 2 files, nixexprs.tar.xz and binary-cache-url
<Lisanna>
oh... so if I have all of my nix expressions spread out all over the place, am I going to have a hard time building a channel?
<clever>
you need a default.nix that can return a set with everything
<pie___>
wooo compiling
<Lisanna>
I have a default.nix
<clever>
now you need a tar containing that default.nix, and every file it refers to
<Lisanna>
...oh boy
<Lisanna>
Guessing there's no automatic way to do that huh?
<clever>
you can also use fetchurl to download things
<Lisanna>
okay, that looks pretty specific to nixpkgs... but the short of it is that the tarball should contain all of the nix expressions in the same directory structure as they appear locally?
<clever>
Lisanna: yeah
<clever>
Lisanna: nix-channel will unpack the tarball into the store, and add it under ~/.nix-defexpr/
<clever>
and then nix-env and nix-build can refer to them
<Lisanna>
are they contained in a root directory or does expanding the tar result in default.nix + other files at the top level?
ssmike has quit [(Remote host closed the connection)]
<clever>
Lisanna: the entire directory structure remains
<clever>
Lisanna: just look at what nix-channel did with nixpkgs in ~/.nix-defexpr/
ssmike has joined #nixos
seppellll has quit [(Ping timeout: 258 seconds)]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] vcunat pushed 1 new commit to master: https://git.io/vFJe7
<NixOS_GitHub>
nixpkgs/master 8688a51 Vladimír Čunát: knot-dns: fix kdig +tls sending bad SNI
NixOS_GitHub has left #nixos []
sivteck has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Mic92 pushed 2 new commits to master: https://git.io/vFJvf
<NixOS_GitHub>
nixpkgs/master 0e1b067 Johannes Frankenau: ncmpcpp: 0.8 -> 0.8.1
<NixOS_GitHub>
[nixpkgs] gebner pushed 1 new commit to master: https://git.io/vFJvd
<NixOS_GitHub>
nixpkgs/master 00a5d6d Gabriel Ebner: jabref: fix startup error with gsettings schemas
NixOS_GitHub has left #nixos []
TweyII has joined #nixos
<Lisanna>
A lot of my nix expressions refer directly to local source directories for building... I definitely don't want to be bundling all my source code along with my nix expressions, is there a good solution for something like this?
TweyII is now known as Guest40950
tanonym has joined #nixos
<Lisanna>
"refer directly": src = ./mysrc;
<tanonym>
Okay, let's try getting a ZFS install going for Linux
FRidh has joined #nixos
pie___ has quit [(Ping timeout: 255 seconds)]
<ArdaXi[m]>
Lisanna: How would those ever work without having the source code bundled alongside?
<Lisanna>
ArdaXi[m]: with a binary cache
<ArdaXi[m]>
Well, yes, but a directory isn't a fixed-output derivation
<Lisanna>
I think I have a solution... I need to separate all the build-specific logic out and put it into a nix channel, and then all of the nix code that deals with my local sources should use my nix-channel
<ArdaXi[m]>
So how would it know what to fetch from the binary cache?
pie___ has joined #nixos
<Lisanna>
right, hence my conundrum :)
otti has joined #nixos
<ArdaXi[m]>
You'd want something like fetchurl that works locally, if you want to accomplish this, not sure if that exists
<Lisanna>
Yeah, already had that idea,
griff_ has joined #nixos
guillaum2 has quit [(Remote host closed the connection)]
<Lisanna>
not going to do anything like that. I'm going to take all my build expressions (they are completely separate from the source expressions) and put them in a nix-channel, then use that nix-channel locally with all my local stuff
<Lisanna>
i.e., they'll all be functions which accept a src argument
<Lisanna>
unrelated question: how do I get networking working in runInLinuxVM? I'm trying to copy dockerTools.pullImage but no luck so far.
snikkers has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] rycee pushed 1 new commit to master: https://git.io/vFJJF
<NixOS_GitHub>
nixpkgs/master 000b68c Robert Helgesson: git-hub: 0.11.1 -> 1.0.0
<tanonym>
If not ZFS what is a good option for a portable USB stick install of NixOS for the file system? Since I'm dealing with 32GB here something that compresses would be advantageous.
dieggsy has quit [(Remote host closed the connection)]
<Lisanna>
tanonym: btrfs
<Lisanna>
It's designed for USB sticks :)
<tanonym>
Okay, I have gotten btrfs working before as well. And going by the wiki pages, probably less of a headache than trying to do a ZFS install off the bat. Better I work the kinks out in a VM and then clone.
<tanonym>
Honestly that Ubuntu ZFSonLinux page makes my head hurt... :S
dieggsy has joined #nixos
pie___ has quit [(Ping timeout: 240 seconds)]
<tanonym>
How do btrfs and zfs compare in terms of capability?
<tanonym>
They're saying that you should have at least 4GB RAM for normal operations on ZFS and much more if you're doing mirroring and other operations (seems to need lots of RAM to run efficiently when doing it's job)
dywedir has joined #nixos
<tanonym>
Okay, now to work out how to enable compression in btrfs for the USB stick install.
<tanonym>
So nice to have a terminal-based irc client that behaves nicely with links (irssi) compared to weechat. ><
<tanonym>
Methinks I'll do btrfs install on my old Lenovo laptop HD and on a nice 32GB DataTraveller stick.
sivteck has quit [(Quit: user missing.)]
<tanonym>
<< <3 my atomic upgrades and rollbacks. Makes testing things out so relaxing and fun.
glenn has joined #nixos
<Lisanna>
I'm just using webchat x.x
<Lisanna>
Corporate blocks IRC and I'm too lazy to pull up my other computer
<tanonym>
Getting around blocks against IRC. Le fun.
<tanonym>
I had to install an irc client into tempfs for the liveCD to do the install.
<Lisanna>
haha
<clever>
tanonym: nix-env -iA nixos.irssi
<tanonym>
Because knowing me I will pooch something up at some point and not grok what the wiki and manual tell me :D
glenn has quit [(Ping timeout: 246 seconds)]
<tanonym>
Thx clever. Currently running a nice black and blue irssi instance :)
<tanonym>
Hm, that is odd: Dolphin file manager crashes on launch when running the NixOS LiveDVD.
<infinisil>
I think I've seen that problem here just recently
cyris212 has joined #nixos
griff_ has quit [(Quit: griff_)]
guillaum2 has joined #nixos
<tanonym>
Yeah, looks like btrfs is probably the best option for my low-end gear at the moment.
<Lisanna>
cool ^^
<guillaum2>
Is there anything in my config which may make my nixos-rebuild switch take 5 minutes (when it does not install / compile / change anything)
<Mic92>
most people don't have that much duplicated data
<tanonym>
hyper_ch It seems relatively straightforward going by the NixOS wiki page, but I suspect I just don't have the hardware to take advantage of ZFS's capabilities.
<clever>
tanonym: i have a laptop with 4gig of ram running on zfs
<hyper_ch>
tanonym: so how would your hardware take advantage of btrfs' capabilities?
<tanonym>
I have an anaemic 1.6GHz AMD-E2 APU Lenovo B575 I'm trying resurrect for a little longer until I can get my hands on a better laptop.
<hyper_ch>
I think if you want to run dedup it's about 3-4GB ram per TB storage as recommendation
<hyper_ch>
tanonym: why not just give it a try how it works?
<tanonym>
It was more the compression I can do with btrfs. I was trying to make a portable install of NixOS to go on a USB stick that I can plug into any computer.
<hyper_ch>
nixos is pretty simple to resetup
<hyper_ch>
up o you want you wanna use... I just have bad experiences with btrfs :)
dieggsy has quit [(Remote host closed the connection)]
<tanonym>
Now that's actually a good point.
<tanonym>
So I would name my partition something like zpool/nixos?
<hyper_ch>
but then there's plenty of others that have good experience with btrfs
<hyper_ch>
I followed clever's lead and named my pool "tank" :)
<tanonym>
Hehe.
<hyper_ch>
and to root dataset is nixos
dieggsy has joined #nixos
<hyper_ch>
(but then, I have an encrypted dataset in between though)
<tanonym>
That's the command in the ZFS Wiki for NixOS, do I need to make a solaris partition first and mount it to /mnt and then point it at my /dev/sda?
<hyper_ch>
can you even use mirror twice?
<clever>
tanonym: you cant mount anything until you make the pool
<clever>
hyper_ch: that will concat the 2 mirrors together
<tanonym>
No, I'm trying to do it with a single disk, but that is the only example the Wiki gives for installing NixOS on ZFS.
<clever>
hyper_ch: so you get twice the storage, and can loose up to 1 drive from each pair
<hyper_ch>
ah, raid10 :)
<tanonym>
I'm not trying to make a 4 disk mirror or RAID or anything
<tanonym>
Okay, create /boot and /data. Is swap necesary for day-to-day use of the HD?
<hyper_ch>
I don't use swap anymore on my notebook
<hyper_ch>
but then it has 16gb ram
<tanonym>
Mine only has 8, I think.
<tanonym>
Or 4...
<hyper_ch>
clever: non-encrypted zfs on nixos - still seperate /boot recommended?
<clever>
hyper_ch: yes
<tanonym>
8GB according to System Monitor
guillaum2 has quit [(Remote host closed the connection)]
<tanonym>
Do I need to make the data partition any particular format (one howto said I need to format it as solaris before creating the zfs partition.)
<hyper_ch>
tanonym: do you want to install on usb stick or ssd/hdd?
<clever>
tanonym: "zpool create" is what formats it
<clever>
you dont have to format it before formatting it
pxc has joined #nixos
<hyper_ch>
so create a partition for /boot
<hyper_ch>
and a second partiton for the zpool
<clever>
also, is it MBR or GPT?
<tanonym>
hyper_ch: both actually.
<tanonym>
I have the internal HD but I wouldn't mind getting a compressed install on a USB stick for portability.
<tanonym>
And my laptop is an MBR
<tanonym>
GPT bricks the thing completely.
<clever>
why does GPT brick it?
<tanonym>
I don't know.
<clever>
how exactly is it bricked?
<tanonym>
All I know is when I was running openSUSE an update shifted my partition scheme to GPT and I couldn't boot from the HDD anymore. The BIOS kept dumping me to PXE boot and nothing else. I could boot from CD or USB drives but not the internal. I had to zero the internal HD and reset the partition scheme to MBR or all I had was a paperweight.
sivteck has joined #nixos
<clever>
you need a special partition to boot from GPT
pxc has quit [(Ping timeout: 252 seconds)]
<tanonym>
Yeah. I never could get the GPT to work.
<clever>
probably because you never made a bios boot partition and reinstalled grub
<tanonym>
So I'll stick with MBR because I know that works :D Less headache for me.
<tanonym>
The OS was originally installed under MBR and then the update changed it to GPT and borked everything and my searchfu failed to find how I needed to configure the GPT partition to make the thing work.
<tanonym>
So I wiped it went back to MBR and replaced openSUSE with NixOS.
<clever>
:D
<aminechikhaoui>
ikwildrpepper: do you remember what's the purpose of systemd.services.fetch-ssh-keys in GCP ? is it just used during the boot or something ?
<tanonym>
Why an openSUSE Leap security update would go change my parition table I don't know. But before that GNOME had been breaking as well, and I could never get it back without wiping and reinstalling everything because under FHS distros you apparently can't cleanly remove a DE without breaking a bazillion other things.
ylwghst has joined #nixos
<tanonym>
And now that I've used NixOS for a while I have no wish to ever go back to using other distros :D
<clever>
hyper_ch: i have a dozen usb sticks, i cant remember which one is the live usb
<hyper_ch>
the red one
<hyper_ch>
if you have too many, I always have too few...
<tanonym>
I'll tie a nice bell to my rescue stick :D
<tanonym>
Well, the rescue stick will be my OS-in-a-pocket.
orivej has joined #nixos
* hyper_ch
imagines clever running around with a bandolier full of usb sticks
<tanonym>
Do I need to do a mkfs.ext4 -L nixos /dev/sda3 and mount it to /mnt before running zfs create?
<hyper_ch>
what is sda3 in your case?
sivteck has quit [(Quit: user missing.)]
<tanonym>
It's a Chewie wif USB sticks! He deploys them from his trusty USBowcaster. :D
<tanonym>
My / partition.
<hyper_ch>
no
<clever>
tanonym: zpool create formats the partition you give it
<hyper_ch>
your run zpool create
<clever>
tanonym: you dont need to format before formatting
<tanonym>
Okay.
<sphalerite>
clever: turns out just adding ncurses and pkgconfig to the build inputs was enough to get the build system to detect it for menuconfig
<tanonym>
Do I need to worry about giving my zpool a label?
dywedir has quit [(Remote host closed the connection)]
<joko>
tanonym: not at all
<ArdaXi[m]>
You'll want to give it a name, yeah
<clever>
sphalerite: ah, nice
<joko>
The name of the pool is automatically detected to be imported
<tanonym>
zfs create -o mountpoint=none rpool/tank /dev/sdaX is the command I want?
<joko>
I don't think you have to set any part label
<tanonym>
Or zpool create -o rpool tank /dev/sda3?
<Lisanna>
Also, since the intent of this is to install Nix on a disk image, the nix-channel --update nixpgks step is going to result to give different results fairly frequently, and I don't see a way to lock it to a specific version ):
<tanonym>
Any other options I should be passing.
<ArdaXi[m]>
You probably want either rpool, tank, or some other name for your pool
<ArdaXi[m]>
Not both rpool and tank
<hyper_ch>
zpool create -o ashift=12 -o altroot=/mnt { pool name } /dev/sda3
<tanonym>
Ah, thanks, hyper. Wasn't clear from the wiki :)
<ArdaXi[m]>
You should know what you're doing before you set ashift
<infinisil>
Why would i want a different dataset is my question, <pool> is already one, and perfectly fit for /
<clever>
tanonym: this is where i mount all of the datasets, activate swap, and mount the boot partition to boot
<hyper_ch>
infinisil: everything you set as option there gets inheriated to child datasets
<hyper_ch>
so I could e.g. make a dataset "transient"
LexLeoGryfon has joined #nixos
<tanonym>
I just generated root config.
<hyper_ch>
and have stuff in there like tmp, cache etc....
<hyper_ch>
oh well :)
<tanonym>
Now I'm up to defining bootloader and other configuration.nix editing
<hyper_ch>
I like grub
<infinisil>
I do set options on the root dataset, which are compress=on, so i have compression inherited by all datasets
<hyper_ch>
on? not lz4?
<clever>
hyper_ch: on will use the "best" compression algo, as set in the source
<infinisil>
lz4 is the default when set to on for now, if a better algorithm is added, on uses the new one
<clever>
i think lz4 is the best for speed, and gzip-9 is the best for storage
<clever>
gzip-9 does have a noticable impact on latency
<hyper_ch>
on /tmp you probably don't want compression
<clever>
some people even put a tmpfs on /tmp/
<infinisil>
Not sure, I mean compression is pretty cheap anyways
<hyper_ch>
yep, me :)
<LexLeoGryfon>
hey, first of all thank you for great OS and stuff. I'm currently running nixos-install on VM, everything is fine. Small question - where is the option\support in configuration.nix for syslinux bootloader? (I don't use\like GRUB, and always prefer syslinux on my systems)
<clever>
hyper_ch: u-boot also supports the same syntax
<hyper_ch>
:)
<Dezgeg>
in other words, syslinux on x86 is not supported
<infinisil>
Actually, the isoimage seems to be using syslinux
<LexLeoGryfon>
how can I add syslinux support on my machine? ( I know how to install it manualy, but how can I add support\extension option for NixOS configuration.nix) ?
<candy`>
gchristensen: error: getting status of ‘/nix/var/nix/profiles/per-user/root/channels/nixpkgs/lib/minver.nix’: No such file or directory
chrilves has quit [(Ping timeout: 246 seconds)]
<gchristensen>
wat
chrilves has joined #nixos
<infinisil>
that seems like a botched nix installation
<candy`>
I try to install nix on centos for multi user to be able to use on our HPC cluster
<gchristensen>
ughh I wish I could help you more right now, I've done that, but I've got to go
<candy`>
ok thx gchristensen
chrilves has quit [(Remote host closed the connection)]
<LexLeoGryfon>
gentlemen, I don't get few things : 1) where should I commit\change any scripts to add additional option\functionality to NixOS configuration.nix ? 2) let's say I want to add an option that executes few system calls and write MBR to disk, how could I do that in Nix language?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] copumpkin pushed 2 new commits to master: https://git.io/vFJnL
<NixOS_GitHub>
nixpkgs/master c3d2479 Brian McKenna: sbt-extras: init at 77686b3...
<NixOS_GitHub>
nixpkgs/master c3760f6 Daniel Peebles: Merge pull request #30811 from puffnfresh/package/sbt-extras...
NixOS_GitHub has left #nixos []
<LexLeoGryfon>
I understand how to do similiar stuff in Chef\Ansible, how to extend them with ruby\python and achieve anything. But I don't get how to extend\contibute to Nix?
rogue_koder has quit [(Ping timeout: 240 seconds)]
<LexLeoGryfon>
tanonym: set to "4e98920d" if you don't share zpool across many devices or generate yours
damke has quit [(Ping timeout: 240 seconds)]
cfricke has joined #nixos
<LexLeoGryfon>
actually that networking.hostId should be added\mentioned in ttps://nixos.wiki/wiki/NixOS_on_ZFS )
Guest40950 has quit [(Changing host)]
Guest40950 has joined #nixos
Guest40950 is now known as TweyII
a6a3uh has quit [(Quit: Bye)]
<tanonym>
I generated one according to the option page.
<hyper_ch>
just used a 8 charcter hex :) could even be 12345678 :)
<tanonym>
I must say the expressions are nice to read, it's pretty clear what's going on in them for the most part. Like making sense of the xml files for Dragon Age Origins.
<ArdaXi[m]>
If you only have one disk, scrubbing isn't extremely likely to be helpful, other than to detect a failing disk early
<tanonym>
So snapshots on, but autoscrubbing off?
<tanonym>
I only have a 300GB disk
<tanonym>
Hopefully won't chow through the space too fast
<ArdaXi[m]>
Snapshots are nice to be able to retrieve files you've accidentally deleted, you can always delete old snapshots if you run low on space
asdfoiawe has quit [(Ping timeout: 258 seconds)]
<tanonym>
Okay. I'll enable that once the install finishes and I've rebooted.
<Lisanna>
Can a nix-channel have derivations that are nested? e.g., allowing a user to type nix-env -i foobars.fooiest.fooBar2
<clever>
Lisanna: yes
<clever>
Lisanna: derivations can have attributes, which could be more derivations
rotaerk has quit [(Ping timeout: 246 seconds)]
<etu>
tanonym: Snapshots usually only take any space when you change files. It can be bad if you have huge files that you change.
<Lisanna>
it's interesting that nixpkgs doesn't use this more often... all the derivations which can fully evaluate are flattened to the top-level
<tanonym>
etu: that's handy
<clever>
Lisanna: pkgs.chromium is a shell script wrapper arround the open-source build, that sets where to find plugins and such
<clever>
Lisanna: pkgs.chromium.browser is the raw derivation that built the browser itself, with no ability to load plugins from nixpkgs
trevorriles has joined #nixos
<etu>
tanonym: When I was running btrfs with snapshots, I used to make a subvolume for certain places which contained temporary/non-important/big files to avoid snapshots of them :)
trevorriles has quit [(Client Quit)]
<clever>
etu: thats why i have a seperate dataset for /nix in my zfs setups, so i can turn snapshots off for that
<ArdaXi[m]>
I only really make snapshots of /home, nothing else has any data that I care about and can't easily restore
mbirkis has quit [(Read error: Connection reset by peer)]
<clever>
ArdaXi[m]: for nixos, you also want to save at least /etc/nixos/ so you can rebuild things
<tanonym>
If I run the snapshot commands before rebooting it would be zfs set com.sun:auto-snapshot=true /mnt/<pool>/<fs>
<ArdaXi[m]>
clever: I've got /etc/nixos replicated on GitHub and backed up
<clever>
tanonym: its just pool/fs
a6a3uh has joined #nixos
<clever>
ArdaXi[m]: i also keep mine in git, but i dont update it often enough
<ArdaXi[m]>
The weird failure case where my /etc/nixos disappears but the snapshot is still there isn't really worth the effort of getting it into a separate dataset
justanotheruser has joined #nixos
<clever>
ArdaXi[m]: the snapshots are more for undo, when the text editor cant undo far enough
<tanonym>
Which so snapshot root and nix I guess? I already backup home files in my SpiderOak
<ArdaXi[m]>
Yeah, I can see the merit
<clever>
i turn snapshots on for the pool, and off for pool/nix
<ArdaXi[m]>
tanonym: I'd still include home, maybe only the ones that run more frequently than your backups
<tanonym>
so zfs set com.sun:auto-snapshot=true tank and com.sun:auto-snapshot=false tank/nix?
<NixOS_GitHub>
[nixpkgs] rycee closed pull request #30812: mpg321: add pkg option to set libao default audio driver (master...mpg321-defaultAudio) https://git.io/vFf43
NixOS_GitHub has left #nixos []
sphalerite__ has joined #nixos
pie_ has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] gnidorah opened pull request #30827: SDL2: wayland support (staging...sdl) https://git.io/vFJzX
NixOS_GitHub has left #nixos []
mutagenfork has joined #nixos
tanonym has joined #nixos
<tanonym>
Well, that was anticlimactic. After all that, it doesn't even boot.
<tanonym>
FFS
Isorkin has quit [(Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)]
<tanonym>
I think I forgot something in configuration.nix to get GRUB to boot from the ZFS file system.
ssmike has quit [(Ping timeout: 246 seconds)]
<tanonym>
Now I can't even mount the filesystems because it can't open the data set.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] gnidorah opened pull request #30828: xwayland: enable acceleration with help of glamor (master...xwayland) https://git.io/vFJzp
NixOS_GitHub has left #nixos []
<tanonym>
yes
cement has joined #nixos
<sphalerite__>
tanonym: how does opening the data set fail?
sphalerite__ has quit [(Quit: Page closed)]
<tanonym>
I'm trying to do a reinstall.
jophish has quit [(Remote host closed the connection)]
<tanonym>
When I tried to boot the zfs install it just dumped me to PXE, grub wasn't even an option.
<tanonym>
I'm just going to wipe the whole thing and try again.
<clever>
tanonym: it helps to know what you did wrong, or you are doomed to repeat that failure
<tanonym>
Following the justdoit expression :)
tanonym has quit [(Quit: Lost terminal)]
rotaerk has joined #nixos
whald has quit [(Ping timeout: 258 seconds)]
trevorriles has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
Wizek has joined #nixos
trevorriles has joined #nixos
adamt_ has quit [(Ping timeout: 240 seconds)]
Isorkin has joined #nixos
tanonym has joined #nixos
dieggsy has quit [(Ping timeout: 252 seconds)]
jb55 has joined #nixos
<hyper_ch>
clever: how would you partition a 4TB drive for zfs? I assume it need gpt and hence a bios boot partition when using legacy... or would you use efi?
riclima has joined #nixos
ylwghst has joined #nixos
<clever>
hyper_ch: legacy with biosboot
<hyper_ch>
so still 3 partitions needed
<clever>
yeah, biosboot, /boot, zfs
<hyper_ch>
annoying :)
<hyper_ch>
thx
<LexLeoGryfon>
ye, what will be correct hex code for boot partition and boot loader? on uefi+gpt+zfs. cuz manual says use EF00 and systemd-bootloader. and zfs manual says use grub but grub recongnizes only EF02
<clever>
1 EFI System C12A7328-F81F-11D2-BA4B-00A0C93EC93B
<clever>
LexLeoGryfon: this typecode for fdisk, when you want to boot with efi
<infinisil>
hyper_ch: Yeah I know what I said, but I don't get your question, you asking for the usecase of uefi?
<infinisil>
Hi ldlework
* hyper_ch
heard whenever someone mentions u/efi, God slays a baby seal
<hyper_ch>
infinisil: I just hate uefi with all my heart :)
<infinisil>
Why?
asdfoiawe has joined #nixos
<infinisil>
I mean I don't have a strong opinion on that, I just saw uefi being the more modern thing and most new computers using that, so I went with it, I don't have a usecase other than booting with it
<TweyII>
What's a good way to do something in Nix based on a file inside the source distribution? src.out refers to the *packed* source, no? So if I want to readFile ${src}/path/to/file, it doesn't exist yet
trevorriles has quit [(Ping timeout: 248 seconds)]
<clever>
TweyII: stdenv.mkDerivation will unpack it at the unpackPhase, so if its the source for your own thing, you can just refer to it in the local directory
<tilpner>
What is src? It could be a file
<TweyII>
tilpner: I have src, which is a tarball, and I'd like to readFile a file inside the tarball and put the content into an attribute of my derivation argument
<TweyII>
clever: No, src comes from the Internet (fetchurl)
<tilpner>
TweyII - Using ${src}/something doesn't automatically unpack src. A derivation automatically unpacks it for you, as clever said, so you don't have to worry about that
<tilpner>
TweyII - But don't use ${src} in your phases for that
<TweyII>
tilpner: Right, exactly. But ideally I want to see the contents of src *in Nix*, not in my builder (which is a shell script) to set some environment variables for the builder
riclima has quit [(Ping timeout: 264 seconds)]
<tilpner>
TweyII - You can't generally unpack a tar into the store, permissions are restricted
<TweyII>
Hm :-\
<tilpner>
TweyII - For some tars that may be possible, so you could create a derivation that unpacks a tarball, and puts the result into the store, so that you can refer to it
<tilpner>
What tar is it?
<TweyII>
It's okay, I guess I can do it in my builder
<TweyII>
I guess I just wanted to write Nix rather than bash :þ
<TweyII>
tilpner: It's a crate from crates.io — so it's a tarball that contains the package source and also a manifest file, that contains information about how to build the package
<tilpner>
That should work then
Itkovian has quit [(Ping timeout: 240 seconds)]
* tilpner
looks up crate verification rules
p4cman has joined #nixos
<ldlework>
I have copied rycee's method of installing right from GitHub. Setup a Nix based dotfile management with just three quick commands! Two if you already have nix! https://dustinlacewell.github.io/home-manager-helper/
<tilpner>
TweyII - cargo package doesn't mind suid files, I don't know if the crates.io backend does verification against that
Itkovian has joined #nixos
<TweyII>
tilpner: I'm not using Cargo
MercurialAlchemi has quit [(Ping timeout: 246 seconds)]
<tilpner>
TweyII - But the person who uploaded to crates.io used cargo
riclima has joined #nixos
<TweyII>
tilpner: Sorry, I don't understand your suggestion then
<tilpner>
There was no suggestion, just a warning
<TweyII>
Oh, right, the unpack derivation — yes, that's an option, but I think I prefer writing it in bash
<tilpner>
If crates.io allows to upload suid files, whatever you're building will not work for all files
<tilpner>
*for all crates
<TweyII>
I'll just pass some tools into the build to make querying it not horrible
<tilpner>
(There might be other limitations)
jtojnar_ has quit [(Remote host closed the connection)]
<TweyII>
tilpner: Wait, you're saying I'll fail to build some packages because some crates might have files in them with suid permissions? I'm not sure I want to succeed at building such a thing…
johnw_ is now known as johnw
<tilpner>
That was just an example, the store might have other limitations. Unfortunately I don't know what exactly it restricts. Most crates will build fine with standard permissions, some horrible hacks might not work
johnw has quit [(Changing host)]
johnw has joined #nixos
orivej has quit [(Ping timeout: 240 seconds)]
erasmas has joined #nixos
drakonis_ has joined #nixos
vandenoever has quit [(Ping timeout: 255 seconds)]
drakonis has quit [(Ping timeout: 255 seconds)]
tanonym has quit [(Ping timeout: 260 seconds)]
snikkers has quit [(Ping timeout: 240 seconds)]
<ldlework>
rycee on the home-manager readme you used to have instructions regarding some paths that might need to be manually created on non-NixOS systems
<ldlework>
Those instructions seem gone now. I think they are still needed.
vandenoever has joined #nixos
asdfoiawe has joined #nixos
ylwghst has quit [(Ping timeout: 264 seconds)]
<ldlework>
Although I'm now not even seeing those instructions in the README
<ldlework>
something about having to create some gcroot based folder, and some other folder...
<ldlework>
ln: failed to create symbolic link '/nix/var/nix/gcroots/per-user/tpratt/current-home': No such file or directory
<copumpkin>
or rather, High Sierra is broken, and Nix triggers it
<ldlework>
Ah yeah I see the ticket.
kiloreux_ has joined #nixos
<ldlework>
That is some serious bad-news, lol.
Lisanna has quit [(Ping timeout: 260 seconds)]
<samueldr>
what's broken?
<samueldr>
I have some coworkers using macOS, don't know if they updated
<ldlework>
samueldr it locks up the system
<adisbladis>
samueldr: kill() in OSX does not do privilege checks
<samueldr>
I haven't been screamed at for broken nix environments
<copumpkin>
you can run nix in single user mode and it'll be fine
<samueldr>
ah
<ldlework>
copumpkin I'm having my coworker try that now
<copumpkin>
it's just that the default install triggers the horrible bug
<samueldr>
hmm
ertes-w has quit [(Ping timeout: 255 seconds)]
<samueldr>
default install, as in using the script from nix's page?
<adisbladis>
Single use nix works great for those at my work getting hit
<copumpkin>
will probably put out some sort of workaround soon at nixcon
kiloreux has quit [(Ping timeout: 264 seconds)]
<LnL>
htop aparently also runs into issues
<ldlework>
Maybe if the install script simply detected high-sierra and then informed the user that it would be installed in single-user mode
rogue_koder has joined #nixos
<betaboon>
when writing a module i can never decide on how to sort the options. by name? by functional context? I'm lost XD someone has a sane rule of thumb ?
<ldlework>
randomize them
<ldlework>
then you don't need to worry
<betaboon>
rearrange on every commit ? XD
<ldlework>
hehe
<betaboon>
best commits. people switching tabs vs spaces xD
chessai has quit [(Remote host closed the connection)]
lissyx has joined #nixos
Isorkin has quit [(Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)]
tanonym has joined #nixos
peacememories has joined #nixos
jgertm has quit [(Ping timeout: 240 seconds)]
ma27 has joined #nixos
Neo-- has quit [(Ping timeout: 240 seconds)]
bennofs has joined #nixos
ylwghst has joined #nixos
ahstro has joined #nixos
<lebel>
I have a VM that is working under VirtualBox on my NixOS host that I'd like to start at boot time via systemd with VBoxHeadless. My .service file is built fine, but when I try to start the server, I have the error "VERR_VM_DRIVER_NOT_ACCESSIBLE -- The support driver is not accessible. On linux, open returned EPERM."
<ahstro>
Is it possible to optionally import a nix file? I'm trying to keep all my `networking.networks` in a separate file so I don't version control my passwords
drakonis has joined #nixos
chessai has joined #nixos
<samueldr>
lebel: is the user for the service in the right groups?
<infinisil>
ahstro: Of course, just do `imports = [ ... ] + lib.optionals (your condition) [ your optional imports ]
drakonis_ has quit [(Ping timeout: 255 seconds)]
<lebel>
Yes. I have the same error when I manually execute the headless command. Anyway, the service entry in my configuration.nix is as follow on https://pastebin.com/aKwEPKf1
ylwghst has quit [(Ping timeout: 240 seconds)]
<infinisil>
ahstro: What I like to do is `imports = [ ./private ];` where private is a git submodule of a private repository where i keep some sentitive stuff, in there i set all the private options, could also be networking stuff
Isorkin has joined #nixos
<ahstro>
infinisil: That's a smart move! Thanks for the tip
<samueldr>
not sure, but `Group=` in the service definition is different from the groups the user is a member of
asdfoiawe has quit [(Ping timeout: 258 seconds)]
<samueldr>
as the user, execute `groups` and ensure you have `vboxusers` in there
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
damke has joined #nixos
<sphalerite>
What is `types.package`? I've made an attempt at putting together a firmware package just using runCommand, but it's complaining that it's not a package
ylwghst has joined #nixos
damke_ has quit [(Ping timeout: 240 seconds)]
work_ has quit [(Quit: Connection closed for inactivity)]
<infinisil>
ahstro: Well that's what I would like to have, I just set this up a few days ago, gonna transition all private stuff to that next ;P
<infinisil>
i have it set up, just not for all private stuff yet
<sphalerite>
clever: but… the result of runCommand *is* a derivation…
<sphalerite>
oooooh I'm just using runCommand wrong >_> was missing the env vars set
tanonym has quit [(Quit: Lost terminal)]
<clever>
ahh
<clever>
so you gave it a lambda that was wanting 1 more arg
<sphalerite>
yep
peacememories has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<infinisil>
I want types already..
<lebel>
I guess, my question is more inline as if there is someone out there that is running VirtualBox guests under a NixOS host and starting the virtualmachines with systemd. I can't google it for the life of me :)
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] jwiegley closed pull request #30708: coqPackages.QuickChick: remove support for coq 8.7 (master...fix-quickchick) https://git.io/vdAMC
NixOS_GitHub has left #nixos []
sigmundv has joined #nixos
<lebel>
(I want to run an OpenBSD guest is always up)
orivej has quit [(Remote host closed the connection)]
orivej has joined #nixos
sivteck has quit [(Quit: user missing.)]
jgertm has joined #nixos
<ylwghst>
clever: pls what is the proper way to test variables in nix-repl after loading nixpkgs variables? i always forgot
chessai has quit [(Remote host closed the connection)]
erictapen has quit [(Ping timeout: 240 seconds)]
<clever>
ylwghst: test what kind of variables?
<ylwghst>
${alsaUtils} for example
<hyper_ch>
so, just enabled remote zfs unlocking on home server
<ylwghst>
${pkgs.alsaUtils}
<clever>
ylwghst: quote the whole thing
tanonym has joined #nixos
erictapen has joined #nixos
betaboon has quit [(Quit: WeeChat 1.9.1)]
betaboon has joined #nixos
<ylwghst>
thats it thx
<tanonym>
Whee! ZFS is running!
<tanonym>
Now to tweak themes and icons and such :)
<nixo[m]>
Whats the state of hercules-ci? I see there has not been activity for a while
c0bw3b has joined #nixos
<hyper_ch>
tanonym: check here how you can regulate the number of auto snapshots with cour configuration.nix https://nixos.org/nixos/options.html#zfs.autosnapshot
riclima has joined #nixos
seppellll has left #nixos ["Leaving"]
<ylwghst>
clever: if I'm writing a package and got .deb package.. is it a good to define installPhase where It will copy all binary files into locations where they are supposed to be?
<ylwghst>
where points $out , $libExecPath or $buildPath is there any reference abou these variables?
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] nyarly opened pull request #30833: (jira-cli) init at 2.2 (master...jira_cli) https://git.io/vFJxn
NixOS_GitHub has left #nixos []
a6a3uh has quit [(Quit: Bye)]
<tanonym>
Looking now hyper_ch
<tanonym>
auto snapshots are on the expected channels /root and /home but not /nix.
<hyper_ch>
tanonym: zfs list -t all
<hyper_ch>
you should have at least frequently snapshot meanwhile
<tanonym>
Yeah.
<noobly>
so DrRacket isn't aviable right?
<ArdaXi[m]>
ylwghst: $out is where the builder is expected to put all its files, so $out/bin will be in your path if you install the package, for example
<hyper_ch>
tanonym: if you enable snapshotting and haven't set anything, by default it will make frequently, hourly, daily, weekly and monthly snapshots
lissyx has quit [(Ping timeout: 240 seconds)]
<tanonym>
I have left it with the defaults for the moment.
<hyper_ch>
tanonym: you can turn off some of them for different datasets and you can set the amounts for each type in your configuration.nix
<hyper_ch>
tanonym: so, just play around it :)
<LnL>
noobly: we have a racket package
sivteck has joined #nixos
<noobly>
oh I think I see what's going on, I'm 32 bit
<hyper_ch>
also at the full hour, not a frequent snapshot will be made but a hourly
<ArdaXi[m]>
Or, well, $out is a lot more common anyway
<c0bw3b>
what kind of formatting is possible in the longDescription of a package ?
<hyper_ch>
same for full day at midnight or full week (sunday midnight)
<ylwghst>
i missed it
<TweyII>
$out is also not special
<TweyII>
The first output listed is special
<c0bw3b>
for example if one would like to refer to another derivation/package, how should it be written? "package" <package> `package` or html tags or bbcode or ...? :p
oida has quit [(Ping timeout: 260 seconds)]
<infinisil>
docbook
<infinisil>
And there are some special xml attributes and stuff for nix
<noobly>
how linux savvy would I have to be to get racket to work on my 32 bit?
<infinisil>
I have absolutely 0 clue where to find info on that though
<c0bw3b>
ok thanks infinisil that's something to start with
<infinisil>
If I need some special formatting in a description, I just look through other packages and hope i find what i need
* TweyII
didn't know that
<c0bw3b>
I couldn't find an example in the nixpkgs tree... but maybe did not search enough
damke has quit [(Ping timeout: 240 seconds)]
<tanonym>
Interesting: if I am upgrading a home server's drives piecemeal, then it's actually advantageous to use btrfs over zfs.
<infinisil>
c0bw3b: Ah, I'd just use <literal>name</literal> for that
<infinisil>
equivalent to `name` in markdown (but you can't use markdown)
<infinisil>
Why the hell can't we just switch everything to markdown goddamnit
<c0bw3b>
ah! thanks a lot infinisil exactly what I was looking for
<ArdaXi[m]>
tanonym: I'd honestly be wary of those fancy 'conversion' tools on data I care about
<tanonym>
That's a fair point, but since I have such a low budget I would have to frankenstein a file-server for myself, that is a risk I'd have to take and probably have important stuff either in hardcopy or saved to teriary drives.
digitus has joined #nixos
<tanonym>
At some point I'll have to stop being a lazy butt and move my motherboard and stuff to the new case I got.
a6a3uh has joined #nixos
Itkovian has joined #nixos
<tanonym>
Well, second-hand and missing a couple of panels (Antec Sonata Proto... but it did come with a 500W PSU in it for $60 instead of the $100 it would have cost new)
<ldlework>
rycee that command needs to run as root right?
Itkovian has joined #nixos
Itkovian has quit [(Client Quit)]
<noobly>
so I downloaded the .sh file for 32-bit DrRacket but could not get it to run, missing "rm" apparently. What might this mean in this context?
<rycee>
No, I think it should work when run as your user.
glenn has joined #nixos
a6a3uh has quit [(Quit: Bye)]
<tanonym>
Hm, downloaded icon themes, restarted E, but they still are not appearing in the settings menu. Usually restarting the DE should be enough.
<ahstro>
Anyone here running Neovim and would like to share their nix config? Not quite sure how to use it
<noobly>
anyone? maybe it's because nixos doesn't put the usual utilities in /bin?
glenn has quit [(Ping timeout: 240 seconds)]
kkini has quit [(Remote host closed the connection)]
kkini has joined #nixos
<ghostyyy>
noobly, your $PATH should be set to point to that program
chessai has joined #nixos
<schoppenhauer>
hi. does anyone else have the problem that palemoon segfaults?
<ghostyyy>
so it could be that the racket program assumes a specific path for rm, or modifies $PATH
<schoppenhauer>
it randomly segfaults on my computer shortly after i start it
Itkovian has joined #nixos
<schoppenhauer>
and i do not really know what to do about it.
tanonym has quit [(Quit: Lost terminal)]
ryantm has quit [(Quit: Connection closed for inactivity)]
<schoppenhauer>
this seems to be nixos-specific, however
<chessai>
Does anyone here use XMonad? I've been wondering what the simplest way to get started with XMonad on NixOS is
<lebel>
Is it me, or is it that when running under systemd's .service file, modules loaded for VirtualBox aren't loaded or accessible? Like with some sort of SE Linux permission?
<noobly>
ghostyyy: ok thanks, don't really know what that means but I'll work on interpreting it
<noobly>
am noob
<ghostyyy>
noobly, nixos has a racket package, maybe you should try using that?
<noobly>
I have racket v6.8 alreaady installed on my laptop
<bgamari>
Sonarpulse, ping
<noobly>
but I haven't used the laptop consistently since June, so I forgot how I had this all working
<noobly>
I know I was compiling racket programs at one point though, and it'd be nice and easy if I could set up DrRacket. Also, in regards to that link you provided, it's for 64 bit machines, I'm 32 bit so maybe that's part of my issue..?
tanonym has quit [(Client Quit)]
<hyper_ch>
Mic92: you've been using zfs encryption for a while now, right?
<TweyII>
chessai: And ~/.xsession that runs xmonad
<TweyII>
Is what I use
stanibanani has joined #nixos
lebel has quit [(Remote host closed the connection)]
frankqux1 has quit [(Ping timeout: 248 seconds)]
jumblemuddle has joined #nixos
<jumblemuddle>
I've got an issue where after a random amount of uptime, my mouse (trackpad, trackpoint, external usb mouse, synergy) stops working, and the backspace key doesn't work (again, through any keyboard). Any ideas? Give me a sec to share my config.
bennofs has quit [(Ping timeout: 258 seconds)]
snikkers has quit [(Ping timeout: 248 seconds)]
mutagenf1rk has quit [(Ping timeout: 248 seconds)]
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<hyper_ch>
Mic92: how do you send your encrypted datasets? do you use raw or do you send them to pool also with encrypted dataset as childset?
<Mic92>
hyper_ch: I have never done that
<hyper_ch>
:)
<hyper_ch>
well, finally set homeserver to nixos with root zfs
<hyper_ch>
and just tested to send notebook/encZFS/Nixos -> homeserver/encZFS/xxxx
<hyper_ch>
that works fine
<jumblemuddle>
showkeys in a tty shows the backspace key working just fine, so I'm led to belive it's an xorg issue
<TweyII>
Why are people talking about ZFS so much lately? Did something new happen in ZFS development? Or has everyone just finally given up on ext4 and btrfs?
<jumblemuddle>
I'm running the latest unstable channel
<TweyII>
jumblemuddle: Sure it's not some application grabbing your input?
<jumblemuddle>
Yeah, nothing like that unfortunately. :/
<hyper_ch>
clever: Mic92: Just saw some code from tcaputi doing: echo password | zfs create -o encryption=on -o keyformat=passphrase pool/encrypt --> nice way to provision automatically the encryption password
<TweyII>
It doesn't sound like a hardware issue because Synergy, but also it sounds pretty weird to be an Xorg issue given that mouse input and just backspace stops working
<clever>
TweyII: ive found that synergy behaves very very weirdly if i renice certain processes
<jumblemuddle>
It looks like there might be some other keys too. If I open up rofi (similar to dmenu), I can close it or backspace. I have to tty out and kill it.
<TweyII>
clever: Yeah, but it's not *just* Synergy, it's all mouse input
<clever>
ah
<jumblemuddle>
Killing synergy doesn't do anything either.
<TweyII>
jumblemuddle: Can you open up a xev?
<jumblemuddle>
Yeah, I've tried that. No backspace key being reported
<clever>
TweyII: also be aware, that synergy disables key-repeat on the clients, when they have focus
<clever>
TweyII: and re-enables repeat when the client looses focus
<TweyII>
jumblemuddle: What other keys are/aren't reported?
<jumblemuddle>
Wait, xev is reporting backspace. I spoke too soon.
<infinisil>
TweyII: Actually, the windowManager.xmonad.enable shouldn't do anything, it gets entirely ignored if you have ~/.xsession
<TweyII>
Okay, so Xorg is in the clear
erictapen has quit [(Ping timeout: 264 seconds)]
<TweyII>
infinisil: Oh really. Ha.
<TweyII>
infinisil: I didn't understand Nix very well when I wrote this config.
<jumblemuddle>
And backspace works in emacs... Zsh in St is the only space backspace doesn't work.
<TweyII>
jumblemuddle: St is a terminal?
<TweyII>
jumblemuddle: What about in xterm?
<taaperotassu>
How to check what notification daemon's are running?
<jumblemuddle>
Yeah, you totally were. :P No visible application though.
<jumblemuddle>
Yeah, that's what kept me from looking into that. I guess st and/or zsh are doing something weird there.
<TweyII>
st I suppose, but I'm not sure how they'd be connected
sivteck has quit [(Quit: user missing.)]
<TweyII>
Maybe if it only sends backspace if you have a cursor over the terminal, or something silly like that
<jumblemuddle>
I recall some journalctl message that was run every time st was started while the mouse wasn't working about utf 8 mouse mode or something.
<jumblemuddle>
:shrug:
<TweyII>
‘UTF-8 mouse mode’… how mystifying
sivteck has joined #nixos
<jumblemuddle>
Can't reproduce now
<jumblemuddle>
Might not have been that, but I'm pretty sure it was UTF-8 for whever reason.
<ylwghst>
clever: so installPhase copied etc/ and usr/ from binary package into $out after installing package into user-environment package files are in /nix/store/ but there aren't links in .nix-profile
<jumblemuddle>
TweyII: Heh, interesting.
<clever>
ylwghst: .nix-profile links the bin subdir, but you have a usr/bin/
<clever>
ylwghst: you need to move $out/usr/bin to $out/bin
mutagenf1rk has joined #nixos
<jumblemuddle>
Anyways, I've gotta get going. Thanks, TweyII, clever!
<ylwghst>
clever: i fixed this by ln -s $out/usr/bin/binary $out/bin
<ylwghst>
but actually its not working
jumblemuddle has quit [(Quit: Page closed)]
huhni2000 has quit [(Quit: Page closed)]
<TweyII>
ylwghst: NixOS generally doesn't use the /usr distinction, so you probably want to mv $out/usr/bin $out/usr/lib $out anyway
lissyx has joined #nixos
<ylwghst>
clever: i see
<ylwghst>
TweyII: youre right :D
<ylwghst>
ok
<infinisil>
TweyII: ylwghst: You'll want $out/lib
<infinisil>
and $out/bin
<TweyII>
infinisil: That's what I said ;)
<ylwghst>
good
<ylwghst>
now i got it
<infinisil>
TweyII: Ohh sry, didn't read right
<TweyII>
infinisil: mv can be tricky!
<ylwghst>
i actually did it this way cp -r usr/* $out
<clever>
pass -v to both cp and mv, to see what its doing
<Sonarpulse>
bgamari: pong
<infinisil>
That's probably why busybox keeps showing all those symlinks during building..
hamishmack_ has joined #nixos
<bgamari>
Sonarpulse, so the problem isn't that propagated dependencies aren't being propagated in the cross case
<bgamari>
Sonarpulse, the problem is more fundamental
<Sonarpulse>
bgamari: oh!
<bgamari>
Sonarpulse, the ld-wrapper only adds -rpaths for libraries that are explicitly listed as a -l in the compiler command line
<bgamari>
Sonarpulse, so we don't end up with transitive dependencies in the search path
hamishmack has quit [(Ping timeout: 248 seconds)]
hamishmack_ is now known as hamishmack
<bgamari>
since ld doesn't search shared object RPATHs when cross compiling
<Sonarpulse>
bgamari: I wonder also if the old gcc-cross-wrapper did --rpath-link
<Sonarpulse>
I forgot to check that
<ylwghst>
how i should do test build of my package? should I always do nix-env -e package and nix-env -f /pkgs -i package to try build it ?
<infinisil>
nix-env -i also removes the old one, no need to uninstall it first
<ArdaXi[m]>
You can just do nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
<ArdaXi[m]>
In the directory with your derivation, replacing default.nix with the filename if necessary
radivarig has joined #nixos
<ArdaXi[m]>
That should drop a `result` symlink in your current directory which contains the build output
tanonym has joined #nixos
snikkers has joined #nixos
<ylwghst>
infinisil: good
<bgamari>
Sonarpulse, right
<bgamari>
it looks like it's doing something similar
<bgamari>
I don't see how this could possibly work
<Sonarpulse>
bgamari: my best hope now
<Sonarpulse>
is that with --enable-targets=all
<Sonarpulse>
it will indeed traverse --rpath recursively
<Sonarpulse>
not just --rpath-link
<bgamari>
I don't see why it would
radivarig_ has quit [(Ping timeout: 248 seconds)]
<bgamari>
the documentation is pretty clear here
<Sonarpulse>
because --enable-target=all is kind of "more native", perhaps?
<Sonarpulse>
if you pass -mi386 or whatever
leat has quit [(Quit: WeeChat 1.9.1)]
<Sonarpulse>
to a native linker
<Sonarpulse>
does the --rpath behavior change?
<Sonarpulse>
I'm guessing --target=foo and --enable-target=foo don't precisely align in autoconf for no good reason
<ahstro>
CrazedProgrammer: Thanks! That looks like it makes enough sense for me to grasp
<Sonarpulse>
but in this case that incongruence might be to our advantage
<bgamari>
it doesn't seem like a good idea to exploit this though
leat has joined #nixos
<Sonarpulse>
bgamari: perhaps yeah
<Sonarpulse>
but the documented behavior seems stupid to me too
lissyx has quit [(Ping timeout: 240 seconds)]
jb55 has quit [(Ping timeout: 255 seconds)]
<Sonarpulse>
I understand no wanting to look at --rpath
<Sonarpulse>
if the deploy locations were different than the dev locations
<bgamari>
Sonarpulse, it looks like this is a characteristic of the elf32 emulation
<bgamari>
Sonarpulse, so I wouldn't be surprised if it made no difference
<Sonarpulse>
oh, you mean only elf32 looks at --rpath?
<bgamari>
the behavior is defined around line 1462 of ld/emultempl/elf32.em
<Sonarpulse>
ewwww!
<bgamari>
of binutils-gdb
<Sonarpulse>
cheking
reinzelmann has quit [(Quit: Leaving)]
<bgamari>
NATIVE is defined in the .sh files ld/emulparams, for instance ld/emulparams/elf32_x86_64.sh
<bgamari>
which checks that if [ "x${host}" = "x${target}" ]; then
<Sonarpulse>
ah
<Sonarpulse>
yuck yuck
Lisanna has joined #nixos
a6a3uh has joined #nixos
<bgamari>
Sonarpulse, I mean, we could possibly chase the dependency graph ourselves
<bgamari>
although that would almost certainly require caching to be performant
glenn has joined #nixos
<bgamari>
alternatively we could patch ld
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nix] orivej opened pull request #1633: Update the language documentation (master...doc) https://git.io/vFUmv
NixOS_GitHub has left #nixos []
<bgamari>
I'm not sure whether gold behaves differently here
<Lisanna>
Can someone help me understand Nix's hashing rules and what impact it has on what sorts of things you can do?
sigmundv has quit [(Ping timeout: 246 seconds)]
<bgamari>
if it does perhaps we could just define the problem out of existence
<bgamari>
and just say that gold must be used for cross
peacememories has joined #nixos
<lebel>
is it a bad habit to use /run/wrappers/bin/ for path for binaries that requires setuids in systemd.services.* ?
<tanonym>
Now to see about getting that NixOS on a stick install working.
<Sonarpulse>
bgamari: I already want to patch binutils
<Sonarpulse>
I got commit access to darwin's LD lol
<Sonarpulse>
(the unofficial fork)
<Sonarpulse>
(that we use)
<Sonarpulse>
so I'm game for patching and upstreaming
<bgamari>
Sonarpulse, well, I don't think such a patch will be upstreamed
<bgamari>
Sonarpulse, this is documented behavior; I don't understand the rationale but it seems that it was quite deliberate
<Sonarpulse>
bgamari: well we wouldn't unconditionally change it
<Sonarpulse>
configurable thing
<Sonarpulse>
as long as we aren't violating default behavior and ELF spec
<Sonarpulse>
I can hope!
glenn has quit [(Remote host closed the connection)]
<Sonarpulse>
granted, I've never dealt with the binutils / gcc people before
<bgamari>
I wish I understood why this is the way it is
<Sonarpulse>
people had a lot of bad ideas about cross!
Isorkin has quit [(Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)]
<Sonarpulse>
I'm *very* used to stupid shit by now :)
<Sonarpulse>
I think just the deploy thing
<Sonarpulse>
"oh, I'm going to copy those binaries to a different prefix on another machine, so RPATH entries would just be misleading"
<bgamari>
heh
requisitebits has quit [(Ping timeout: 240 seconds)]
<Lisanna>
Specifically, I don't understand why networking is disabled for normal derivations, but not for fixed-output derivations. What if I'm okay with all of the dependents being rebuilt of the network result changes?
glenn has joined #nixos
zraexy has quit [(Quit: Leaving.)]
glenn has quit [(Remote host closed the connection)]
glenn has joined #nixos
<TweyII>
Lisanna: Nix is lazy, so you don't know if the network result has changed
<TweyII>
Lisanna: Otherwise you would have to rebuild all network-based derivations every time
<MichaelRaskin>
Lisanna: if network result changes, the hash doesn't match
<Lisanna>
Okay, but I can generate random numbers with /dev/urandom with a normal derivation and have plenty of chaos... so what's special about a network result?
<MichaelRaskin>
If the result is different and the hash is the same, we have a megaproject of migrating off the broken hash function.
<MichaelRaskin>
I am not sure you have access to /dev/urandom.
<Lisanna>
even in runInLinuxVM?
<TweyII>
Even if you do, you shouldn't use it
<MichaelRaskin>
And there are many more derivations that subtly break because of network effects than those who spawn a VM
<TweyII>
It is possible to make non-deterministic builds, I think
requisitebits has joined #nixos
<TweyII>
But it's unwise
<ArdaXi[m]>
You could deliberately create a non-reproducible build, but you really shouldn't
zraexy has joined #nixos
<TweyII>
Lisanna: A derivation is only rebuilt if its inputs change
<TweyII>
Lisanna: Otherwise the result is assumed to be the same as when you built it last time
<Lisanna>
I'm thinking about this in the context of writing tests in Nix. Are the nixpkgs tests fixed-output or normal derivations?
<TweyII>
Lisanna: If that's not true then you have a non-reproducible build — it'll work fine so long as you have it in cache, but might break if you build it elsewhere or after removing it from cache, and all hashes based on that output will be different from everyone else's, so you won't be able to share a binary cache
c0bw3b has left #nixos []
<TweyII>
Lisanna: Tests *in* Nix or tests *for* Nix?
<Lisanna>
all of this kind of stuff, most of it uses runInLinuxVM
<Lisanna>
I'm guessing these are normal derivations?
<ArdaXi[m]>
Are tests derivations?
peacememories has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<Sonarpulse>
bgamari: btw #nixos-dev is now a thing
<Lisanna>
AFAIK they are, I don't know a lot about them, there isn't a lot of documentation on writing them, but it looks like a LOT of tooling work has gone into making those
<Sonarpulse>
vaguely for developing nixpkgs instead of using it
<TweyII>
Yeah, they are, they're built using runCommand
<Lisanna>
I'm thinking about writing tests that use something other than runInLinuxVM, specifically tests that might require network resources. Is having a test be a fixed-output derivation not feasible?
<clever>
Lisanna: this is how you do "networky" things without having internet access
<clever>
Lisanna: it spawns 4 qemu VM's, with 2 networks, and runs the torrent client between things
<copumpkin>
shlevy: I think it was Fuuzetsu who implemented most of that stuff
<copumpkin>
not sure how up to date it is
<shlevy>
Our package doesn't have a standard-library.agda-lib file that the manual says it should have
<TweyII>
I think it's from before that
<Lisanna>
Yeah, I see plenty of that... unfortunately what I meant was something less pure... as in, there is a resource out on the internet / LAN that absolutely cannot be contained on a local machine running Nix, and I want to write tests that are dependent on it doing something or another.
<shlevy>
hmm I'll just clone it from github?
<TweyII>
Lisanna: You want a non-deterministic test?
<Lisanna>
Well, if it's a fixed-output derivation, it's somewhat deterministic
<TweyII>
shlevy: Yeah, I just kept it in a ~/.agda directory and pointed agda at it
<copumpkin>
shlevy: probably, Agda's moved a fair amount recently and unless someone's actively keeping our packages up to date, it's probably olde
<clever>
Lisanna: fixed-output causes its own problems
<shlevy>
OK
<clever>
Lisanna: nix will only run the test once, because you said the content is the same
<clever>
Lisanna: so it wont test new versions of the code
judson is now known as Guest24961
Guest24961 has quit [(Killed (barjavel.freenode.net (Nickname regained by services)))]
Guest48304 is now known as Judson
<MichaelRaskin>
clever: well, there is output name that can change
<Lisanna>
even if the build inputs change?
<Judson>
Is FRidh around?
<shlevy>
copumpkin: Why no nix for agda?
<clever>
MichaelRaskin: but you would need to encode all of $buildInputs into the name to have it rebuild correctly
glenn has quit [(Remote host closed the connection)]
<Judson>
FRidh[m] if you have a second about python expressions...
<MichaelRaskin>
Lisanna: the idea of fixed-output that inputs don't matter.
<copumpkin>
mostly because I haven't done much agda in a while and even when I did I used it with aquamacs and didn't bother figuring out how to make the two worlds collide
<Lisanna>
...okay, so that would be somewhat useless then
<ArdaXi[m]>
This is how, for example, a package can have multiple mirrors
Judson1 has joined #nixos
<MichaelRaskin>
clever: well, I test path /nix/store/hash-name, the test is test-for-hash-name
glenn has joined #nixos
glenn has quit [(Remote host closed the connection)]
glenn has joined #nixos
jb55 has joined #nixos
<MichaelRaskin>
Nix will encode the buildInputs on the step before the test just fine.
<ArdaXi[m]>
It'll pull from whatever mirror it wants, and because it's fixed-output that doesn't change the output
Judson1 is now known as Guest46441
trevorriles has joined #nixos
<MichaelRaskin>
But testing with VMs is cleaner, nicer, doesn't break in mysterious ways when a backhoe digs up your network cable etc.
<clever>
MichaelRaskin: ive had nightmares trying to test things with DHT's on a real network
<clever>
MichaelRaskin: the conntrack limits in routers would make the test fail if you try to test it too often
trevorriles has quit [(Client Quit)]
trevorriles has joined #nixos
<MichaelRaskin>
Fully featured software emulation of a backhoe!
<Lisanna>
I guess what I'm saying is that there are ways to be non-deterministic locally, and there are ways to be deterministic over a network. I'm definitely after a deterministic test, and I'm just looking for some way to "promise" that all of my network stuff is deterministic. If the build inputs change, the test should be evaluated, and the output should be taken as the result, and assumed to never change based on the build inputs.
<Lisanna>
i.e., I guess just a normal derivation, but allowed to access the network.
erictapen has quit [(Ping timeout: 246 seconds)]
<clever>
Lisanna: if the nix sandbox is disabled, then you have full network access and the ability to read anything on the host
<Lisanna>
Okay
jb55 has quit [(Ping timeout: 258 seconds)]
<Lisanna>
isn't it disabled by default?
<Lisanna>
I have it turned on right now
<clever>
i believe nixos has it off by default, but hydra has it on
<MichaelRaskin>
Also, there is relaxed snadbox mode: sandbox enabled, but __noChroot agrument switches it off.
<MichaelRaskin>
But I think Hydra just force-sets sandbox on.
reinzelmann has joined #nixos
<Lisanna>
Okay, and the sandbox is mostly a preventative measure to rule out 99% of sources of nondeterminism, not a perfect guarantee of determinism
<MichaelRaskin>
We have no idea how to fix, for example, cross-thread race conditions without a horrible performance hit.
<ArdaXi[m]>
There's the option where it will just build it a few times and make sure the output is identical or fail the build
trevorriles has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
trevorriles has joined #nixos
athan has joined #nixos
<Lisanna>
wait a second... I can write tests as fixed-output derivations and have it be useful
<Lisanna>
with the sandbox enabled
<Lisanna>
Just have the important build inputs also be included in the outputs
<MichaelRaskin>
In the output name
<Lisanna>
e.g.: network resource returns string "SUCCESS" + concat it with the input version of the package under test, so "SUCCESSpatchelfv1.2"
<Lisanna>
when I change the input source ,that will make an output that's never been seen before, so it will rebuild
<Lisanna>
and I can predict the hash ahead of time
<MichaelRaskin>
That would make you calculate sha256 of the output inside Nix.
<ArdaXi[m]>
I'd put it in the output name unless you want to calculate all those hashes by hand
<MichaelRaskin>
There is a simpler way.
<MichaelRaskin>
You create a proxy input that has symlinks to all the real inputs.
<MichaelRaskin>
You put its name into the test name.
<MichaelRaskin>
The output file is always empty and has a known hash.
<MichaelRaskin>
If tests fail, you log an error and exit with nonzero exit code.
<ArdaXi[m]>
And I would put the hash of the inputs in there, not just the name, just in case the package changes without changing its version
<MichaelRaskin>
ArdaXi: I mean the full basename, thanks for correction.
<JosW>
all that talk about zfs, has anyone used NILFS2 with NixOS?
<ArdaXi[m]>
I figured, was referring to the "SUCCESSpatchelfv1.2" example
<MichaelRaskin>
I previously explicitly wrote the hash is included, but didn't say it this time.
<MichaelRaskin>
Ah.
<JosW>
I found out about Nixos on de NILFS Wikipedia page :)
<Lisanna>
MichaelRaskin: I'm not sure what you're talking about, I can do this hashing inside Nix... if the test succeeds, the string "SUCCESS" is produced from the network running derivation, and if it fails, the string "FAIL" is produced. I expect "SUCCESS" + input names / hashes, and that's an easy hash to compute inside of Nix.
TweyII has quit [(Ping timeout: 248 seconds)]
<Lisanna>
and if FAIL + input names / hashes is returned, the hash check will fail, and the build will fail, indicating test failure.
<MichaelRaskin>
Lisanna: hashing inside Nix is pain, and you do not need it.
<ArdaXi[m]>
Lisanna: If you're creating a fixed-output derivation you'll need to provide the hash of your output in the derivation
<nliadm>
is it valid in C to pass around void* that point to invalid memory?
<ArdaXi[m]>
Depends on what you mean by 'valid', it'll compile fine but it doesn't seem like a great idea
<disasm>
nliadm: it's completely valid to pass it around, doing something with it, not such a good idea
<clever>
some ugly libraries use "invalid" points like 100 to have special meanings, and if its outside that special range, its a normal pointer
<disasm>
but if your just passing a pointer for a function to set to a valid location, that's perfectly valid use case for what you're asking.
<Lisanna>
nliadm: kind of sort of not really. IIRC it's illegal to evaluate it in any meaningful way
jb55 has joined #nixos
justbeingglad has joined #nixos
<MichaelRaskin>
Even cast to int??
justbeingglad has left #nixos []
<Lisanna>
it's illegal to interpret it as a memory address at least
glenn has quit [(Remote host closed the connection)]
<MichaelRaskin>
Ah yeah, that's true.
<Lisanna>
Let me check... there's a really weird part of the C standard covering this...
<MichaelRaskin>
But really, there are no valid C programs anyway.
<ArdaXi[m]>
Strictly speaking it's not illegal, it'll just segfault but that's beyond the scope of C
a6a3uh has joined #nixos
<disasm>
ArdaXi[m]: but it should only segfault if you try to access it, right?
<MichaelRaskin>
ArdaXi: I think it is UB in C to do anything with pointers that could ever segfault
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] rnhmjoj opened pull request #30837: xorg.bitmap: init at 1.0.8 (master...bitmap) https://git.io/vFUs7
NixOS_GitHub has left #nixos []
<ArdaXi[m]>
Yeah, I meant "interpret it as a memory address"
nh2 has joined #nixos
<ArdaXi[m]>
The kernel will consider it illegal but C won't
glenn has joined #nixos
<nliadm>
I should be able to turn it into a `uintptr_t` without any hassle, right?
<disasm>
drinking my last american beer before I get to Munich :) I'll stick with wine on the flight. So stoked for good German beer (although this Wolf IPA is pretty good)
<Lisanna>
Okay, just checked, you are not allowed to do ANYTHING with its value.
<infinisil>
Wait, is this #nixos?
<nliadm>
I just need to pass a bit of data to a callback, and the type this API gives me is `void*`
<Lisanna>
that includes dereferencing, comparing, casting, whatever
ison111 has quit [(Ping timeout: 240 seconds)]
<nliadm>
ug
<disasm>
infinisil: lol :) yeah, little off-topic
<sphalerite>
We like our off-topic
<Lisanna>
infinisil: sorry ^^ I'll get back to Nix stuff, but further reading on that topic is C11 6.2.4 "Storage durations of objects"
<disasm>
infinisil: You'll be in Munich this weekend, right?
<infinisil>
I will :D
<MichaelRaskin>
infinisil: yes, we are discussing the degree of non-reproducibility of behaviour of some specific builds
<sphalerite>
Tomorrow's going to be fun, my flight leaves at 6am 😱
<infinisil>
I should buy a T-shirt that says "Infinisil"
<ylwghst>
If I provide a patch within ../mypackage/patches/file.patch how I should apply it within patchPhase?
<disasm>
sphalerite: where are you flying from?
<infinisil>
my train leaves at 7pm tomorrow :P
<disasm>
ylwghst: patches = [ ./path/to/patch ];
<Lisanna>
So wait a second, you can't specify a hash at the evaluation time of a nix expression? It has to be a literal?
<MichaelRaskin>
Lisanna: it should be an evaluation-time value.
<disasm>
sphalerite: yeah, my flight leaves at 1830 tonight from Philly, I get in around 0830
<ArdaXi[m]>
Lisanna: That's what makes it fixed output, if that's what you mean
<MichaelRaskin>
infinisil: >train >Germany — sounds like a pain…
glenn has quit [(Ping timeout: 264 seconds)]
<disasm>
infinisil: where are you traveling from?
<infinisil>
The train goes directly from my town to Munich, and I already bought the ticket, so not really :)
<ahstro>
CrazedProgrammer: I love you! Your config setup is amazing, and I'm learning so much. Thank you!
<ArdaXi[m]>
Deutsche Bahn is quite decent in my experience
<infinisil>
North-East of Switzerland
<disasm>
infinisil: I miss the German train system...
erictapen has joined #nixos
<MichaelRaskin>
infinisil: OK, direct train could work.
<sphalerite>
disasm: fun...
<sphalerite>
Yeah, German trains aren't half bad
<Lisanna>
Okay, I think I understand... there's no way I could include the hashes of the input files themselves, since that's runtime, but you might be able to provide the hashes of the names of the inputs, since all of that is known at eval time, but that's not terribly safe
<sphalerite>
As far as rail networks I know of go
<disasm>
typically I fly in through Frankfurt and take a train, but that was more expensive than Munich this time :)
<nixos1022>
Hi there, is there anyone who has experience with Nixos and iscsi? To me, the open-iscsi package in nixpkg looks pretty broken
<sphalerite>
That is, France is great, Germany is decent, and UK is... Not great
<CrazedProgrammer>
ahstro: thanks! really glad it helps, I put a lot of time into it :)
<sphalerite>
nixos1022: clever knows stuff, not sure if he's awake now
jb55 has quit [(Ping timeout: 260 seconds)]
zraexy has quit [(Ping timeout: 260 seconds)]
<sphalerite>
nixos1022: he linked me something useful recently, I'll see if I can find it
<MichaelRaskin>
Lisanna: well, there is a cheap cheat.
<Lisanna>
So what's your proxy file idea again MichaelRaskin ? I didn't really follow your first explanation.
<ahstro>
CrazedProgrammer: I can imagine! Can't thank you enough :)
<MichaelRaskin>
Have a single input that is just a set of symlinks to all the other inputs.
<MichaelRaskin>
This is a non-fixed-output derivation, but it doesn't do anything exciting.
<disasm>
sphalerite: Is france better than Germany now? I remember my parents always complaining about public transit in France when we used to live in Germany.
<clever>
nixos1022: booting nixos over iscsi, mounting iscsi normally, or hostind iscsi?
<MichaelRaskin>
disasm: I think it is.
<nixos1022>
clever mounting iscsi normally
<nixos1022>
at least for now
<clever>
nixos1022: ah, thats simple
<nixos1022>
really?
reinzelmann has quit [(Quit: Leaving)]
<clever>
nixos1022: let me pull up the guide i used
<MichaelRaskin>
Lisanna: now the name of the fixed-output derivation can include the full basename (with hash) of the proxy derivation
* infinisil
checks out CrazedProgrammer's nix config
<MichaelRaskin>
Lisanna: and then you look at that abomination and decide just to spin up a few VMs.
<sphalerite>
disasm: idk I was very pleased especially with the local transportation (in Lyon)
<nixos1022>
iscsiadm: can't open iscsid.startup configuration file /etc/iscsi/iscsid.conf
<nixos1022>
iscsiadm: iscsid is not running. Could not start it up automatically using the startup command in the /etc/iscsi/iscsid.conf iscsid.startup setting. Please check that the file exists or that your init scripts have started iscsid.
<nixos1022>
iscsiadm: can not connect to iSCSI daemon (111)!
<nixos1022>
iscsiadm: Maybe you are not root?
<nixos1022>
iscsiadm: Could not lock discovery DB: /var/lock/iscsi/lock.write: Permission denied
<nixos1022>
iscsiadm: Maybe you are not root?
<Lisanna>
candy`: no, I've only ever installed Nix as single user
<MichaelRaskin>
Lisanna: you use lib.splitString
<nixos1022>
iscsiadm: Could not lock discovery DB: /var/lock/iscsi/lock.write: Permission denied
<clever>
nixos1022: use a pastebin
<nixos1022>
iscsiadm: Could not add new discovery record.
<clever>
nixos1022: also, you need to start iscsid first
<nixos1022>
sry, I it was already bothering me to spam the irc
<candy`>
Lisanna: it's installed and only you use it ?
JosW has quit [(Quit: Konversation terminated!)]
nixer has quit [(Quit: Page closed)]
<Lisanna>
candy`: I've installed Nix in its single-user mode on some HPC-esque environments, i.e. fedora-like, nothing terribly interesting yet though
<sphalerite>
disasm: over longer distances I mostly did Lyon<>Paris which was always good
<sphalerite>
Went to Marseille once too, and once somewhere in the middle of nowehre with a regional train which was fine tio
<sphalerite>
Idk
<nixos1022>
clever I did, now it only tells me, that it has an invalid initiator name
<Lisanna>
candy`: I have booted and run NixOS with HPC hardware
<ldlework>
I just tried reinstalling nix on OSX and now nix-env is telling me: error: Nix database directory ‘/nix/var/nix/db’ is not writable: Permission denied
<MichaelRaskin>
There are too many and concatenating will hit the filename length limit.
<Lisanna>
MichaelRaskin: Okay, but a directory of symlinks will have one outPath, which contains a hash of the directory + the symlink files. But that hash wouldn't change if the thing they point to change, would it?
<MichaelRaskin>
It is a normal derivation.
<MichaelRaskin>
Its hash is the hash of the list of its inputs + the builder
<MichaelRaskin>
So, any input changes — the hash changes.
<Lisanna>
I don't know if symlinks are followed or not when computing hashes ):
hexamod has joined #nixos
chessai has joined #nixos
<infinisil>
What I like to do in such situations is to just test it with a simple example
snikkers has quit [(Ping timeout: 260 seconds)]
<MichaelRaskin>
Lisanna: well, for regular derivations the hash in the output path name is a hash of the complete build procedure, including the input hashes.
<nixos1022>
clever it misses sbin in preStart = "${config.system.sbin.modprobe}/bin/modprobe iscsi_tcp"; I think I need some package to do modprobe. Could you just quickly give me the right one?
<Ralith>
Lisanna: hashes are based on inputs, not output
metaphysician has quit [(Ping timeout: 240 seconds)]
metaphysician has joined #nixos
<clever>
nixos1022: nixos doesnt use sbin
<clever>
checking...
<clever>
nixos1022: oh, the sbin attr
<nixos1022>
yes
<clever>
try ${pkgs.kmod} instead
<nixos1022>
seems to work
griff_ has joined #nixos
<infinisil>
I usually use `nix-shell -p bash --pure` and type the command i want to know the package of, then command-not-found is gonna tell me
Itkovian has joined #nixos
root_ has quit [(Remote host closed the connection)]
root_ has joined #nixos
<Lisanna>
well, my simple example yielded no interesting results ):
<Lisanna>
well, sort of
<Lisanna>
I need more than just the symlinks to be build inputs
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vFUCU
<NixOS_GitHub>
nixpkgs/master 5a64e44 Joachim Fasting: tor: 0.3.1.7 -> 0.3.1.8...
<NixOS_GitHub>
nixpkgs/master 2b496a8 Joachim Fasting: tor-browser-bundle-bin: 7.0.7 -> 7.0.8
NixOS_GitHub has left #nixos []
<Lisanna>
Nix won't follow symlinks to other things
<MichaelRaskin>
Your test can resolve them and add to PATH
<nixos1022>
clever i did a rebuild switch. The starting of the systemd unit fails. Here the log: https://pastebin.com/yGbbLpRa
<Lisanna>
so I would need all of the normal buildinputs, and the special symlink proxy, for the symlinks to be followed
<Lisanna>
and then if the files pointed to by any of the symlinks changes, then the hash of the symlink proxy will also change?
<MichaelRaskin>
Yes.
<Lisanna>
okay, then I use the outputPath with string split or whatever and set that as the fixed output hash of the test
<clever>
nixos1022: "ps aux | grep iscsid" is it running?
<infinisil>
Only 91 people go to nixcon? Heh, I thought the original intention was 120, right?
<nixos1022>
it is
<nixos1022>
but I started it before manually
<clever>
nixos1022: yeah, that one is in the way, kill it then restart the systemd unit
<nixos1022>
I just realized that
<gchristensen>
infinisil: 10% of #nixos seems like a great turnout
<infinisil>
gchristensen: If say it like this, it does sound pretty good :D
<infinisil>
There are dozens of us!
drakonis has quit [(Quit: Leaving)]
nh2 has quit [(Ping timeout: 255 seconds)]
riclima has quit [(Quit: riclima)]
<Lisanna>
Ralith: what? I thought the whole point was that hashes are computed from the output of the derivation
<Lisanna>
and if the output's hash doesn't match the specified fixed hash, the build fails
Itkovian has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<MichaelRaskin>
Hashes are only computed on output for fixed-output derivations
<Lisanna>
Yes
<MichaelRaskin>
The idea is that you can compute all the hashes in advance during evaluation.
nh2 has joined #nixos
<Lisanna>
hang on... so I've gotten the hash from outPath, and my test's output has a file containing a string "SUCCESS" or "FAIL"... what do I do with these two things to make them be the thing that goes into the hash function?
<nixos1022>
clever thanks for the help. The only thing I need now, is to find out my initiatorname.
<clever>
nixos1022: it was set to iqn.2015-09.com.example:3255a7223b2 on one of my machines
<clever>
nixos1022: i think it just has to be unique within your network, so the server knows who is who
<Lisanna>
also, thanks for your patience thus far... I'm not familiar with Nix's hashing very well, and I'm running on 24 hours + of extremely limited sleep ^^
<MichaelRaskin>
Lisanna: you can just "exit 1" on failure/
<nixos1022>
but if i have several machines running nixos, it might get some weird bugs right?
<Lisanna>
Oh... I guess I could do that...
Isorkin has quit [(Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org)]
<MichaelRaskin>
Don't forget to creat "$out" on success.
<nixos1022>
also that initiator name doesn't work for me
<Lisanna>
Well, okay, fine, in the success case, I have the outPath hash of the inputs, how do I make that be the fixed output derivation's hash?
<MichaelRaskin>
(it may be even empty, just make sure the hash matches)
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] clefru opened pull request #30838: python-trezor: Move mnemonic dependency to propagatedBuildInputs (release-17.09...python-trezor-fix) https://git.io/vFUlu
NixOS_GitHub has left #nixos []
<MichaelRaskin>
Lisanna: make $out an empty file
<MichaelRaskin>
If it is a file, only _content_ is hashed.
<MichaelRaskin>
The name is not.
snikkers has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] joachifm pushed 2 new commits to master: https://git.io/vFUlg
<NixOS_GitHub>
nixpkgs/master 36e1937 Joachim F: Merge pull request #30510 from xvapx/tribler-update...
NixOS_GitHub has left #nixos []
<MichaelRaskin>
So you can hash an empty file once and reuse the hash.
<Lisanna>
so $out is an empty file... the hash for which is the hash of 0, but I have the has I extracted from outPath, how do I make these things the same?
justbeingglad has joined #nixos
<MichaelRaskin>
They are unrelated.
<MichaelRaskin>
There is fixed-output-derivation content hash which depends only on the output content.
justbeingglad has quit [(Remote host closed the connection)]
<MichaelRaskin>
This is what you pass to mkDerivation.
griff_ has quit [(Quit: griff_)]
<Lisanna>
so then how do I make it rebuild of the buildinputs change, if the fixed-output derivation's content hash is always of nothing?
<clever>
Lisanna: this is the problem i mentioned with fixed-output derivations
<Lisanna>
I'm not sure what I'm supposed to do with the hash I extract from outPath
<MichaelRaskin>
The _name_ of the fixed-output derivation depends on the inputs.
<clever>
nix will only build it once
<MichaelRaskin>
clever: it will do it once per name, though.
<clever>
cheaty!
<Lisanna>
Oh, so I do name = outPathHash
<Lisanna>
and $out is empty
<MichaelRaskin>
Yes.
<Lisanna>
oh god
<Lisanna>
wait, if only the name changes, doesn't nix reserve the right to just copy the file from somewhere else in the store?
<Lisanna>
rather than doing the actual rebuild?
<MichaelRaskin>
Well, you could disable all the substituters to be really sure.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] clefru opened pull request #30839: python-trezor: Move mnemonic dependency to propagatedBuildInputs (master...python-trezor-fix-master) https://git.io/vFU80
NixOS_GitHub has left #nixos []
<Lisanna>
):
<MichaelRaskin>
But right now the only infrastructure like that is content-addressed nixos.org tarball storage with curated content.
<MichaelRaskin>
You can kill substituters just for one build, though.
<Lisanna>
I'm liking this less and less the more I understand it, lol
<copumpkin>
the name is part of the hash
<copumpkin>
so changing the name will rebuild
Isorkin has joined #nixos
<copumpkin>
(haven't been following beyond that :P)
<Lisanna>
copumpkin: MichaelRaskin said that the name is ignored for fixed-output derivations
<MichaelRaskin>
In practice if you make the on-success content unique, there is no infrastructure now to look for fixed-output content in your store.
<MichaelRaskin>
And tarballs.nixos.org is unlikely to ever carry empty file.
<copumpkin>
it isn't as far as I know?
<MichaelRaskin>
copumpkin: copumpkin: we have just spent a few tens of lines to establish context of what is referred where.
<MichaelRaskin>
Please don't break it.
<copumpkin>
ok
<MichaelRaskin>
There is $out name and there is content hash for fixed-output and there is no fixed terminology and it is terrible.
<Lisanna>
so there's that solution, which works more or less coincidentally, and then there's generating the hashes manually
<MichaelRaskin>
Yes.
<MichaelRaskin>
Then there is also import-from-derivation, which is also terrible.
trevorriles has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
python476 has joined #nixos
stanibanani has quit [(Ping timeout: 264 seconds)]
noobly has quit [(Quit: Page closed)]
simukis has quit [(Quit: simukis)]
<Lisanna>
okay, thanks for all of your careful explanation
<Lisanna>
sounds like Nix isn't the right tool for this kind of thing
kp__ has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] dywedir opened pull request #30840: fd: 4.0.0 -> 5.0.0 (master...fd) https://git.io/vFU48
NixOS_GitHub has left #nixos []
<greymalkin>
Heading over from #haskell -- having a `nix-shell --command 'cabal configure'` problem -- the environment includes openssl, but `cabal configure` complains that it cannot find it.
<clever>
greymalkin: how exactly is openssl included int he environment?
<johnw>
does openssl supply libcrypto.a?
<johnw>
greymalkin is seeing this:
<johnw>
13:57 <greymalkin> cabal: Missing dependency on a foreign library:
<johnw>
13:57 <greymalkin> * Missing C library: crypto
<greymalkin>
Specifically I'm trying to build cryptonite-openssl (with local additions); there is a `default.nix` that I generate with `cabal2nix` 2.6
<clever>
greymalkin: try using "runhaskell Setup.hs configure" rather then cabal configure
<greymalkin>
The generated default.nix includes the line: librarySystemDepends = [ openssl ];
<greymalkin>
clever: Same result
Synthetica has joined #nixos
jb55 has joined #nixos
<nixos1022>
clever now everything works. I just found the initiatorname in the kernel logs of the server
<clever>
greymalkin: and if you remove the .env at the end, what happens when you run nix-build on that shell.nix?
<Synthetica>
I'm trying to edit a root-only file from sublime3, but it is complaining that it can't find ```/usr/bin/pkexec```, even though ```export NIX_REDIRECTS="/usr/bin/pkexec=/run/wrappers/bin/pkexec"``` is set in ```/run/current-system/sw/bin/sublime```. Any pointers?
<clever>
Synthetica: is libredirect also in LD_PRELOAD?
<greymalkin>
clever: it works.
<Synthetica>
clever: Yes... I think? ```export LD_PRELOAD="/nix/store/j2f8cg7xma1l9w7frlmib6wd4pm9zkn3-libredirect-0/lib/libredirect.so"```
nh2 has quit [(Quit: Leaving.)]
<clever>
Synthetica: yeah, that should work
<clever>
greymalkin: i think the problem is that the native libraries arent in the .env shell
frankqux2 has quit [(Ping timeout: 248 seconds)]
erictapen has quit [(Ping timeout: 246 seconds)]
<Synthetica>
clever: It should, but it doesn't
<nixos1022>
clever should I add your instructions to nixos.wiki so that other people can don't have to ask in the irc. I would include your iscsi_module as well
<clever>
Synthetica: next thing would be to peek at "strings /proc/PID/environ" for sublime, to see if that variable is still set right
Ivanych has quit [(Ping timeout: 246 seconds)]
<clever>
Synthetica: then try to strace sublime, to see what syscall its using to access pkexec
<clever>
nixos1022: sure
frankqux1 has joined #nixos
<sphalerite>
clever: ooh strings for environ is a neat trick! I've always used tr '\0' '\n' but strings is a lot easier to type :D
<greymalkin>
Hmm.. how should I work around this? Adding ` // { buildInputs = with nixpkgs.pkgs [ openssl ]; }` in the shell.nix still gives me the same error, and I've run my knowledge of nix-shell into the ground now.
<Lisanna>
instead of $out being an empty file, pass through the symlink directory verbatim as the output,
<clever>
greymalkin: that will overwrite the buildInputs and leave none of the normal ones i believe
<MichaelRaskin>
Then you need its content hash for fixed-output derivation
<Lisanna>
right, don't you get that from its outPath?
<MichaelRaskin>
Which is different from its input-based derivation-name hash.
<Lisanna>
...oh
<clever>
Synthetica: thats strange, its running the right thing, but claiming it cant find it
pie_ has quit [(Ping timeout: 240 seconds)]
<greymalkin>
I remember reading that it was a best-attempt merge; which makes sense since the result still had cabal/ghc and all the other libraries necessary to at least start the build process.
<MichaelRaskin>
Lisanna: in reality, there is a hidden reason why same-hash substitution inside the store is not likely to ever happen.
<Synthetica>
clever: It's also trying /usr/bin/gksudo, but that clearly doesn't work
<MichaelRaskin>
People are lazy, bumping the version and copying the hash from the complaint message is an update technique people use
thaega has left #nixos ["ERC (IRC client for Emacs 25.2.2)"]
<greymalkin>
Also, openssl is "in the environment" enough to have an entry in the shell's LD_LIBRARY_PATH (though, that's a runtime linkage, as I was reminded)
<Synthetica>
(But sublime3 does have a flag to enable gksu support, but I'm not quite sure how to set it)
<MichaelRaskin>
I try to also replace a random symbol in the hash, but sometimes I forget. I guess I am not alone in that.
<clever>
greymalkin: i would strace the cabal configure, and see what its doing to look for crypt
glenn has quit [(Remote host closed the connection)]
<Synthetica>
Oh, when I manually try to run ```/run/wrappers/bin/pkexec```, I get ```lkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie```
<clever>
Synthetica: ah, then something must be wrong with policykit/pkexec
arjen-jonathan has quit [(Ping timeout: 246 seconds)]
<greymalkin>
clever: I think I've found something -- the openssl derivation included in the environment is libraries-only -- no headers.
<Synthetica>
clever: Should I try enabling gksudo? Not sure how to set that flag
<clever>
greymalkin: did you look at the openssl in $NIX_CFLAGS_COMPILE ?
<clever>
Synthetica: you could try mapping gksudo to just normal sudo
<sphalerite>
ghostyyy: if someFeatureSupport is in the arguments for the package function, somePackage.override {someFeatureSupport = true;}
glenn has joined #nixos
<ghostyyy>
where does that go? if i put somePackage.override {someFeatureSupport = true;} in environment.systemPackages then it says its not a package
<ghostyyy>
but if i put it outside of it then it gives me a syntax error
glenn has quit [(Remote host closed the connection)]
<clever>
greymalkin: lists are weird in nix, that is a list containing a function and a set
<clever>
ghostyyy: you have to force the function application with ( ... )
kiloreux_ has quit [(Remote host closed the connection)]
kiloreux_ has joined #nixos
<ghostyyy>
ah! thank you!
glenn_ has joined #nixos
glenn_ has quit [(Remote host closed the connection)]
p4cman has quit [(Quit: Connection closed for inactivity)]
glenn has joined #nixos
justbeingglad has joined #nixos
justbeingglad has left #nixos []
a6a3uh has quit [(Quit: Bye)]
gutsoo has joined #nixos
civodul has joined #nixos
sigmundv__ has joined #nixos
<gutsoo>
Hi All. Question about nixops. Is it possible to deploy to a remote libvirt system? It seems like nixops wants my deploy from and deploy to to be the same for libvirt?
pxc has joined #nixos
<clever>
gutsoo: if you use the "none" targetEnv, it can just deploy to anything running nixos, with ssh open
snikkers has quit [(Ping timeout: 248 seconds)]
<clever>
gutsoo: so you could deploy to an existing libvirt guest, but you would have to manually create the guest on the remote end
seanparsons has quit [(Ping timeout: 248 seconds)]
zraexy has joined #nixos
<gutsoo>
interesting! checking out your example now
jb55 has joined #nixos
<clever>
gutsoo: in the example i linked, eeepc.nix contains the common setup between 2 netbooks, so i can just grab whichever has a charged battery
<clever>
gutsoo: but there is pre-existing differences in the filesystem layout, that i havent bothered to fix yet, so i encoded that in the deployment.nix
<clever>
and they need a unique ip within the VPN
<gutsoo>
so when you say it hijacks the existing nixos, it basically overrides the configuration.nix and does a nixos-rebuild?
<clever>
it will build it on the machine running nixops
<clever>
and then copy it over with nix-copy-closure
<clever>
then just activate the pre-built nixos
riclima has joined #nixos
<gutsoo>
ahhhh
<clever>
so half of the nixos-rebuild job is done on a central box
ambro718 has joined #nixos
<gutsoo>
okay, i've got more reading to do. any recommended documentation besides the nixops manual?
glenn_ has joined #nixos
pxc has quit [(Quit: WeeChat 1.9.1)]
<clever>
the nixos and nixpkgs manuals
civodul` has joined #nixos
<gutsoo>
alright cool. thanks for the help!
pxc has joined #nixos
<riclima>
Hey guys
<riclima>
What would be the equivalent in a default.nix file for the command `nix-shell -p somepackage`?
glenn has quit [(Ping timeout: 255 seconds)]
<clever>
riclima: -p will dynamicaly generate a derivation, in the form of
<riclima>
The first arg is the name of the command
<riclima>
Then you subsequently run it
<riclima>
I understood run command would just do it in one go
<clever>
runCommand takes 3 arguments
<riclima>
3?
<riclima>
there's only two?
<clever>
the name, some attributes, and then a bash script of the command to run
civodul` is now known as civodul
<clever>
the first "dummy" is a name, the 2nd "dummy" is a bash script to run
<clever>
nix-shell ignores that bash script, and drops you into a shell suitable for running dummy (but you just dont run it)
<riclima>
Right, so that script is being generated?
<riclima>
Ah right
<riclima>
Because there is no script
<clever>
yeah
<riclima>
How come when I ran nix-shell with nothing, it said there was no 'default.nix' as opposed to no 'shell.nix'?
<clever>
if shell.nix doesnt exist, it will try default.nix
<clever>
and if both dont exist, it has to name one of them
hexamod has quit [(Quit: My MacBook has gone to sleep. ZZZzzz…)]
<riclima>
Excellent
<riclima>
Thank you!
hexamod has joined #nixos
iqubic has joined #nixos
python476 has quit [(Remote host closed the connection)]
hexamod has quit [(Client Quit)]
civodul has quit [(Quit: ERC (IRC client for Emacs 25.3.1))]
<rycee>
eqyiel: Your syntax error in HM is very interesting. I'm trying to figure out why it happens. Do you have nix-repl? What does `nix-repl> ''a'^b$'c''` say for you?
hexamod has joined #nixos
glenn has quit [(Remote host closed the connection)]
ertes has joined #nixos
sigmundv has joined #nixos
<Ralith>
when using separateDebugInfo, how do I actually get gdb to see the separate debug info?
hexamod has quit [(Client Quit)]
glenn has joined #nixos
<rycee>
Anybody who knows Nix around who could help me understand why https://github.com/rycee/home-manager/pull/106/files causes/fixes "error: syntax error, unexpected $undefined, expecting IND_STR or DOLLAR_CURLY or IND_STRING_CLOSE"?
<rycee>
(I do not get the syntax error in 1.11.15)