worldofpeace changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | NixOS 20.09 Nightingale ✨ https://discourse.nixos.org/t/nixos-20-09-release/9668 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 20.09 RMs: worldofpeace, jonringer | https://logs.nix.samueldr.com/nixos-dev
<supersandro2000> It is self updating. I leave this to someone else.
<ryantm> https://discourse.nixos.org/t/call-for-nodepackages-maintainers/9176/ I don't think any of the people that answered the call have stuck around. Or at least they haven't been pinging me to help them.
ericnoan has quit [Ping timeout: 260 seconds]
costrouc has quit [Quit: costrouc]
srk has quit [*.net *.split]
AlwaysLivid has quit [*.net *.split]
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nixos-dev
ericnoan has joined #nixos-dev
v0|d has quit [Remote host closed the connection]
srk has joined #nixos-dev
AlwaysLivid has joined #nixos-dev
tilpner_ has joined #nixos-dev
tilpner has quit [Ping timeout: 240 seconds]
tilpner_ is now known as tilpner
AlwaysLivid has quit [Remote host closed the connection]
AlwaysLivid has joined #nixos-dev
<siraben> Editing the yasnippet-snippets repo, what's fixPhase? Was it added and removed at some point? https://github.com/AndreaCrotti/yasnippet-snippets/blob/master/snippets/nix-mode/fixPhase
<V> siraben: that sounds like a typo'd fixupPhase
<siraben> I see
<siraben> In installPhase, should I runHook {pre,post}Install?
<V> installPhase is supposed to call those, yes
<V> same with the other phases
<siraben> Hm, could it be another treewide PR to add those to phases that are lacking pre/post hooks?
<siraben> looks like in the packages I maintain I forget to do this as well
<V> oh, if you're just talking about packages, it only affects people who are overriding those packages
<V> and even then, only if they want to add pre/post hooks (which makes less sense in this case, because if the package is using pre/post hooks then you'd want to have pre-pre and post-pre and so on hooks)
<V> IIRC guix does something better and just lets you order stages
srk has quit [Ping timeout: 268 seconds]
<energizer> why is it a treewide instead of just adding phases in the stdenv setup file?
<energizer> s/phases/hooks/
<samueldr> in any phase you implement, you should add runHook {pre,post}... to be a good citizen
<samueldr> but that's not a matter of treewide change I suppose
srk has joined #nixos-dev
<samueldr> and overriding a pre/post hook, you should anyway use the old value
<samueldr> (unless you know you shouldn't, and that's why you're overriding)
<samueldr> that is, with the current semantics
<siraben> colemickens: would you be able to help out with evaluation errors in #109638? I ran a script to resolve around 1700 of them but the remaining ones are caught in ofborg and takes too long to reproduce locally
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109638 (by siraben, 4 days ago, open): pkgs/development/libraries: stdenv.lib -> lib
<siraben> it would be a matter of running `while true; do ./step.sh; done` in https://github.com/NixOS/nixpkgs/pull/109425 , with theFile changed to `GC_INITIAL_HEAP_SIZE=4g nix-env -f ./outpaths.nix -qaP --no-name --out-path --arg checkMeta true `
<{^_^}> #109425 (by siraben, 6 days ago, merged): treewide: stdenv.lib -> lib
<siraben> it replicates ofborg's evaluation locally, then sed's the file with missing lib
<colemickens> hey siraben did you mean cole-h maybe?
<colemickens> otherwise, no, I can't :(
<siraben> Oh sorry, cole-h ^
<samueldr> we probably should consider removing chromium too
<samueldr> (like other distros do)
<samueldr> or making no builds, provide your own API keys)
<gchristensen> well then
<gchristensen> the down side to "freeish" software
<samueldr> ah, danielrf[m] already opened an issue #110245
<{^_^}> https://github.com/NixOS/nixpkgs/issues/110245 (by danielfullmer, 1 day ago, open): Google set to limit Chromium usage of Google APIs
<siraben> cole-h: disregard, I was able to force-push the changes and ofborg is green
orivej has joined #nixos-dev
<samueldr> big oof: raspberry pi os pretty much bets on chromium to work
<samueldr> I wonder how it'll affect them
<siraben> is this going to affect ungoogled-chromium as well?
<siraben> My understanding is that ungoogled-chromium tries to remove the Google-dependent parts
<samueldr> I would assume it won't affect it
<samueldr> as it's solely about external API services
<samueldr> like http requests to interact with google's APIs
<danielrf[m]> Chrome sync was really the last thing keeping me on chromium vs switching to ungoogled-chromium
<danielrf[m]> actually, IIRC, I think there was another issue: ungoogled-chromium can't fetch extensions from the chrome web store
srk has quit [Remote host closed the connection]
srk has joined #nixos-dev
<samueldr> yeah
<samueldr> I don't remember if anyone tried to make use of those extension enterprise policy on NixOS
<samueldr> but I'm thinking about it
<danielrf[m]> there has been some effort to nixify chrome extensions: https://github.com/NixOS/nixpkgs/pull/98014
<{^_^}> #98014 (by ryneeverett, 18 weeks ago, open): [WIP] chromium.withPackages/chromium-extensions: init
<danielrf[m]> yeah, we can already add extensions to the enterprise policy, but just the ID, and then chromium would fetch/update it from the chrome web store
<danielrf[m]> *extension ID
<samueldr> ah
<samueldr> that's a bit ungood, loading unpacked or packed extensions reproducibly is where the good stuff is at
<danielrf[m]> hopefully the fetching from the chrome web store doesn't rely on another "private" API, or else the chromium package is _really_ useless...
<V> They're just trying to make firefox sufficiently compelling that they don't get thwacked with an antitrust lawsuit /s
Jackneill has quit [Ping timeout: 260 seconds]
<danielrf[m]> Well, the "Chrome Web Store API" is one of those listed under https://www.chromium.org/developers/how-tos/api-keys
<danielrf[m]> I wonder if a chromium build without built-in keys (which is what Google is recommending we do) can even interact with the webstore....
<samueldr> if you can't login to your google account...
<samueldr> you probably won't be able to do that
<samueldr> since without a google account you cannot install extensions
<samueldr> (yeah, that's bad)
<danielrf[m]> IIRC you should still be able to login to a google account
<samueldr> in the browser context?
<danielrf[m]> it's just that the browser integration with the google account won't work anymore
<danielrf[m]> yes
<samueldr> yeah, I assumed that the web store had some magic going on with that
<danielrf[m]> it'd be just like logging in w/ firefox
<samueldr> I don't know if extensions are supposed to work without a user account in the browser
<danielrf[m]> I'm going to start up a build without any built-in keys and report back what actually works...
<danielrf[m]> yeah perhaps not
<danielrf[m]> oh, wait, no, they definitely do
<danielrf[m]> I periodically test chromium with a fresh profile whenever there are new releases... and the extensions specified in my local policy get automatically installed
<danielrf[m]> even when I haven't logged-in
<clever> i recently signed into my google profile on an rpi (not sure which chrome build), and everything just magically installed itself as well
<samueldr> yeah, that should affect them as well since it's a chromium build
Jackneill has joined #nixos-dev
rajivr has joined #nixos-dev
zarel has quit [Ping timeout: 240 seconds]
zarel has joined #nixos-dev
cole-h has quit [Ping timeout: 265 seconds]
justanotheruser has quit [Ping timeout: 264 seconds]
saschagrunert has joined #nixos-dev
krkini has joined #nixos-dev
kini has quit [Ping timeout: 264 seconds]
jonringer has quit [Ping timeout: 264 seconds]
supersandro2000 has quit [Read error: Connection reset by peer]
supersandro2000 has joined #nixos-dev
<eyJhb> Just wanted to put this here, after the nix formatter discussion some time ago. I am not really a fan of these two formatting styles - https://termbin.com/6xx6 .. The newline thing makes it harder to read for me at least
hexa- has quit [*.net *.split]
zowoq[m] has quit [*.net *.split]
danielrf[m] has quit [*.net *.split]
Ericson2314 has quit [*.net *.split]
domenkozar[m] has quit [*.net *.split]
jdnixx-M has quit [*.net *.split]
symphorien[m] has quit [*.net *.split]
zhaofeng has quit [*.net *.split]
joepie91 has quit [*.net *.split]
piegames has quit [*.net *.split]
domenkozar[m] has joined #nixos-dev
zowoq[m] has joined #nixos-dev
Ericson2314 has joined #nixos-dev
danielrf[m] has joined #nixos-dev
piegames has joined #nixos-dev
zhaofeng has joined #nixos-dev
jdnixx-M has joined #nixos-dev
joepie91 has joined #nixos-dev
symphorien[m] has joined #nixos-dev
hexa- has joined #nixos-dev
Ericson2314 has quit [Ping timeout: 242 seconds]
domenkozar[m] has quit [Ping timeout: 242 seconds]
bk1603[m] has quit [Ping timeout: 260 seconds]
philipp[m] has quit [Ping timeout: 246 seconds]
zowoq[m] has quit [Ping timeout: 258 seconds]
symphorien[m] has quit [Ping timeout: 258 seconds]
danielrf[m] has quit [Ping timeout: 258 seconds]
thefloweringash has quit [Ping timeout: 268 seconds]
niksnut has joined #nixos-dev
puzzlewolf has quit [Ping timeout: 268 seconds]
Ox4A6F has quit [Ping timeout: 244 seconds]
ma27[m] has quit [Ping timeout: 246 seconds]
ryantm has quit [Ping timeout: 240 seconds]
rnhmjoj has quit [Ping timeout: 240 seconds]
JJJollyjim has quit [Ping timeout: 240 seconds]
garbas[m] has quit [Ping timeout: 260 seconds]
michaelpj has quit [Ping timeout: 260 seconds]
regnat has quit [Ping timeout: 244 seconds]
alexarice[m] has quit [Ping timeout: 244 seconds]
chvp has quit [Ping timeout: 244 seconds]
immae has quit [Ping timeout: 244 seconds]
roberth has quit [Ping timeout: 244 seconds]
regnat[m] has quit [Ping timeout: 268 seconds]
timokau[m] has quit [Ping timeout: 240 seconds]
Irenes[m] has quit [Ping timeout: 240 seconds]
colemickens has quit [Ping timeout: 240 seconds]
jonge[m] has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 240 seconds]
nh2[m] has quit [Ping timeout: 240 seconds]
Dandellion has quit [Ping timeout: 240 seconds]
bbigras has quit [Ping timeout: 240 seconds]
emily has quit [Ping timeout: 240 seconds]
kraem has quit [Ping timeout: 246 seconds]
worldofpeace has quit [Ping timeout: 260 seconds]
aanderse has quit [Ping timeout: 268 seconds]
maralorn has quit [Ping timeout: 268 seconds]
dtz has quit [Ping timeout: 268 seconds]
jtojnar has quit [Ping timeout: 268 seconds]
Valodim[m] has quit [Ping timeout: 268 seconds]
DamienCassou has quit [Ping timeout: 260 seconds]
mjlbach has quit [Ping timeout: 265 seconds]
zarel has quit [Ping timeout: 265 seconds]
rnhmjoj has joined #nixos-dev
__monty__ has joined #nixos-dev
thefloweringash has joined #nixos-dev
ryantm has joined #nixos-dev
symphorien[m] has joined #nixos-dev
DamienCassou has joined #nixos-dev
dtz has joined #nixos-dev
immae has joined #nixos-dev
garbas[m] has joined #nixos-dev
Ericson2314 has joined #nixos-dev
emily has joined #nixos-dev
kraem has joined #nixos-dev
Valodim[m] has joined #nixos-dev
colemickens has joined #nixos-dev
Dandellion has joined #nixos-dev
roberth has joined #nixos-dev
timokau[m] has joined #nixos-dev
puzzlewolf has joined #nixos-dev
Irenes[m] has joined #nixos-dev
worldofpeace has joined #nixos-dev
domenkozar[m] has joined #nixos-dev
michaelpj has joined #nixos-dev
nh2[m] has joined #nixos-dev
jtojnar has joined #nixos-dev
philipp[m] has joined #nixos-dev
Ox4A6F has joined #nixos-dev
siraben has joined #nixos-dev
JJJollyjim has joined #nixos-dev
maralorn has joined #nixos-dev
mjlbach has joined #nixos-dev
jonge[m] has joined #nixos-dev
bbigras has joined #nixos-dev
chvp has joined #nixos-dev
danielrf[m] has joined #nixos-dev
regnat has joined #nixos-dev
bk1603[m] has joined #nixos-dev
aanderse has joined #nixos-dev
alexarice[m] has joined #nixos-dev
ma27[m] has joined #nixos-dev
regnat[m] has joined #nixos-dev
zowoq[m] has joined #nixos-dev
<mjlbach> Are we not allowed to chgrp of /run/user entries? Trying to package toolbox
<mjlbach> Ahh it's because my id and uid are not matched
AlwaysLivid has quit [Ping timeout: 268 seconds]
<dhess> domenkozar: that last one is fairly repeatable
AlwaysLivid has joined #nixos-dev
fuzzypixelz has joined #nixos-dev
fuzzypixelz has left #nixos-dev [#nixos-dev]
<jtojnar> siraben: hmm, apparently, stdenv is actually a derivation too
<jtojnar> but I would not expect it to do anying
<jtojnar> what package is that?
<jtojnar> philipp: do you have error log for the GStreamer issue?
<yorick> https://github.com/NixOS/nixpkgs/pull/103162 doesn't look like this got backported
<{^_^}> #103162 (by freezeboy, 10 weeks ago, merged): wordpress: 5.5.1 -> 5.5.3
zarel has joined #nixos-dev
teto has joined #nixos-dev
orivej has quit [Ping timeout: 265 seconds]
<jtojnar> aaron: s/mod_perl/mod_php/
<aanderse> Jan Tojnar: >_<
<rnhmjoj> jtojnar philipp: i'm too trying to get gstreamer to work. i captured i log but i don't known what to make of it
<aanderse> to be clear... i'm the victim here
<aanderse> /me looks at the mountain of `perl` code he is responsible for
<aanderse> lol
<philipp[m]> rnhmjoj: Huh, so you got it to build with gstreamer? Can you share the package definition?
<rnhmjoj> btw, it's not only the voip that's not working, also the media player
<jtojnar> rnhmjoj: did you use wrapGAppsHook?
<rnhmjoj> philipp: i simply added the gst_all_1 packages and it builds with voip support (you can see the call button) but it's not working
<rnhmjoj> here's the expression if you need it: https://maxwell.ydns.eu/git/rnhmjoj/nheko/src/branch/master/nheko.nix
saschagrunert has quit [Remote host closed the connection]
<rnhmjoj> jtojnar: no, it's a Qt application, is it required for gstreamer?
<philipp[m]> Yes, I think so.
<jtojnar> yup
<philipp[m]> Huh, I did the same thing. Must have made some typo I guess.
<jtojnar> the elements are loaded at runtime based on GST_PLUGIN_SYSTEM_PATH_1_0 env var
<rnhmjoj> is there a specific variable that must be set or something like it? i would like to avoid a double wrapper
<rnhmjoj> jtojnar: oh that's it, i'll try that
<philipp[m]> Also you might want to check whether libnice is also needed, it's in the build requirements: https://github.com/Nheko-Reborn/nheko#build-requirements
<jtojnar> rnhmjoj you might also need other variables from wrapGAppsHook for GTK file chooser
<jtojnar> so it is better to just use everything as per docs
<rnhmjoj> philipp: yeah, i've just added it but i have to wait until i get gstreamer working
<philipp[m]> Just saying because I overlooked it myself at first :D
<philipp[m]> Oh and if you want to be super nice, you might also want to test against my changeset of mtxclient. https://github.com/NixOS/nixpkgs/pull/110457
<{^_^}> #110457 (by pstn, 3 hours ago, open): mtxclient: Remove unneeded dependencies, add myself as maintainer.
<philipp[m]> I really don't expect anything bad to happen, but you never know...
<domenkozar[m]> dhess: that looks like it's github indeed
<dhess> domenkozar[m]: yep. https://github.com/NixOS/nix/issues/4469
<{^_^}> nix#4469 (by dhess, 2 hours ago, open): etag assertions
<eyJhb> Anyone using the Mautrix module atm.?
<eyJhb> Edit, anyone that is using it or might have some oppinions about it? I am trynig to rewrite it atm. but I am somewhat stuck, in what I should do.
<domenkozar[m]> dhess: the bug report and the workaround look good to me
<dhess> domenkozar[m]: ok cool, thank you!
<domenkozar[m]> I have someone that is willing to pay a developer one day per week to work on fixing macOS problems in nixpkgs, is anyone interested in such work?
<domenkozar[m]> with a potential to grow, I'm thinking to do a recurring funding campaign for other companies to chip in
<qyliss> siraben: as requested: https://edef.eu/~qyliss/nix/pkgconfig/
<qyliss> oh I need to fix the title
<siraben> qyliss: thank you 🙏
<siraben> that's quite the cliff, looks like around early 2020 maintainers stopped adding pkgconfig
<supersandro2000> pkgconfig got really unpopular
<siraben> Why was it around at all when the package is called pkg-config?
<V> because nix didn't originally support identifiers containing -
<V> IIRC
<V> and pkg-config is a very core piece of software, so it got packaged extremely early on
<V> you can see the same with util-linux
<siraben> Ah, interesting.
<V> commit 95c74eae269b2b9e4bc514581b5caa1d80b54acc
<V> back in late 2012
<siraben> > Since we don't have a negation or subtraction operation in Nix, this
<siraben> don't we have this now?
<siraben> is unambiguous.
<{^_^}> error: syntax error, unexpected IN, expecting ')', at (string):471:57
<siraben> > let a=5;b=3; in a-b
<{^_^}> undefined variable 'a-b' at (string):471:17
<siraben> let a=5;b=3; in a - b
<siraben> > let a=5;b=3; in a - b
<{^_^}> 2
jonringer has joined #nixos-dev
Synthetica has joined #nixos-dev
<infinisil> I guess the answer is "no", but is it possible to find the key of a binary cache just from the URL of it?
jonringer has quit [Remote host closed the connection]
jonringer has joined #nixos-dev
<infinisil> So e.g. given `https://cache.nixos.org`, how can I get the public key that's used for signing?
teto has quit [Ping timeout: 264 seconds]
<philipp[m]> eyJhb: What are your woes with mautrix so that you want to rewrite it? I'm not using mautrix but matrix-appservice-discord and they are pretty similar.
pmy has quit [Ping timeout: 264 seconds]
pmy has joined #nixos-dev
<edef> infinisil: i don't believe so
<edef> infinisil: one could add it to the cache manifest?
justanotheruser has joined #nixos-dev
<eyJhb> philipp[m]: Mautrix module, as there is like 8 mautrix-* that functions 99% the same, it seems stupid to have hyper specific modules for each service
<eyJhb> But the issue is, that it requires sooo many paths for it to work, and if I just make a config option for each one, then you might as well just make the systemd service yourself :p
<eyJhb> https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/misc/mautrix-telegram.nix#L128-L160 pkgs.mautrix-telegram, pkgs.mautrix-telegram.pythonModule.sitePackages, pkgs.mautrix-telegram.alembic, and then as well ${pkgs.mautrix-telegram}/bin/mautrix-telegram. And I am unsure how I can get all these paths, from e.g. pkgs.mautrix-telegram (in this case, but could be switched for
<eyJhb> mautrix-facebook as well
AlwaysLivid has quit [Remote host closed the connection]
AlwaysLivid has joined #nixos-dev
teto has joined #nixos-dev
<infinisil> edef: Seems like something that should be supported imo
<philipp[m]> eyJhb: Yeah, that sounds like a lot of work. Do we know whether the appservice ecosystem will change when dendrite becomes stable?
<eyJhb> philipp[m]: I might have been stupid. Well, it shouldn't! As how the appservice works should stay the same :) Also, mautrix is a independent thing made ba someone named tulir. So as long as they contiune making this work, it should... work
<eyJhb> But I guess I am just being stupid. The only big change I need to make, is to remove DynamicUser, as that makes for some not nice things, when we want stuff to work togethr.
<eyJhb> together*
averell has quit [Remote host closed the connection]
<edef> infinisil: the point of the current system is that we separate transport security / object store security from build trust
<philipp[m]> But the appservices only want to work together with the homeserver and that is only possible via tcp/ip, no? So why should local users get in the way?
<eyJhb> It is because the appservice makes a registration.yml file, and it would be cool/nice/what I would expect, to allow the service to create this file, and then chown it to allow the homeserver to read it
averell has joined #nixos-dev
<eyJhb> This is not possible with DynamicUser, so you have to copy it to some other location before the homeserver is able to read it, instead of doing something like `services.matrix-synapse.app_service_config_files = [ service.mautrix.name.registrationFile ];
<eyJhb> Which would be a lot cooler I would say :D
<philipp[m]> That would be cool indeed. Currently thinking what might be the most robust way to go about this. I'd like to have that working across container boundaries if possible.
<eyJhb> As long as you "share" the dir, it is possible. Can't really put it into nix store, except if we generate the file ourself
<philipp[m]> There are secrets in that file, so no nix store isn't an option either way.
<eyJhb> But then, it is generated by the mautrix service, and atm. I just have a "postPreStart" command, where you can chown it to the user you want + run any other commands you wish on it
pmy has quit [Ping timeout: 272 seconds]
<V> why not just create a group for everything that needs to have access to this, and create a shared directory for them
<V> then you can still have DynamicUser
<philipp[m]> Then all appservices could read each others secrets.
<eyJhb> philipp[m]: You can chown it to a user they don't have access to
<eyJhb> The registration.yml is not used by the appservice at all, that is homeserver only
pmy has joined #nixos-dev
<eyJhb> You need to specify the secrets for the appservice in their config
<eyJhb> But that could work V
<V> philipp[m]: I just meant for shared data
<V> (I don't know how exactly this is structured, so just offering general guidance)
<eyJhb> But then there would be a `services.mautrix.registrationDir` + registrationUser + registrationGroup ?
<philipp[m]> Why not just use the homeservers user/group?
<eyJhb> Wouldn't that work philipp[m] ? I would assume so. - I would default them to homeservers user/group, but allow them to change it :)
<philipp[m]> Yes, that should work I think.
<eyJhb> Thanks philipp[m]++ and V++ I appreciate the feedback! I will head in that direction then ! :D
<{^_^}> V's karma got increased to 11
<{^_^}> philipp[m]'s karma got increased to 0b10
<philipp[m]> What we could also consider: Have a file watch on the contents of `services.matrix-synapse.app_service_config_files` and be able to restart synapse if needed.
<Ericson2314> niksnut: I would have to make `unsupported` public rather than protected to use there, is that OK?
<eyJhb> That would be cool as well :p Not sure how often that would be needed however. I guess on first start matrix-synapse would actually fail with the above setup
<philipp[m]> True, it would fail. Also I don't think of it as needed, but as a way for myself to keep me from forgetting it.
<philipp[m]> And wondering why my appservice doesn't work...
<Ericson2314> niksnut: actually I'll just manually use `getURI` as the `unsupported` message wasn't write anywaysa
mkaito has joined #nixos-dev
mkaito has joined #nixos-dev
<eyJhb> philipp[m]: With either approach atm. it will fail, unless we allow for synapse to have a "watch" dir, where it will load all registration files from
<philipp[m]> That sounds awfully complex though
<eyJhb> Yeah it does , so that might be a furture thing :p
<philipp[m]> Or a "don't do it because it's to complex" thing 🙃
<eyJhb> "If you really really really want to do it and find a elegang solution to the complex problem and multiple people agree" kind of thing :p
<Ericson2314> niksnut: OK fixed everything now
<Dandellion> eyJhb,,philipp #matrix-nix:transformierende-gesellschaft.org existss if you didnt know!
<eyJhb> Dandellion: My Matrix server is still in beta :( Waiting for spaces to become part of the spec. Not sure when that will happen...
<rnhmjoj> philipp: i think i've managed to make gstreamer working, at least i can play videos using the embedded media player
<rnhmjoj> still, it says it can't find any microphones, so now i'm looking into this
<philipp[m]> Great job!
cole-h has joined #nixos-dev
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-dev
janneke has quit [Quit: janneke quits Mes'sing]
janneke has joined #nixos-dev
mkaito has quit [Quit: WeeChat 3.0]
rajivr has quit [Quit: Connection closed for inactivity]
orivej has joined #nixos-dev
<eyJhb> Ehmm... Anyone have examples of mkOption{} that depend on the value of the other mkOption values? E.g. I define a datadir in one option, that should be used in another as a default value. Does that make sense?
mkaito has joined #nixos-dev
mkaito has joined #nixos-dev
mkaito has quit [Changing host]
<cole-h> eyJhb: if you used `let cfg = config.......`, you can do `cfg.datadir`
<cole-h> I believe
<eyJhb> Oh, the issue is then, that it is the value in a submodule, ` serviceSubmodule = types.submodule ({ name, config, ... }: {`, so I am guessing I can access it using the config? The issue now is, that I also need to access the "global" config as well. (I have services.mautrix.services.<name>.dataDir, which I am trying to access, in a ${something...}
mkaito has quit [Quit: WeeChat 3.0]
<eyJhb> cole-h: I did a `let globalCfg = config; in types.submodule ({ name, config, ... }: {`, I am guessing there is something better
orivej has quit [Ping timeout: 264 seconds]
<cole-h> So you'd just introspect as "normal" (e.g. programs.fish.someattr would be accessed by cfg.someattr). Don't think that would cause infinite recursion.
<cole-h> However, I think you'd need to set `defaultText` or changing whatever the default option is will rebuild the manual IIRC.
<eyJhb> Yeah, but how would I then access it as I need the name? `${cfg.services.<name>.datadir}`, unsure how I get a dynamic name in there, I don't think I can just do `${cfg.services.name.datadir}`
<cole-h> Ahhhhh
<eyJhb> `error: attribute 'name' missing, at /home/eyjhb/projects/nixos/nixus-setup/channels/nixpkgs-test/nixos/modules/services/misc/mautrix.nix:35:37` -> that is what is annoying :D
<cole-h> It's a submodule, OK.
<eyJhb> Yeah, should have said that in the first message :( Sorry
<eyJhb> Anything prettier?
<eyJhb> Wouldn't work as far as I know, as I need two config, global and the submodule one :D Or am I missing something?
<eyJhb> Hmm. I might have a ugly solution
<eyJhb> The issue is, that I need to do `${cfg.services.<name>}`, where I have the name in another variable. I guess I could do getAttr to do that
<cole-h> `cfg.services.${config._module.args.name}`?
<eyJhb> Already in a string, and I can't nest ${} -> "something${cfg.services.${name}}"?
<eyJhb> ` database = "sqlite:///${cfg.services.name.datadir}/mautrix-facebook.db";` is what doesn't work
asbachb has joined #nixos-dev
<cole-h> Why can't you nest it?
<eyJhb> > let a = "a"; b = "b"; c = { a = { b = "yay"; }; } in "${c.${a}.${b}}"
<cole-h> > let asdf = "fdsa"; fdsa = "asdf"; a = { asdf = "lol"; }; in "${asdf}${a.${fdsa}}"
<{^_^}> error: syntax error, unexpected IN, expecting ';', at (string):471:51
<{^_^}> "fdsalol"
<eyJhb> 2 sek, let me check that out
<cole-h> > let asdf = "fdsa"; fdsa = "asdf"; a = { asdf = { fdsa = "lol"; }; }; in "${asdf}${a.${fdsa}.${asdf}}"
<{^_^}> "fdsalol"
abathur has quit [Quit: abathur]
<eyJhb> > let a = "a"; b = "b"; c = { a = { b = "yay"; }; }; in "${c.${a}.${b}}"
<{^_^}> "yay"
<eyJhb> Guess it works, I just got a error last time I did this.............
rnhmjoj has quit [Changing host]
rnhmjoj has joined #nixos-dev
rnhmjoj has joined #nixos-dev
energizer has quit [Quit: ZNC 1.7.0+deb0+xenial1 - https://znc.in]
cole-h has quit [Ping timeout: 246 seconds]
leungbk has joined #nixos-dev
leungbk has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<asbachb> I currently try to fix some of my problems with running NixOS inside an lxd container. I stumbled over "sys-kernel-debug.mount". I wonder if it is useful / possible to mount /sys/kernel/debug in a container via systemd. From my understanding it should be mounted via the host anyway. (see
asbachb has quit [Quit: Connection closed]
asbachb has joined #nixos-dev
<eyJhb> philipp[m]: All the above works now. Now I just need a good way, to add the tokens in from the registration file, to the service...
adisbladis has quit [Ping timeout: 256 seconds]
lukegb has quit [Ping timeout: 256 seconds]
adisbladis has joined #nixos-dev
lukegb has joined #nixos-dev
pmy has quit [Ping timeout: 265 seconds]
pmy has joined #nixos-dev
<eyJhb> V: philipp[m]: I found a issue. I need to run the execStartPre with +, as I cannot create the registrationsfile dir, as the dynamic user. But the issue is, that all the files will then be created with root, and I don't know what the name/uid of the dynamic user will be, so I can't chown the files to it. Any ideas?
<philipp[m]> Dose `chown --reference=${runtimeDir} foo` work?
<eyJhb> Let me check
pmy has quit [Ping timeout: 264 seconds]
<eyJhb> Seemed to work, thanks! But I am not sure, if this is borderline hacky atm.
<philipp[m]> Also feels hacky to me but I couldn't say why.
pmy has joined #nixos-dev
zarel has quit [Ping timeout: 240 seconds]
<eyJhb> It seem perfectly fine, while also being hacky...
<eyJhb> I will update the PR soon, then I guess it can be up for review
<eyJhb> Also, not sure that just creating another file in /var/lib/ is OK to do........
<philipp[m]> Wait a moment, reading sth.
<eyJhb> https://github.com/NixOS/nixpkgs/pull/110404 is what I have done for today
<{^_^}> #110404 (by eyJhb, 23 hours ago, open): WIP: module mautrix-* new service to handle all mautrix services
<eyJhb> Not pretty and needs some more work. But I think the base is somewhat there? Logging off for today! :D ANy comments are appreciated
<V> eyJhb: hmm. is it possible that having a service/dynamic user that exists specifically to have ownership would be useful
<philipp[m]> I think the idea for dynamic users is to put those files into the ConfigurationDirectory of the unit and let systemd handle the ownerships from there on.
energizer has joined #nixos-dev
jonringer_ has joined #nixos-dev
<jonringer_> hey, can someone kill https://hydra.nixos.org/eval/1644094
<jonringer_> a stdenv-rebuild was merged to master https://github.com/NixOS/nixpkgs/pull/107214 I reverted it, but hydra already started an eval before I could do so
<{^_^}> #107214 (by Ericson2314, 4 weeks ago, merged): lib: Clean up how linux and gcc config is specified
<philipp[m]> >Except in case of ConfigurationDirectory=, the innermost specified directories will be owned by the user and group specified in User= and Group=. If the specified directories already exist and their owning user or group do not match the configured ones, all files and directories below the specified directories as well as the directories themselves will have their file ownership recursively changed to match what is
<philipp[m]> configured
<Ericson2314> jonringer_: oh sorry. I swear it wasn't a stdenv rebuild until the last iteration
<philipp[m]> So how hard is that except binding?
<gchristensen> jonringer_: do you have an account on hydra?
<jonringer_> never mind, I forgot that i had hydra powers :/
<gchristensen> no worries :)
<jonringer_> all good Ericson2314, we all make mistakes, and it wasn't that much of deal :)
<jonringer_> I just didn't want hydra to munch on 100's of hours of compute time
<Ericson2314> jonringer_: well i just hope I can still fix it to be a non-mass-rebuild so I can instant gratification :)
<jonringer_> :)
<samueldr> Ericson2314: what's coming is not a slight against you
<samueldr> this is why forbidding pushes to master is not a panacea against breakage and oopsies :)
<Ericson2314> samueldr: say the merge button is greyed out for non-super-amid without being below the mass-rebuild threshold? :D
<samueldr> get github to implement this in our for-nixpkgs fork of github with all the features and fixes we need :)
<jonringer_> They have a similar feature for "required number of reviewers", not sure if they have a way for use to expose a predicate like 'rebuilds: rebuilds < 1000 && branch in stableBranches`
<gchristensen> I mean it could be done actually
<samueldr> I was mindfully not stating it could be done through actions shenanigans
<samueldr> I guess ofborg *can* though, no?
<gchristensen> require a check to pass, and have a check fail if rebuilds is too high and it points to master
<gchristensen> yea
<samueldr> × on too many rebuilds
<samueldr> [for master]
<samueldr> to side-step, add an escape hatch label "bypass: rebuild-check" or something so the any committer can if needed
<samueldr> (if it really locks the merge button
<jonringer_> hopefully with better testing around PRs, we wont be in a situation where we have to push a massive rebuild to master
<jonringer_> we would also need an except for staging-next
<samueldr> jonringer_: security issues
<gchristensen> the next heartbleed would go right to master
<samueldr> the terrible ones, if staging-next isn't in a good place either
<jonringer_> yea, that's fair, but those are VERY infrequent
<jonringer_> and true to the word "exceptional"
<samueldr> exactly, but the escape hatch needs to be there even moreso
<gchristensen> escape hatches which are auditable (like labels!) are nice
<gchristensen> easy to do the right thing by default, easy to do the right thing when it isn't the default right thing, distributed trust among contributors, etc.
<samueldr> it's be nice to have "programmatic" fields on issues/PRs, so let's say rebuild count is an actual number in a field, actionable and filterable
{^_^} has quit [Remote host closed the connection]
<samueldr> heh, we could have binary labels we need to AND together, rebuilds 0b00001, rebuilds 0b00010, rebuilds 0b00100 etc. totally unhelpful for the humans
{^_^} has joined #nixos-dev
AlwaysLivid has quit [Remote host closed the connection]
AlwaysLivid has joined #nixos-dev
asbachb has quit [Quit: Connection closed]
orivej has joined #nixos-dev
<ekleog> philipp[m]: just found a solution for the gstreamer issue you had with nheko, if you hadn't found it yet: `wrapProgram "$prog" --suffix GST_PLUGIN_SYSTEM_PATH_1_0 : "${pluginPath}"` with `makePluginPath = plugins: builtins.concatStringsSep ":" (map (p: p + "/lib/gstreamer-1.0") plugins);` and `pluginPath = makePluginPath [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad
<ekleog> gst-plugins-ugly gst-libav ];` (taken from `pkgs/tools/networking/gmrender-resurrect/default.nix`) is an example way to make things work I think
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-dev