<jlv>
qyliss: I'm learning towards bin, but I was hesitant because the script uses perl, and I didn't want to add an extra dependency for a supplementary script. My first instinct was actually to create a separate package that depends on the original. For reference, I'm packaging the `conplay` script for playing audiobooks with mpg123.
<qyliss>
jlv: ah, in that case you should add multiple outputs
<nix-build>
[nixpkgs] @jonringer pushed 0 commits to master: https://git.io/JvdQv
<jlv>
qyliss: Do you know of a split output package that I can reference? From the manual, I'm having a hard time understanding how to convert the mpg123 package into a split output package.
<jlv>
edef: I see. So if I want to add one additional output, without breaking anything, I would just add something like `outputs = [ "out" "conplay" ]`. Although, looking through packages that define `outputs =`, I don't see any that use split outputs to package supplementary scripts.
<edef>
jlv: there are a few
<jlv>
edef: If the supplementary scripts has the original binary as a runtime dependency, do I need to wrap the original binary into the script (like with `wrapProgram`), or can I assume the original binary is always available if the extra output is installed?
Maxdamantus has joined #nixos
<edef>
jlv: "installed" isn't necessarily a meaningful concept
<edef>
jlv: so yes, use wrapProgram
<thoughtpolice>
jlv: Multiple outputs are computed essentially as multiple .drv files, so you can definitely have a dependency on say, the script output "$foo" without having one on "$bin" or "out". Whether or not "installing" something brings multiple outputs into scope is another question
<thoughtpolice>
Like, as an example, when you use `nix-env -i` it has some logic to detect and include .man outputs in the installation, if they are available. It installs both .man and .out at once, but that does not mean .man has a dependency on .out. This general rule applies to anything, though.
<thoughtpolice>
So TL;DR yes, use wrapProgram to be safe. The worst it will do is add an extra `exec`
wavirc22_ has joined #nixos
wavirc22 has quit [Ping timeout: 240 seconds]
<jlv>
thoughtpolice: That makes sense.
codygman has joined #nixos
<thoughtpolice>
Really, the only special case a multi-output derivation adds is that, when you refer to a default name `foo` and it has 3 outputs `{out, man, doc}`, then the string antiquote "${foo}" is the same thing as referring to `"${foo.out}"`. Otherwise, multi-output derivations are "more or less" just a couple different derivations wrapped up as an attribute set. Or at least, that's how I think about it.
<thoughtpolice>
It's actually a little more special than that: the default antiquote reference is whatever occurs first in the list of `outputs` in the attrset you write. In theory, this should be freeform and could be any set of names, in any order you want. *However*, the current implementation requires the name of the first output to be `out`. (Otherwise you could name it `.bin` or something, which would probably be more accurate in the
<thoughtpolice>
general case.)
<cole-h>
Though for completeness sake: "${foo}" refers to the first in the `outputs` list, which isn't always `foo.out`
<nix-build>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python37Packages.chalice: 1.12.0 -> 1.13.0 »: https://git.io/JvdQK
<thoughtpolice>
cole-h: Oh, maybe that restriction got lifted, then. It was in place for a while
kleisli has quit [Remote host closed the connection]
<thoughtpolice>
IIRC
<jlv>
thoughtpolice: does that mean I don't have to add `outputsToInstall = [ "out" ]` if I just want it to install the first `outputs` by default?
kleisli has joined #nixos
thc202 has quit [Ping timeout: 252 seconds]
<thoughtpolice>
jlv: Nope! And of course there are some extra special cases on top of that, too. You'll always get `.out` for instance -- but if you include something in `buildDepends`, then it includes `.lib` and `.dev` as well, if they exist
<thoughtpolice>
That makes things like multi-output libraries transparent
<kalbasit>
is it possible to set the priority while installing a package, i.e `nix-env --set-flag priority 0 -if ./default.nix`
<pjt_014>
kalbasit: in package definitions there is
<pjt_014>
lib.pkgs.mkOverride # foo or something like that
Maxdaman1us has joined #nixos
<pjt_014>
search "nixos mkOverride" and you'll find it
<kalbasit>
checking...
<pjt_014>
as for doing it on the command line, I don't know of a way to do that
<simpson>
excelsiora: You're not crazy. That URL does appear to be shortened; that's unfortunate.
<kalbasit>
pjt_014: mkOverride is for nixos modules AFAIK
<kalbasit>
What I'm trying to do is install direnv from a local Git repo, except I already have it installed in home-manager
<kalbasit>
I just want to test something and uninstall it. Anyway, it's refusing to install due to conflict suggesting to run `nix-env --set-flag priority` but for an already installed package.
<kalbasit>
I guess I'll just use the go binary directly
<pjt_014>
There is one other thing I can think of
<pjt_014>
long shot though
Maxdamantus has quit [Ping timeout: 256 seconds]
<pjt_014>
there are a number of Optional types that can be set on conditionals
<nix-build>
[nixpkgs] @hrhino opened pull request #84068 → scala-runners: init at e6996f8 → https://git.io/Jvd5P
<pjt_014>
i.e. "postPatch = stdenv.lib.optionalString (customConfig != null) ''..."
wavirc22_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
felixfoertsch23 has joined #nixos
felixfoertsch has quit [Ping timeout: 240 seconds]
felixfoertsch23 is now known as felixfoertsch
<jlv>
What is the proper way to package a script with a hashbang like `#!/usr/bin/env perl`? Is it enough to `wrapProgram` perl, or should I replace the hashbang with `#!${perl}/bin/perl`?
<edef>
jlv: patchShebangs will take care of it
<edef>
jlv: just make sure to have perl in your buildInputs
<pjt_014>
"patchShebangs ." will do everything in the source directory
<jlv>
edef: Oh, nice. I didn't know about `patchShebangs`.
<pjt_014>
me neither till the lack of it fked up a tool I like :\
wavirc22 has joined #nixos
mounty has joined #nixos
<pjt_014>
oh
<pjt_014>
I just found a sentence I don't like
<pjt_014>
"The attribute python refers to the default interpreter, which is currently CPython 2.7. "
orivej has quit [Quit: No Ping reply in 180 seconds.]
<lovesegfault>
What's the right way to make `src` in `mkDerivation` be the files in ./. tracked by git?
<lovesegfault>
is it `cleanSource`?
orivej has joined #nixos
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #nixos
<nix-build>
[nix] @Infinisil opened pull request #3468 → Make function arguments retain position info → https://git.io/Jvd5d
<jlv>
qyliss, thoughtpolice, edef: Thank you for all of your help :) The package is looking good and the pull request is open. Please let me know if you see any issues. https://github.com/NixOS/nixpkgs/pull/84069
<nix-build>
rfcs#64 (by Infinisil, 12 weeks ago, open): [RFC 0064] New Documentation Format for nixpkgs and NixOS
<pjt_014>
,locate tic
<nix-build>
Found in packages: ncurses, ncurses5
<pjt_014>
good bot
<parsnip>
why not have one bot for factoids, and one bot for the rss feed?
<infinisil>
Only the NOTICEs are autonomous. Non-NOTICE's are user-triggered
<evils>
infinisil: you wouldn't happen to know why the bot changed name?
<infinisil>
evils: Nope
<infinisil>
parsnip: But yeah that's something I want eventually (I run the factoids and other interactive parts of the bot)
<parsnip>
hmm, /ignore -n nix-build doesn't work in irccloud. it just ignores it all.
<parsnip>
i never stated that nix uses pandoc
<parsnip>
should i add a sentence at beginning that says, "some people want to use pandoc to read documentation"
<parsnip>
the pandoc docs are an incredibly long page, and difficult to navigate
<infinisil>
Oh so *you're* using pandoc
<parsnip>
it would be much easier for some of us to digest that very long page in org-mode
<infinisil>
Your title "Converting manual to org with pandoc does not make much sense" makes it sound like Nix is using pandoc
<parsnip>
any suggestion for how to improve the issue?
<infinisil>
Well certainly clarify what you're doing or trying to do
<infinisil>
Provide more context, source code, commands, stuff like that
bhipple has quit [Remote host closed the connection]
<parsnip>
okay. but my two points were skipped anyways
<parsnip>
why is it okay to have the html jumbled like that?
<parsnip>
even in the webpage, things are off
<infinisil>
Nobody said it's okay
<parsnip>
section 8 sits as a sibling to part 2
<OmnipotentEntity>
infinisil, hey there, have you ran that tool (RFC45) on nixpkgs yet btw?
<infinisil>
omnipotententity: I have, though haven't posted a comment yet
<OmnipotentEntity>
cool, does it match my diff?
<infinisil>
omnipotententity: There were ~100 missed unquoted URLs, and one (non-problematic) quoted one that wouldn't have to be quoted (since it's commented out). Also sometimes extra spaces were present after the URL (in your PR) :)
<OmnipotentEntity>
Still with extra spaces in the current PR?
<infinisil>
Haven't checked yet
<OmnipotentEntity>
I know about the one in the comment, I did that intentionally.
<OmnipotentEntity>
And I'm vastly not surprised about the missed ones.
<infinisil>
I'm biased, but I'd prefer if the tool could be used for the mass replacement in a single commit, while any other manual fixups be done in a separate commit
<infinisil>
But I it's nice to know that you arrived at mostly the same result with a bit more manual work :P
<OmnipotentEntity>
Honestly, I prefer automated solutions as well. I just thought there was value with having a human spot check. And as I mentioned in the PR, I didn't fancy trying to find a lexer or write a lexer for nix, because I thought it would take more time than it saved.
<OmnipotentEntity>
So, as long as both methods arrive at nearly the same result, I'm happy with either.
<OmnipotentEntity>
I have some experience, but I won't say I'm the most adroit.
<OmnipotentEntity>
Let me take a look
<pjt_014>
I have packaged exactly 0 packages, so you are more adroit then me.
<OmnipotentEntity>
pjt_014, you misspelled propagated
<pjt_014>
wat
<pjt_014>
was that really it?
<OmnipotentEntity>
yeah, almost certainly
wavirc22 has quit [Read error: Connection reset by peer]
<pjt_014>
well
<OmnipotentEntity>
the fact that it builds but doesn't run means the issue is with your propagatedBuildInputs, and you misspelled the variable as propogated. ;D
<pjt_014>
does nix really just ignore that?
wavirc22 has joined #nixos
<OmnipotentEntity>
You can define arbitrary variables within an expression
drakonis has quit [Quit: WeeChat 2.7.1]
<OmnipotentEntity>
Nix has no way to know if you misspelled a special variable name or intended something else.
<pjt_014>
Is there a way to list special variables in scope?
<OmnipotentEntity>
You'd have to ask someone that actually knows something about the Nix language. I only know barely enough to do packaging
<pjt_014>
Hm.
<pjt_014>
I do have a really nice idea tho
<pjt_014>
a tool that feeds a nix file thru a filter that checks for misspellings
<pjt_014>
all you'd need is a list of specialVarNames
<pjt_014>
and a filter that can check everything against a Levenstein distance of ~2
linarcx has joined #nixos
<pjt_014>
actually whichever edit distance metric allows for transpositions
<OmnipotentEntity>
well, if you want to implement it, there's a link to a haskell implementation of a lexer for the nix language up thread a bit. You could implement it using that.
<pjt_014>
that'd be a hell of a nosedive into learning haskell
<nix-build>
[nixpkgs] @gnprice opened pull request #84072 → cpython: Use optimizations, for a 25% speedup. → https://git.io/JvdbR
evanjs has quit [Ping timeout: 240 seconds]
<pjt_014>
an ugly ass bash script would be enough as a first draft
<OmnipotentEntity>
oh, I kind of figure anyone using Nix has at least a passing familiarity with Haskell
<pjt_014>
pffft no
<pjt_014>
scares me almost as much as lisp
<pjt_014>
All my functional programming is in Elixir
extile has left #nixos [#nixos]
<pjt_014>
Probably the easiest language to dive into FP with
<pjt_014>
unless you count javascript since it got map/reduce/filter and first class functions
<kyren>
oops, I didn't mean to link that comment, I meant to link the discussion in general
<pjt_014>
good summary in there
linarcx has joined #nixos
<pjt_014>
minor idea though
<pjt_014>
what about a pin operator?
<pjt_014>
(almost) like what Elixir has
<pjt_014>
"^ foo = bar"
<pjt_014>
would only assign a value if it's already in scope
<pjt_014>
I think go does something like this with the := operator
evanjs has joined #nixos
lovesegfault has quit [Ping timeout: 272 seconds]
<bsima>
why does 'builtins.getEnv "HOSTNAME"' return an empty string?
linarcx has quit [Quit: WeeChat 2.8]
<srhb>
bsima: can you provide more details? From whence are you using that function?
<bsima>
just in 'nix shell'
<bsima>
'echo $HOSTNAME' gives me the correct value though
<bsima>
from in bash
kleisli has joined #nixos
<srhb>
bsima: You're going to have to provide more information on how you're using it. I cannot reproduce from this.
<srhb>
For instance, this works just fine: { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { shellHook = ''echo ${builtins.getEnv "HOSTNAME"}'';
<bsima>
$ nix repl
palo1 has joined #nixos
<bsima>
nix-repl> builtins.getEnv "HOSTNAME"
<bsima>
""
<bsima>
<srhb>
bsima: And you're certain HOSTNAME is set in the context you're running nix repl there? Because I also cannot reprouce that, running `HOSTNAME=test nix repl`
palo has quit [Ping timeout: 260 seconds]
palo1 is now known as palo
<bsima>
ok weird, so 'HOSTNAME=test nix repl' works
<bsima>
guess it's something weird with my shell
<srhb>
No idea, sounds odd. But yes, I doubt it's a Nix issue.
rauno has joined #nixos
rauno has quit [Remote host closed the connection]
linarcx has joined #nixos
<pjt_014>
oh boy here i go compiling gcc again
mexisme has quit [Ping timeout: 252 seconds]
magnetophon has quit [Ping timeout: 256 seconds]
srxl has joined #nixos
codygman has quit [Quit: Quit]
xelxebar_ has joined #nixos
lovesegfault has joined #nixos
<srxl>
Is there an easy way to get access to a function in another nix file from a nixos module, besides importing it?
leonardp has joined #nixos
<srxl>
Ideally, I'd be able to get it from the module's arguments somehow, eg. `{config, options, newFunction, ... }:`
<nix-build>
[nixpkgs] @pnelson opened pull request #84073 → nextdns: init at 1.4.36 → https://git.io/Jvdbd
kenran has joined #nixos
magnetophon has joined #nixos
xelxebar_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
linarcx has quit [Read error: Connection reset by peer]
<s1341>
Good morning
opthomasprime has joined #nixos
<kenran>
I built a nix derivation on my macOS machine and used `nix-copy-closure` to copy it over to a nixos host machine. Should I expect it to work that way (it doesn't, "Exec format error")? Or what is the correct way to get something working on that machine?
erasmas has joined #nixos
linarcx has joined #nixos
<kenran>
(I wasn't expecting it to work cross-architecture. I'm just not totally sure, and I'm not really finding a good pointer on what I should do instead short of copying the source over and building it there).
<srhb>
kenran: You should not expect it to work. It's built for Mac, not Linux. You'll want to build the derivation on a Linux host, or do a cross build (and I don't know how feasible cross is for Mac->Linux)
<kenran>
srhb: Ok, thanks! It should be feasible to build it on a nixos VM I have lying around and deploy from there, or even inside a docker container then, correct?
<kenran>
Linux docker container with nix installed*
<srhb>
kenran: Yes, definitely. There's also a number of options for setting up remote builders, so builds for a certain arch get auto forwarded
ZaraChimera has joined #nixos
<srhb>
Er, actually I'm not sure about the linux docker container. I assume that's doable, but I've never done it myself. Getting nix to work flawlessly in a container setup is probably not trivial due to the sandboxing required.
<srhb>
(Then again, if that's implemented on Mac as some sort of container-in-linux-vm, it may be less of a headache)
<srhb>
But my first guess is that VM is the simplest way.
erasmas has quit [Ping timeout: 256 seconds]
<kenran>
srhb: it is implemented that way. It should not be a real problem, I'm using the nix package manager inside docker a lot. This is the first time I'm actually using nix itself to get something deployable :)
<srhb>
kenran: Disclaimer: I've no experience with it, but it sounds like exactly what you want
<kenran>
srhb: I just remembered I have a CI pipeline set up which runs on linux and that could just output the result of a `nix-copy-closure --export`
<srhb>
Does look a bit oldish though.
<srhb>
kenran: Why would you export it instead of copying the closure around directly?
<kenran>
srhb: thanks, that link looks interesting!
<srhb>
I don't see anything really wrong with it, but --import and --export is usually more of a hassle and low-level than doing a direct copy-closure
rauno has joined #nixos
<kenran>
srhb: The first step would be the export simply because I don't know yet how to get on the CI machine from here, and I can't get to the target machine from the CI machine.
<srhb>
Ah, I see.
<kenran>
It's just simpler to have an "artefact" that I can put somewhere first.
<kenran>
Thanks a lot for the tips. With all these option I'm sure I'll get something to work. At some point I'll probably post the project nix code somewhere because I'm certain I did some terrible things... :D
linarcx has quit [Read error: Connection reset by peer]
linarcx has joined #nixos
ATuin has joined #nixos
zaeph1 has quit [Ping timeout: 265 seconds]
linarcx has quit [Read error: Connection reset by peer]
linarcx has joined #nixos
cole-h has quit [Ping timeout: 256 seconds]
FRidh has joined #nixos
zaeph has joined #nixos
mexisme has joined #nixos
<xfix>
hm, weird, there are 100000 tasks in a queue, and yet according to https://hydra.nixos.org/machines only the Darwin tasks are currently executing, the rest of machines are idle (and I'm pretty sure they have tasks to do)
mexisme has quit [Ping timeout: 252 seconds]
FRidh2 has joined #nixos
FRidh has quit [Ping timeout: 260 seconds]
chagra has quit [Ping timeout: 258 seconds]
mexisme has joined #nixos
Ariakenom has joined #nixos
mir100 has quit [Read error: Connection reset by peer]
<pjt_014>
I'm submitting a PR to add a package. If I want it to be available as widely as possible do I just select master?
mir100 has joined #nixos
roosemberth has quit [Ping timeout: 256 seconds]
o1lo01ol1o has joined #nixos
<evils>
pjt_014: i think so, it'll relatively quickly become nixpkgs
roosemberth has joined #nixos
<pjt_014>
woohoo
<pjt_014>
That's my 1st package added :DD
<evils>
grats
<nix-build>
[nixpkgs] @petersjt014 opened pull request #84078 → added catcli package, added petersjt014 (me) as maintainer → https://git.io/JvdxJ
<evils>
pjt_014: adding yourself as a maintainer should be a separate commit
lsix has joined #nixos
<jtojnar>
pjt_014 what do you mean as widely as possible?
<jtojnar>
and yes, master is the target for new packages
<etu>
pjt_014: The commit message for adding the package should be in the form of: "package-name: init at version-number"
<evils>
maybe someone will correct me if i'm wrong, but i think propagatedBuildInputs are also buildInputs, making the buildInputs line redundant
o1lo01ol1o has quit [Ping timeout: 265 seconds]
<etu>
The "..." as input to the function should probably be dropped, I don't think it's needed here
o1lo01ol1o has joined #nixos
<pjt_014>
jtojnar: fixed the title, looking at other things
<benny>
is there a simple example package that has an optional dependency for the test part of the package? or should I just add it to the normal dependency even though it's only used for the test?
<benny>
evils: the context is that want to improve the babashka package because I would like it to get added (there have been three PR's for it so far) and it builds fine right now, but to run the tests, it needs the leiningen package
<lovesegfault>
est31: normally you'd want `cargo` instead of `rustup`, I'm using rustup here to do something cursed
<evils>
benny: it is a build time dependency, not a runtime dependency? then add it to nativeBuildInputs
<benny>
I guess it's a build time dependency, it's only for the test and not needed for the runtime
<evils>
sounds like a job for nativeBuildInputs
FRidh has joined #nixos
<est31>
lovesegfault: opensslShared doesn't work
FRidh2 has quit [Ping timeout: 264 seconds]
<benny>
cool, I'll check if maybe the other dependency is also only for the and not runtime, thanks
<est31>
does that mean I have to install openssl manually?
<lovesegfault>
est31: you don't need to do the thing I did for llvm with openssl
<lovesegfault>
llvm is weird
<lovesegfault>
just add openssl to `buildInputs`
<est31>
ok
<lovesegfault>
You _may_ need to do something stupid like `buildInputs = with pkgs; [ openssl.out ]` because openssl IIRC has split outputs
<pjt_014>
soooo the bot says the one test it did failed because I didn't list outputs (though no examples I found did so)
<pjt_014>
What would I need to list then?
<pjt_014>
I know that the first listed becomes the default
<pjt_014>
Some examples I've found use "out", some "bin"
<pjt_014>
and I've seen both "doc" and "man"
o1lo01ol1o has joined #nixos
<pjt_014>
If I can I'd want to know for sure before busying the bot again
linarcx has quit [Quit: WeeChat 2.8]
linarcx has joined #nixos
o1lo01ol1o has quit [Ping timeout: 265 seconds]
lovesegfault has quit [Ping timeout: 272 seconds]
<evils>
pjt_014: that bot is quite good at being cryptic, i think i've had such a failure message when i didn't add myself as a maintainer, could you separate your maintainer-list edit and put it before the package init, maybe that helps...
bvdw has quit [Read error: Connection reset by peer]
laduke has quit [Ping timeout: 252 seconds]
bvdw has joined #nixos
laduke has joined #nixos
<pjt_014>
Is there an easy way to walk that back with git?
<nix-build>
[nixos-artwork] @mogorman opened pull request #49 → 20.03 Markhor art work → https://git.io/Jvdp8
<srxl>
The `//` doesn't seem to do a "deep merge". Is there any way to do this in Nix, ie. `{ foo = { bar = "bar"; }; }` + `{ foo = { baz = "baz"; }; }` should give `{ foo = { bar = "bar"; baz = "baz"; }; }`
<evils>
woeps, that should be maintainers-list: add <your username>, and the right version ofc; learning to use git rebase -i is quite valuable too though
<benny>
can I repeat once more how amazing zramSwap is, what a godsend, even if it's clearly affecting fluidity when you're at 100% main memory and 80% zram swap usage :P
<evils>
pjt_014: there should be a button at the bottom, it may be greyed out...
<pjt_014>
here's it failing to build for aarch64 (minus fetching paths): http://0x0.st/iMkC.txt
<pjt_014>
evils: in the meantime if you wanna see what's failing the log's here ^
mallox has quit [Quit: WeeChat 2.7.1]
mallox has joined #nixos
gulplante has joined #nixos
<evils>
pjt_014: looks like `gts` fails, dependency of graphviz, dependency of anytree, dependency of catcli; i think that means you want platforms.all, but either mark it as broken on aarch64, or blame the test setup, because i can't find a `gts.aarch64` failure on hydra
<evils>
pjt_014: unless there's a particular reason to think it only works on linux, i'd go with platforms.all and see what the bot says about aarch64
smatting has quit [Ping timeout: 252 seconds]
mallox has quit [Quit: WeeChat 2.7.1]
smatting has joined #nixos
mallox has joined #nixos
<pjt_014>
I'm going to leave it for now (gotta sleep) and see if anything more comes of it by tomorow. If not, I'll add it.
fendor has joined #nixos
<evils>
gn
<pjt_014>
Before that though, I think a careful look at the bot's message ("This PR does not cleanly list package outputs after merging") might hint at what it's for
<pjt_014>
Something is different after merging? dunno
<pjt_014>
anyway I'll be back in like 8~14 hrs or something
<nix-build>
[nixpkgs] @alyssais pushed commit from @jonringer to master « git-town: 7.2.0 -> 7.3.0 »: https://git.io/JvFen
pjt_014 has quit [Ping timeout: 264 seconds]
captjakk has quit [Read error: Connection reset by peer]
emilsp has quit [Quit: bye]
captjakk has joined #nixos
emilsp has joined #nixos
<nix-build>
[nixpkgs] @danbst pushed to release-20.03 « postgresql-wal-receiver: fix test for Pg12 (#80268) »: https://git.io/JvFe4
__monty__ has quit [Quit: leaving]
captjakk has quit [Ping timeout: 258 seconds]
<nix-build>
[nixpkgs] @doronbehar opened pull request #84092 → gthumb: add gst plugins and needed environment for video playbacl → https://git.io/JvFeu
c382feb92 has quit [Ping timeout: 265 seconds]
gulplante has quit [Ping timeout: 240 seconds]
ottidmes has joined #nixos
gulplante has joined #nixos
pbogdan has joined #nixos
o1lo01ol1o has joined #nixos
<srxl>
Is there a shorthand for something like `if foo ? bar then foo.bar else defaultValue`?
rauno has quit [Remote host closed the connection]
CRTified has quit [Quit: Gateway shutdown]
<ottidmes>
anohigisavay: you can pass files to nix repl, and it support the <...> notation, and in this case it is is simply loading /path/to/your/nixpkgs/nixos/default.nix, which then is auto called (which is supported by many of the nix tooling), i.e. when the file contains a function with as the argument an attrset that all have defaults, it will call it with the empty attrset automatically
<ottidmes>
anohigisavay: which in the case of /path/to/your/nixpkgs/nixos/default.nix is `maybeEnv "NIXOS_CONFIG" <nixos-config>` for the configuration, and builtins.currentSystem for system
<michaelpj>
`nixos-option` will also do this for you: `nixos-option boot.loader`
<nix-build>
[nixpkgs] @timokau opened pull request #84095 → calibre: fix build of desktop items → https://git.io/JvFvs
sigmundv_ has joined #nixos
captjakk has joined #nixos
<ottidmes>
anohigisavay: as a refresher, <something> looks up files on the NIX_PATH, left to right, which can contain directories or prefixes that function as aliases
<ottidmes>
anohigisavay: but other than the already supported prefixes, like nixos-config, nixpkgs-overlays, and nixpkgs, you should not really use it your self, since it is rather impure (your build will depend on an external definable env variable)
<anohigisavay>
ummm... the exact problem i have is that i want to have two mutually exclusive services (binding the same tcp port), one is enabled by default, and occasionnally i want to manually switch between them (i.e. systemd stop a, systemd start b)
captjakk has quit [Ping timeout: 265 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<anohigisavay>
the only relevant config key is 'enable', but if i set it to false for one of the services, it is marked as "masked", and i can't do `systemd enable` or `systemd start` on it.
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
turion has quit [Ping timeout: 246 seconds]
<anohigisavay>
i thought there would be some key like 'start' on the services but no.
<bqv[m]>
enable it, then find the underlying systemd definition and remove the wantedBy value
<bqv[m]>
that way, it will be created by nix, but not enabled
<bqv[m]>
then you can manally enable it when wanted
<anohigisavay>
bqv[m]: wow! that did the job!
<anohigisavay>
bqv[m]: thank you!
<bqv[m]>
np
hax404 has quit [Remote host closed the connection]
<nix-build>
[nixpkgs] @markuskowa pushed 2 commits to master: https://git.io/JvFva
laduke has quit [Ping timeout: 240 seconds]
hax404 has joined #nixos
laduke has joined #nixos
turion has joined #nixos
zupo has joined #nixos
ZaraChimera has quit [Quit: Going offline, see ya! (www.adiirc.com)]
erasmas has joined #nixos
<ldlework>
How do I install an icon theme such that it shows up in ~/.local/share/icons ?
<nextloop>
i want to manage some software with nix on my opensuse tumbleweed installation. what exactly are the pros and cons for mutli vs single user installation? the docs here ( https://nixos.org/nix/manual/#chap-installation ) only talk about "multiuser is better"
cosimone has quit [Remote host closed the connection]
<ottidmes>
ldlework: maybe HM has something for it, other than that, all I can think of is installing in systemPackages and symlinking /run/current-system/sw/share/icons to ~/.local/share/icons, or specific icons in it
<bqv[m]>
There is also a pr that adds it to nixpkgs
<bqv[m]>
But it won't be merged in our lifetime
<ottidmes>
what is better naming for the path to nixpkgs, just nixpkgs, or nixpkgsPath, the latter is the most explicit, but the former should already be enough, cause we already have pkgs to mean the packages in nixpkgs, so nixpkgs should conceptually already point to a path
<bqv[m]>
Why not just use pkgs.path…
<bqv[m]>
Its already there
<bqv[m]>
Or (import <nixpkgs> {}).path
<ottidmes>
bqv[m]: its not like I need access to pkgs.path, I need the path to another nixpkgs than your default <nixpkgs>
<ottidmes>
so suggesting pkgs.path is like suggesting to use the final thing to get the original, not working ;)
<nix-build>
[nixpkgs] @7c6f434c pushed 2 commits to master: https://git.io/JvFJg
eof_ has joined #nixos
<ldlework>
If I fetchFromGithub a repository which has a bash script, how do I pass the contents of that bash script to pkgs.writeShellScriptBin?
<ldlework>
Let's say `let foo = pkgs.fetchFromGithub`
<ldlework>
and the script is in scripts/bar.sh
eof has quit [Ping timeout: 264 seconds]
* ldlework
pokes bqv[m]
coco has quit [Ping timeout: 240 seconds]
<gulplante>
ldlework: you cna read a files contents with fileContents so fileContents "${foo}/scripts/bar.sh" should work. or foo.outPath/scripts/bar.sh or something
<ldlework>
Thank you so much
<ikwildrpepper>
ldlework: I wouldn't use writeScriptBin, but just a runCommand "store-name" {} "mkdir -p $out ; cp ${src}/scripts/bar.sh $out/bin"
<ikwildrpepper>
seems useless to read the contents to nix first, and then outputting it again, but I guess it is a matter of taste, perhaps :)
<gulplante>
ldlework: writeShellScriptBin is just a wrapper around runCommand. ikwildrpepper's method is more straightforward
<ikwildrpepper>
unless you want to process the string in nix for some reason
<ldlework>
I feel like it's just forcing me to write the boilerplate over and over?
<gulplante>
you could define a function that outputs your boilerplate bash, if you like
<ikwildrpepper>
ldlework: nix supports functions, if you want to abstract, you can just write your own function :)
<ikwildrpepper>
ok, I'll let gulplante answer now :D
<ldlework>
isn't.. that was writeShellScriptBin is...?
* ikwildrpepper
highfives gulplante
<gulplante>
ikwildrpepper: I was thinking the same thing lol :D
<adisbladis>
ldlework: If you want it to fit into the model writeShellScriptBin is using you'll end up with IFD
<adisbladis>
,IFD ldlework
<nix-build>
ldlework: import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<bqv[m]>
ldlework: sorry, I have pings turned off cause of qyliss :p
<cab404[m]>
looks a bit too low level though. firejail wrapper maybe?
<ottidmes>
hyper_ch: I always harcode my interface names with their mac address via udev rules, that solves the issue predictable network interface names is trying to solve, while still giving me what I consider nicer names, like eth0 and the like
<bqv[m]>
ottidmes: i saw something like that called vm.nix
<bqv[m]>
it used qemu
<bqv[m]>
it's like nixos-containers but with qemu
iyzsong has quit [Ping timeout: 240 seconds]
<gchristensen>
are people using that grafana loki thing with good success?
philr has joined #nixos
kleisli has quit [Remote host closed the connection]
kleisli has joined #nixos
<bbarker>
Yesterday I hit an interesting situation where running the same patchelf script I'd run many times before seemed to have broken an executable (MATLAB, in this case). Fortunately I'd backed up the installation. But aside from why/how that happened, it has me wondering about calling my patchelf script each time I start nix-shell. Slow and redundant and now potentially dangerous, I could avoid the patchelf script by creating a lockfile of
<bbarker>
sorts, just not sure the best place to put it yet. local directory would probably be fine for now
knupfer has joined #nixos
kleisli has quit [Remote host closed the connection]
<nix-build>
[nixpkgs] @Profpatsch pushed commit from @IvarWithoutBones to master « xp-pen-g430: init at 20190820 »: https://git.io/JvFLD
kleisli has joined #nixos
<ekleog>
fpletz: By chance, are you using a self-hosted nextcloud nixos module? (trying the maintainers one by one, hoping not to poke too many people ^^') When I'm trying to use the Talk android app or the nextcloud-client nixos package with my instance, I get an endlessly-looping “please wait” on the “connect” button -- do you also see that, or is it just me?
<srk>
bbarker: create a derivation out of it and you don't have to patch manually :)
<bbarker>
srk, i was thinking that but the MATLAB installation itself is many GB, so anytime i change the nix-shell script slightly i think that would replicate all those GBs in the /nix/store
<simukis_>
I’m seeing nix segfault or exhibit other undefined behaviour (what usually is a set is being reported as an integer, list, or anything else) in CI. Any suggestions on how to investigate it?
<srk>
bbarker: maybe you can only wrap executable and ignore the rest
<simukis_>
the version I’m using is fairly recent.
opthomasprime has joined #nixos
andreas303 has quit [Ping timeout: 240 seconds]
b42 has quit [Ping timeout: 256 seconds]
rauno has quit [Ping timeout: 240 seconds]
o1lo01ol1o has quit [Ping timeout: 265 seconds]
cartwright has quit [Ping timeout: 240 seconds]
b42 has joined #nixos
chagra has quit [Ping timeout: 256 seconds]
opthomasprime has left #nixos [#nixos]
inf has quit [Ping timeout: 264 seconds]
chagra has joined #nixos
gxt has quit [Ping timeout: 240 seconds]
pbogdan has quit [Remote host closed the connection]
inf has joined #nixos
chagra_ has joined #nixos
ekleog has quit [Remote host closed the connection]
<thibm>
Is there a consistent way to override derivation to get static libraries ? I have a thing that needs 33 static libraries, so I prefer to ask before digging into each derivation
<thibm>
But I'm afraid there is not
gustavderdrache has joined #nixos
<nix-build>
[nixpkgs] @primeos pushed 5 commits to release-20.03: https://git.io/JvFqH
<nix-build>
[nixpkgs] @Mic92 pushed to master « mosh: enable parallel building »: https://git.io/JvFm4
<globin>
ekleog_: we don't use nextcloud talk
kleisli has joined #nixos
domogled has quit [Ping timeout: 240 seconds]
kleisli has quit [Remote host closed the connection]
<nix-build>
[nixpkgs] @volth opened pull request #84108 → scallion: use openssl 1.0 → https://git.io/JvFmr
Ralith_ has quit [Ping timeout: 240 seconds]
<thibm>
bqv[m]: Indeed, but that would be possible thanks to Nix abstractions. Many libraries has an argument like static/enableStatic/linkStatic
<thibm>
But there is no consistency :(. So I'll do it manually. Most of them are fine with --enable-static=yes, but some not
Ralith_ has joined #nixos
<thibm>
And I need gcc libraries (stdenv.cc.cc.lib) like libstdc++ and libgomp as static libraries. I'm guessing it will not be easy
<ekleog_>
globin: hmm… the nextcloud GUI client on nixos, maybe?
<ekleog_>
basically, the clients I had added a while ago can still connect without any issue, but for some reason I can't add any new heavy client (tried with the nextcloud GUI on nixos and the nextcloud talk client on android)
igghibu has joined #nixos
<ekleog_>
issue is, between the time I setup nextcloud (late 2018) and the time I recently tried to add clients (1-2 months ago), I haven't tested, so I don't know at which point it went wrong
Ralith_ has quit [Ping timeout: 265 seconds]
thibm has quit [Ping timeout: 264 seconds]
rogue_koder has joined #nixos
thibm has joined #nixos
dingenskirchen has quit [Quit: dingenskirchen]
linarcx has quit [Ping timeout: 250 seconds]
Ralith_ has joined #nixos
dingenskirchen has joined #nixos
<ekleog_>
globin: (I've just tried with the regular nextcloud phone app, it infinitely-spins while trying to connect just after having input the password too)
<ekleog_>
maybe the weirdest thing being that there's nothing of interest in the journalctl, and that in the security options of my account it does show the phone as being added, so it's not just a password issue
<Mic92>
It would be cool if nextcloud talk would have mod, where it does not need a login.
<Mic92>
*mode
chagra has joined #nixos
<Mic92>
For meetings
domogled has joined #nixos
<Emantor>
AFAIR you can send invite links so people don't need an account. We used our hackespace instance for this at work.
growpotkin has joined #nixos
<thibm>
For the record, there are some hints on how to automatically get static libraries in pkgsStatic definition
knupfer1 has joined #nixos
knupfer has quit [Quit: knupfer]
knupfer1 is now known as knupfer
chagra_ has quit [Ping timeout: 240 seconds]
<Emantor>
Ah, but you need an account to start the call.
alexgood has joined #nixos
ATuin has quit [Quit: WeeChat 2.7.1]
bahamas has quit [Quit: leaving]
<gchristensen>
can I build a rust package with carnix with debug enabled?
rauno has quit [Remote host closed the connection]
fusion809 has quit [Read error: Connection reset by peer]
fusion809 has joined #nixos
<bqv[m]>
hey folks what's the peril of using networking.usenetworkd
<bqv[m]>
cause not using networkd is causing me physical pain
mauli has quit [Quit: WeeChat 2.7.1]
mauli has joined #nixos
nobrak` has quit [Remote host closed the connection]
fenedor has joined #nixos
<chrisaw>
I'm a bit stuck here - trying to use uwsgi with multiple "vassals" - one defined in each of 2 packages. The problem is - uwsgi seems to end up with one *or* the other - not both.
sigmundv_ has quit [Remote host closed the connection]
<Mic92>
bqv[m]: I personally not use networking.useNetworkd. I use the networkd options directly as exposed by systemd.network.*
<Mic92>
It's less indirection
<thibm>
So there's makeStaticLibraries which is kind of bruteforcing mkDerivation's attributes to get static libraries. Cool
<nix-build>
[nix] @edolstra pushed to flakes « fetchTree: Support integer attributes »: https://git.io/JvF3t
captjakk has joined #nixos
anohigisavay has joined #nixos
bdju has joined #nixos
<alexgood>
Hey folks, I'm getting an `ENOMEM` from an `mlock` call, as far as I can tell that means that `RLIMIT_MEMLOCK` is too low. How do I go about changing that in Nix?
cfricke has quit [Quit: WeeChat 2.7.1]
sigmundv_ has joined #nixos
cosimone has joined #nixos
orivej has quit [Ping timeout: 256 seconds]
knupfer has quit [Remote host closed the connection]
<nix-build>
[nixpkgs] @Infinisil pushed 2 commits to master: https://git.io/JvF36
<nix-build>
[nixpkgs] @Rizary opened pull request #84113 → nixpks-fmt all of the things → https://git.io/JvF3y
<chrisaw>
When passing in a list of options in NixOS - can I merge two sets from different packages?
<Mic92>
pbox
<chrisaw>
For example: if package 1.nix sets: services.example.a = { a = 1; b = 2 }; how can I also allow 2.nix to set: services.example.b = { c = 3; d = 4; }?
<nix-build>
[nixpkgs] @Infinisil pushed 2 commits to release-20.03: https://git.io/JvFsq
<chrisaw>
infinisil: Basically I have two packages - both need to define a "vassal" in uwsgi but each package overwrites the other so only one is ever created. Trying to figure out how to get them to simply "merge" together instead of overwriting eachothers definitions.
o1lo01ol1o has quit [Remote host closed the connection]
philr has quit [Ping timeout: 256 seconds]
<fusion809>
Hi folks, is there any magic trick to getting i3pystatus to work on NixOS? My ~/.i3/config file has this line: status_command python3 ~/.i3/i3status.py that calls on a script that uses i3pystatus and it fails. Guessing I need to modify this command to include nix-shell
<fusion809>
It has a few python deps on top of i3pystatus too, like netifaces, colour and psutil
o1lo01ol1o has joined #nixos
<fusion809>
I included these packages under services.xserver.windowManager.i3.extraPackages = with pkgs; [ in /etc/nixos/configuration.nix
<adisbladis>
fusion809: Could you pastebin your full expression please ?
<fusion809>
You mean the error, or the config file or my ~/.i3/i3status.py?
<adisbladis>
Ok, you can't include python packages like that. Try turning `python37Packages.colour python37Packages.netifaces python37Packages.psutil` into `python37.withPackages(ps: [ (i3pystatus.override { python3Packages = ps; }) ])`.
<typetetris>
Using vncserver from tightvnc gives me `vncserver: couldn't find "Xvnc" on your PATH.`, is this a known bug, or did I do something wrong? `nix-env -iA nixos.tightvnc; vncserver`.
<adisbladis>
fusion809: Or you can just use the i3pystatus package directly ?
<adisbladis>
Why are you having a local copy in ~/.i3/i3status.py ?
<fusion809>
adisbladis: and that's under services.xservices.windowManager.i3.extraPackages? (your first idea). No, ~/.i3/i3status.py isn't a i3pystatus copy. It calls on i3pystatus, however, but it isn't the i3pystatus.py script contained in the i3pystatus package.
<adisbladis>
In any case `(python37.withPackages(ps: [ (i3pystatus.override { python3Packages = ps; }) ]))` should work the way you expect. It will give you a wrapped python interpreter that can import i3pystatus
<adisbladis>
fusion809: Ah right, sorry for the misunderstanding :)
<adisbladis>
Yes, you put `environment.systemPackages = [ rofi (python37.withPackages(ps: [ (i3pystatus.override { python3Packages = ps; }) ])) rxvt ];`
markus1189 has quit [Ping timeout: 265 seconds]
markus1189 has joined #nixos
opticnerve has quit [Quit: Leaving]
magnetophon has joined #nixos
<fusion809>
That's fine, I realize I'm not the best communicator. Ah, still failing, I'm afraid, with the same error.
<fusion809>
I even added i3pystatus to systemPackages
gustavderdrache has quit [Remote host closed the connection]
<adisbladis>
fusion809: I can see that you're adding python37Full to systemPackages too
<adisbladis>
Remove all python interpreters from your system packages
<fusion809>
Yep. OK, shall do.
wildtrees has joined #nixos
<adisbladis>
(also check what `which python3` returns)
gustavderdrache has joined #nixos
<adisbladis>
It should point at something looking like /nix/store/f6gmqcxy0cyww8qy82frrgs4rablz02j-python3-3.8.2-env/bin/python3
<fusion809>
Ah, so I should remove that I'm guessing? I do use GNU Octave with the symbolic toolbox a lot, which that enables, so it'd be a very temporary fix
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noudle has joined #nixos
<fusion809>
Oops, I think Octave is the line above, maybe that line is redundant.
<adisbladis>
,libs
<adisbladis>
Hm, I thought the bot had something for that
<nix-build>
[nixpkgs] @alyssais pushed commit from @bqv to master « python3Packages.weechat-matrix: unstable-2020-01-21 -> 0.1.0 »: https://git.io/JvFnI
<adisbladis>
Though actually i3's extraPackages just sticks things in environment.systemPackages
<fusion809>
Still getting an error. I should admit, I haven't been getting the actual error being returned, I've just been running the command that's in my ~/.i3/config file for status_command in my terminal (namely python3 i3status.py), but maybe for NixOS that's not suitable. Sorry, I'm used to using Arch. I don't know of a way to get the error log for the i3 status bar.
<fusion809>
I should clarify.
<nix-build>
[nixpkgs] @Rizary opened pull request #84122 → Refactoring nixpkgs using nixpkgs-fmt → https://git.io/JvFnY
<fusion809>
I mean the error I've been reporting to you, the one I paste logged, that was from the running of "python3 i3status.py" (which is in my ~/.i3/config file). But I am seeing an error on the i3 status bar, but it isn't a detailed error
<fusion809>
It's just saying that stuats_command process exited unexpectedly (exit 0)
<fusion809>
status command^
<adisbladis>
I can execute your python script just fine with a python interpreter created using the expression I pasted
<adisbladis>
But I don't use i3, so I can't help you there.
<fusion809>
I can too in my terminal.
<adisbladis>
Maybe you have to restart i3?
<fusion809>
Such a pity, I really love i3 on Arch. Well, I've been reloading it to test, but I'll try a reboot. -fingers crossed-
fusion809 has quit [Remote host closed the connection]
<nix-build>
[nixpkgs] @alyssais pushed commit from @AndersonTorres to master « jwasm: 2017-11-12 -> 2.13 »: https://git.io/JvFnC
sasycto has left #nixos ["ERC (IRC client for Emacs 26.3)"]
fusion809 has joined #nixos
<fusion809>
Ah, silly me, it was the script itself that was the problem. Thanks adisbladis, I'm pretty sure that before those Python changes (before which in the terminal that python command failed) both the script and the i3pystatus set up was the problem.
<adisbladis>
gchristensen - the fastest merge in the west
<gchristensen>
PRs that are almost all deletes and green check-marks are good-to-go imo :P
o1lo01ol1o has joined #nixos
<bqv[m]>
proceeds to delete every file in nixpkgs
<andi->
make sure to keep everything that is needed to pass eval ;)
<bqv[m]>
ah, of course
<excelsiora>
woot
<excelsiora>
gm
<excelsiora>
or afternoon, wow
sasycto has joined #nixos
anohigisavay has quit [Quit: Konversation terminated!]
chagra has quit [Ping timeout: 256 seconds]
<sasycto>
My laptop speakers just stopped producing audio (although my headphones work fine still). What steps should I go through to diagnose the problem? I haven't made any system configuration changes when it happened, which was right in the middle of watching a video.
rardiol_ has joined #nixos
<sasycto>
I've already checked alsamixer and the speakers are not muted and have their sound cranked up.
<bqv[m]>
is there a shortcut for ` git reset --hard $otherbranch; git reset --soft $previousbranch; git reset `
<bqv[m]>
that just seems horribly clunky
<bqv[m]>
i'm sure you can work out what i'm trying to achieve with that
erictapen has joined #nixos
<sasycto>
But I don't know what steps to go through to diagnose pulseaudio et al to determine if it's a hardware issue vs a software one.
rardiol has quit [Ping timeout: 264 seconds]
mrCyborg has joined #nixos
<adisbladis>
sasycto: Did you check in pavucontrol ?
<sasycto>
I have not.
<sasycto>
Apparently that's not installed.
edef has quit [Read error: Connection reset by peer]
thibm has quit [Quit: WeeChat 2.6]
<srk>
it's just nix-shell -p pavucontrol away!
edef has joined #nixos
justanotheruser has joined #nixos
<srk>
you can also check alsamixer and alsamixer -Dhw
<sasycto>
It's enabled in pavucontrol.
peelz has quit [Remote host closed the connection]
<sasycto>
Like I said, I checked to ensure that everything is enabled in alsamixer
peelz has joined #nixos
zupo has joined #nixos
delan has joined #nixos
delan has joined #nixos
delan has quit [Changing host]
<adisbladis>
sasycto: pavucontrol can give you more information about specific streams
<adisbladis>
And has a little handy vu-meter
<sasycto>
Also pavucontrol does display that audio is attempting to be sent (i.e. the audio stream is showing output, but I hear nothing)
<sasycto>
Which almost makes it feel like it's a hardware issue (which I'd believe since my left speaker gave out a while back, and HP seems to have shite quality control), but I don't know how I'd tell
KeiraT has quit [Remote host closed the connection]
erictapen has quit [Ping timeout: 256 seconds]
KeiraT has joined #nixos
<fusion809>
Anyone know how to get audio to work under i3? On other distros with i3 I find audio works out of the box, but on NixOS it doesn't seem to be. Never I run `alsamixer` or `amixer` in a terminal I get pulseaudio connection refused errors.
konobi has quit [Remote host closed the connection]
<fusion809>
s/Never I run/Whenever I run/^
<andi->
fusion809: did you enable sound in your configuration?
<misuzu>
is there some kind of function in nix to get a hash of a string?
konobi has joined #nixos
<fusion809>
No, didn't realize I had to. Lol, bit too used to using KDE on NixOS it seems.
<fusion809>
ottidmes: I did, but not much and it's never caused a problem before.
<sasycto>
builtins.hashString
<sasycto>
Oh, I see someone else already said that
<ornxka>
how do i tell nixos to put stuff in the root dir
<ornxka>
like if i plan on running a bunch of third-party binary software with hardcoded paths
<fusion809>
I'll give rebooting without those bits of code, see if audio starts working again
<ornxka>
i think theres some thing that lets you make a chroot?
<cole-h>
buildFHSEnv or something
<ornxka>
ah thats it thx
fusion809 has quit [Remote host closed the connection]
<bqv[m]>
nevermind guess i'll just enable it and see what happens...
growpotkin has joined #nixos
fusion809 has joined #nixos
hmpffff has joined #nixos
<fusion809>
Well, the audio is back, but I don't know why as when I added back that code, the audio remained still there.
<ottidmes>
fusion809: I have had a few rare moments were my audio stopped working, for which a restart always worked so far
<fusion809>
Ah, so might just be a weird bug.
<chrisaw>
This is likely a really simple question but can anyone tell me how I can install a version of uwsgi with the python3 plugin included *without* using the service?
<chrisaw>
Basically what I want is to use something like: uwsgi = pkgs.uwsgi { plugins = "python3" };
<ottidmes>
fusion809: in the past, this always worked for me: pulseaudio -k && sudo alsa force-reload
noudle has quit []
<fusion809>
Thanks, I'll add that to a function in my ~/.zshrc file.
<infinisil>
What is polkit and why is it enabled by default?
<avn>
Folks, anyone have experience upgrading firmware for iwlwifi (as well as module options tuning, etc?).
justanotheruser has joined #nixos
<symphorien>
infinisil: a dbus based password prompt for gui things to escalate privileges
<andi->
not just that..
<srk>
also a javascript runtime
<andi->
dbus permission management used for all kinds of things these days.. without that you don't even get proper /run/user/… IIRC
<infinisil>
Hm, I wonder if it breaks my minimal system config for a single service
<infinisil>
If I turn it off
<andi->
might be fine
<infinisil>
Trying to minimize closure size here
<andi->
I had a friend of mine use it for a VPN VM on his OpenBSD.. worked fine.. expect some quirks
<symphorien>
also it's intertwined with systemd. systemctl will try to use polkit if you are not root and try to do something priviledged
fusion809 has quit [Remote host closed the connection]
<ottidmes>
for now... :P
fusion809 has joined #nixos
<infinisil>
Now python and perl are the biggest offenders in my closure size
<infinisil>
python mostly from zfs (I think that might be avoidable)
<infinisil>
perl probably can't be avoided due to it being used for the activation script..
<bqv[m]>
what is /run/keys for...
<symphorien>
nixops iirc
<bqv[m]>
hm ok
<ottidmes>
I thought effort was made to banish perl from the codebase, but that was some time ago
<ottidmes>
Maybe that was just Nix itself though
mawis has joined #nixos
zupo_ has joined #nixos
<chrisaw>
cole-h: That's pretty much what I'm looking for - just struggling to figure out how to define a package with an override like that. :|
<bqv[m]>
ottidmes: so as part of your reproducibility, how do you handle secrets that services depend on? e.g. i've just noticed my local system has a dependency on /etc/wpa_supplicant.conf, but i can't generate that through nix or my wifi password will be in the store
<bqv[m]>
i'm thinking have it as a secret in the config repo, and have an activation script copy it into place
<bqv[m]>
alternatively i could just drop supplicant and use iwd like a civilized human being
o1lo01ol1o has quit [Remote host closed the connection]
endformationage has joined #nixos
<bqv[m]>
then at least it wouldn't fail to start, it just wouldn't connect to anything until told to
<nix-build>
#84043 (by neilmayhew, 19 hours ago, open): glibc-2.30 libraries link to glibc-2.27
<ottidmes>
bqv[m]: I haven't used NixOS much on a laptop, so that's why I haven't run into that particular problem
pbogdan has quit [Remote host closed the connection]
knupfer has quit [Ping timeout: 240 seconds]
<ottidmes>
bqv[m]: things I find the hardest are state and settings of applications, like ideally I would keep track of my firefox and chrome setup and open tabs, I think you can supply a set of extensions to use, but doubt you can also supply how you have those extensions configured
jumper149 has joined #nixos
<bqv[m]>
ottidmes: i think rycee had something going to declaratively add extensions to firefox
<bqv[m]>
it's either in home-manager or the nur
<cole-h>
I think it's their NUR -- but I think it's on their GitLab, not GH
<ottidmes>
bqv[m]: yeah, like I said, that's all I know of existing, but the rest is where its getting hard
pbogdan has joined #nixos
<ottidmes>
Installing the few extensions I use manually is almost no trouble at all, but remembering how I had the setting exactly, some have custom CSS and such, that I would like to see made declerative
<bqv[m]>
yeah
<tilpner>
ottidmes: You can configure cooperating extensions with enterprise policies
<ottidmes>
tilpner: Ah, makes sense that they have something for enterprise, I will add it to my TODO, after a quick google I also saw a few extensions and tips, but it looked rather complicated (many sources where settings can be stored)
<tilpner>
ottidmes: I have a very-WIP repo for configuring nixpkgs firefox like that. It shows how to do it, but the presets are not good right now
kenran has joined #nixos
lunik1 has joined #nixos
<bqv[m]>
ottidmes: so problem with the activation script tactic, in restricted mode it's actually impossible because it would be accessing paths outside the store, or it would need the content of the file in the store.
<bqv[m]>
starting to think this is impossible
<ottidmes>
tilpner++ interesting stuff!
<nix-build>
tilpner's karma got increased to 76
<bqv[m]>
either it's declarative and it's in the store, or it's imperative and not in the store
opthomasprime has quit [Remote host closed the connection]
<nix-build>
[nixops] @adisbladis opened pull request #1275 → Move from xml intermediate Nix representation to JSON → https://git.io/JvFBT
opthomasprime has joined #nixos
<ottidmes>
bqv[m]: there is no middle ground, saying, these paths are safe but at a different location then /nix/store?
opthomasprime has quit [Remote host closed the connection]
opthomasprime has joined #nixos
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bqv[m]>
i don't think so, realistically i think i need it to be in the store but encrypted some how, and decrypted as part of activation, if that could ever make sense
roosemberth has quit [Ping timeout: 260 seconds]
knupfer has joined #nixos
roosemberth has joined #nixos
<bqv[m]>
so perhaps if there needs to be a file outside the nix store, limit it to one! have a key file on the filesystem, use it as part of activation to decrypt secret files
zaeph1 has joined #nixos
<bqv[m]>
or, go even purer, use a HSM to decrypt them!
<johnjay>
is co mpiling a custom kernel any different for nixos
shafox has quit [Remote host closed the connection]
<johnjay>
or is it largely the same? I'm assuming you're running nixos and compiling the kernel for that system
zaeph has quit [Ping timeout: 256 seconds]
knupfer has quit [Ping timeout: 256 seconds]
<ottidmes>
bqv[m]: but even on restricted mode, it can only restrict while in Nix world right, I mean, it itself has to access /boot and /etc for example, so could you really not make it work?
<rycee>
Configuring FIrefox `user.js` and providing extensions is part of the firefox HM module. But the packaged extensions are in my NUR where they are automatically updated daily.
hmpffff_ has joined #nixos
<bqv[m]>
ottidmes: yeah sure, but i'm thinking of if i was to provision a new machine with this config, it initially wouldn't work due to the missing files. the configuration isn't self-contained if it relies on random filesystem files
<bqv[m]>
but maybe that's overkill
opthomasprime has left #nixos [#nixos]
hmpffff has quit [Ping timeout: 272 seconds]
<ottidmes>
bqv[m]: My config is self contained, the way its setup it makes sure the necessary files are made available, and the installer does not need much, and what it needs is copied to the store (no private info), but that does mean no wifi in the installer, you could make that work with an encrypted file, but I usually install my laptop through ethernet cable anyway
<bqv[m]>
yeah, i reckon i'm overthinking this. i should just set it to use iwd and be done with it
<nextloop>
you mean use that branch of the PR drakonis ?
<drakonis>
maybe?
<drakonis>
still a draft though
<nix-build>
[nixpkgs] @mmlb opened pull request #84128 → j2cli: fix missing dependency on setuptools → https://git.io/JvF0Y
<coco>
I'm working through Nix Pill 7 (https://nixos.org/nixos/nix-pills/working-derivation.html), and build a derivation with a builder.sh that contains 'declare -xp', but I don't see any exported variables during the build (as in the description). What am I doing wrong?
o1lo01ol1o has joined #nixos
<ottidmes>
coco: it helps to share what you have done so far
<nix-build>
[nixpkgs] @edolstra pushed 2 commits to master: https://git.io/JvF0w
o1lo01ol1o has quit [Ping timeout: 256 seconds]
<ottidmes>
coco: I think that is due to nix build (hides everything in a log file, used by nix repl) versus nix-build (shows everything while building)
zupo_ has joined #nixos
<ottidmes>
coco: See nix log --help
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #nixos
crumbler has quit [Quit: Leaving]
<nix-build>
[nixpkgs] @Infinisil opened pull request #84129 → Support removing python from zfs/grub closure → https://git.io/JvF0K
<coco>
ottidmes: ah, that explains it. nix-build indeed shows the output. thanks!
<bqv[m]>
coco: shortcut: ` nix repl '<nixpkgs>' `
jlv has joined #nixos
<coco>
good to know :-)
<jlv>
Does anyone know why my session is locking when the display is turned off (as in, with `xset dpms force off`)? I enabled `services.screen-locker` in home-manager, and it looks like the X11 screen saver is now a lock screen (as in, when activated with `xset s activate`). I can work around that easily, but can't turn off the display without the
<jlv>
session locking / screensaver activating.
pjt_014 has joined #nixos
fusion809 has quit [Remote host closed the connection]
<Ankhers>
Is there some way to delete lorri's cache or something? I seem to be stuck at an old version of a package within one of my projects. If I `nix-shell', it gives me the proper version.
<bqv[m]>
i just use ` lorri shell < /dev/null `
<Ankhers>
bqv[m]: That did it. Thanks!
cosimone has quit [Remote host closed the connection]
mallox_ has quit [Quit: WeeChat 2.7.1]
cosimone has joined #nixos
kiloreux has joined #nixos
<jlv>
So I've done a bit of reading and it sounds like it's actually impossible to turn off a display without locking the session, when using X11 (assuming you want to lock the session on inactivity). Is that right? That seems ridiculous.
<CptCaptain>
Why does nix-build redownload a tarball, even though I just prefetched it?
<CptCaptain>
No, github is giving me all sorts of weird gateway timeout errors
<cole-h>
GitHub is experiencing technical issues :)
<energizer>
jlv: can't you use xrandr --off?
ZaraChimera has joined #nixos
<kiloreux>
I am trying to compile nethack-ftp on nix. But getting `error: use of undeclared identifier 'ARG_MAX`. How can I fix this error? It seems like ARG_MAX need to be imported from somewhere inside gcc.
<CptCaptain>
cole-h: You're right. I still wonder why it is necessary to download the tarball again.
<cole-h>
¯\_(ツ)_/¯
kiloreux has quit [Read error: Connection reset by peer]
<ottidmes>
CptCaptain: are you using eval time fetchers like the builtin fetchTarball or the fetchers in nixpkgs?
gustavderdrache has quit [Quit: Leaving.]
kiloreux has joined #nixos
<ottidmes>
kiloreux: lol, did a quick search and found possible leads to your question, but yeah, all on github which seems to be down ATM
<CptCaptain>
This project is using fetchfromgithub
<CptCaptain>
*this package
<ottidmes>
CptCaptain: you sure the prefetches succeeded, not some error pages?
jumper149 has quit [Quit: WeeChat 2.7.1]
<ottidmes>
Guess so, otherwise the sha would fail..
<ottidmes>
Well, that would depend on how you prefetched of course
jlv50 has joined #nixos
<kiloreux>
ottidmes, Github is okay for me. But none of those worked for me.
<CptCaptain>
The prefetch succeeded, I got a hash and I can find the files in the nix-store
o1lo01ol1o has joined #nixos
jlv50 has quit [Remote host closed the connection]
oranginal has joined #nixos
jlv52 has joined #nixos
jlv has quit [Ping timeout: 240 seconds]
kiloreux has quit [Remote host closed the connection]
<jlv52>
energizer: Well, that turned off the display, but it doesn't turn back on for mouse / keyboard activity, and I'm not sure how to turn it on again without rebooting.
kiloreux has joined #nixos
<energizer>
jlv52: how about --on
<oranginal>
hey everyone. I was wondering if this would be an okay chat to ask (probably basic) config file questions in.
<jlv52>
energizer: there is no `--on` option.
<OmnipotentEntity>
github is being slooooooow
<jlv52>
oranginal: of course.
<ottidmes>
oranginal: it is
<energizer>
jlv52: oh sorry it's called --auto
<pinkieval>
I'm reading this part of the Nix tutorial: https://nixos.org/nix/manual/#sec-generic-builder and I don't understand the sentence "Discerning readers will note that the buildInputs could just as well have been set in the Nix expression"
<pinkieval>
buildInputs *must* be in the Nix expression, doesn't it?
<oranginal>
I was going through the vim docs on the NixOS wiki, as I want to install plugins, but I'm keep getting errors when I try to use the instructed code blob.
<jlv52>
energizer: That turned the display on, but it also changed the rotation XD The default rotation is not correct.
<oranginal>
I keep getting the error "packageOverride" doesn't exist.
<simukis_>
You can write scripts that (ab)use shebangs like this for pretty nice results: https://paste.rs/MTt, but can you stack nix-shells this way? a-la https://paste.rs/QFQ?
<energizer>
jlv52: you can read the xrandr docs to set it how you like
<ottidmes>
oranginal: If you could share the error and config, that would help, but is it not packageOverrides?
<oranginal>
packageOverrides had same issue: `error: The option `packageOverrides' defined in `/etc/nixos/configuration.nix' does not exist.`
<jlv52>
energizer: I guess this can work, and I do know how to change the rotation, but this seems like a very messy way to just turn off a display. Why does turning off the display lock the session in the first place? That seems like such a weird decision to me.
<energizer>
jlv52: xrandr --off doesn't lock the session for me
<ottidmes>
oranginal: you probably want to use overlays anyway: nixpkgs.overlays = [ (self: super: { ...your stuff... }) ];
<energizer>
jlv52: that's all i know about this topic. ##linux probably has more info
<oranginal>
ottidmes: I was going with these instructions. https://nixos.wiki/wiki/Vim Have something that instructs how that works?
<ottidmes>
oranginal: ah, if you want to stick to the wiki, just use nixpkgs.config = { packageOverrides ...
<ottidmes>
or better nixpkgs.config.packageOverrides
<oranginal>
Actually, let me edit that for everything in it..
<oranginal>
Is there a good syntax highlighting for this on pastbin?
<ottidmes>
oranginal: problem is you are combining NixOS configuration with Nixpkgs config, you can add Nixpkgs config as part of your NixOS configuration, but it has to be through the option I just mentioned, nixpkgs.config
<ottidmes>
oranginal: Not sure, I always use Github Gist, but considering their issues at the moment, might not be the best, but maybe they are unaffected by the technical issues, don't know
<oranginal>
ottidmes: So, when I look at the wiki it didn't mention that it was modifying nixpkgs.config Is there something that could tell me about how that works?
<jlv52>
energizer: Thanks for you help. I'm not sure I'll ever understand why X11 works the way it does, but at least this workaround seems to work. I really need to switch to Wayland one of these days.
<genevino>
is there a simple way to install tmux in the installer environment? i tried "nix-env -i tmux", but that seems to do a lot more than i wanted
<benny>
infinisil: that's useful to see, even if the top post is quite actionable vs the bottom, but the scope of the work of the last few nominations puts into context what's approximately needed :-)
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
<pjt_014>
for what was said earlier, It might be worth noting that you can do a shallow clone of nixpkgs to save space: git clone github.com/... --depth 25
<bqv[m]>
i've made my config put itself at /run/current-system/flake
<lovesegfault>
Does anyone know how to massage (or smack) fontconfig on NixOS so that color emoji takes preference over the bw ones?
<cole-h>
`du -sh ~/workspace/vcs/nixpkgs` -> 1.4G
<lovesegfault>
cc. cole-h and colemickens who might be seeing this with the new alacritty
<bqv[m]>
so i'll just have /etc/nixos be a symlink to /run/current-system/flake
<cole-h>
I don't think it's necessary to shallow-clone, but that's just me
<pjt_014>
My local device has 400G+ free but the HDD has 'old age' warnings up the wazoo (cuz it is), meanwhile my vps is crazy fast io/disk-wise but has 32GB of space
<pjt_014>
and I have two rpis that are for misc stuff
<pjt_014>
I'm hoping to get a few basic network services on my pi0 so that it can be on 24-7 for that
<cole-h>
lovesegfault: btw "new" alacritty now follows font fallback of your entire system. `fc-match -s <font>` is the exact same fallback path
<lovesegfault>
cole-h: Yeah, I'm trying to figure out how to get it to work without that xml mess
<cole-h>
Good luck
<lovesegfault>
b/c that will also override my other fonts
<lovesegfault>
It sets everything to roboto which is disgusto-barfo
<cole-h>
Check your NIX_PATH and make sure /etc/nix/configuration.nix exists is what I would do
thetet has joined #nixos
<oranginal>
lovesqgfault: config like hardware.acpilight.enable
<guest1234>
I'm an aspiring nix user that's stuck at the install screen. I have an old x220, but no ethernet cord to connect it directly. I've created a wpa_supplicant.conf file and restarted wpa_supplicant. running the command wpa_cli seems to show that I'm connected to my wifi. When I run nixos-install I'm still shown the message "warning: you don't have
<guest1234>
Internet access; disabling some network-dependent features" and then errors because it's still trying to download things from the internet. Has anyone else here had a similar problem before?
<oranginal>
lovesegfault: I've noticed others do install, but that one doesn't.
<ornxka>
i dont have /etc/nix/configuration.nix
<ornxka>
i have /etc/nixos/configuration.nix, which is a symlink
<lovesegfault>
ornxka: The former doesn't exist, the latter sounds like you use NixOps or Morph?
<ornxka>
well, i made the symlink
<ornxka>
as in manually
<ornxka>
it points to a git repo and the file is definitely there
genevino has quit [Quit: Great minds discuss ideas. Average minds discuss events. Small minds discuss people.]