<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fjAeY
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #66462 → hunspell-dicts: add support for Australian dictionary → https://git.io/fj7Q8
<{^_^}>
[nixpkgs] @matthewbauer pushed commit from @Provessor to master « hunspell-dicts: add support for Australian dictionary (#66462) »: https://git.io/fjAeZ
laika___ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jonreeve[m]>
Can someone give me a hand with my overlay? I can't seem to get Jupyterlab 1.0 installed for the life of me. I've been trying for months now. I'm thinking of switching to something easier than nixos.
<jonreeve[m]>
I guess the issue is that jupyterlab-server requires jsonschema>3, but nearly everything else in python requires v2. But this is the kind of thing that Nix was made for, right? So I should just be able to define a my_jsonschema and have it be a dependency for jupyterlab-server. But I seem to be missing something
<jonreeve[m]>
It looks like globally upgrading jsonschema won't work, since so many other python packages depend on the 2.X version.
<infinisil>
Yeah so this is what i need to change before I can PR
<jonreeve[m]>
But I can build a 3.X one with a different name, though, and pass it to jupyterlab-server, I just need to get the order right
<infinisil>
Well I tried that, but it didn't work, probably because there's sub dependencies using the 2.X version still
<jonreeve[m]>
But something's not right when I pass my_jsonschema as a propagatedBuildInput to my_jupyterlab_server. Am I doing the order wrong there?
<infinisil>
ANd that multiple levels deep
evax has quit [Ping timeout: 268 seconds]
<infinisil>
The order shouldn't matter
<jonreeve[m]>
Hmmm I think I see what you mean
<jonreeve[m]>
This is a big mess
<infinisil>
I think you should first try to build it from my nixpkgs branch (which is master + my commits), because I think you might have some different nixpkgs version which gets you different results
<jonreeve[m]>
I'll give it a shot. Thanks
amfl_ is now known as amfl
felixfoertsch has joined #nixos
felixfoertsch23 has quit [Ping timeout: 264 seconds]
<evanjs>
infinisil: jonreeve was asking on matrix and I've been waiting on ihaskell to get fixed again and was curious about jupyterlab 1.0. I prefer lab over notebook when possible.
<evanjs>
infinisil: Oh, on a completely different note, do you have a template for your private repo secrets? I haven't setup secrets in nix before and was trying to mimic your znc setup
freeman42x has quit [Quit: Leaving]
<infinisil>
evanjs: Nah I don't have a template, but there's not too much to it
<infinisil>
The most interesting thing is probably the thing to generate a nix expression for all passwords
<infinisil>
And that's really just an option `private.passwords = mkOption { type = attrsOf str; default = import ./gen.nix; internal = true; }` and a gen.sh that just writes to gen.nix by querying `pass` for a number of keys
<infinisil>
I should move this out of the private repo though and make a nicer module for it
iyzsong has quit [Ping timeout: 250 seconds]
Zer0xp has joined #nixos
chr15 has joined #nixos
<iqubic>
Lorri and direnv in emacs is literally the best thing ever.
<iqubic>
I have never seen any better nix-shell integration.
<iqubic>
Everything is working exactly the way I want it to.
lally has quit [Ping timeout: 248 seconds]
lally has joined #nixos
chr15 has quit [Ping timeout: 245 seconds]
Zer0xp has quit [Ping timeout: 268 seconds]
<{^_^}>
[nixpkgs] @teto pushed commit from @Alkeryn to master « ckb-next: use qt5's mkDerivation »: https://git.io/fjAfS
<evanjs>
infinisil: Yeah a public module would be great. Ahhh I need to make the option first, duh. After some fighting with my tired self, I think I have a handle on it now (nixos-option works). Now to set get znc properly configured...
nexgen2 has quit [Quit: Leaving]
endformationage has quit [Quit: WeeChat 2.5]
lally has quit [Ping timeout: 244 seconds]
abathur has quit [Ping timeout: 245 seconds]
dansho has quit [Remote host closed the connection]
dansho has joined #nixos
alex-v has quit [Ping timeout: 246 seconds]
palo1 has joined #nixos
<{^_^}>
[nixpkgs] @Provessor opened pull request #67424 → Add large hunspell dicts → https://git.io/fjAfx
evanjs has quit [Quit: WeeChat 2.5]
palo has quit [Ping timeout: 248 seconds]
palo1 is now known as palo
alex-v has joined #nixos
evanjs has joined #nixos
freedan42x has joined #nixos
evanjs has quit [Client Quit]
evanjs has joined #nixos
<hpfr[m]>
So there seems to be a nixos option for adding config to logind but not /etc/systemd/sleep.conf? Am I supposed to just change that imperatively? :/
oborot_ has quit [Ping timeout: 245 seconds]
oborot has quit [Ping timeout: 244 seconds]
captn3m0- has joined #nixos
captn3m0 has quit [Ping timeout: 272 seconds]
<hpfr[m]>
I guess environment.etc."systemd/sleep.conf"? Lame
alex-v has quit [Remote host closed the connection]
alex-v has joined #nixos
chiiba has joined #nixos
<slack1256>
I still don't know why logind is useful...
<{^_^}>
[nixpkgs] @jchv opened pull request #67425 → lightspark: init at 0.8.1 → https://git.io/fjAJI
kini has quit [Read error: Connection reset by peer]
Phillemann has joined #nixos
<Phillemann>
I'm trying to package the Python program "gcp". It has a normal setup.py file containing a "dbus-python" dependency. When I add this dep to propagatedBuildInputs, still nix-build tells me it cannot find it.
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fjAUc
<li_matrix>
any bazel + nix users?
slack1256 has quit [Remote host closed the connection]
<srhb>
li_matrix: You should probably just state your question. I've used bazel a tiny, tiny bit a while ago, and probably won't be able to help, but can't tell before you explain the issue. :)
<li_matrix>
no that was my question
<li_matrix>
thanks!
<li_matrix>
eldostra mentionned it on GH and I was curious
<betaboon>
joepie91: then in winetricks add "adcefwebbrowser.exe" (which is part of the installed fusion360) applications so that it is run in win7 mode
<betaboon>
joepie91: virtualdesktop in winetricks fixes floating ui-components
<betaboon>
joepie91: then you should be done
<clever>
betaboon: maybe write it up on the nixos wiki?
<betaboon>
joepie91: only thing that doesnt work: when closing fusion360 it will get stuck and you have to `killall fusion360.exe`
<betaboon>
clever: i think running a specific application under wine is of no concern for nixos-wiki.
localstore has joined #nixos
<clever>
ehh, yeah
zgrep has quit [Quit: It's a quitter's world.]
<clever>
only time its been nixos specific for me, was when i had to run winetricks on the proton prefix from steam
<betaboon>
clever: i never had to do that oO
<clever>
the nixpkgs winetricks is a different wine version, and the proton winetricks isnt patched
<betaboon>
i guess i should find some time to setup a blog at some point
<clever>
betaboon: stationeers needs a font installed into the prefix, or half the text is just missing
<localstore>
hey all! what am I doing wrong here? ./roles/log/alerts/notifications.tmpl.nix
<localstore>
I had it in let (write something in a yaml file and define it) in (test of my module)
<betaboon>
clever: ah ok, for a specific game, i see :)
zgrep has joined #nixos
<localstore>
and I want to move the let section into a separate file and include it :/
<localstore>
but not sure how to do that
<localstore>
tried to to do, let imports = []; in but that doesn't work
<betaboon>
localstore: can you post the contents of that fine on a pastebin of gist ?
<clever>
localstore: use normal import to load a file, not imports
<localstore>
sorry, wrong paste :)
<localstore>
what is the differrence?
<localstore>
between import/imports?
<clever>
imports is a list of nixos modules
<clever>
import is a nix primitive, to just load a file and get whatever value is in the file
<betaboon>
i like to use `imports = [];` when applicable, but it doesnt seem applicable for this use-case
<vika_nezrimaya>
can pkgs.releaseTools.sourceTarball correctly package a Python source tree with setup.py sdist?
<clever>
localstore: gist also helps a lot in this situation, it supports multiple files, so you can just include the whole thing and the line numbers survive
<localstore>
clever: do I just od import ./myfile.nix; ?
<clever>
localstore: in a let block
<clever>
that will return whatever the file contains
<localstore>
clever, hmm, I tihnk I'm doing it wrong /home/mmahut/repo/morph/
<clever>
localstore: a let block must be key=expr; pairs
<clever>
localstore: you just have a naked expr
<localstore>
oh ok, is there a way to include a file in let that will contain these key exprt pairs?
<localstore>
I have them in the file
<localstore>
and want to include the whole let block
<clever>
localstore: if the file contains { foo = "bar"; }
<clever>
and then you do let baz = import ./file.nix; in ...
<clever>
you can then do baz.foo
<localstore>
that's neat, let me try that
dahirsch has quit [Ping timeout: 250 seconds]
fendor_ has joined #nixos
fendor_ has quit [Remote host closed the connection]
fendor_ has joined #nixos
fendor has quit [Ping timeout: 258 seconds]
localstore has quit [Remote host closed the connection]
<joepie91>
betaboon: with what winetricks setup?
<joepie91>
thanks :) will give that a try some time soon
<joepie91>
would be good not to have to dual-boot for this
<joepie91>
aha
<joepie91>
betaboon: curious, did you figure this out yourself? I looked around for the state of Fusion 360 on Linux a while ago and pretty much just found "nope, won't work properly" comments
<joepie91>
ah. I can live with that :)
<joepie91>
I would certainly appreciate it being on there
<rnhmjoj>
is there a reason why in nixos the dbus-launch process is kept around after dbus has started?
<betaboon>
joepie91: no not completly. i tried every other week, googled for information etc, this solution is the result of trial-and-error following all the (sometimes outdated) information i found
<angerman>
Shouldn't I in principle be able to build this: `nix build '(with (import ../nixpkgs { crossSystem = { config = "armv6l-unknown-linux-gnueabihf"; }; }); haskell.compiler.ghc865)'` where nixpkgs points to release-19.03?
cfricke has quit [Ping timeout: 245 seconds]
<clever>
angerman: at a glance, i would expect that to work, what error does it have?
<angerman>
clever: it seems to try and build glibc natively on macOS.
<clever>
angerman: that sounds like a bug with one of the libraries being set wrong, the error at the end should say which
pie_ has joined #nixos
<angerman>
I've been trying to stab at it without much success.
<angerman>
I'll file an issue
<clever>
angerman: what happens if you try to build perl with a similar command?
<angerman>
yea same.
<clever>
while evaluating 'getOutput' at /Users/angerman/Projects/iohk/nixpkgs/lib/attrsets.nix:464:23, called from /Users/angerman/Projects/iohk/nixpkgs/pkgs/development/interpreters/perl/default.nix:22:13:
<clever>
error: while evaluating 'assertValidity' at /home/clever/apps/nixpkgs-master/pkgs/stdenv/generic/check-meta.nix:248:20, called from /home/clever/apps/nixpkgs-master/pkgs/stdenv/generic/make-derivation.nix:273:18:
<angerman>
looks, like builing `ghc` on head get's me a bit firther.
<clever>
angerman: i run into a different error on this end
<angerman>
yea, you won't likely have that arch issue so far up, as your nix host is linux as well.
<clever>
ah yeah, need a darwin box, let me see if i still have ssh to sarov...
boxscape is now known as boxscapeR
boxscapeR is now known as boxscape
<clever>
angerman: and i'm in!
<angerman>
clever: thanks. I'll probably hit my head against it some more after lunch.
<clever>
Darwin nixoss-iMac.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
<angerman>
I'll just casually blame Ericson2314 for braking it, without having proof.
<{^_^}>
#67433 (by angerman, 9 minutes ago, open): Can't build armv6l-unknown-linux-gnueabihf-ghc (or -perl) on macOS with release-19.03
<clever>
angerman++
<{^_^}>
angerman's karma got increased to 2
<das_j>
how can I use the native versions of packages in makeBinPath? basically the makeBinPath-equvivalent of nativeBuildInputs
<angerman>
clever: for a bit of background, I was experimenting with `haskell.nix` and got it to cross compile to windows and ghcjs, and casually thought I should try to change the triple to rpi, which is when the whole thing just fell apart and left be a bit baffled.
<clever>
angerman: i tried native (and qemu) arm builds a few months ago, and thats when i discovered (with your help) that it lacks native codegen, and the llvm backend is a bit segfaulty under -j>1
<angerman>
Well, I didn't even get that far :-/
<clever>
there was no proper cross in my setup, it was all "native", either on an aarch64 kernel, or qemu-user-aarch64
<angerman>
ohh! Yea, I'm stubborn, I only do cross to arm/aarch64
<clever>
qemu-user lets you cheat a bit
<clever>
but i can also see qemu-user helping, to let you run template haskell for proper cross
<angerman>
clever: yea there is a patch that does what we do for win32 for arm32
<clever>
assertion failed at /private/var/root/michael/nixpkgs/pkgs/development/compilers/ghc/8.2.2-binary.nix:7:1
<clever>
still get an assertion in ghc, when on a mac
<angerman>
it seems like you can build it on master though.
das_j has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @peterhoeg opened pull request #67441 → crystal: init at 0.30.1 → https://git.io/fjAIF
fusion809 has joined #nixos
boxscape has joined #nixos
<boxscape>
What exactly does it mean when a package is marked as broken? Simply that you (most likely) won't be able to install it, or could it mean other things too?
<symphorien>
that it is unlikely to compile
<boxscape>
okay
<symphorien>
in some cases this means "does not compile, no maintainer, we don't remove this yet, but only in a few months"
<boxscape>
I see
<symphorien>
so if you rely on this package and are able to make it work, feel free to make a PR and add yourself as maintainer
<boxscape>
ok, I'll see if I have some time to figure out what to do
<symphorien>
good luck
<boxscape>
(I'm looking specifically at a haskell package, so I assume since the goal is to have the entirety of hackage in nix packages it probably wouldn't be removed even if it stays broken?)
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aveltras>
are cabal common stanzas supported by cabal2nix ?
dahirsch has joined #nixos
<maralorn>
boxscape: With haskell packages they get sometimes prematurely set to broken by the automation because of temporary build fails. So trying to build it with an override might work. When you notice that for a package, it would be awesome to make a PR to mark it as not broken anymore.
<maralorn>
otoh I am not even sure if that (i.e. removing the broken flag) matters after the next automation run. I also don‘t know how often these runs happen. Would love to hear about that.
<boxscape>
maralorn the specific package I'm referring to (liquid-fixpoint) already had a github issue since december, and apparently all that's required to fix it is to update the version that's on hackage. So I just commented on that issue asking if there's an update on that
mapofthesun has joined #nixos
<mapofthesun>
i have a new package derivation which ships a script, that is using templates from $out/usr/share to genreate some content --- I need to replace the template path in the script with where itwill be in the nix storage, how to do that?
<mapofthesun>
i mean, is it even possible? if not, how are cases like this solved?
selfsymmetric-mu has quit [Remote host closed the connection]
<tilpner>
You can use $out in patchPhase IIRC, or use builtins.placeholder "out"
<mapofthesun>
but that path is using at script running, not building or installation
<LouisDK>
symphorien: Thanks. Just discovered that. On line 6663 it should run "disable xnvctrl" if the first commands fails but it just seems to exit with an error instead which I find I strange. Thinking of using "services.xserver.videoDrivers" to see if the system runs nvidia prior to build.
<mapofthesun>
or is $out also for when the package is build?
<symphorien>
LouisDK: because of the sandbox, you cannot detect whether nvidia is installed at build time anyway
<tilpner>
mapofthesun: Yes, so replace the path during patchPhase with $out
<LouisDK>
symphorien: not with an mkIf services.xserver.videoDrivers = "nvidia*"?
<mapofthesun>
tilpner: the path is a line in the script itself
<mapofthesun>
ok will give it a try
<tilpner>
mapofthesun: That's okay, substituteInPlace or sed can be used to edit files at build time
<mapofthesun>
yes, but that path is not going to be used at build time
<mapofthesun>
but after installation by the user
<mapofthesun>
if you see what I mean
<symphorien>
LouisDK: you can imagine making two mythtv derivations and make a module which selects which one to install depending on the value of this option
<tilpner>
mapofthesun: Yes it will. Passing $out to substituteInPlace counts as usage during build time
<clever>
LouisDK: i would make a single mythtv default.nix, that has an option like withNvidia ? false in its args, and then callPackage it twice, with it set to true or false
<tilpner>
mapofthesun: So you do patchPhase = ''substituteInPlace your-file --replace /usr/share/something $out/share/something'';
<symphorien>
this uses the "right" of evdi depending on which options the user selected
xkapastel has joined #nixos
<LouisDK>
symphorien: Adding "--disable-xnvctrl" to "configureFlags" if mkIf services.xserver.videoDrivers = "nvidia*" is true wouldn't be a good option?
goodwill has quit [Quit: ...]
<clever>
LouisDK: you cant directly read services.xserver from default.nix, so it needs to be an argument to receive via .override
<symphorien>
you cannot use mkif in the default.nix of mythtv
<symphorien>
there are two levels: derivations, which are built in a sandbox, only can create files in $out, and should (ideally) run on any system with nix
<LouisDK>
symphorien, makes sense.
<symphorien>
and modules, which are NixOS specific, and mostly use derivations to populate /etc/ and /run/current-system according to /etc/nixos/configuration.nix
<clever>
LouisDK: in the case of virtualbox, it will .override the package, to make it obey the nixos options in configuration.nix
<clever>
and thats where you can bring `services.xserver.videoDrivers = "nvidia*"` into the mix
<iggi_>
can someone help me with running sonic-pi? Just 'nix-shell -p sonic-pi --run sonic-pi' is producing an error on startup. here is the past of the error https://pastebin.com/raw/s60TQ2b7
<iggi_>
I tried setting up jack, but the nixos wiki page on jack is outdated.
<tilpner>
iggi_: Outdated how?
<tilpner>
iggi_: Does `groups` say you are part of the jackaudio group?
zupo has joined #nixos
<aanderse>
something wrong with my brain... i can't seem to understand why i can't override the contents of /etc/openal/alsoft.conf in my configuration.nix :\
<aanderse>
pulseaudio module originally defines the entry
<aanderse>
i'm trying to overwrite it with environment.etc."openal/alsoft.conf".text = lib.mkForce "drivers=alsa"
<aanderse>
error is duplicate entry openal/alsoft.conf
<aanderse>
can anyone point out my likely stupid erro?
<alexarice[m]>
aanderse: Does it work if you specify it as { target = ...; source = ...;} as they have done in the module?
<aanderse>
alexarice[m]: i'm 99% sure i tested that a few minutes ago, will confirm now
<clever>
aanderse: one is setting text, the other is setting source, mkForge cant change it from source to text
<aanderse>
clever: yeah, right, here we go... that was an even bigger error
<aanderse>
pasting...
endformationage has joined #nixos
<alexarice[m]>
clever: aanderse I agree with clever, you are forcing the text attribute but I'm guessing behind the scenes it writes the text attribute to a file and then says that source is set twice?
<aanderse>
but yeah, scratching my head at this point
<alexarice[m]>
do you know where the module code for `environment.etc` is?
<clever>
aanderse: i think i see the problem, behind the scenes, environment.etc."foo" turns into environment.etc = [ { name = "foo"; source = ...; } ];
<clever>
aanderse: so mkForce cant cant override things, and just inserts a 2nd element into the list
<aanderse>
i'm just trying to get sound working on stardew valley for my son... lol
<clever>
and then make-etc.sh complains
<alexarice[m]>
seems quite hard to override actually
<iggi_>
tilpner: uff, switch to unstable sounds like it will cause to much work.
<aanderse>
alexarice[m]: yeah, i guess some things fall through the cracks :\
<clever>
alexarice[m]: the override is forcing the game to use alsa
<clever>
and then alsa picks the first unused device, whatever pulse happens to not have open, usually the one that isnt plugged in :P
<clever>
its unused for a reason!
<aanderse>
yeah, anywho, thanks for everyone helping me out with the environment.etc thing, i thought i must have been missing something obvious. maybe i'll make a PR for 20.03 to make environment.etc an attrset
<clever>
aanderse: a far simpler change is to pr pulseaudion.nix, to make that a proper option
<clever>
tilpner: less security related, a package to build electron, from source
<tilpner>
clever: No, I want to use security as motivation for this
<tilpner>
(And electron might be too large to use here anyway)
<ptival[m]>
hi, I'm trying to follow the commands in the man page of `nix-shell`, but in my shell, the `genericBuild` and phases do not seem to be sourced: I run `nix-shell '<nixpkgs>' -A bc --command sh`, and then in the new shell, phases are not available to run, things like `typeset -F` don't return anything :\
<clever>
tilpner: the util to download the electron source, literally creates a 30gig directory
<tilpner>
clever: Are you making the point that it's unpractical to audit 30G of code?
<clever>
ptival[m]: genericBuild is a bash function, and those dont get inherited when you run another sh
<clever>
tilpner: more agreeing with you that its "too large" as in just eats a ton of disk space :P
<clever>
ptival[m]: try again without --command
rsoeldner has quit [Ping timeout: 252 seconds]
mac10688 has joined #nixos
turion has joined #nixos
<ldlework>
Does anyone have know of offhand some guide or walkthrough on how to setup the default.nix/shell.nix such that they work together and each piece does contributes/does the right thing?
drakonis has joined #nixos
<clever>
ldlework: for most packages, default.nix can work by itself
<ldlework>
Something like the shell.nix sets up the environment for which default.nix uses to build? I don't know. I don't have this internalized yet.
<ldlework>
clever: sure but I also want to be able to shell in and do stuff
zupo has joined #nixos
<clever>
ldlework: nix-shell on the default.nix works for any c/c++ based project
<ldlework>
Yeah, I'm in dotnet core land
<ldlework>
But I guess I should just start by building a default.nix
<clever>
and then test if it also happens to work on shell
<ldlework>
.NET on Linux is an absolute dream btw
<ldlework>
dunno if any of you know
<ldlework>
Did you know that Linux on Windows is also a dream?!
<ldlework>
I have been working with WSL2 the last few weeks and wow
<mightybyte>
Is there a way to force a build to be for a certain system?
<ldlework>
ok ok offtopic
<mightybyte>
...without the nix derivation you're using exposing an argument for it
<clever>
ldlework: ive seen a couple bits of software, that give a .exe file for the "linux" binary, and it "just works" when i run mono on it
<iqubic>
ldlework: Long time, no see.
<clever>
surprisingly, i dont even have to patchelf things
<iqubic>
What?!?!
<iqubic>
WHAT!?!?!
<ldlework>
hi iqubic
<iqubic>
does nix-build do what I think it does?
<ldlework>
I must just say that I'm **incredibly** satisfied writing C# and F# with Rider on Linux with Dotnet Core
<ldlework>
Rider understands C# probably better than any IDE understands any other language.
<iqubic>
Does nix-build search the current directory for a default.nix, and build that?
<ldlework>
Even smalltalk, lisps, etc
<ldlework>
Big claim, I know.
<clever>
iqubic: by default, yes
rsoeldner has joined #nixos
<ldlework>
Now I just gotta figure out how to deploy dotnet stuff, beyond you know like, Docker
pie_ has quit [Ping timeout: 250 seconds]
<ldlework>
Learning how to use Nixlang for Docker is something I should do at some point
<ldlework>
I wish there were some books I could buy on Nix
<iqubic>
clever: That's good.
<ldlework>
dang I can't even remember how to start a default.nix
<clever>
ldlework: with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; buildInputs = [ mono ]; }
<ldlework>
clever: where do you live?
<clever>
ldlework: canada
<ldlework>
cool
pie_ has joined #nixos
<mightybyte>
tilpner: You don't need to do anything special for underhanded nix. We had a production nix expression delete someone's entire hard drive a few years ago. :o
lopsided98 has quit [Remote host closed the connection]
<tilpner>
mightybyte: With sandboxing?
<vika_nezrimaya>
mightybyte: i'm impressed
<mightybyte>
I don't think it was sandboxed.
<mightybyte>
Probably because it was being run in nix-shell or something.
<iqubic>
That sounds like sandboxing to me.
<mightybyte>
It didn't actually delete the whole hard drive because the person got suspicious pretty quickly and killed it. But not before it had already done a lot of damage.
lopsided98 has joined #nixos
<clever>
mightybyte: that reminds me of justdoit .....
<alexarice[m]>
Is there a way to conditionally set an attribute? mkIf maybe?
<clever>
alexarice[m]: or depends on the context
<clever>
s/or//
shibboleth has joined #nixos
<alexarice[m]>
I sort of want { a = 1; if c then b = 2; }
<alexarice[m]>
in a module
<clever>
alexarice[m]: if its a nixos module, mkIf is your solution
<alexarice[m]>
thanks
<alexarice[m]>
clever++
<{^_^}>
clever's karma got increased to 178
Myhlamaeus1 has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @Ma27 opened pull request #67452 → vde2: build with `--disable-python` by default → https://git.io/fjAmD
<ldlework>
clever: hmm, System.UnauthorizedAccessException: Access to the path '/homeless-shelter/.dotnet' is denied. ---> System.IO.IOException: Permission denied
<clever>
if outputHashMode == "flat", then $out must be a file, if its "recursive" then $out can be a file, symlink, or directory
<clever>
that also impacts how it computes outputHash, but you can just tofu it
<clever>
after that, you can use any means you want to download things and put them in $out
<clever>
buildCommand is one method, pkgs.runCommand is another
ixxie has joined #nixos
<ldlework>
not gonna lie, i barely understand what you're saying
<ldlework>
i'll read it a few more times
<clever>
,tofu
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<ldlework>
what is my overall goal here, in like conceptual terms
<ldlework>
is the idea to create a completely independent package from my actual application, which is just the downloaded dependencies?
<clever>
to download the dependencies and nothing else
iqubic` has joined #nixos
<clever>
that derivation will return a path to those dependencies, which you can then use in a non-fixed drv, to build things
<ldlework>
clever: if the only build input I need is mono, and the command run from my project source is `mono .paket/paket.exe install` and that downloads things to places like $HOME/.nuget and $HOME/.paket which are then copied into the current working directory into folders like `paket-files/` and `packages/` and `paket.lock` what are we looking at to adapt what you're saying to that?
<ldlework>
Basically, instead of curl google.com, do the install process
<ldlework>
clever: hmm no matter what I do, it just spits out the same thing
<ldlework>
i even changed the derivation..
viric has quit [Read error: Connection reset by peer]
<clever>
ldlework: then you set outputHash on the main build, which is a promise that the output will be the same as last time
<clever>
ldlework: so nix is trusting your lie, and ignoring all changes
<clever>
ldlework: thats why you have to split it into 2 pieces, download and build
wfranzini has quit [Remote host closed the connection]
<ldlework>
I only set the hash inside the dependencies
<ldlework>
I haven't done anything to default.nix
wfranzini has joined #nixos
<clever>
ldlework: can you gist all of the nix files?
<ldlework>
i have default.nix and paket.nix (for dependencies)
<ldlework>
yes
<sphalerite>
Is there a way to set a channel to a specific revision? I'm suspecting I might need to do `nix-channel --add https://releases.nixos.org/nixos/19.03/nixos-19.03.173369.500931b1f65 nixos && nix-channel --update`, then set the URL back to the normal one, or is there a better way?
<clever>
sphalerite: does it need to be a channel?
<sphalerite>
clever: yeah I want to use the latest version of nixpkgs before a breaking commit was introduced, without fudging up my NIX_PATH
jollyjester has joined #nixos
<clever>
sphalerite: -I nixpkgs=foo
<jollyjester>
hello i'm trying to make a program using cairo but cairo.h is not found
<bdesham>
my config.nix contains a bunch of package overrides. how can I build my overridden version of a package against a local clone of nixpkgs instead of whatever's in my NIX_PATH?
<iqubic`>
Like I want variable $FOO to be set to "bar" but only in my nix-shell.
<symphorien>
I would advise against using nix inside your build system
<{^_^}>
#63895 (by turion, 8 weeks ago, open): Add luna
<clever>
ldlework: yeah, if you dont delete result, nix-collect-garbage wont be able to delete /nix/store/3h6w6dbai6ph3mm8rzrqy330cxf2lgkf-disinfo-dependencies
justanotheruser has joined #nixos
<jollyjester>
symphorien: nix-shell -p cairo and then cc main.c and cairo.h not found
<symphorien>
,locate cairo.h
<{^_^}>
Found in packages: wxGTK29, palemoon, cairo.dev
<clever>
jollyjester: the cairo devs decided to put the headers in $out/include/cairo/cairo.h
<jollyjester>
oh cairo.dev
<jollyjester>
makes sense
<symphorien>
Try cairo.dev ?
<clever>
jollyjester: to solve the same problem nix solves
<clever>
which breaks nix :P
<clever>
so you must use pkgconfig to "discover" the right -I path
<ldlework>
clever: in my default.nix I'm doing `cp -r --parents ${deps}/* .` but getting cp: cannot create directory './nix/store/3h6w6dbai6ph3mm8rzrqy330cxf2lgkf-disinfo-dependencies/packages': Permission denied etc
<clever>
iqubic`: to be a default nix expression
<clever>
ldlework: why are you using --parents?
casaca has quit [Ping timeout: 268 seconds]
<ldlework>
so that the file structure is preserved
<clever>
ldlework: -r already does that
<ldlework>
directory structure rather
<clever>
ldlework: and dont use *
<ldlework>
you're right
iqubic` has left #nixos ["ERC (IRC client for Emacs 27.0.50)"]
<ldlework>
hmm dang when building dotnet wants to change shit in the store
<ldlework>
Permission denied to modify the '/nix/store/bkrkm7fia7f3vfjk7j9hplag9r7l4bp9-dotnet-sdk-2.2.103/sdk/NuGetFallbackFolder' folder.
casaca has joined #nixos
<clever>
ldlework: why is it trying to modify its own source?
pie_ has joined #nixos
<ldlework>
crap like this too
<ldlework>
/nix/store/bkrkm7fia7f3vfjk7j9hplag9r7l4bp9-dotnet-sdk-2.2.103/sdk/2.2.103/NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/build/disinfo/Disunity.Disinfo/Disunity.Disinfo.csproj]
<ldlework>
damn it dotnet
<clever>
ldlework: youll need to find a way to convince it to build without network access
fendor__ has joined #nixos
fendor_ has quit [Ping timeout: 244 seconds]
<ptival[m]>
@clever thanks, figured out my problem!
<clever>
and then, `ghci -c "runhaskell Setup.hs repl"` to pull up ghci
<ldlework>
clever: This is after the first part, which also accesses the internet, works completely fine and downloads all the packages
<turion>
Ok, I'll try that :) thanks a lot clever!
<clever>
ldlework: i think its trying to query the package db, to know what the latest version is, and if it can just use what its finding on disk, or has to update
<clever>
ldlework: you must figure out how to force it to stop doing that
<ldlework>
clever: this is during the derivation that has internet access
<ldlework>
i think it has something to do with https validation
<turion>
Hmm how about cabal test though
<clever>
ldlework: oh, ssl, one minute
<clever>
turion: runhaskell Setup.hs test
<turion>
Oh, just runhaskell Setup.hs test
<ldlework>
i can't even curl the file that nuget is trying to get at
<turion>
:)
<clever>
turion: and `runhaskell Setup.hs configure --enable-tests`
<ldlework>
clever: do you have a big personal relational knowledge base, or do you like go into a savant like seizure where you deep recall arbitrary nix technique?
<clever>
ldlework: some env var has to be set to ${cacert}/etc/ssl/certs/ca-bundle.crt
<clever>
ldlework: and this tweet explains my secret :P
<ldlework>
clever: so both nuget and curl both failed to get at this json file behind https. are there like application specific environment variables for this?! or is there a system location we can put the bundle so that apps find it
<clever>
ldlework: the sandbox is stopping openssl from finding the default ca cert list, you have to set an env var to tell it who to tust
<clever>
trust*
<ldlework>
so look up the openssl env var
<ldlework>
maybe SSL_CERT_DIR will do it
<clever>
ldlework: grep nixpkgs for `etc/ssl/certs/ca-bundle.crt`
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<clever>
,
<{^_^}>
Special commands: find tell locate expand - Commands sorted by use count, page 0 (use ,<n> to view page <n>): tofu help libraries unstable unfree escape'' library declarative ping escape" overlay howoldis pinning -a ask callpackage profiling pr paste imperative cache which-channel xy wololo exec fancy-uninstall nixlang++ pills xml haskell loot stateversion botsnack channels home-manager stuck pointers tias timer dontask pure-eval runtimedeps thesis
<clever>
dang thats some high lag
pie_ has joined #nixos
<angerman>
clever: got it to finally build. Will need to try something more involved next.
<clever>
angerman: id be interested in static arm builds
<clever>
angerman: since that would open up android fairly easily
<clever>
you can ignore the entire android NDK issue
<angerman>
Are you sure you can?
<clever>
angerman: the NDK is basically the libraries you link to (which live in /system/lib) and the headers for those libraries
<clever>
but if you have a static ELF file that fits the cpu arch, you dont care
<clever>
and the compiler toolchain for producing compatible binaries
<angerman>
clever: sure assuming you only perform the syscalls that your kernel permits.
ris has quit [Ping timeout: 246 seconds]
<clever>
yeah
<{^_^}>
[nixpkgs] @mmahut opened pull request #67456 → nixos/unifi: restarting on failure → https://git.io/fjAOO
_ris has joined #nixos
laika___ has joined #nixos
cunny[m] has joined #nixos
cunny[m] has left #nixos [#nixos]
Soo_Slow has joined #nixos
vvbb[m] has joined #nixos
<vvbb[m]>
hello
<vvbb[m]>
anyone here knows how to use nix-shell?
<vvbb[m]>
i'm just trying to build a project using cairo, trying to import the cairo package but keep getting cairo.h missing
<vvbb[m]>
also if anyone is willing to teach me how to use nix-shell that'd be great
drakonis has quit [Ping timeout: 246 seconds]
pointfourone has quit [Quit: Leaving]
<clever>
vvbb[m]: create a default.nix with these contents: with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; buildInputs = [ cairo pkgconfig ]; }
<savanni>
I use nix-shell for almost every project, so I have a lot of examples.
<clever>
vvbb[m]: then put CFLAGS=$(pkg-config --cflags cairo) into your Makefile
<vvbb[m]>
hmm thank you very much
pie_ has quit [Ping timeout: 250 seconds]
thc202 has quit [Ping timeout: 272 seconds]
<vvbb[m]>
i'm using qtcreator
<vvbb[m]>
by the way
<vvbb[m]>
just adding that to my makefile will make it work
<vvbb[m]>
or do i need additional setup
<vvbb[m]>
clever:
<clever>
vvbb[m]: the makefile also has to use $CFLAGS when building things
drakonis has joined #nixos
<vvbb[m]>
ok but i don't need to run qtcreator using nix-shell or something like that just add the CFLAGS part to my makefile
<vvbb[m]>
also does this matrix chat bridge to irc?
<clever>
vvbb[m]: if qtcreator is going to be running `make`, then you need to run it within nix-shell
<clever>
but if you only run make yourself in the shell, then you can just do only `make` in `nix-shell`
<vika_nezrimaya>
Please congratulate me on turning my laptop into a Hydra build server
<vvbb[m]>
congrats
<savanni>
:applause:!
<vika_nezrimaya>
I had a spare laptop and couldn't think of a project
<clever>
vika_nezrimaya: next fun step is deploying to it with nixops and the none backend
<vika_nezrimaya>
Clarification please? What do you mean?
<vika_nezrimaya>
trying to use NixOps to manage it?
<vika_nezrimaya>
hm
<clever>
vika_nezrimaya: nas.nix and router.nix take the place of configuration.nix
jollyjester has joined #nixos
<jollyjester>
test
<vika_nezrimaya>
what's your router machine, clever?
<vvbb[m]>
ok yeah there's an irc bridge
jollyjester has quit [Client Quit]
<clever>
vika_nezrimaya: a 2U server with a pair of xeon cpu's (dual socket) and 8gig of ecc ram
<vika_nezrimaya>
There is indeed an IRC bridge, @vvbb. I'm currently on IRC and I read your messages! I assume you're a Matrix user?
<vika_nezrimaya>
clever: ughhh servers :3 I want one but I don't have the money and space for it
<vika_nezrimaya>
that's why I have an RPi
<vika_nezrimaya>
and now, as soon as the git clone of nixpkgs finishes on Hydra, it'll try to build a minimal NixOS system and some packages to go with it
jgt has joined #nixos
<clever>
vika_nezrimaya: its actually an old machine from my dads work, that had the power supply fail, so it was replaced
<clever>
then i fixed it
<clever>
model name : Intel(R) Xeon(TM) CPU 3.20GHz
<clever>
Aug 25 17:58:42 router kernel: e1000 0000:04:02.1 enp4s2f1: Detected Tx Unit Hang
<clever>
the cpu's are pretty old, and its not dual core, its dual socket!
<clever>
and lately, the network card has been having eratic hanging issues
<vika_nezrimaya>
means your internet can suddenly disappear?
<ldlework>
clever: why can't I copy a file from some other package to the current working directory (ie stuff from src=)? I get permission denied.
<clever>
vika_nezrimaya: both the lan and wan cards are failing, so either the router looses internet, or the house looses the router, lol
<ldlework>
but this ^ is where I'm running my build command, and where I need that file to be
<clever>
vika_nezrimaya: but it recovers after ~30 seconds
<clever>
the problem is that it tends to happen in bursts, sometimes back to back, so it keeps re-breaking
<vika_nezrimaya>
I think 30 seconds may actually be enough for some things to timeout...
<clever>
ldlework: cp preserves the permissions, one minute
<clever>
ldlework: cp --no-preserve=mode -r
<clever>
vika_nezrimaya: yeah, some things do fail every now and then
<clever>
vika_nezrimaya: i thought it might be related to the summer heat, and stuck an extra fan in it (tech support gore style!) but its still happening
<clever>
vika_nezrimaya: the top half of a floor fan is just jammed into the shelving unit, above the open case, lol
nabana has joined #nixos
<ldlework>
Why am I having such trouble with this sed replacement?
<ldlework>
find ./Disunity.Disinfo/obj/ -type f -print0 | xargs -0 sed -i "" -e "s@/build/disinfo@$out@g"
knupfer has joined #nixos
<ldlework>
sed: can't read : No such file or directory
<balsoft>
clever: I ususally use a vacuum cleaner for that purpose
<ldlework>
that folder is full of files :(
<clever>
ldlework: the "" told it to open ""
<ldlework>
damn you stack overflow!
<{^_^}>
[nixpkgs] @scalavision opened pull request #67457 → singularity: prepatch path to cp in 3.2.1 → https://git.io/fjAOz
<{^_^}>
[nixpkgs] @worldofpeace pushed 3 commits to master: https://git.io/fjAO9
reanimus has quit [Ping timeout: 276 seconds]
bakakuna has joined #nixos
growpotkin has joined #nixos
<ldlework>
clever: what's the quick way to also install a bin script with the right dotnet executable so Ican do `dotnet run TheDll.dll`
<ldlework>
some writeScriptBin thing
<clever>
ldlework: writeShellScriptBin or writeScriptBin
dahirsch has joined #nixos
wtv_nick has joined #nixos
<ldlework>
clever: do Icall that from inside installPhase
dahirsch has quit [Remote host closed the connection]
<clever>
ldlework: its a nix function
<clever>
ldlework: so you call it from the nix file, and pass it the other derivation as a string
<ldlework>
huh so like the top-level derivation ends up being the helper script?
<clever>
writeShellScriptBin "name" "${something}/bin/dotnet run ${yourthing}/TheDll.dll"
<clever>
yeah
<ldlework>
I see...
<clever>
default.nix could also return an attribute set, containing: the deps, the real build, and the script
<clever>
then you nix-build -A wrapper
jgt1 has joined #nixos
bakakuna has quit [Ping timeout: 272 seconds]
jgt has quit [Ping timeout: 252 seconds]
<zfnmxt>
What's the best way to restart a systemd service on resume from suspend? There's powerManagement.resumeCommands, but there's also systemd-suspend, and maybe other ways. Not sure what's the best.
<clever>
zfnmxt: there is a systemd target you can do something with (i forget what), which will cause systemd to restart it for you
xkapastel has quit [Quit: Connection closed for inactivity]
<ldlework>
clever: interestingly I get no output at all
<ldlework>
but my service seems to connected to discord
<ldlework>
but doesn't respond to anything, etc
<ldlework>
strange
<clever>
ldlework: any debug flags you can enable, or sprinkle prints thru the code?
<zfnmxt>
clever: Yeah, I think suspend.target. Probably better like that than via powerManagement.
jgt1 has quit [Read error: Connection reset by peer]
<vika_nezrimaya>
I suppose my RPi4 could be crunching some builds too
<{^_^}>
[nixpkgs] @matthewbauer pushed commit from @mroi to release-19.03 « glibc: fix cross builds on Darwin »: https://git.io/fjA3n
<vika_nezrimaya>
when I get it
<vika_nezrimaya>
when I buy it...
<samueldr>
as of right now nixos isn't trivial to get going on the rpi4, but it's a question of time, for when upstream projects stabilize the aarch64 stuff
<samueldr>
(both the kernel and u-boot, u-boot currentlu waiting on the kernel)
<vika_nezrimaya>
People are doing nixos on rpi4 with some patches and overlays
<vika_nezrimaya>
I saw it in the issue
<samueldr>
yeah, "isn't trivial" :)
<vika_nezrimaya>
didn't look closely yet
phdoerfler has quit [Quit: Leaving.]
<samueldr>
trivial would be just `dd`ing the sd_image as usual :)
<vika_nezrimaya>
pfffft that's too boring
<samueldr>
nah, that's trivial :)
<vika_nezrimaya>
I don't like dding images anyway, I want to be able to nixos-install them
wfranzini has quit [Remote host closed the connection]
<samueldr>
well, in a way the same applies, if you're booting from u-boot
<samueldr>
(I'm not sure if you have experience with the rpi side of nixos)
wfranzini has joined #nixos
reallymemorable has joined #nixos
<vika_nezrimaya>
I'm at the "Booted an image I cross-compiled on my RPi2 and now I don't know what to do with it"
<samueldr>
ah, so you at least can explore the boot chain, it's the same for aarch64 rpis
LouisDK has joined #nixos
LouisDK has quit [Remote host closed the connection]
<samueldr>
the file contains an expression that is a function, which declares its dependencies required; the output of the function is a derivation
<LouisDK>
Makes sense. Thanks.
<samueldr>
so the initial attrset-looking thing `{ stdenv, /* ... */ }:` is used to inject dependencies
<samueldr>
om
<samueldr>
oops
<samueldr>
in `all-packages.nix` it is being called using `mythtv = libsForQt5.callPackage ../applications/video/mythtv { };`
<samueldr>
(libsForQt5.callPackage is a specialized callPackage)
edwtjo has joined #nixos
<samueldr>
callPackage will input the required dependencies from the package set, and if needed you could pass an overriden dependency. e.g. if you needed a specific perl, it would be `/*...*/ callPackage { perl = perl528; }`
reallymemorable has quit [Quit: reallymemorable]
knupfer has quit [Ping timeout: 264 seconds]
<{^_^}>
[nixpkgs] @peti opened pull request #67461 → update mailman to version 3.2.2 → https://git.io/fjA3M
ensyde has joined #nixos
<LouisDK>
samueldr. I'll have to read up on overrides as mythtv 30.0 have to be build differently for a system using the nvidia driver.
sandrab has quit [Remote host closed the connection]
ris has joined #nixos
<evanjs>
infinisil: Bah. Got znc and clients setup (following your setup), but I can't figure out how to connect remotely (port forwarding and etc is done). Do I need to specifiy config.networking.domain (for acme) if I'm using NetworkManager for DHCP?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<evanjs>
Per nixos-option: "The domain. It can be left empty if it is auto-detected through DHCP."
LouisDK has quit [Remote host closed the connection]
Lears has joined #nixos
ris has quit [Ping timeout: 252 seconds]
<vika_nezrimaya>
tilpner: I wish I could overtake it... Right now my build laptop seems to be able to produce cross-compiled armv7l derivations (and I plan to publicly expose the binary cache), though it's obviously in no way would be able to keep up with Hydra
civodul has quit [Quit: ERC (IRC client for Emacs 26.2)]
chiiba has joined #nixos
<tilpner>
vika_nezrimaya: You can certainly work on cross-compilation without editing access to that project board
<vika_nezrimaya>
I can
<ivan>
evanjs: the domain is used for dns lookups and is unrelated to connecting remotely
<ivan>
evanjs: the nixos firewall might be blocking you
ris has joined #nixos
<tilpner>
vika_nezrimaya: You may want to coordinate with dezgeg on a joint cache (not sure if that's still a thing)
<vika_nezrimaya>
Right now I'm only deploying a small set of packages from the master: nginx, php (with argon2 and apxs2 disabled), mysql, postgresql, uwsgi, libgpiod, prosody, redis and uwsgi.override { plugins = ["python3"]; } (aka uwsgi-python3 in the release.nix)
<vika_nezrimaya>
and a systemPath for minimal nixos system
<vika_nezrimaya>
and an SD image for it (but the build is currently broken)
<vika_nezrimaya>
in job 'minimal-sd': The option `sdImage.populateRootCommands' is used but not defined.
<tilpner>
(Does not appear to be a thing)
<evanjs>
ivan: I made sure I opened port 5000, and I’m currently connected to ZNC from my phone. Is there anything beyond allowedTCPPorts required for remote connections?
<vika_nezrimaya>
the cache wasn't updated in months, I'm not sure of the reasons
<vika_nezrimaya>
so I decided to start my own
<ivan>
evanjs: just that. so it works from your phone? (but not somewhere else?)
<evanjs>
Bah. When I said “remotely” I should’ve specified WAN connections (that are port forwarded by my router). Within the LAN, things seem to work fine
Zer0xp has quit [Ping timeout: 246 seconds]
chr15 has quit [Ping timeout: 246 seconds]
<ivan>
sometimes routers have very dumb port forwarding configuration screens that don't save until you click another thing
<ivan>
make sure you set TCP and have the right port and LAN IP
<ivan>
sometimes they have additional firewall things that can reject packets
<ivan>
sometimes they don't have hairpin NAT and fail to route properly when you use the WAN IP from inside the LAN
<ivan>
sometimes ISPs filter some ports unconditionally
<vika_nezrimaya>
tilpner: what do you think of my set of packages? Should I add something maybe? don't suggest Apache, apr doesn't cross-compile (NixOS/nixpkgs#67259)
<evanjs>
on a MikroTik right now so it's a different kind of "dumb" :P
<tilpner>
vika_nezrimaya: You could add some compilers (clang, rustc, ghc), that cuts compilation times for other applications shorter without actually compiling all of them. Of course they usually take forever
<cyris212>
Does someone have a working systemd timer for unison?
<tilpner>
I had a working unison in watch mode
<cyris212>
I run into the weirdest errors when launching unison as a nixos systemd user service.
<vika_nezrimaya>
tilpner: do a lot of apps get compiled with clang?
<cyris212>
tilpner: Was unison started through systemd in your case?
<vika_nezrimaya>
tilpner: I counted five in all-packages.nix
<tilpner>
vika_nezrimaya: So leave it out
<EsperLily>
I didn't even know there was a service for unison. What does it do as a service? I just have it installed as a system package
<cyris212>
EsperLily: there isn't one.
<cyris212>
At least not an official module in nixpkgs.
chiiba has quit [Ping timeout: 248 seconds]
<evanjs>
ivan: I think I see what you're saying now. SSH Home -> Work -> Home works fine but SSH Home -> Home (WAN Address) doesn't seem to work. Guess I'll take a look at some MT forums on how to configure hairpin NAT or similar solutions. Confirmed working via LTE from my phone without any changes, so that must be it. Thanks!
<cyris212>
tilpner: pkgs.openssh was missing in the path :-)
<cyris212>
thank you!
<EsperLily>
huh I didn't know you could configure unison to run automatically in response to an external file monitoring process
<EsperLily>
not that I want to do that anyway
<tilpner>
EsperLily: I used it as a more robust network filesystem for small shares, it worked quite well
<EsperLily>
I use unison to synchronize a bunch of files on my desktop and laptop, have done for close to 15 years now. I only have it installed on NixOS because that's my always-on sync server
<ivan>
evanjs: cool
steell has joined #nixos
Ariakenom has quit [Quit: Leaving]
ris has joined #nixos
<steell>
i'm trying to write a derivation that uses the `steamcmd` package to download a bunch of binaries at install time, but during the installPhase, there seems to be no web access?
turion has quit [Quit: Leaving.]
<slabity>
steell: Correct. Its all locked down so installers can't pull a nasty on you
ng0 has quit [Ping timeout: 260 seconds]
<slabity>
That's why gathering sources is its own phase
laika___ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<steell>
slabity: makes sense, what phase should i use then?
jgeerds has quit [Ping timeout: 246 seconds]
<steell>
unpack?
ng0 has joined #nixos
<slabity>
I can't remember
<EsperLily>
that's actually a good question, how are the various fetchers allowed network access
<slabity>
I remember seeing something about creating your own fetchFrom* type of command for setting your sources, but I can't find it
<tilpner>
A derivation only gets network access if it promises to only ever produce the same result
<ldlework>
i'm so bad at nixops
<tilpner>
That is called a fixed-output derivation and is controlled with the attributes outputHash, outputHashMode and outputHashAlgo
<EsperLily>
ah that would explain it. The fetchers I was looking at set those
<vika_nezrimaya>
oh great, ar is hardcoded in a package
Chiliparrot has joined #nixos
<ar>
vika_nezrimaya: not really. ar is laying on a beanbag at CCCamp2019 near the rocket
<vika_nezrimaya>
?
<tilpner>
Look at the nick
<vika_nezrimaya>
wow
<vika_nezrimaya>
beanbags are nice
<vika_nezrimaya>
I want a beanbag
dycan has joined #nixos
pie_ has joined #nixos
<dycan>
hi, need help. abnormal shutdown when grub. Now I can't go into display-manager. It keep running in black screen. I can login by CD-ROM. I can mount /dev/sda1. But I don't know the next step to rescue.
wtv_nick has quit [Ping timeout: 272 seconds]
<vika_nezrimaya>
I'd suggest using nixos-enter to chroot into your install and try to poke the logs with journalctl
<vika_nezrimaya>
dycan: if you're suspecting corruption in /nix/store, you can try to repair it by using... what was it... nix-store --repair I think
<ldlework>
What's the proper way to stop a service with NixOps?
<ldlework>
Just remove it from the expressions?
sigmundv_ has joined #nixos
<dycan>
vika_nezrimaya: Thanks for the tips. I'll learn and try it.
fusion809 has joined #nixos
<ldlework>
Removing it doesn't seem to stop the service...
<m1crOman>
is there any known bugs with zfs on root atm? Having a kernel panic during pool import at boot atm, but I can import fine from my install media
<evanjs>
ldlework: like a service on a nixops-deployed vm?
<tilpner>
mightybyte: Did you update just before this? Can you boot an old generation?
iggi_ has joined #nixos
<tilpner>
Uhh
<tilpner>
m1crOman: ^
ryantm has quit [Quit: Lost terminal]
<m1crOman>
tilpner, I'm installing fresh actually. I've tried twice now
<m1crOman>
I am going to try with a very basic zpool config because I applied a ton of feature flags
<ldlework>
evanjs: yes a systemd unit deployed with nixops
<m1crOman>
(they are all boot supported I checked)
<ldlework>
setting enable = false, just removes the unit
<ldlework>
and the service stays running
<tilpner>
m1crOman: You should compare the versions of the live system to those of the to-be-installed system
ryantm has joined #nixos
<m1crOman>
tilpner, oh how can I do that?
<tilpner>
m1crOman: And are you sure this is zfs-specific? Perhaps try an ext4 installation, just to verify
<m1crOman>
I will try that yeah
<m1crOman>
I'm pretty sure it's zfs specific because it said "Importing zpool ..." and then did a full line of dots and then paniced
<tilpner>
m1crOman: `uname -r`, `zfs version` on the live system
<tilpner>
(If there is no zfs version command, that's data too)
<tilpner>
m1crOman: nix-instantiate --eval '<nixpkgs/nixos>' -A config.boot.kernelPackages.kernel.name
<m1crOman>
ah it seems my live system is 0.7 and the install will be 0.8
<tilpner>
Use that to print the version of the kernel your configuration would install
<m1crOman>
Now I need to remember how I built a zfs netboot image ;P
Soo_Slow has quit [Remote host closed the connection]
<tilpner>
Same with nix-instantiate --eval '<nixpkgs/nixos>' -A config.boot.kernelPackages.zfs.name
<tilpner>
Same with nix-instantiate --eval '<nixpkgs/nixos>' -A config.boot.kernelPackages.zfsUnstable.name
<evanjs>
ldlework: Right, I think it's going to stay like that until the VM reboots or such. If you just want to stop a service on a nixops vm, you could ssh into it with `nixops ssh` and just stop it on there. Could also `nixops deploy --force-reboo` or similar
<ldlework>
:(
<ldlework>
why does nginx get stopped when I remove it's unit?
<ldlework>
this seems bad
<ldlework>
what if I had to do this for 1000x servers?
<tilpner>
What? It'd be worse to keep running after the unit is removed IMO
<ldlework>
you gotta reboot your whole layer to do something like stop a systemd service?
<ldlework>
what?
<ldlework>
that's what it does
<tilpner>
That's not what you said
<ldlework>
nginx successfully quits when i remove it's unit
<ldlework>
my service does not
<ldlework>
is always been my message
<ldlework>
:D
<m1crOman>
tilpner, the zfsUnstable version in my live image is 0.8, is there a way for me to switch to that live?
<m1crOman>
I guess not becaues of the kernel modules
<tilpner>
ldlework: Then paste your service config
<tilpner>
m1crOman: I don't think so, especially if you have loaded zfs pools
<m1crOman>
tilpner, I don't since this is still the live system and I can/will blow them away
<tilpner>
ldlework: What happens if you comment out lines 6 to 18?
<tilpner>
m1crOman: I guess you can attempt modprobe-ing your way around, and bringing the correct userland tools into PATH, but booting an image with 0.8 installed out-of-the-box seems like a better way
<ldlework>
tilpner: it's still running
<ldlework>
tilpner: could it be that the process is named `dotnet` and this does not match what's in the service or something?
<tilpner>
ldlework: What does systemctl status say?
<tilpner>
(Append service name)
<ldlework>
[root@disunity:~]# systemctl status disinfo
<ldlework>
Unit disinfo.service could not be found.
<worldofpeace>
Is there something similar to `relatedPackages` for options in `mkOption`?
<ldlework>
because I deployed with it commented out..
<tilpner>
ldlework: I suspect your KillMode is to blame
<tilpner>
Why did you set that to process?
<ldlework>
i copied it from my nginx config which works
<m1crOman>
tilpner, agreed. I'll give adding zfsUnstable to a netboot image a try so
<ldlework>
i cannot even find systemd.services.<name>.serviceConfig.KillMode documented in on the options site
<ldlework>
So I have no idea what it even does
<ldlework>
oh it's a systemd thing
<tilpner>
ldlework: Please comment out line 15, manually kill the process, redeploy
<tilpner>
ldlework: Then comment out the entire service, redeploy. It should then be killed properly
<clever>
`-i .` is a regex to match any single character
<clever>
so you installed every single-character thing in nixpkgs!
<m1crOman>
clever, That's a pretty sweet nix script. I fixed the issue though - I turned off forceImportRoot + forceImportAll and on first boot I had to add zfs_force=1 as per the notes in https://nixos.org/nixos/options.html#zfs.forceimportroot
orivej has quit [Ping timeout: 244 seconds]
<clever>
ldlework: youll want to remove them with nix-env -e :P
<m1crOman>
can confirm all good on second boot
<clever>
m1crOman: one minute
<m1crOman>
tilpner, ^ incase you're curious when you are back
<clever>
if you properly export it, then you dont need to force import
<m1crOman>
clever, oH! Ok I'll add that to my notes thanks
dycan has joined #nixos
<clever>
m1crOman: basically, you need force if the hostid that is currently importing, doesnt match the hostid that last imported it
<clever>
m1crOman: but if you export, that is cleared, allowing anybody to import
<m1crOman>
clever, Right that does indeed explain the issue. Good to know the details :)
<clever>
m1crOman: its basically a protection for when your pool is a block device on the lan, and multiple hosts could access it at once
<m1crOman>
clever, Yeah that makes sense..at the same time should this host die and the drives be swapped into another machine the next person is going to have a good head scratcher if they don't read my notes