<{^_^}>
[nixpkgs] @misuzu opened pull request #77479 โ nixos/docker-containers: daemonize docker run and handle restarts by docker โ https://git.io/Jvffr
<Valodim[m]>
is there a function to shell-escape a string?
<evanjs>
tek[m]: looks like the winner is openat(AT_FDCWD, "/nix/store/i1fgflxmr7qigc0jjjkspmjk2j0y21k0-nixos-19.09.1815.caad1a78c47/nixos/pkgs/tools/system/efivar/default.nix", O_RDONLY|O_CLOEXEC) = 6
<evanjs>
a bunch of other reads between that and the "garbage" reads though
<tek[m]>
evanjs: is `6` the fd of the garbage reads?
<evanjs>
I'll check but wow -- `-rw-r--r-- 1 evanjs users 687M Jan 10 19:11 why` - yeah not doing that again :D
tigran has quit [Remote host closed the connection]
<tek[m]>
oh that sounds plausible ๐
erictapen has joined #nixos
<evanjs>
tek[m]: looks like it's 3
<tek[m]>
then you'll have to look for the open or connect that has `= 3` at the end
<tek[m]>
might also be helpful to look at `lsof -p $pid`
virus_dave has joined #nixos
<{^_^}>
[nixpkgs] @riotbib opened pull request #77480 โ Added `trusted_proxies` setting to nextcloud โ https://git.io/JvfJe
<elvishjerricco>
I wonder if updating NixOS puts a new version of the ZFS user utils on PATH, even though the ZFS kernel module can't be updated till reboot. I'm sure there are some cases where that can be problematic.
work_ has quit [Quit: Connection closed for inactivity]
evanjs has joined #nixos
<elvishjerricco>
Specifically with unstable. I'm sure no such problems are likely on a stable channel
turona has quit [Ping timeout: 246 seconds]
turona has joined #nixos
mexisme_ has joined #nixos
mexisme_ has quit [Ping timeout: 248 seconds]
zeta_0 has joined #nixos
<pie_[bnc]>
does anyone know how to get to documentation when using the mozilla rust overlay
<zeta_0>
this is throwing a weird syntax error in home.nix, could you guys help me out, it is probably something simple that i am missing? https://hastebin.com/vebowidide.bash
<{^_^}>
[nixpkgs] @marsam pushed commit from @r-ryantm to release-19.09 ยซ joker: 0.12.7 -> 0.14.0 ยป: https://git.io/JvfUT
colemickens_ has joined #nixos
<gchristensen>
,smart-questions if zeta comes back asking that question again, please ask them how their reading of this went, and in what ways they applied this to the question they're asking:
<{^_^}>
if zeta comes back asking that question again, please ask them how their reading of this went, and in what ways they applied this to the question they're asking:: How to get better and faster answers to your questions: https://www.mikeash.com/getting_answers.html
<{^_^}>
[nixpkgs] @marsam pushed commit from @r-ryantm to release-19.09 ยซ wolfssl: 4.2.0 -> 4.3.0 ยป: https://git.io/JvfUL
schorsch has quit [Remote host closed the connection]
<infinisil>
zeta_0: Comment out the `(all-hies.selection ...` line. Do you still get the error?
werner291 has quit [Quit: werner291]
<gchristensen>
zeta_0: how did reading that mikeash.com article go, and have you tried applying its principles? I'm wondering if you've found it helpful yet
zarel has joined #nixos
tchitchi has joined #nixos
tchitchi has left #nixos [#nixos]
<zeta_0>
infinisil: if i comment out `(all-hies.selection ...)` i still get the same error?
<zeta_0>
gchristensen: i only skimmed through the main points, could you resend me the link, thanks
<gchristensen>
I expect you to give it a good read, and apply its principles for all your future questions here
<zeta_0>
gchristensen: ok, i saved the link, i'll read when i finish with the problem that i am dealing with right now
<gchristensen>
okay, but fingers crossed your next question will be after you have read it.
<infinisil>
zeta_0: Now replace `import /home/zeta/.config/nixpkgs/home.nix` with the contents of that file. Do you still get the error?
<colemickens>
Does specifying users.cole.openssh.authorizedKeys.keys prevent the usage of /home/cole/.ssh/authorized_keys ?
<gchristensen>
no
erictapen has quit [Ping timeout: 260 seconds]
<colemickens>
Right, of course. My concat of keys went awry.
xkapastel has quit [Quit: Connection closed for inactivity]
johnw has quit [Remote host closed the connection]
<zeta_0>
infinisil: months ago another nix user helped me integrate configuration.nix with home.nix, maybe the way home-manager is setup, some names are conflicting or something, i don't know, the corresponding code should be towards the bottom of my configuration.nix file
<zeta_0>
infinisil: i am a little confused about your previous instruction, replace the contents of what file? sorry i am little lost, thank for having patience
<infinisil>
zeta_0: Replace the expression `import /home/zeta/.config/nixpkgs/home.nix` in configuration.nix with the contents of /home/zeta/.config/nixpkgs/home.nix
<zeta_0>
infinisil: so you want me to paste everything in home.nix in the corresponding home-manager section of configuration.nix?
<zeta_0>
infinisil: my guess it that it has something to do with home-manager installed in the user account section, months ago i moved home-manager from the systemPackages section to my user account section, maybe that is what's causing the conflict?
h0m1 has quit [Ping timeout: 248 seconds]
<infinisil>
zeta_0: Yes that's what I mean
ditadi has quit [Read error: Connection reset by peer]
<zeta_0>
infinisil: ok, i did it, let me try a rebuild real quick, then i'll let you know if an error was thrown or not: https://hastebin.com/ucujuxucob.bash
<dansho>
looks like theres a whole chapter on emacs in the nixos manual =C
<zeta_0>
infinisil: i did exactly what you said and the same error was still thrown?
<infinisil>
zeta_0: Oh, well there's the problem. The file you posted earlier looks like your home.nix: https://hastebin.com/koqoxeneka.cs
<infinisil>
But it's not
<infinisil>
You apparently removed the whole context around that expression
<infinisil>
zeta_0: Okay now think for a moment. Actually think about what your config looks like. What is that `let all-hies = ...; in` there? what is `home.packages`? Don't you have another home.packages? How do expressions work? How do variables work? Is { ... } a package?
geosmin has quit [Read error: Connection reset by peer]
<infinisil>
The snippet in all-hies, doesn't that look like a home.nix? How would you take parts of that snippet and extend your home.nix with it?
<infinisil>
Just think about this for a while, try to figure it out for yourself. I won't hand hold you this time.
<boxscape>
So, ever since I got a new CPU and mainboard, if I leave my nixos system running for a few hours, the screen goes black, and it seems to automatically switch to a new config that I can't boot into. (I have to select the older config to boot). Is that (at least the part where it automatically builds and switches to a new config) expected?
<infinisil>
zeta_0: And if you're stuck, make your config as simple as possible, remove all things that are irrelevant and try again to understand it. Mess with the expression until you understand what the error means
<zeta_0>
infinisil: ok, i think i get what you mean now, i feel embarrassed right now
<infinisil>
zeta_0: Cool, now do this thinking every time before you ask a question
chenhq2005 has joined #nixos
<infinisil>
thinking and tinkering and trying stuff out too
<zeta_0>
infinisil: it wasn't all my fault the error messages that nix threw didn't help me catch my mistake, oh well, like you said, i got to keep thinking and tinkering
mexisme_ has joined #nixos
<infinisil>
No the error message is (almost) entirely appropriate and should have helped with this. I suggest you try to understand why that it.
<infinisil>
why that is*
<infinisil>
Being able to understand what errors mean is very important for debugging problems
<zeta_0>
infinisil: i have my home.nix configuration setup really good, i just need to fix all-hies and ihaskell. i almost have the nix-shell workflow going, then i should be good do go
<zeta_0>
infinisil: nix feels so much harder than haskell, but i guess this is subjective
mexisme_ has quit [Ping timeout: 260 seconds]
ddellacosta has quit [Ping timeout: 258 seconds]
<martyet-o>
mmmm, stupid question.. is it easier to fresh install nixos 19.03 (in order to downgrade) or just downgrade from nixos (how?)
<gchristensen>
do you remember how to change the channel, martyet-o?
<martyet-o>
gchristensen, mmm discovered new world on wiki :)
<gchristensen>
:)
ddellacosta has joined #nixos
<evanjs>
On a related note.... I still havenโt seen anything telling me to update my version string in mt configuration. Will I ever see such a message? ๐
* gchristensen
has never needed to
<gchristensen>
when I sudo, why do I see this? "gpg-connect-agent: failed to create temporary file '/root/.gnupg/.#lk0x000000000174b8d0.Petunia.2301': No such file or directory
zeta_0 has quit [Remote host closed the connection]
<gchristensen>
`sudo -i` specifically
boxscape has quit [Ping timeout: 240 seconds]
chenhq2005 has quit [Ping timeout: 260 seconds]
Thra11 has quit [Quit: WeeChat 2.7]
zeta_0 has joined #nixos
ixxie has quit [Ping timeout: 265 seconds]
<zeta_0>
infinisil: ok, so i fixed the all-hies installation in home.nix, so that is good to go
felixfoertsch has joined #nixos
<zeta_0>
infinisil: now when i open a haskell file in a cabal project i get this error: Command "hie-wrapper --lsp -d -l /tmp/hie.log" is not present on the path.
<zeta_0>
infinisil: i get the same error when opening a single haskell file as well
felixfoertsch23 has quit [Ping timeout: 260 seconds]
colemickens_ has quit [Quit: Connection closed for inactivity]
<zeta_0>
is this problem nix related or should i go to a different channel for help?
slack1256 has joined #nixos
spacefrogg has quit [Quit: Gone.]
aw has quit [Quit: Quitting.]
<evanjs>
zeta_0: That sounds more like you have a command bound to something that expects a program, or rather, a single object available in your $PATH
aw has joined #nixos
aw has joined #nixos
aw has quit [Changing host]
spacefrogg has joined #nixos
<zeta_0>
evanjs: i am sure now that i correctly installed all-hies in home.nix, now i just need to make sure my lsp config in emacs is ok, maybe that is what is causing the error?
<zeta_0>
anyways, almost there, progress is good
<evanjs>
Yes that is what it sounds like
<evanjs>
Specifically, whatever `hie-wrapper -- lsp ...` is bound to
<zeta_0>
evanjs: i am pretty sure the code in my .emacs is correct, so i am not sure what to do next to troubleshoot the error?
<evanjs>
Do you have the config available that can be shared?
<zeta_0>
evanjs: oh i think i accidentally put my all-hies installation inside of my haskellPackages no directly within home.packages, let me do a quick rebuild, sorry i didn't catch the mistake earlier
<zeta_0>
nix should tell me when i paste things in the wrong spot, well, i am going to do a quick rebuild
<evanjs>
zeta_0: thatโs a thing with any highly customizable system, and with computers in general. How can they ever really know where the โrightโ place is? Theyโre only as good as we make/use them
<zeta_0>
evanjs: sorry about that, i start making mistakes when i start getting tired
<zeta_0>
evanjs: i'll let you know if the rebuild fixed my problem
<tbenst[m]>
hydra question! Anyone know how to get hydra to copy build outputs to hydra's /nix/store from a build machine? Seems like it doesn't happen by default unless I'm missing something
zeta_0 has quit [Remote host closed the connection]
<zeta_0>
evanjs: ok that fixed it, hie works now when i open a single haskell file, i just started a cabal project and opened a haskell file inside of it, lets see if it is able to build cabal this time
<tbenst[m]>
when a build is done on a build machine, I see only two files on hydra-server: `/var/lib/hydra/cache/hks67kr0wvd5kl9hk8yinmnkx6lviapi.narinfo` and `/nix/var/nix/gcroots/hydra/hks67kr0wvd5kl9hk8yinmnkx6lviapi-python3.7-mlflow-1.4.0`. Nothing in /nix/store
<tbenst[m]>
only clue I get from journalctl is `hydra-queue-runner[2163]: copying path '/nix/store/hks67kr0wvd5kl9hk8yinmnkx6lviapi-python3.7-mlflow-1.4.0' (60848440 bytes, compressed 0.0% in 39 ms) to binary cache`, and yet I see nothing in store. Plenty of space on disk drive
<wedens[m]>
I'm trying to override src for tor-browser-bundle-bin using overrideAttrs, but it results in attempts to download both old and new srcs :O wtf?
<bhipple>
It looks like the meta is using the srcs to compute the platforms, but you're only overriding src
<wedens[m]>
but it should only use attr names in meta
fusion809 has quit [Read error: Connection reset by peer]
<wedens[m]>
perhaps I misunderstand how laziness works in this case
fusion809 has joined #nixos
<bhipple>
hmm, looking at it, it seems like your understanding should be right . . .
<wedens[m]>
overriding meta changes nothing fwiw
<bhipple>
yeah, same for me (no difference with meta override)
<wedens[m]>
there is only one place where I use this derivation and it uses this exact attribute name (no aliases)
<wedens[m]>
so, I just have no clue where it might get the old version
<bhipple>
FWIW the commit on the master branch is using the 9.0.4 version already
<lovesegfault>
How can I have a conditional on the OS being Linux?
<bhipple>
ohhhhh I see the problem
<lovesegfault>
Like {} // if linux { foo = bar; } else { };
<bhipple>
Take a look in the `buildCommand`: it references the original `tar xf "${src}"`, which will have been expanded out to a regular string by the time the overlay mechanism kicks in
<lovesegfault>
*{} // if linux then { a=b; } else {};
<wedens[m]>
lovesegfault: stdenv.isLinux
<lovesegfault>
wedens[m]: where does stdenv come from? lib?
<bhipple>
wedens[m]: you'll have to replace the `buildCommand` string in your overlay. Usually, we factor into smaller phases like postUnpack so it's easier to overlay a small part of the build string, so it might not be a bad idea to contribute some refactoring here
<wedens[m]>
lovesegfault: nixpkgs (commonly mentioned as `pkgs` attr)
<lovesegfault>
wedens[m]: Thank you :)
<wedens[m]>
bhipple: you might be right. I thought buildCommand is not evaluated yet at this point
<wedens[m]>
fuck it then. I'll wait for unstable to update..
<bhipple>
wedens[m]: it's not evaluated, but nix var references will have been expanded already to a string. This means you could run a substitute on the string for oldAttrs.src -> src
<bhipple>
You can run nix show-derivation -f . tor-browser-bundle-bin to see what I mean
<lovesegfault>
wedens[m]++
<{^_^}>
wedens[m]'s karma got increased to 4
bvdw has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @dtzWill opened pull request #77493 โ python3Packages.caldav: unbreak now that xandikos is packaged, touchups โ https://git.io/JvfLJ
<Guest84>
I will read those links but I should mention that from 6 months back until a month back I was able to download at full speed, only after a month of hiatus is there a problem.
<Guest84>
thanks, i will read
slack1256 has quit [Remote host closed the connection]
<lovesegfault>
wedens[m]: Is there an optional for string?
<wedens[m]>
optionalString
<lovesegfault>
wedens[m]: Is there optionalAttr?
<lovesegfault>
> optionalAttr
<{^_^}>
undefined variable 'optionalAttr' at (string):273:1
<jtojnar>
aargh, I keep forgetting `attrset ? foo` checks for "foo", not "${foo}"
eoli3n_ has joined #nixos
<{^_^}>
[nixpkgs] @nlewo merged pull request #75911 โ when building a layered docker image, ignore it if tar encounters chaโฆ โ https://git.io/Je54F
<jackdk>
Has something changed in the 19.09 channel recently? my nixos-rebuild switch on two different machines has started failing with error: "cannot connect to daemon at '/nix/var/nix/daemon-socket/socket': Connection refused"
<{^_^}>
[nixpkgs] @volth opened pull request #77506 โ nixos/nat: use nixos-nat-out instead of OUTPUT โ https://git.io/JvfYJ
<mananamenos>
hi, my haskell project does not build anymore, stating that HaskellNet package is broken. So i've pulled the haskell-updates branch and tried to see the error while building this package with the --allowBroken flag. However, the error is not something related with tests, in which case i could disable them, and then build my haskell project pointed to my local nixkpkgs. The actual error while building HaskellNet is S
<mananamenos>
etup: Encountered missing dependencies: mime-mail >=0.4.7 && <0.5. What should I do now?
<{^_^}>
[nixpkgs] @cdepillabout pushed 2 commits to haskell-updates: https://git.io/JvfYK
chenhq2005 has joined #nixos
mananamenos has joined #nixos
chenhq2005 has quit [Ping timeout: 258 seconds]
<mananamenos>
srk: i've fixed failing packages in my nixpkgs local, now my haskell project enter nix-shell with no errors, however, when cabal new-repl fails with: [__1] fail (backjumping, conflict set: HaskellNet-SSL, myproject)
<{^_^}>
[nixpkgs] @rycee pushed to master ยซ jwt-cli: init at 2.5.1 ยป: https://git.io/JvfYF
<srk>
mananamenos: missing dependency on HaskellNet-SSL? in shell you can list available packages with ghc-pkg list
<{^_^}>
[nixos-org-configurations] @turboMaCk opened pull request #95 โ Avoid colour indications on outdated channels โ https://git.io/JvfYh
<mananamenos>
ok, the list does not show two brokens libs (HaskellNet, HaskellNet-SSL). I've entered my projects shell with command: nix-shell -I nixpkgs=~/projects/nixpkgs. I suppose i should have done this in other way then
Thra11 has joined #nixos
<Thra11>
Why do processes inside a nix-shell use /run/user/1000 instead of /tmp, and how can I change this?
<symphorien>
is there a channel where pkgsStatic.stdenv is cached ?
<symphorien>
Thra11: XDG_TMP_DIR or something like that
<mananamenos>
srk: how do i change this line inherit (nixpkgs) pkgs; in my nix-shell to point to local dir of nixpkgs?
<mananamenos>
i got it already, sorry
<clever>
mananamenos: you have to change whatever defined nixpkgs, which should be a few lines up
stteevveen has joined #nixos
noudle has joined #nixos
<stteevveen>
Hi! seems like I don't succeed to understand how to use package overriding for virtualbox . In my config I have something like this: let n1903 = import <mychannel1903> {}; in { virtualisation.virtualbox.host.package.override = {virtualbox = n1903.virtualbox;} }; It complains it is not of the type package. I have tried other syntaxes, but I
<mananamenos>
i have one question more, if i build a haskell project on my nixos system 19.09 and then deploy that binary on nixos 19.03, could it cause any problems?
<clever>
mananamenos: if you deploy with nix-copy-closure, it should be perfectly fine
<Thra11>
symphorien: Comparing the environments inside and outside a shell, it looks like the shell is setting both TMP and TMPDIR to /run/user/1000, while outside the shell they are unset.
<stteevveen>
@clever with virtualisation.virtualbox.host.package.override = n1903.virtualbox I get the same error, that this is not of type package
<Thra11>
I don't know whether it's nix-shell itself or the packages in the shell which are setting these
<clever>
Thra11: i believe its in the source of nix-shell, to set TMP and TMPDIR
stteevveen has quit [Remote host closed the connection]
mexisme_ has quit [Ping timeout: 246 seconds]
<Thra11>
clever: Do you know why? and if I override them, could it break the shell in some way? (My problem is that /run/user/1000 is too small. I could make /run/user/1000 larger, but I don't think it's intended to be used as /tmp)
<clever>
Thra11: you can probably just set TMP yourself in the shell.nix
<mananamenos>
clever: i use nixops to deploy this project. The remote server's configuration.nix has a systemd service which point to local machines haskell project's release.nix/bin/project. But now my local system is 19.09 while the remote is 19.03
<clever>
mananamenos: nixops uses nix-copy-closure behind the scenes, so it should work just fine
<mananamenos>
thank you!
Chiliparrot has joined #nixos
kleisli has quit [Ping timeout: 265 seconds]
<evils>
Thra11: any luck setting /tmp?
<mananamenos>
can i add openssh.authorizedKeys.keys =.. without nixos rebuild switch somehow?
<Thra11>
evils: I can explicitly set it once in the nix-shell, which allows the process which needs lots of tmp space to run successfully. I'm just trying to investigate why nix chose /run/user/1000 instead of /tmp in the first place
<clever>
mananamenos: ~/.ssh/authorized_keys still works
<ddima>
mananamenos: you can't apply the config without running rebuild. but you can use your users `~/.ssh`
<ddima>
(what clever said)
boogiewoogie has joined #nixos
<evils>
Thra11: seems like my usual zsh has `XDG_RUNTIME_DIR=/run/user/1000`
chagra_ has joined #nixos
<Thra11>
evils: Yes. That's normal. Then Nix chooses XDG_RUNTIME_DIR as TMPDIR in the shell, which sort of makes sense, because it should have suitable ownership and permissions. However, it can be a bit surprising because 1. People expect TMPDIR=/tmp. 2. Lots of commands (such as nix build) end up using a different TMPDIR depending on whether you're in a shell or not.
cosimone has quit [Remote host closed the connection]
<Thra11>
I should probably just set boot.runSize to match my /tmp size
<evils>
huh, i used services.logind.extraConfig = "RuntimeDirectorySize=8G";
<Thra11>
evils: :o I'm guessing boot.runSize just sets that setting under the hood
<evils>
sure looks better xD
knupfer has joined #nixos
<evils>
but neither's really a good solution for my usecase, kicad's update.sh, which currently has a comment of "use this option", not particularly portable...
<jluttine>
how can i import nix files from github in configuration.nix imports? i get "not allowed to refer to a store path" when i just use builtins.fetchTarball inside the imports list
drewr has joined #nixos
<evils>
Thra11: this is a .sh with a nix-shell shebang, i'd just add an `export TMPDIR=/tmp` in contained bash script
alex`` has joined #nixos
jonten has joined #nixos
jjakob has joined #nixos
mananamenos has joined #nixos
UndefinedIsNotAF has quit [Remote host closed the connection]
<Thra11>
Yaniel: As far as I can tell, a compiler upgrade has caused the krita build to start outputting a lot of warnings, so hydra kills it for using up too much space with its log spam.
__monty__ has joined #nixos
<Yaniel>
there certainly is a ton of -Wdeprecated-copy warnings
Rusty1 has joined #nixos
<Thra11>
A short term fix might be to have the nix build specify -Wno-deprecated-copy
felixfoertsch has quit [Ping timeout: 265 seconds]
<Thra11>
(Long term fix being to report and/or fix the issue upstream)
<Yaniel>
I just did
<Thra11>
Yaniel: report or fix?
<Yaniel>
report, seems like a good starter issue for new upstream contributors
<Thra11>
Yes. It probably hasn't been noticed/fixed yet because the warning only appears in gcc 9+
<Shouou>
Is there a way to import a Nix set directly in configuration.nix' `imports`? Or do I have to just `// extraConfig`?
<Shouou>
Basically, I'm importing a config with `fetchFromGitHub` and want to include said changes in my configuration.nix
<tilpner>
Shouou: Try replacing fetchFromGitHub with builtins.fetchTarball
<tilpner>
That works around the "using fetchFromGH, but imports could alter what fetchFromGH is" issue
<tilpner>
Or bootstrap pkgs, that works too
<tilpner>
Shouou: And yes, if the fetched file is a module, you can put it into imports = [ here ];
<Shouou>
Oh nice. Does that work with or without an `import` statement? If the latter, how can I specify a path? Can I use < brackets > or does that only work for things from $NIX_PATH and the like?
<tilpner>
You can put the fetchTarball directly in there, but that looks ugly. Use a let-in, or import an external sources file
<tilpner>
Shouou: <...> syntax only works with NIX_PATH. If you're fine with altering NIX_PATH, that might be easier because Nix fetches sources in there for you automatically
<Shouou>
I'm getting an infinite recursion error when adding said thing to the imports list. I'm just doing `let hw = builtins.fetchTarball { ... }; in { imports = [ "${hw}/dell/xps/13-9380" ]; ... }`
<Shouou>
(where hw refers to nixos-hardware)
<Shouou>
Okay it was just a lazy user error: I was trying to use pkgs.lib.fakeSha256 so I could avoid specifying lib in the function arguments at the top. Not entirely sure why it happened still though
<Shouou>
clever, what's the reason specifically? I'm curious
<BugeyeD>
hi all. anyone here using conda? know of a way to enter conda-shell and activate an environment in a single command? currently takes 2 commands, unlike outside of nixos ...
<qyliss>
What are the two commands?
<clever>
Shouou: because it has to traverse all of the imports, to figure out what nixpkgs.config is set to, to figure out the value of pkgs
<BugeyeD>
qyliss: first have to run 'conda-shell' so that conda works at all, then 'conda activate myenvironment'
<BugeyeD>
qyliss: trying to use conda because python virtualenv is so broken in nixos.
<qyliss>
I don't really know anything about conda, I'm afraid.
<BugeyeD>
qyliss: been using venv for a decade and have workflow build around that, having to backpeddle big time to use nixos
<BugeyeD>
so far it is the only thing i don't like ... i understand the difficulties, just looking for solutions.
Dagger2 has joined #nixos
nixtacular has joined #nixos
<nixtacular>
when I run `nix-shell` in one of my projects, it started all of a sudden to give me this error: `error: cannot open connection to remote store 'daemon': reading from file: Connection reset by peer`
Dagger2 is now known as Dagger
<nixtacular>
i have a pretty simple `shell.nix`. never caused problems before.
<nixtacular>
any ideas why it's failing now?
<BugeyeD>
nixtacular: fairy difficult to say without having details ...
<ddima>
BugeyeD: I mostly roll with nix-shell and shell.nix files nowadays, so I dont use conda, but you could possibly just create an alias or you could try sth like direnv; https://github.com/direnv/direnv/wiki/Python#anaconda for automatic activation.
<BugeyeD>
ddima: direnv is already on my list, perhaps it should get bumped up ... meanwhile, can you provide an example .nix which covers something like python venv?
<nixtacular>
and a more detailed error using `--show-trace`: `error: while evaluating the attribute 'args' of the derivation 'nix-shell' at /nix/store/zzqjdkb63npdjjj097ldqygkla62aqs2-nixos-19.09.1748.ad1e1af5ad3/nixos/pkgs/build-support/mkshell/default.nix:28:3:`
<simpson>
BugeyeD: The correct move would be to unlearn Conda and replace it with Nix in your workflows, IMO. Indeed the typical virtualenv-oriented approach doesn't work super-well with Nix, but that's okay. Which packages in particular give you problems when you use nixpkgs?
<BugeyeD>
nixtacular: journalctl -u nix-daemon
<ddima>
BugeyeD: Not really, I mean, I use *only* nix-shell (no conda, no venv) as it does enough isolation of dependencies etc.
<nixtacular>
BugeyeD: brilliant! thank you. i can see that i've run out of memory
<nixtacular>
process can't fork anymore
drakonis has quit [Ping timeout: 248 seconds]
<BugeyeD>
nixtacular: we got lucky with a quick ah-hah. i'll take it!
<BugeyeD>
ddima: understood, and i'm happy to learn that method if it can be made to work for me. my very first pain point was with reportlab.
<BugeyeD>
ddima: i only started with conda because i found that it worked with reportlab in nixos where python venv did not
nixtacular has quit [Remote host closed the connection]
shibboleth has joined #nixos
<BugeyeD>
ddima: i've been through that. i think perhaps it was just initially over my head and i was hoping for something that worked outside of nixos as well. not all of my environments are nixos, but i'm hoping to get nix running there as well. such as my macbook.
<ddima>
BugeyeD: hm, I see. then direnv+conda might be a pragmatic path for now.
<simpson>
BugeyeD: What have you tried? Does python2Packages.reportlab not work?
<BugeyeD>
ddima: in the link you provided ... directly underneath python venv is the reference to conda. that is precisely why i looked into conda. :) now would just like a single command to enter an environment. i don't do a huge amount of development, i'm mostly just a sysadmin/architect - but some of my tools need a bit of extra pythong stuff, such as with ansible and reportlab.
ng0_ is now known as ng0
<BugeyeD>
simpson: been banging on it for a month now in my spare time outside of work, hard to say exactly all i've tried. :) i've read nearly everything i could find on nix, but i think i may be missing a connection which is obvious to everyone but myself.
<BugeyeD>
my various projects have different needs, hence using venv prior. if i could figure out how to replace that with some kind of nix expression i'd be perfectly happy.
<BugeyeD>
still think i'm just missing a connection somewhere in my head.
<ddima>
BugeyeD: yeah, and direvn would help you do that, but you can ofc also just do sth like `alias conda-enter='conda-shell; conda-activate $yourenv;'` (or a bit more cleanly as a function in your shells rc file).
testingstuffzzz has joined #nixos
<BugeyeD>
ddima: the alias/function does not work, at least not currently for me. conda-shell executes some kind of fun chroot thing, and the subsequent conda-activate is ignored.
testingstuffzzz has quit [Client Quit]
nek0 has quit [Ping timeout: 268 seconds]
nek0 has joined #nixos
ivan_ has joined #nixos
<simpson>
BugeyeD: Here is a test Nix expression. I have it saved as test.nix, and I can run $(nix-shell test.nix) to get into an environment. In this environment, I have the Ansible binaries and a Python with the reportlab module available. https://bpaste.net/IM7A
<ddima>
BugeyeD: wrt head banging - I think the only best way "to get it" is to just try and write some shell.nix for one of your (maybe simpler) projects with the required dependencies and tools and iterate until its stops breaking and then ask here once you get to the breakages.
error has joined #nixos
<ddima>
well, and maybe learn how to use `nix repl`
<simpson>
FWIW I use direnv and set up a different shell.nix in each project directory, and try not to have situations where a single tool is used across every environment. (Except for vim and git, because I *do* use those the same everywhere.)
<BugeyeD>
simpson / ddima - i think perhaps nix-shell is what i was missing. i understand (at least kind of) the way the nix expressions work. what i think i was missing was the nix-shell portion.
<BugeyeD>
that bpaste bit helps me understand now. i think i can wrap that into a function to make things simple - and perhaps even have direnv execute the function based on my location.
<BugeyeD>
this is not a nixos thing, correct? should work with nix on mac os x or centos or wherever?
<BugeyeD>
oh, i'm going to have to figure out how to deal with differing python versions as well. may not be difficult, we'll see. i'll need 2.7 for some projects, 3.x with others.
<ddima>
BugeyeD: that is just fine, there are multiple pythons in pkgs, like pkgs.python27 and pkgs.python39 etc. the repl is nice enough for exploring those.
<ddima>
BugeyeD: in simpsons gist there is 'pkgs.python' which right now on 19.09 is 2.7 but you could as well just use pkgs.python3 for instance
cosimone has quit [Quit: Quit.]
<ddima>
BugeyeD: and no, direnv is not a nix thing, its standalone and should be fine on osx too
<BugeyeD>
ddima: this one conversation has definitely given me a new avenue to explore. and i appreciate it.
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzzโฆ]
<BugeyeD>
ddima: i meant to ask about the whole nix-shell thing being available with just nix, not specific to nixos
<BugeyeD>
i've seen direnv prior to ever hearing about nix
<BugeyeD>
i do not yet have nix installed anywhere outside this nixos laptop
cosimone has joined #nixos
cosimone has quit [Client Quit]
shibboleth has quit [Quit: shibboleth]
<ddima>
BugeyeD: ah, sorry, misunderstood. nix-shell is available with the nix (package manager) install, so not nixos specific.
cosimone has joined #nixos
<BugeyeD>
ddima: in that case, if i can manage to wrap my head around nix-shell and the expressions, i may be able to completely replace python venv in a portable manner. of course, it'd be specific to nix and therefore not *exactly* portable ...
<BugeyeD>
but good enough for me, which is what matters at the moment.
<BugeyeD>
so again, thanks - ddima / simpson
rembo10 has quit [Ping timeout: 268 seconds]
rembo10 has joined #nixos
juhe1 has quit [Ping timeout: 268 seconds]
<ddima>
enjoy!
cosimone has quit [Quit: Quit.]
cosimone has joined #nixos
cosimone has quit [Client Quit]
delli3_ has quit [Ping timeout: 260 seconds]
amf has joined #nixos
<amf>
if a package has optional things, like claws-mail, how do I enable them? (more specifically the spell checking)
<evanjs>
or rather, IIRC, I need to assign a mkIf to something to use it, right? like `config = mkIf cfg.enable {`
<tigran>
simpson: I mean a unidiomatic way of installing a program that is known to work generally, when you don't really have the time to package it yourself :)
<{^_^}>
[nixpkgs] @mschuwalow opened pull request #77521 โ stups-pierone: init at 1.1.45 โ https://git.io/Jvfcn
Phlogistique has quit [Ping timeout: 268 seconds]
Phlogistique has joined #nixos
<simpson>
tigran: I'd try to avoid those sorts of situations, and make time to sit down and write Nix as needed.
<simpson>
There *is* the FHS user environment, if FHS is what's needed.
mehlon has quit [Remote host closed the connection]
mehlon has joined #nixos
<evanjs>
tigran: depending on how an arbitrary package is deployed, there are tools like nixpkgs.appimage-run, and options like appstream.enable and services.flatpak.enable
mehlon has left #nixos [#nixos]
werner291 has quit [Quit: werner291]
cosimone has quit [Quit: Quit.]
<tigran>
Okay, FHS is probably what I needed. The program I'm trying to run (vmware player) is not packaged in any of those, so no luck wit that. Thank you all
michiel_ has quit [Remote host closed the connection]
bvdw has quit [Read error: Connection reset by peer]
<ambro718>
When I set Firefox to not show system title bar (via Customize), the Firefox window when not maximized gets a white rectangular border all around like this http://pasteall.org/pic/5da13b107a397260c6d7e8aa6e52f257 . I'm using KDE. Any idea where this comes from and how to remove it?
endocrimes has joined #nixos
<ambro718>
I'm suspecting kwin is drawing it.
slack1256 has joined #nixos
h0m1 has quit [Quit: WeeChat 2.7]
dirkx_ has joined #nixos
duck_ has joined #nixos
dckc has quit [Ping timeout: 268 seconds]
Guest92090 has quit [Ping timeout: 268 seconds]
Guest92090 has joined #nixos
ciil_ has joined #nixos
kenjis has quit [Remote host closed the connection]
dckc has joined #nixos
trfl_ has joined #nixos
nckx has joined #nixos
dirkx has quit [Quit: Bye and thanks for all the fish]
duckfullstop has quit [Quit: Why do you need...?]
Guanin has quit [Ping timeout: 260 seconds]
trfl has quit [Remote host closed the connection]
drgbr has quit [Ping timeout: 260 seconds]
ciil has quit [Ping timeout: 260 seconds]
drgbr has joined #nixos
awaz has quit [Ping timeout: 240 seconds]
pepesza has quit [Ping timeout: 240 seconds]
awaz has joined #nixos
dashkal has quit [Ping timeout: 240 seconds]
Guest92090 has quit [Remote host closed the connection]
dashkal has joined #nixos
pepesza has joined #nixos
trfl_ has quit [Excess Flood]
trfl has joined #nixos
noudle has joined #nixos
Guest92090 has joined #nixos
<lovesegfault>
How can I nix-build for another arch?
<ddima>
lovesegfault: there are `pkgsCross.$arch.$pkg` which you could use
<infinisil>
I was gonna link you to the manual section about pkgsCross but turns out there isn't one..
<lovesegfault>
infinisil: :D
<lovesegfault>
ddima: Can I specify it from the cli?
<ddima>
lovesegfault: yes, its a regular attribute
* lovesegfault
tries
<{^_^}>
[nixpkgs] @snicket2100 opened pull request #77522 โ actkbd: fixed the description of the `services.actkbd.bindings` option โ https://git.io/JvfW3
philr has quit [Ping timeout: 265 seconds]
m1cr0man has joined #nixos
<m1cr0man>
Hey folks. I'm trying to deprecate an option in a module that is under a wildcard path (config.security.acme.*.plugins). How do I specify this path in mkRemovedOptionModule?
drakonis has quit [Quit: WeeChat 2.6]
drakonis has joined #nixos
inkbottle has joined #nixos
<infinisil>
m1cr0man: In the submodule, next to options, e.g. `{ options.foo = ...; imports = [ (mkRemovedOptionModule ...`
<m1cr0man>
infinisil yeah I got that part ;) What I'm wondering about is the arguments to mkRemovedOptionModule. What should the list of strings look like?
<infinisil>
And then the path there should be the one under the submodule, so just [ "plugins" ]
<m1cr0man>
oh ok
zebrag has quit [Ping timeout: 240 seconds]
smatting has quit [Ping timeout: 268 seconds]
<m1cr0man>
infinisil ahh yes that makes sense now I see the options def
judson__ has joined #nixos
<m1cr0man>
thanks :D
<infinisil>
:D
<m1cr0man>
lego nearly ready...been a long time coming
evhan` has joined #nixos
detran_ has joined #nixos
duckfullstop has joined #nixos
Piece_Maker has joined #nixos
rogue_koder_ has joined #nixos
<infinisil>
m1cr0man: lego?
<eeva>
Anyone know how I can make it so my local headers are used in nixpkgs' stdenv? I'm running nix-shell on pkgs.mkShell, and then even calling g++ -Imy/local/header/dir doesn't find the header I wantโฆ
endocrimes_ has joined #nixos
judson_ has quit [Remote host closed the connection]
travelion7 has quit [Quit: Ping timeout (120 seconds)]
nixy37 has quit [Quit: Ping timeout (120 seconds)]
<{^_^}>
#74742 (by bcaccia, 6 weeks ago, open): Jack Audio does not present any valid output devices
Guest92090 has joined #nixos
<gchristensen>
thanks for the report, reverbtank :) hopefully someone who knows takes a look
<reverbtank>
(y)
<{^_^}>
[nixpkgs] @jonringer merged pull request #77522 โ actkbd: fixed the description of the `services.actkbd.bindings` option โ https://git.io/JvfW3
<{^_^}>
[nixpkgs] @jonringer pushed commit from @snicket2100 to master ยซ actkbd: fixed the description of the `services.actkbd.bindings` option ยป: https://git.io/Jvf4v
<gchristensen>
also nix-instantiate --eval --strict --json '<nixpkgs>' -A bc.meta, or nix-instantiate --eval --strict --json '<nixpkgs>' -A bc.meta.homepage
<lovesegfault>
And if you want it pretty: nix-instantiate --eval --strict --json '<nixpkgs>' -A bc.meta | jq
<evanjs>
gchristensen: sure sure. But like as an overview?
<gchristensen>
don't know
<evanjs>
alright. *adds to project ideas*
fenedor has joined #nixos
<gchristensen>
it'd be cool to get editor integration for options
<evanjs>
basically just like a "current value" field in addition to the overviews given by e.g. https://nixos.org/nixos/options.html and `man configuration.nix`
<m1cr0man>
Hey again. I'm trying to figure out how to add a change notice to security.acme.certs.<name>.extraDomains to convert it from a dict to a list. I have already worked with mkChangedOptionModule but that doesn't seem like the right choice because the name is staying the same. I was trying to take inspiration from the recently merged loaOf deprecation
<m1cr0man>
PR but I can't figure out how that works. Is there an easy way to do this?
<gchristensen>
it is changing from a dict to a list?
knupfer has joined #nixos
<m1cr0man>
Yeah
<m1cr0man>
There's no longer support for custom webtree paths per extra domain
<gchristensen>
oh I see
fendor has quit [Ping timeout: 240 seconds]
<lovesegfault>
gchristensen: Nix language server :P
madamecoco has quit [Remote host closed the connection]
<evanjs>
gchristensen: yeah thatโs been on my wishlist for a while. I can see how some options or values might be a little weird to handle (looking at you, mkAliasDefinitions...) but I would definitely use it
<evanjs>
lovesegfault: I mean yeah butโ
Thra11 has quit [Quit: WeeChat 2.7]
Guest92090 has quit [Ping timeout: 268 seconds]
<gchristensen>
no "but" needed :P let's do it! :)
<bhipple>
Is there some documentation anywhere on how/when/where the tarballs.nixos.org hashed mirror gets updated?
<m1cr0man>
Hm, would the way to do this be add an assertion to print a warning if it's not a list, then check if it's a list in the module code somewhere during use and convert it if necessary?
<m1cr0man>
That doesn't change the value of the option though..other modules might have issues
<gchristensen>
m1cr0man: it basically has to be a hard error, though
<gchristensen>
since the user might be depending on that old behavior I think/
<bhipple>
I've been running my own internal hashed mirror at $WORK for about a year with a heavily forked version of the find-tarballs.nix and copy-tarballs.pl scripts, and noticed a handful of deficiencies. Would be nice to sync up with someone who knows more about how it works upstream
<m1cr0man>
gchristensen: Ugh yeah that sucks because other than this I think I can make the new module work out of the box for people that aren't changing the webroot path
Guest92090 has joined #nixos
<evanjs>
gchristensen: seriously, though. Also on my list of โwhat ifโsโ is a Mobile/remote NixOS config editor. Yes, I am crazy ๐ but mobile ssh is not fun haha
<gchristensen>
one sec bhipple
<m1cr0man>
evanjs, git repo with some CI/CD? :P github's mobile editor is not the worst
<infinisil>
Is there a way to make a `fetchTarball { ... }` available in a NixOS qemu vm?
<evanjs>
m1cr0man: oh good lord. No I was thinking something more visual haha. Like a playground (ie Swift, Rust) of sorts? Probably way better analogies than those haha
<infinisil>
I think since it's not technically a derivation I can't just add it with virtualisation.pathsInNixDB
Guest92100 has joined #nixos
<infinisil>
(well I tried that and it didn't work)
Guest92090 has quit [Remote host closed the connection]
<infinisil>
And I'm wondering if there's a way to achieve this other than changing it to something ugly like `(import <nixpkgs> {}).fetchFromGitHub { ... }`
<qyliss>
infinisil: how about copyPathToStore (fetchTarball ...)
<{^_^}>
[nixpkgs] @mweinelt opened pull request #77531 โ kernel: set POWERCAP and INTEL_RAPL โ https://git.io/JvfBF
<gchristensen>
bhipple: pretty much daily on a cron. what kind of updates would you like?
<bhipple>
Internally, I've rewritten it from perl -> python to avoid needing support on perl langbinds, and parameterized where it uploads (S3, flat FTP server, dir on disk), and updated it to not need a local nix store. Would kinda like to upstream some of this but I'm not 100% clear on the current feature set, and know my script is missing some stuff
<gchristensen>
ah
<infinisil>
qyliss: Nah that doesn't work
<bhipple>
But as far as features: I've noticed that often find-tarballs.nix misses src dependencies in private let bindings, noticed that the builtins fetcher uses base16 encoding instead of base32, noticed that the copy-tarballs only does flat files (no recursive) so I was wondering if we need a NAR mirror support or something
<bhipple>
the last one is the biggest, as it means that things like fetchFromGitHub can be mirrored if it's a release src tarball, but not if it's a git clone dir
<infinisil>
qyliss: I guess I haven't mentioned it, but the vm is running inside a nix-build
halfbit has quit [Ping timeout: 252 seconds]
Guest92100 has quit [Ping timeout: 265 seconds]
<gchristensen>
so I know eelco isn't keen on rewrites, bhipple, but perhaps the part about no local nix store is interesting
<viric>
Anyone knows what can make a luks device in use? It's not mounted
<infinisil>
So nix evaluation doesn't have access to the internet
<bhipple>
I have various workarounds for most of these but was just curious who knows the most about it to see if I'm not rediscovering old known issues one at a time :)
<viric>
on luksClose I get "Device lvluks is still in use."
<gchristensen>
bhipple: the hashes in the hashed mirror is intentionally a hash that upstream would recognize (ie: not a NAR). I think NARs should stay in the cache. the tarballs mirror really is for archives we've fetched
DerGuteMoritz has quit [Ping timeout: 268 seconds]
<bhipple>
gchristensen: makes sense. I'm building NixPkgs with builders that are 100% air-gapped from all remote network access except the hashed mirror, which I do because we want to be able to re-build historical archives in fresh nix stores, and upstream URLs often disappear
<bhipple>
(my own hashed mirror, not tarballs.nixos.org)
<m1cr0man>
evanjs that makes more sense, and infact I'd really like something like that for one of my deployments
<viric>
... things with lvluks ... # Replacing mountinfo device (0:53) with matching DM device backup (253:12).
<bhipple>
The ones that are more problematic are ones like cargo, go, and bazel, which do a goModSha256 trick where they "vendor" their dependencies into a src hash package. These are the sort of recursive hashed-mirror packages I'm interested in supporting
<viric>
The DM device "backup" is another one
<m1cr0man>
ok gonna sleep and dream about SSL certs and how to nixify them :)
<gchristensen>
bhipple: cargo, go, bazel are devils and should be banned.
m1cr0man has quit [Remote host closed the connection]
<gchristensen>
those fetchers, thaht is
<qyliss>
gchristensen++
<{^_^}>
gchristensen's karma got increased to 195
<bhipple>
Hah, no disagreements there :)
<evanjs>
yeah I think cargo's I just overlook but go just drives me crazy (probably because I haven't done much with it) because of the whole GO PATH thing haha
<gchristensen>
bhipple: so instead of improving upstream's mirror tooling, I'd rather work on fixing nixpkgs
<bhipple>
gchristensen: that's an interesting idea, and is actually how my workaround spoofer works: if it's going to look for a pkg with recursive dir hash X, I can put a tar.gz file in the hashed mirror at location X (tho the tar.gz file has hash Y), and the fetcher will find it and unpack it, then validate that, indeed, it hash hash X once unpacked. Super dirty, would be nice if we were just looking for Y.tar.gz
<bhipple>
in the first place
<gchristensen>
bhipple: it would be more in the spirit of fixed output builders anyway
<bhipple>
essentially, the hashed mirrors only work with --flat hashes
<bhipple>
I guess there's performance/efficiency value in the recursive hash for some src inputs, though, since the builders aren't always unpacking as the first phase of builds?
<bhipple>
considering for NixPkgs' sake, not my own
<gchristensen>
there are nice perks of using archives and not recursive ashes
<gchristensen>
for example, if the source is an archive, SOURCE_DATE_EPOCH is filled in automatically to a reasonable date, and generated docs get relevant dates
Guest92090 has quit [Remote host closed the connection]
<bhipple>
Computing and checking the hashes is much faster/simpler, too
<gchristensen>
yeah
werner291 has quit [Quit: werner291]
<bhipple>
although perhaps not net faster when considering time to pack after the git clone, and time to unpack at the start of a build
<bhipple>
would save some space on disk for all the src packages too, though
<gchristensen>
I have to assume that compared to compilation the compress / decompress is nothing
<infinisil>
Regarding what I asked earlier, I think the solution is to just not nix-build in the vm but let the outer nix handle that