selfsymmetric-mu has quit [Remote host closed the connection]
Rusty1 has joined #nixos
qqii has quit [Ping timeout: 260 seconds]
ris has quit [Ping timeout: 276 seconds]
averell has joined #nixos
jackdk has joined #nixos
zacts has joined #nixos
noudle has quit []
domogled has quit [Remote host closed the connection]
<zacts>
is btrfs stable enough on nixos to use as a laptop fileystem?
<zacts>
I'm kind of out-of-the loop when it comes to linux filesystems
<zacts>
would ZFS be more well supported on nixos, or should I try Btrfs?
* exarkun
also curious
<clever>
zacts: i use zfs on all of my nixos machines
<zacts>
cool ok
<avn>
zacts: zfs works pretty well
<zacts>
nice, I'll try it out
<zacts>
I'm somewhat familiar with ZFS from FreeBSD, but it's been years
<ToxicFrog>
ZFS is well supported on Nix. brtfs is also well supported but, tragically, doesn't actually work very well
<ToxicFrog>
In general, I mean, not specifically on Nix
<zacts>
good to know :-)
<avn>
zacts: if you want boot from zfs, you need enable "copy kernel" or disable hardlinking store, grub unable to read kernels straight from /nix/store
<ToxicFrog>
So I would recommend zfs, or failing that, ext4 or xfs or the like.
<zacts>
so must I build my own ZFS kernel modules or can binaries be provided?
<ToxicFrog>
zacts: if you enable ZFS nix will automatically put the necessary support into the kernel/initrd (not sure which)
<clever>
zacts: just boot.supportedFilesystems = [ "zfs"]; and nixos will build the kernel drivers for you
<zacts>
ok cool
<ashkitten>
so what's keeping btrfs from being a useful filesystem?
kvda has joined #nixos
<exarkun>
ashkitten: btrfs developers just seem to not be winning
<ashkitten>
do they not have enough developers or what
<ToxicFrog>
ashkitten: awful performance characteristics, weird infelicities like the FS running out of space despite only being half full and only sometimes being fixable when it gets into that state, bad UX
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fji80
<ashkitten>
weird
<exarkun>
ashkitten: software development is hard? most software projects fail? I don't have more insight than that.
<ashkitten>
i mean fair enough
cyphase has quit [Ping timeout: 245 seconds]
thc202 has quit [Ping timeout: 250 seconds]
kvda has quit [Client Quit]
<ashkitten>
it looked interesting as an alternative to zfs, but with all the tales of data loss under btrfs i dont really trust it enough to try out
<Ralith>
bcachefs is the new hotness
<exarkun>
I hear pretty good things about xfs
b has quit [Ping timeout: 248 seconds]
<zacts>
what is bcachefs?
<ToxicFrog>
Yeah, it would be really nice if there were a viable in-tree alternative to ZFS, but as it is btrfs isn't even a viable alternative to ext4
<exarkun>
actually I re-installed my laptop w/ xfs on / and completely forgot about that.
<ashkitten>
i'm not looking for an alternative to zfs, per se. i'm happy with zfs, i just think it'd be nice to have other projects that can experiment with new ideas
<samueldr>
exarkun: go through 18.03 once first
<exarkun>
samueldr: I get a similar syntax error on 18.03
<samueldr>
exarkun: For users of NixOS 17.09, you will first need to upgrade Nix by setting nix.package = pkgs.nixStable2; and run nixos-rebuild switch as the root user.
<exarkun>
samueldr: What if I didn't do that first
<samueldr>
then nix cannot parse the new syntax I think
<ashkitten>
is there anything significant about bcachefs vs zfs?
<exarkun>
samueldr: right, but does that mean I totally destroyed my nixos system or is there some way to recover from this
<samueldr>
ah no, nothing should be "destroyed"
kvda has quit [Read error: Connection reset by peer]
<samueldr>
first, you were on 17.09, right?
<samueldr>
as in, the running system was 17.09?
<exarkun>
samueldr: I was first on 16.09 actually :/
<samueldr>
ah!
<samueldr>
and you built --uprade 17.09
<exarkun>
I tried going straight to 19.03 without reading the release notes, and then someone suggested going to 17,09 first, so I tried going to that, and then I tried going to 18.03
<samueldr>
switch the channel back to 17.09, build boot to 17.09, then reboot; then it should be possible to do the next step
<samueldr>
did you reboot to 17.09? (or switch to it?)
<exarkun>
I haven't switched to anything, only `nixos-rebuild test --upgrade`. I did reboot once somewhere in this process, trying to get back to a clean, working 16.09 but I saw some evidence that that's not what I got.
<exarkun>
there was a store schema upgrade at some point in here I guess?
<exarkun>
if I try to go to 17.09 now I get: error: cannot start daemon worker: current Nix store schema is version 10, but I only support 7
mexisme has quit [Ping timeout: 268 seconds]
<samueldr>
hmmm, I don't know :/
<samueldr>
maybe first figuring out where you are, what your system is running
<samueldr>
nixos-version should output the information
<exarkun>
it says 16.09.680.4e14fd5 (Flounder)
<samueldr>
right, so the current active system is a 16.09
<exarkun>
which nixos channel was active when the command was run, do you mean?
<samueldr>
it looks like your store was upgraded to 2.0
<samueldr>
yes
<exarkun>
I ran it a lot of times with ... probably all of the channels :/
<samueldr>
so it looks almost like you switched to 18.03
<samueldr>
well, tested into 18.03
<exarkun>
the command seemed to fail every time though
<samueldr>
(test is like switch, except it doesn't write to the bootloader)
* exarkun
nods
<exarkun>
I thought it would be safe to "test" the changes because I could always reboot back to the old system
<exarkun>
but I didn't think about nix store schema upgrades
<samueldr>
I think the generally agreed best practice when switching channel is to nixos-rebuild boot since sometimes software doesn't act just right when switching
<samueldr>
yeah
hio has quit [Quit: Connection closed for inactivity]
<samueldr>
allegedly, from the issue you linked, in the future it shouldn't be an issue
<samueldr>
so, I see two directions (1) 17.09 and setting nix to nix 2 in configuration.nix (2) trying again 18.03
<exarkun>
I guess I'll try those dump/restore instructions and see if I can get back to a store readable to 16.09 and then I'll re-try the nixos-rebuild, going first from 16.09 to 17.09 and then from 17.09 to ...?
<exarkun>
okay I can try that
<clever>
exarkun: i would just upgrade further
<samueldr>
though I would try through 18.03 first
<clever>
exarkun: you can force nixos-rebuild to use a newer nix, so it can read the store
<samueldr>
exarkun: take time to read through release notes, all of them you're going through, sometimes there's really neat stuff hiding in them you can learn :)
<samueldr>
(I know I did!)
jluttine has joined #nixos
<OmnipotentEntity>
after all of this faffing about, I managed to patch the .so files, but
<OmnipotentEntity>
I also learned what I did wrong originally and they don't need to be patched due to the wrapper.
stepcut has joined #nixos
<OmnipotentEntity>
so... I guess I don't need to make a PR
<clever>
omnipotententity: ah!
hamishmack has quit [Ping timeout: 245 seconds]
MmeQuignon has quit [Ping timeout: 245 seconds]
<OmnipotentEntity>
thanks for the help though clever I appreciate it
<Riley>
If anyone else here uses home-manager as a NixOS system module, you might be able to help me out... I'm having trouble enabling the home-manager fontconfig. Setting fonts.fontconfig.enable = true says it has a conflicting definition in the home-manager source files
slyfox has joined #nixos
Miyu-chan has joined #nixos
Miyu-chan is now known as Guest7000
stepcut has quit [Remote host closed the connection]
<OmnipotentEntity>
If anyone is good with python packaging. I checked the nixpkgs manual, but I was unable to find any way of restricting a package to a certain version or family of python interpreters. How do you do this?
<OmnipotentEntity>
The manual calls out that the maintainer ought to ensure that the library works with all versions of the interpreter. But this just simply isn't the case for an already packaged library.
<simpson>
omnipotententity: Depends on exactly which restriction you need. The most common one is `isPy3k` for Python 2 vs Python 3.
<OmnipotentEntity>
simpson, I need to restrict the library to only python2.
<OmnipotentEntity>
looks like the proper invokation is "disabledIf isPy3k <rest of the line>" from checking the python-packages.nix file thanks!
azdle has joined #nixos
<simpson>
omnipotententity: `disabled = isPy3k;` grep the tree for more information.
kvda has joined #nixos
<switchy>
hmm, pango is a split package, but I don't seem to be able to install anything to get libpango in my profile... neither installing the bare package nor its .dev split work. I can see the libpango stuff sitting in a store directory though!
alpounet has quit [Ping timeout: 252 seconds]
<Ralith>
switchy: for unclear reasons, user profiles and build environments are separate schemes; you need a nix shell for the latter
rotaerk has quit [Remote host closed the connection]
<OmnipotentEntity>
How does one go about testing to make sure my change is correct?
<OmnipotentEntity>
nix-env doesn't seem to install python packages as they typically live in python, no? and nix-shell doesn't seem to take a path to a nixpkgs directory?
<simpson>
You'd use `python.withPackages` or similar.
hmpffff_ has joined #nixos
<simpson>
I normally use the REPL in order to test out fancy expressions.
<OmnipotentEntity>
oh snap, I had no idea nix-env took a nix expression rather than just a package name
rotaerk has joined #nixos
<OmnipotentEntity>
actually it doesn't?
hmpffff has quit [Ping timeout: 252 seconds]
day|flip has joined #nixos
<switchy>
Ralith, oh, that seems odd...
<Ralith>
yes, it would be nice if things were more consistent
<OmnipotentEntity>
`nix-build -A python37Packages.opencv` is what I wanted
<zacts>
can I nix-build a package and get a full log of my build error?
<zacts>
it's not displaying the full output of the build
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zacts>
I tried --verbose, but it's not making the actual build itself verbose
<zacts>
--verbose seems to only show the nix side of things, and I want the full output of what went wong in my ./build.sh script within my build src/
<OmnipotentEntity>
zacts, By default, output written by builders to standard output and standard error is echoed to the Nix command's standard error. This option suppresses this behaviour. Note that the builder's standard output and error are always written to a log file in <prefix>/nix/var/log/nix
Guanin has quit [Remote host closed the connection]
<OmnipotentEntity>
From the man pages. Check /nix/var/log/nix
<zacts>
oh
<zacts>
is nix-build an alias for `nix build` or something?
<clever>
zacts: nope
<clever>
zacts: they both build, but the args they accept and how they output differ a lot
<zacts>
so should I be using `nix build` for this use-case?
<clever>
`nix build` will show the last 10 lines of the log on failure
<clever>
`nix-build` will show the entire log, failure or not
<clever>
i flip between the 2 based on how much output i want
<OmnipotentEntity>
either way the entire build output is displayed or logged when using nix-build
<clever>
in both cases, the entire output is logged when the build passes
<OmnipotentEntity>
if it's not being displayed then it's not being outputted or it's being overwritten on your console by control characters perhaps (such as \r)
<clever>
nix-store -l /nix/store/foo will read the logs
<zacts>
ok, let me look at this
hamishmack has joined #nixos
cyphase has joined #nixos
<zacts>
the above nix-store command shows the same output that I'm getting on the console
<zacts>
omnipotententity: the package I'm trying to build normally displays many lines of ./configure / etc... but I'm not seeing all of that with nix-build
<zacts>
the package uses its own ./build.sh versus a normal ./configure;make;make install
<zacts>
so perhaps that's why
<OmnipotentEntity>
zacts, which package? It might be suppressing output
<zacts>
omnipotententity: I'm trying to add a package for a Ruby interpreter, rubinius
<OmnipotentEntity>
it should still be showing the output of configure though
<zacts>
I wonder where to begin to debug this
<OmnipotentEntity>
oh
<OmnipotentEntity>
/nix/store/b6gp7z7brjxkvsx5k0gjzsya3wvr1b9w-stdenv-linux/setup: ./configure: /usr/bin/env: bad interpreter: No such file or directory
<zacts>
yes that's the error I'm getting
<OmnipotentEntity>
configure is looking in the wrong place for /usr/bin/env
<clever>
patchShebangs has to be ran
<zacts>
I added patchShebangs
<zacts>
immediately before ./build.sh
<OmnipotentEntity>
patchShebangs .
<zacts>
yep
<clever>
oh, i see the problem
<zacts>
I have that
<clever>
the configurePhase, comes before the buildPhase
<clever>
during configurePhase, nix will run configure for you
<clever>
so nix is running configure, before you patch things
<OmnipotentEntity>
oh haha
<clever>
patchPhase !!
<zacts>
oh
<zacts>
:-)
<zacts>
let me try that
<zacts>
because yes, there is a ./configure script in there, it's just not used directly
<zacts>
./configure and ./build.sh live side-by-side
<zacts>
but ./build.sh is the only way to actually build this package properly
infinee has quit [Ping timeout: 248 seconds]
<OmnipotentEntity>
If you need to NOT run configure, you can disable that phase I believe.
<clever>
you may also want configurePhase = "echo stop that";
<clever>
`set FOO=` will set it to an empty string, while `unset FOO` will entirely unset it
<Miyu-chan>
Right.
<Miyu-chan>
I guess declare works too?
<clever>
ive not really done much with set/declare
<Miyu-chan>
Hm, declare doesn't seem to do that.
* Miyu-chan
shrug
<Miyu-chan>
declare DEBUG; echo ${DEBUG+meow}
<Miyu-chan>
(no output)
clacke_movim has joined #nixos
tv has quit [Ping timeout: 245 seconds]
lassulus has quit [Ping timeout: 244 seconds]
linarcx has quit [Quit: WeeChat 2.4]
<etu>
Miyu-chan: Sometimes running things on the same line can have unintended consequences
<etu>
Miyu-chan: Because bash will expand the variable when you press enter before the declare is executed
<clever>
there is also,
<clever>
FOO=bar sh -c 'echo $FOO'
<clever>
that will export it, for one command, but not persist it
<clever>
the single quotes stop bash from expanding it, and force the sh child-proc to expand it
<etu>
yep
adamantium has quit [Remote host closed the connection]
mexisme has joined #nixos
lassulus has joined #nixos
tv has joined #nixos
m0rphism has joined #nixos
day|flip has quit [Remote host closed the connection]
mexisme has quit [Ping timeout: 246 seconds]
Dagger has quit [Excess Flood]
Dagger2 has joined #nixos
Dagger2 is now known as Dagger
hyper_ch2 has joined #nixos
dftxbs3e has quit [Ping timeout: 252 seconds]
veske has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
turbo_MaCk has joined #nixos
mexisme has joined #nixos
alpounet has joined #nixos
noudle has joined #nixos
<teto>
I am trying to reuse the nixos test infrastructure in nixos-shell. I am almost there. My only resulting problem is that when launching result/bin/nixos-run-vms, I type startAll, and my (only) VM display is loaded until the prompt. As soon as I get to the prompt, if I type anything, I come back to the test-driver.pl loop. Anyway I can login into that VM ?
hyper_ch2 has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
slack1256 has quit [Ping timeout: 268 seconds]
hyper_ch2 has joined #nixos
cjpbirkbeck has quit [Quit: Quitting now.]
hyper_ch2 has quit [Remote host closed the connection]
hyper_ch2 has joined #nixos
Tucky has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
<teto>
seems like I was missing the joinAll. It now works \o/
Neo-- has joined #nixos
dansho has quit [Quit: Leaving]
<jonge[m]>
hey there, i have problems finding more people who have private gitlab repositories and use them with nix. there seem however to be some people who use git over HTTP(S) with gitlab and authenticate successfully... does anybody here use gitlab private repos?
<dminuoso>
jonge[m]: Do you have a specific problem or question?
mexisme has joined #nixos
veske has joined #nixos
<jonge[m]>
dminuoso: yes. How do i let nix checkout private gitlab repositories via https? i know how to do it via ssh, but the latest hydra gitlab feature (https://github.com/NixOS/hydra/pull/649) only works with http git checkouts, so i wonder how to make my hydra and nix build users auth against that..
<{^_^}>
hydra#649 (by globin, 12 weeks ago, merged): Create a gitlab status plugin
<teto>
then in status.py, one can add "status.register("nix-channels")"
<azazel>
my goal would be to have a branch based on nixos-stable where the modules and packages for kubernetes are backported and kubernetes specific tests are run on it
<Miyu-chan>
I guess I could load it with environment.etc."resolv.conf".text = "";
<Miyu-chan>
Or the usual networking.nameservers
<domenkozar[m]>
simpson: with impure tasks you can do naive CD
<{^_^}>
[nix] @edolstra closed pull request #2692 → nix-daemon: emit a warning if untrusted user tries to set build parameters → https://git.io/fhFGf
jackdk has quit [Quit: Connection closed for inactivity]
<teto>
when launching some tests, QEMU windows open and after a little while turn to black (no login prompt, nothing, plain black). Any idea why ? nix-build ./nixos/tests/login.nix shows me a prompt a contrario
<clever>
teto: sounds like dpms trying to prevent monitor burn-in
<clever>
teto: this line (note the escape codes) will disable dpms
the_scourge has joined #nixos
the_scourge has quit [Client Quit]
mexisme has joined #nixos
troydm has joined #nixos
<teto>
clever: nope it doesn't seem to work. This happens almost immediately (2nd screen on boot). I also see tons of errors which all seem to stem from malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "\x{0}\x{0}\x{0}\x{0}...") at /nix/store/1hkp2n6hz3ybf2rvkjkwrzgbjkrrakzl-update-users-groups.pl line 11
<teto>
like the VM can't load pids and then all services fail, dbus etc
<clever>
teto: that sounds like the json state file is full of nulls, from an improper shutdown
<clever>
teto: did you clear the disk image between boots of the vm?
hio has joined #nixos
<aveltras>
teto: probleme was that i didn t override "package" in services.emacs config
<teto>
clever: how can I do that ? removing /tmp/vm-state-client/client.qcow2 should be the way forward I think but is there a flag to prevent this from happening (like "purer" tests)
<teto>
aveltras: great you could find the rootcause !
<teto>
clever: indeed that fixed it
<teto>
clever++
<{^_^}>
clever's karma got increased to 147
veske has joined #nixos
<clever>
teto: in a pure test, you start with a blank /tmp every time, so nothing can persist
<teto>
clever: could building the test with with --pure fix it ?
<clever>
teto: probably not
<teto>
well, until I find a better way, I will share your science on the wiki
<teto>
<3 clever
<{^_^}>
clever's karma got increased to 148
fendor has quit [Ping timeout: 248 seconds]
Neo-- has quit [Ping timeout: 248 seconds]
Miyu-chan has quit [Remote host closed the connection]
civodul has quit [Quit: ERC (IRC client for Emacs 26.2)]
troydm has quit [Ping timeout: 245 seconds]
<das_j>
Umm, I might have a small problem
<das_j>
error: executing SQLite statement 'insert or replace into Refs (referrer, reference) values (?, ?);': database disk image is malformed (in '/nix/var/nix/db/db.sqlite')
<alexarice[m]>
is there anyway to use nix to create a derivation but have it be mutable afterwards, would be nice if a WINEPREFIX could be set up using nix
<exarkun>
clever, samueldr: fwiw 18.03 and then 19.03 upgrades completed without error. thanks again.
<clever>
alexarice[m]: it would have to copy things to somewhere under $HOME on first run
<srhb>
alexarice[m]: The usual approach is to generate a script in the derivation that copies out the things in a rw fashion.
<srhb>
So, "no, but hacks!"
<clever>
alexarice[m]: there have also been 3 or 4 PR's attempting to add windows software, with helpers to make wine just work on them
<alexarice[m]>
srhb: thanks, I was expecting a hacky approach
<alexarice[m]>
clever: do you have an example? or should it be easy to search for
<abbec>
my override also installed something called weechat-bin-env
<abbec>
not weechat
<srhb>
abbec: That's the wrapper indeed.
<srhb>
Which is fine.
Miyu-chan has quit [Remote host closed the connection]
ericsagnes has quit [Ping timeout: 248 seconds]
<abbec>
and yes, checking nix edit nixpkgs.weechat it is enabled by default
Cale has quit [Ping timeout: 252 seconds]
<abbec>
but both perl, python, ruby, lua and tcl seems to be missing when doing nix-env -i weechat
<monotux>
so I wrote a python script (using two packages in nixpkgs) that I'd like to run as a service. what's the easiest way? the source code is stored locally if that matters
<monotux>
technically I should run it as a timer job
<exarkun>
monotux: "easiest"? eh. depends what you're familiar with, probably.
<{^_^}>
#64437 (by cleverca22, 6 hours ago, open): ipxe: fix build by not generating 64bit efi on 32bit systems
<gchristensen>
not nice
<gchristensen>
hmm
<tdeo>
anyone on darwin able to test #64442?
<exarkun>
monotux: probably some combination of buildInputs, propagatedBuildInputs, or direct references to ${dependency}/bin/whatever in other parts of the expression
<abbec>
can you explain what happens in this case?
<exarkun>
monotux: there's a bunch in the manual about how to write a derivation and there's the nix pills. I'm not sure if I can point at anything more specific than that since I can't guess in which areas you might have knowledge gaps.
<srhb>
abbec: -i will look for the name in all of the packages. You're getting nixpkgs.weechat-unwrapped because that's the thing that actually has name = "weechat"
<srhb>
abbec: Whereas you want nixpkgs.weechat (which actually has weechat-bin-env as its name)
<exarkun>
monotux: hopefully your shell.nix is a really good start, at least
<srhb>
abbec: The wrapped version sets the relevant env vars that point to the plugins.
cfricke has joined #nixos
<abbec>
and i ended up with the unwrapped version because?
<srhb>
Because it's the one that has name = "weechat" and you used -i without -A
<clever>
abbec: nix-env -i weechat, finds the unwrapped version, because the name matches weechat closer
<srhb>
abbec: Meaning, you searched by name rather than attrpath
<abbec>
aha, yeah the post explained it
<abbec>
:)
<gchristensen>
clever: my bandwidth is limited enough I can't fetch nix-shell deps to log in to the machines
<gchristensen>
but I can issue a deploy, which might do it.
<abbec>
thanks a lot!
<monotux>
the shell.nis is literally "with import <nixpkgs> {}; \n (python37.withPackages (ps: with ps; [ requests feedgen ])).env" and I just want to create something that runs a python script (the script has these dependencies) every hour or so
<srhb>
abbec: -i is a bit of a usability nightmare, rule of thumb is to just never use it. :)
<avn>
alexarice[m]: with wineprefix is only two ways -- copy from /nix/store to mutable space, and bind mounts (I used bindfs to strip readonly, and overlayfs to layering, both are-fuse fs)
<clever>
gchristensen: your grafana also showed it hasnt done an eval in over a day
<gchristensen>
I see that
<gchristensen>
well, no, just 15h
<monotux>
and the python script is one file that can live anywhere. what I don't understand is how to move from here to where I want to be, without having to upload my script to pypi or something
<exarkun>
monotux: So that gets you a python environment with everything in it that you need, I expect? now write an expression that imports that and writes a systemd unit with all of the right pieces and when you get to "run the command", you do something like "${name-you-bound-the-import-to}/bin/yourprogram ..."
<monotux>
exarkun: sorry if I'm vague but it's hard to be specific when I have no idea whats missing :)
<exarkun>
monotux: and you get the right path as a result and nix notices you have a dependency on ${name-you-bound-the-import-to} and does the right things to make it available
<Sir_Cheer>
elbaliava ti ekam ot sgniht thgir eht seod dna {ot-tropmi-eht-dnuob-uoy-eman}$ no ycnedneped a evah uoy seciton xin dna tluser a sa htap thgir eht teg uoy dna :xutonom
<exarkun>
monotux: it would probably be a good idea for you to read through the docs, I'm sure they explain better than I will
<exarkun>
and in a better format than irc :)
<monotux>
the docs are 50+ pages and hard to jump into if you don't really know what you are looking for, and I started reviewing them. I'll go over them again with your pointers and see what I can figure out
<monotux>
thanks btw, don't mean to sound grumpy!
p_l has left #nixos [#nixos]
fusion809 has quit [Remote host closed the connection]
<exarkun>
yea I know, it's nice when things are simple :)
rauno has quit [Ping timeout: 245 seconds]
<srhb>
monotux: You might want to look at writePython3 eg
<srhb>
monotux: Then, all your systemd unit has to do is use that script as its ExecStart or whatnot
troydm has joined #nixos
<exarkun>
I put "zfs" in boot.kernelModules and switched/rebooted but didn't end up with any zfs support in my kernel. At the same time I put zfs in systemPackages and I did end up with the userspace tools. What gives?
<srhb>
Meaning... let myscript = writePython3 ...; in ... ExecStart = myscript; ...
<srhb>
That's it!
<monotux>
srhb: can I have it read my script from file instead of inline?
<exarkun>
I guess I should set boot.supportedFilesystems instead (though I don't care about support for zfs in the initrd)?
<clever>
exarkun: boot.initrd.supportedFilesystems is for the initrd
<clever>
exarkun: boot.supportedFilesystems is just generic support, after the initrd
<clever>
exarkun: it will also auto-configure itself, based on the .fsType of everything in the fileSystems attrset
<exarkun>
ah! oops.
troydm has quit [Ping timeout: 245 seconds]
Guest75852 is now known as fgaz
gxt has joined #nixos
rauno has quit [Ping timeout: 248 seconds]
ericsagnes has joined #nixos
xcthulhu has joined #nixos
xcthulhu has quit [Client Quit]
ericsagnes has quit [Ping timeout: 248 seconds]
vmandela has quit [Quit: Leaving]
<gchristensen>
looks like it'll be some hours before I can look at ofborg properly. sorry :(
<clever>
kk
<clever>
i'll likely be sleeping by then
<gchristensen>
for whatever reason the deploy process is blocking during tbuild
cfricke has quit [Quit: WeeChat 2.5]
<avn>
exarkun: don't forget `loader.grub.copyKernels = true` if you use store hardlinking and grub same time.
<clever>
if /boot is its own filesystem, then it will always copy kernels
<avn>
clever: correct. But if /boot on same filesystem (and only efi part of grub on own)
<avn>
which if we can remember also not problem-free setup ;)
<clever>
ive also tried /boot on /, with / on zfs, and it had weird issues
<clever>
it could boot, but grub couldnt list any directory, so all debug was imposible
<kraem>
i'm trying to install the go package `github.com/confluentinc/confluent-kafka-go` but i'm getting 'Package rdkafka was not found in the pkg-config search path.' while running `go get` on the package. I've tried setting the env var PKG_CONFIG_PATH to the folder containing the rdkafka.pc file but with no luck. Any pointers?
<avn>
clever: yes, it why copyKernel is need. grub's zfs can't handle store full of hardlinks
<kraem>
nvm. it had nothing to do with nixos and the FHS - solved by setting the env var to point to two folders containing two different pkg-config files.
Tucky has quit [Quit: WeeChat 2.5]
__monty__ has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @globin merged pull request #63877 → nixos/loki: add module and test → https://git.io/fjoZx
<cinimod>
I have a derivation which I have made part of my local nixpkgs. I want to share this with my boss. One option is to have him git clone my repo. Alternatively I could use overlays. Which is better?
<immae>
cinimod: when you say "local nixpkgs", you mean that you modified the repository cloned from https://github.com/NixOS/nixpkgs/ ? If so, it’s better (shorter) to share an overlay than the whole repo :)
<cinimod>
But when I do nix-env -iA nixpkgs.mySundials I get a different build to when I do nix-env -f /Users/dom/nixpkgs -iA sundials_3_lapack where sundials_3_lapack = callPackage ../development/libraries/sundials/3.x.lapack.nix { };
<cinimod>
Ah maybe I don't have different builds
<immae>
cinimod: nix-env -iA nixpkgs.mySundials is equivalent to `nix-env -f ~/.nix-defexprs -iA nixpkgs.mySundials`. If you don’t have the same in ~/.nix-defexprs and in /Users/dom/nixpkgs then it’s normal that you get a different result
root3 has joined #nixos
root3 has joined #nixos
Miyu-chan has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
root3 has quit [Changing host]
root3 is now known as Miyu-chan
<Miyu-chan>
So, uh.
<Miyu-chan>
If I run things under nix run, weechat thinks my user is root. :/
<Miyu-chan>
this only happens on my desktop and not my laptop lol
<Miyu-chan>
And it even gets more confusing.
<Miyu-chan>
[myrl@myrl:~]$ nix run nixpkgs.weechat -c whoami
<Miyu-chan>
myrl
* Miyu-chan
shrug
veske has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
<immae>
Miyu-chan: is it possible that weechat uses USER environment variable, which would be unset in nix run, while whoami uses other facilities to find your user?
Izorkin_ has joined #nixos
<Yaniel>
sounds familiar yes
<Miyu-chan>
Hm.
<Yaniel>
not that it matters once you have it set up anyway
<Miyu-chan>
I doubt it, but it's worth a try.
<immae>
"nix run nixpkgs.weechat -c env" could give you the answer
<Miyu-chan>
I've read the WeeChat code because of this.
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fjirE
matt` has joined #nixos
fendor has joined #nixos
<matt`>
hello all! i'm struggling to get my xserver to work. i'm trying to run it via startx but whenever I type `$ startx', my console completely freezes and i have to cold boot. The .xorg.log files give the error: "xf86OpenSerial: Cannot open device /dev/input/mouse0 Permission denied.". I have xserver.libinput.enable = true in my config. also, i'm using primerun.sh to for nvidia graphics which works fine. it's just when trying to use the
<matt`>
builtin intel graphics that i'm experiencing this error. has anyone experienced this?
<clever>
matt`: nixos isnt configured to support startx, it must be launched by systemd, via display-manager.service
<matt`>
clever: ah ok i'll try that. thanks
matt` has quit [Remote host closed the connection]
<matt`>
clever: systemd is telling me display-manager.service is masked. additionally, doesn't the services.xserver.displayManager.startx.enable option mean I can use that command directly?
<nahamu>
is there a way to use copy-closure with the environment created with nix-shell?
zacts has joined #nixos
<sauyon>
can I run a command to get configuration values?
<nahamu>
I have a shell.nix that doesn't actually correspond to building a package, and I'd like to distribute it to a few other people
<nahamu>
I think I mean export/import rather than copy-closure.
<{^_^}>
[nixpkgs] @matthewbauer opened pull request #64450 → systems/doubles.nix: add Apple doubles → https://git.io/fjiro
<srhb>
nahamu: Hmm, not quite sure. It sounds like you do mean copy-closure, if by that you mean distribute the binary artifact and build env etc. rather than the expression itself?
<srhb>
nahamu: Though I would caution that it's usually far more practical to distribute the expression.
<srhb>
(And one of the killer use cases of shell.nix)
<nahamu>
people have access to the expression, it just downloads lots of stuff over the internet.
<srhb>
Ah, okay, copy-closure indeed then.
<nahamu>
is there a way to use copy-closure with a shellnix?
v88m has joined #nixos
erasmas has joined #nixos
<srhb>
nahamu: I think what you want is what is referred to as a "cache deployment" in the nix-store manual.
<srhb>
nahamu: Eg. the closure obtained from the shell.nix derivation combined with --include-outputs
<srhb>
If you copy that closure, you should have everything necessary for the build env.
<srhb>
s/Eg./Ie./
<nahamu>
I'm still not sure how to assemble to commands.
<srhb>
nahamu: You can try something like.. nix-store -qR --include-outputs $(nix-instantiate shell.nix)
o1lo01ol1o has quit [Remote host closed the connection]
<srhb>
Then copy those paths.
<srhb>
I *think* that does what you want, but give it an experiment :)
<nahamu>
I was almost there, that looks like the next step of what I was doing.
<nahamu>
I'd gotten to running `nix-store -qR $buildInputs` from inside the nix-shell environment.
<srhb>
I feel like that includes a bit more sources than I expected, but not quite sure..
<nahamu>
it's looking promising. Thanks very much!
<srhb>
Actually I'm wondering whether nix-copy-closure --include-outputs $(nix-store -q --references) is closer. I don't think you need to be explicit about the entire closure..
<sauyon>
hrm, is there a nicer way to do basically runCommand then readFile?
<{^_^}>
[nixpkgs] @doronbehar opened pull request #64453 → cpp-utilities: init at 4.17.1 → https://git.io/fjioG
<buckley310>
ar: gchristensen: It turns out root-on-encrypted-zfs works great :)
asheshambasta_m has joined #nixos
<gchristensen>
great!
Shoubit has quit [Ping timeout: 258 seconds]
<lordcirth>
buckley310, awesome! Anything special you had to do?
<buckley310>
not really, aside from the stuff you need to do just to get regular root-on-zfs working
<buckley310>
and obviously turning on encryption on the dataset
<buckley310>
nixos automatically knows to prompt for password on boot it seems like
<lordcirth>
cool!
gagbo has joined #nixos
<buckley310>
oh and it only works on zfs 0.8+, so i built myself an unstable ISO and am using the unstable channel :\ so theres that
<buckley310>
it looks like nix 19.09 will have zfs 0.8.1
<gchristensen>
buckley310: if you didn't do it already, you will want these options for the zfs pool: atime=off xattr=sa acltype=posixacl
<gchristensen>
s/will/will probably/
<buckley310>
do you set those on the pool or in the mount options?
<gchristensen>
pool level
deech has quit [Ping timeout: 248 seconds]
<buckley310>
cool. i had the noatime thing set up using the standard mount options but it broke with zfs, so i commented it out and forgot about it. i might omit the ACL thing unless it turns out i need it.
<buckley310>
thanks for these, these might speed up my server too :P
<gchristensen>
you do need the aclytype
<gchristensen>
otherwise journald is broken for user logs
lord| has joined #nixos
<buckley310>
oh my
<buckley310>
ok
<gchristensen>
the NixOS on ZFS docs need updating :)
deech has joined #nixos
___laika has joined #nixos
lovesegfault has joined #nixos
juliendehos_ has joined #nixos
ris has joined #nixos
<vmandela>
grahamc[m], Hi, I am trying to reach the grahamc on github. hope I have the right irc handle.
<vmandela>
gchristensen, hi. I am following up on the review comments for https://github.com/NixOS/nix/pull/2946 . If you have some time, could you please take a look ? I am sorry if this is a little impatient.
Miyu-chan has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
Miyu-chan has joined #nixos
<zacts>
manveru: we don't have to, but I thought it could make it easier to collaborate on this.
<manveru>
i'd rather have an issue in nixpkgs for it
<zacts>
we can do that
<zacts>
makes sense
<manveru>
thanks :)
<zacts>
note: this is my first contribution to Nixpkgs and I don't have a lot of GitHub experience either. :-)
<zacts>
so I'm still learning how to do all of this
<manveru>
no worries, we'll help as much as we can :D
<zacts>
thanks
<manveru>
did you fork nixpkgs and put your package in there already?
<zacts>
manveru: not yet, I'll do this.
Soo_Slow has joined #nixos
<manveru>
k
<zacts>
unfortunately I have to get some lunch right now, but I'll be back within a couple of hours. You can email me too. (I'm working on getting a 24/7 irc client soon).
lovesegfault has quit [Ping timeout: 272 seconds]
<zacts>
my client isn't 24/7 right now.
<zacts>
I'll bbl
zacts has quit [Quit: WeeChat 2.4]
<manveru>
try irccloud.com
lovesegfault has joined #nixos
acarrico has quit [Ping timeout: 244 seconds]
mexisme has quit [Ping timeout: 252 seconds]
asheshambasta_m has quit [Quit: Leaving.]
winem_ has joined #nixos
psyanticy has quit [Quit: Connection closed for inactivity]
matt` has joined #nixos
<matt`>
hello, i'm having trouble getting startx to work. has anyone had success with this? when i run it my xorg crashes and no logs are generated
lovesegfault has quit [Ping timeout: 264 seconds]
lovesegfault has joined #nixos
Miyu-chan has quit [Read error: Connection reset by peer]
mkoenig_ has quit [Remote host closed the connection]
deech has quit [Ping timeout: 268 seconds]
<ejpcmac>
Hi! ZFS question here: I’ve just had a zpool failure on a mirror (impossible to mount a filesystem due to checksum errors, and scrub unable to repair).
<ejpcmac>
This happend after I had to shutdown my computer harshly, because it did not respond. This was after an hibernation to swap, then sleep to RAM. (The hibernation reboot worked, not the sleep recover)
mkoenig has joined #nixos
<ejpcmac>
My RAM is ECC, so it seems unlikely an error has happened there. It it possible an error has happened in the swap, then loaded again in the RAM and creating a corruption ?
<ejpcmac>
This is quite embarrassing, I would have expected ZFS to be more resilient than this. I’ve already run it on a server with a raidz2 and was able to replace a failing drive.
<gchristensen>
might should try #zfsonlinux, ejpcmac
<ejpcmac>
gchristensen: Indeed.
orivej has joined #nixos
<lordcirth>
ejpcmac, did you set sync=disabled or something?
<gchristensen>
I don't know what the status is with zfs and hibernation
mexisme has joined #nixos
<ejpcmac>
lordcirth: No
furrycatherder has joined #nixos
<ejpcmac>
I had to reboot harshly my computer several times before, in fact, due to ACPI issues on my new laptop (solved since changing something in the BIOS) But the pool seemed OK.
<ejpcmac>
I would expect incomplete transactions not to impact existing data.
<ejpcmac>
gchristensen: From what I’ve read, you cannot hibernate on a swap on ZFS. My swap is then not on ZFS (and maybe it can be corrupted).
<lordcirth>
ejpcmac, but hibernating with a zpool mounted might not be safe, is the question
<gchristensen>
as far as I understand it, bad data in RAM/swap is not really practically capable of destroying your zfs pool. right. the concern is more does ZFS even support hibernation at all
<ejpcmac>
Yes, since the ARC is written to swap when hibernating
<ejpcmac>
gchristensen: It did reboot after hibernating, restoring the state as expected
<superbaloo>
you don't care much about arc, it's a read cache
<{^_^}>
[nixpkgs] @joncojonathan opened pull request #64455 → jetbrains update via update.pl → https://git.io/fjiKp
<ejpcmac>
Then, I tried to suspend to ram, and the reboot from the suspend did not work. But maybe it’s not related.
<gchristensen>
cool, I don't know :P
<gchristensen>
definitely give #zfsonlinux a try
<ejpcmac>
Yep
jayschmoove has joined #nixos
<superbaloo>
if you suspend to swap, then suspend to ram, unsuspend from ram, then reboot and unsuspend from swap
<superbaloo>
this is most likely wrong
<superbaloo>
and that can definitely corrupt your zfs
alp has joined #nixos
jayschmoove has left #nixos [#nixos]
furrycat1 has joined #nixos
alpounet has quit [Ping timeout: 252 seconds]
mexisme has quit [Ping timeout: 245 seconds]
furrycatherder has quit [Ping timeout: 246 seconds]
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fjiXX
lanelet has joined #nixos
<Netsu>
should I use builtins.intersectAttrs?
<Netsu>
is there something like builtins.functionArgs but for derivation?
stepcut has joined #nixos
Acou_Bass has quit [Quit: byeeeeeeeeeeeeeee]
jluttine has quit [Ping timeout: 248 seconds]
qz has joined #nixos
zacts_pi has joined #nixos
Acou_Bass has joined #nixos
phreedom has joined #nixos
<infinisil>
Netsu: derivations aren't functions, so that doesn't make any sense
<infinisil>
Netsu: And the { a, b }: ... thing isn't a derivation, that's a function
<infinisil>
,callPackage
<{^_^}>
If a Nix file foo.nix starts with something like `{ stdenv, cmake }:`, you can build it with `nix-build -E '(import <nixpkgs> {}).callPackage ./foo.nix {}'`
<Netsu>
infinisil: but I have access to derivation's arguments during the `.override`. Is it possible to put some extra there?
<infinisil>
Netsu: You can create a new function with the args you need, the call it with callPackage to get a derivation yeah
<infinisil>
Would help if you'd be a bit more concrete though :)
<Netsu>
infinisil: can I inherit arguments (with optional default values) from original derivation than in some way?
<infinisil>
Unfortunately there's not really a nice way to inherit function argument defaults
<Netsu>
currently it complains about the unknowen `newFlag`
<infinisil>
Huh, why not just use `optional true "--new-flag"?
<infinisil>
Can you be like super concrete? What's the real problem you're trying to solve? What are you doing?
romildo has quit [Quit: Leaving]
<Netsu>
because I create overlay with package that have more options. And later depend on environment variable it should enable or disable some of them to build different version of package
<Netsu>
so I looking for a way to add for package have exstra parameters to override.
<infinisil>
Where is the overlay defined?
<infinisil>
How is the environment variable specified?
<infinisil>
Because if you have this in a NixOS module, you can just refer to config.variables.FOOBAR directly, and use that in the overlay defined in the nixpkgs.overlay option
<Netsu>
defined locally, `(self: super: with self; { ...`
<Netsu>
depend on env var would put necessary `--argstr` to nix-build