<samueldr>
but I'm 99.99% sure it should not require sudo
<Church->
samueldr: Yeah my user account doesn't have build rights I think.
<Church->
Or rights to the nix daemon?
<samueldr>
are you on nixos?
<Church->
Yep
<samueldr>
that doesn't sound right
<samueldr>
well, at least for default configurations AFAIK
<Church->
Okay neat... My laptop is unresponsive. Power button doesn't work. >_>
<Church->
Frack
<samueldr>
:o this definitely doesn't sound like something that nix can do
<Church->
But I can see the irc terminal doing something
<Church->
Yeah maybe somehow iundervolt did something funky?
<Church->
My laptop has had this issue apparently.
<samueldr>
I wonder if it's somehow getting to maxing the memory usage
<samueldr>
when swapping, especially to spinning rust (hard drives) it sometimes leads to what look like complete lock ups :/
Mr_Keyser_Soze has joined #nixos
<Church->
Maybe? But that wouldn't be the cause of the power button issue.
<Church->
Ugh
<Church->
Plus I have SSD only
<Church->
Guess I'll wait for the battery to die
<samueldr>
don't know, though if you undervolt, maybe it's possible
<Church->
Maybe
<samueldr>
you held the power button for a long time? (I guess so, just checking)
<Church->
Guess I'll wait and then do this on my vps
<Church->
Yeppp
<samueldr>
ouch, if so it's probably something going terribly bad at a level elsewhere than the running system :/ (but I don't really know)
<Church->
Yeah my laptop has had this error going by the manufacturer. Only happened once before.
<Church->
Ugh
<Church->
Guess I'll try on the vps in a bit. Try to unset the path and then reconstruct it from buildInputs so as to have normal binaries and the new nix-prefetch-url
iqubic has joined #nixos
<iqubic>
So I'm trying to do haskell development on nix.
<iqubic>
I've looked at it, but not in great detail.
<srk>
cause of the first link
<iqubic>
Yeah. What about the first link?
<duairc>
So I've been reading the Nix and NixOS manuals all day, and I think I have a pretty good grasp of Nix the language
<duairc>
I just read the chapter of the NixOS manual on NixOS modules (Chapter 39). It says that modules have a defined structure {options = {...}; config = {...};} and so on.
<duairc>
The config section is for options definitions
<duairc>
But most examples of NixOS modules that I've seen so far put the option definitions in the root of the module, not inside the config key
<duairc>
Have I misunderstood something? Is there a difference one way vs another? Why are both allowed?
<samueldr>
duairc: there's a mention just before example 39.1
<duairc>
I edited my /etc/nixos/configuration.nix and put all the option definitions inside a config={...}; block and did a nixos-rebuild and everything seems to work
<samueldr>
>> In Chapter 5, Configuration Syntax, we saw the following structure of NixOS modules: [...] This is actually an abbreviated form of module that only defines options, but does not declare any. The structure of full NixOS modules is shown in Example 39.1, “Structure of NixOS Modules”.
<samueldr>
I'm not sure how the abbreviated vs. not abbreviated distinction happens, but it's a convenience thing for end-users
Radivarig has quit [Ping timeout: 246 seconds]
<{^_^}>
[nixpkgs] @andrey-komarov opened pull request #52884 → pythonPackages.apio: init at 0.4.0 → https://git.io/fhTmE
<duairc>
samueldr: Ah, I missed that bit (or more accurately didn't understand it at the time I read it)
ntd has joined #nixos
<samueldr>
I find the nix* manuals are written to be lazily understood :)
<duairc>
samueldr: That's as an authoritative an answer as I could have hoped for!
<samueldr>
looks like that as long as there is neither of `options` or `config` keys, it will be understood as if that was `config = `
<duairc>
I do find that slightly disturbing, but okay, at least I understand it now
<duairc>
I can just give explicit config = {} blocks in any modules I write to make myself feel better
<samueldr>
I don't know the history, so I'm making assumptions, but it would be a bit more tedious for end-users if modules were forcibly defined within the `config` attributes
<duairc>
I mean fair enough, shorter is better all other things being equal, I guess it just feels a bit sneaky to me that there was actually this extra set/key being wrapped around the stuff I was writing all along
<samueldr>
yes, that I can see, especially when I started using NixOS, I would see all those nixos modules with `config = ` in <nixpkgs/nixos> but why would I get that obscure message any time I would mix `config = ...` with other configs??!?
<duairc>
But yeah I'm just glad that I understand that that's what's happening now, I guess coming from a Haskell background I didn't expect Nix to be sneaky lik that
<duairc>
*like
Radivarig has joined #nixos
<samueldr>
though when I learned and understood that it makes end-user-facing configs work with the same system than the internal options definitions, I was pleased
cnidario has quit [Read error: Connection reset by peer]
<jasongrossman>
LLOL at "I find the nix* manuals are written to be lazily understood"
<samueldr>
jasongrossman: do I understand your amusement comes from that statement being true? :)
<samueldr>
(and in all honesty, I don't say this as a bad criticism, but something that may help other users reading the manual)
<Church->
samueldr: To it's like the language itself?
<Church->
Lazily evaluated? :p
<samueldr>
that's the joke :)
<{^_^}>
[nixpkgs] @samueldr opened pull request #52886 → sd-image-aarch64: use default (LTS) kernel → https://git.io/fhTmp
<duairc>
Another thing, I've been having a problem where anything that touches networking takes ages, it eventaully fails with: systemd-networkd-wait-online[nnnn]: Event loop failed: Connection timed out
<duairc>
A bit of searching shows that this is probably because one of the interfaces on my machine (eth1) never gets out of the configuring stage
<duairc>
But it's not actually used for anything, it doesn't have a cable plugged into it even, is there an option anywhere where I can tell networkd (or whatever) to just pretend it isn't there?
<{^_^}>
[nixpkgs] @benley pushed commit from @r-ryantm to master « jsonnet: 0.11.2 -> 0.12.1 (#52874) »: https://git.io/fhTmj
<jasongrossman>
samueldr: I have a theory of humour, but it's incomplete and anyway nobody except me believes it and anyway I can't find the place I've written it down.
<duairc>
It seems that CoreOS had the same problem I'm running into (https://github.com/coreos/bugs/issues/279), but it looks like they just patched networkd themselves and never upstreamed it
<{^_^}>
coreos/bugs#279 (by crawford, 3 years ago, closed): networkd wedges down interfaces in 'configuring' state, broken between 215 and 218.
<pie__>
is it possible to get nix-build to dump all the scripts its going to use to build something somewhere?
<samueldr>
pie__: do you mean the different phases?
<pie__>
samueldr, yeah i guess
<samueldr>
I don't think it can really since it doesn't produce discrete scripts, but instead uses environment variables and shell functions
<pie__>
basically i want to start doing some more complicated stuff with nixpkgs but i still dont really know how a lot of things happen
<pie__>
it would be nice to be able to dissect the actual things that happen
<simpson>
pie__: I could have sworn that nix-build takes a --dry-run flag.
<simpson>
But I guess not?
<pie__>
maybe it does
<samueldr>
pie__: if you use, as an example, `nix-shell -A fuse` from a nixpkgs checkout, and from that shell `env | grep -i phase` you would see the defined phases
<samueldr>
the other phases can be seen using e.g. `type configurePhase`
<pie__>
ok
<pie__>
ill give it a shot
<samueldr>
simpson: nix-build will honor --dry-run, see `man nix-store` for its description
<samueldr>
>> --dry-run Print on standard error a description of what packages would be built or downloaded, without actually performing the operation.
<samueldr>
it's one step removed from building, so while it resolves all dependencies, no build script is being invoked
aleph- has joined #nixos
silver has quit [Read error: Connection reset by peer]
<pie__>
samueldr, when im in a nix-shell, how do i actually get to the build directory? it leaves me in my current working dir
<samueldr>
since it doesn't run within the sandbox, and with the same environment and privileges as nix-daemon, you're not given a build directory
<samueldr>
if you want to poke at it the same way the build script does, you would look at `$prePhases`, run any phases defined there, then run each phases in order... annoyingly it looks like there's no canonical way to list all phases that will be ran (with a 30 seconds look)
<samueldr>
BUT!
<samueldr>
you have to be cautious
<samueldr>
running a phase is NOT as simple as simply typing `unpackPhase` and pressing enter
<samueldr>
while it looks like it will work, that will not run phases defined in the derivation
<samueldr>
the correct way to run them is `runHook ...` e.g. `runHook unpackPhase`
<pie__>
/tmp/nix-build-demolition-gunner.drv-0/env-vars seems to be a thing for at least failed builds with -K
<pie__>
samueldr, oh huh. didnt know about runhook >.>
<jackdk_>
samueldr I have what I think is a sensible dhcpd config now, but the server does not seem to see the request packets. I have turned off the firewall while I debug this, but no joy. what am I missing?
<samueldr>
jackdk_: no idea, I treat network as a blackbox with minimal configuration :/
<samueldr>
my knowledge is severely limited
<jackdk_>
ok, no worries
<simpson>
pie__: That is remarkably clean shell IMO.
<pie__>
simpson, fair enough
<pie__>
im not much of a sheller
<simpson>
But also yeah, Steam needs extra help. There are, meanwhile, packages that don't even have buildPhase or installPhase, and I think that they outnumber packages that need FHS user envs like Steam.
jackdk_ has quit [Remote host closed the connection]
<pie__>
yeah a lot of packages are pretty simple
<pie__>
deceptively simple :P
<pie__>
(praise nixos)
<pie__>
so...any recommendations on how i should make my own wrappy thing to run exes via WINE or should i just use writeFile or what and do a simple substitution
<aleph->
Yeah networking on nixos is mildly annoying.
<pie__>
oh hm...i guess that might run into the problem we just discussed...not knowing things at eval time
* pie__
pokes around
<simpson>
What are you trying to put into the Nix store? Work backwards from that.
<aleph->
Man more and more nix just seems like it's full of hacks
<pie__>
aleph-, :D
<simpson>
You said that you're on a VPS? If NixOS isn't supported by the host, then that can cause no end of networking issues.
<aleph->
Me?
<simpson>
Yes?
<aleph->
Oh nah, on my laptop
<aleph->
Just some odd firewall issues with my chromecast still
<aleph->
Kinda weird, it comes and goes between nixos revisions
Radivarig has quit [Remote host closed the connection]
Radivarig has joined #nixos
mupf has joined #nixos
Radivarig has quit [Ping timeout: 240 seconds]
Supersonic has quit [Ping timeout: 268 seconds]
sir_guy_carleton has joined #nixos
<pie__>
whelp, just discovered writeShellScriptBin inthe source code accidentally :P
<pie__>
samueldr, maybe what nix really needs is docstrings and generated documentation
<samueldr>
Church-/aleph- what I just said might be misinterpreted: I don't mean "YOU DO WORK", but "nix can't guess what you want"
<Church->
Yeah I was wondering about that. :P
<samueldr>
(but also, you probably can figure it out at that point)
drakonis has joined #nixos
<samueldr>
pie__: first of all `writeShellScriptBin` is not a "set pattern" function ({x, y, z}: /*function body*/) so the way you wrote it will fail
<samueldr>
it's used like `writeShellScriptBin "scriptname" "script contents"`
<samueldr>
but that's not what you asked :)
<pie__>
samueldr, but it is a set pattern function ;_;
<pie__>
samueldr, i found it weird that the way you said i should do it didnt work
<pie__>
but i googled for examples and they looked like this
<pie__>
even though the function docs also use what you said
<pie__>
or im messing up something else
<pie__>
samueldr, damn neverming
<samueldr>
yeah, I was getting confused :/
<pie__>
that was just writeTextFile
<samueldr>
yeah
<pie__>
[internal screaming]
<samueldr>
what writeShellScriptBin is, in the end, is a derivation, it can be installed or used, look at: nix-shell -p 'writeShellScriptBin "hi-pie" "#!/bin/sh\necho hi there!"' --run "hi-pie"
<pie__>
meh, not sure i want it to be so heavy, probably doesnt really matter though
* pie__
pollutes all the stores :D
<samueldr>
probably doesn't matter, just showing you what this makes, so you maybe better grok what it does
<pie__>
i did see someone add it to buildInputs
<pie__>
wasnt sure if that was how i should be doing it
<pie__>
but i guess it is
<samueldr>
that'd make the binary it writes available as a runnable thing during the build
<pie__>
yeah
<pie__>
hmm...but i want to refer to files in the derivation im building /now/
<samueldr>
what you seem to want is to get a script to run your game, right?
<pie__>
yeah
* samueldr
assumes demolition is a game
<pie__>
yeah
<pie__>
some random game i found
<pie__>
needed something to test on
<samueldr>
otherwise I'd get midly concerned if you told me you were not writing for building contractors :)
<samueldr>
okay, so, now that's all said, putting it *inside* the thing you're building doesn't magically makes it know about the context of your main `mkDerivation`
<pie__>
im not sure what you concretely mean by that
<pie__>
but i do realize that since its a different derivation, i wont be able to refer to the game executable
<samueldr>
the way you have it made, `$text` during the build phases will be /nix/store/xxx-demolition-gunner, and is a store path with a bin directory and in that bin directory, a demolition-gunner script
<samueldr>
yeah
<samueldr>
one thing you could do
<samueldr>
is to make your main derivation be a "build input" to that script
<samueldr>
give me 2 minutes I'll write up something
<pie__>
i can probably do that but
<pie__>
maybe i should just not use a "separate derivation" thing
<pie__>
depending on howi want to do things
<pie__>
alternatively, is there even a way to use functions without making them derivations
<pie__>
doesnt sound like it would fit the functional paradigm
<pie__>
so i guess "stdenv.mkDerivation isnt really set up to do this"?
<samueldr>
well, within nix, `writeShellScriptBin` as you're using it is still a function, you're using it to get a script
<pie__>
yeahh
<pie__>
(i wonder if the underlying problem that you cant write imperative code at eval time. give nix an IO type ;P)
<samueldr>
maybe, I'm not a FP-type-peep, my only FP language is nix
<pie__>
samueldr, i mean...is there even a way to add this file during the build without writing shell scripts?
<samueldr>
(and bash)
<samueldr>
:3
<pie__>
;p
<samueldr>
pie__: yeah, since you can do it in bash
<pie__>
im just an fp noob
<samueldr>
just bear with me a minute
<pie__>
yeah ok
<samueldr>
you remember I said "<samueldr> one thing you could do"
<pie__>
i mean im pretty sure i understand what youre doing
<samueldr>
I have the other way :)
nh2[m] has joined #nixos
<samueldr>
still to show
<pie__>
i mean go ahead, its a lot easier than trying to figure it out :D
<pie__>
*without writing bash scripts or passing derivations to eachother
<pie__>
(are there any nix functions that use some kind of "set of files" paradigm :< , thats what i would want i think. where i can just add files to a set and they will show up)
<Church->
samueldr: So yeah is there anything else it needs, or can I just toss in the installPhase?
<samueldr>
Church-: I don't know for sure, but other than an install phase, it looks fine to me
<pie__>
simpson, hm thats also in trivial-builders, guess i should peek at it
<Church->
Cool, let me go try it out. :)
<simpson>
pie__: Yeah, it's easier to read then to explain.
<pie__>
samueldr, oh neat
<pie__>
:3
<samueldr>
pie__: the main drawback with that is how it `cd` before running the game, but that's been done **only** because many games think $PWD is where they're started from
shibboleth has quit [Remote host closed the connection]
<pie__>
hm
<samueldr>
you could also not `cd` and use the full path to the game
<pie__>
"still works better than lutris" (jk, but ive had trouble running stuff)
<iqubic>
What game is this?
<samueldr>
now I'm looking through nixpkgs to show you the alternative
<pie__>
iqubic, idk some random game i found on the internet
<pie__>
now comes the fun part: how does babby manage wineprefix
<iqubic>
Because I've also had issues running games on Nixos
<iqubic>
Although, once I got CrossCode running, it's been working just fine. Nothing about the game seems glitchy, and the save functionality is working correctly.
<samueldr>
since you're escaping a bash script within a bash script within nix
<samueldr>
I really hate the whole "cat into a file into a build phase" since it makes it a hell to work with :/
<pie__>
iqubic, also yay for running crosscode. runtime things are basically the same on nixos as any other linux distro, id figure (at least to some first order approximation?) so once the dependencies work i guess id expect things to work as well as anywhere else
<samueldr>
which is why I kindly showed you the alternative I prefer :)
<aleph->
samueldr: I'm doing it in my installPhase, I hate it.
<iqubic>
pie__: Yeah that's been my experience indeed
<pie__>
iqubic, well ok any if you have behaviours that you run into at runtime like wanting to run other executables and accessing hardcoded paths and and and... :P
<pie__>
s/any/and
<iqubic>
I haven't runing to that at all yet.
<pie__>
yeah, i wouldnt expect it for somethng like crosscode. lutris calls out to 7zip, wine, stuff like that
<pie__>
and those arent dynamically linked stuff that shows up when you try to run it in the beginning
cyounkins has joined #nixos
<pie__>
no crash, just errors when you actually try to run things. then you need to go back and add them to the propagatedBuildInputs
<pie__>
i also had an issue of needing to pass an environment variable to stop lutris from trying to run some libraries of its own, because they werend the things that would run on nixos without patching (basically some bundled runtime stuff, like the aforementioned 7z)
<pie__>
anyway, </dump>
<pie__>
samueldr, oh god that seems fucking horrorible
<aleph->
samueldr: Definitely crediting you when I semi release it. :)
<iqubic>
And Lutris isn't even a game, but a platform for games.
<samueldr>
you mean catting run scripts?
<samueldr>
yeah it's terrible :/
<pie__>
samueldr, like, i would have a single second thought when looking over it and otherwise pass over it, but now that we're discussing it...
<pie__>
iqubic, yeah, i was kind of just saying what kind of issues you can run into
<samueldr>
for what is probably most cases, it's seamless-enough that people don't see the issues
<samueldr>
but the moment you need a bit of fancyness... it hurts :/
<siraben>
iqubic: o/ finally switched over to NixOS for weeks now
<pie__>
samueldr, i mean...at *least* make a variable that contains the raw script, and then use some sort of escaping function
<siraben>
Pretty cool, doesn't break at all
<iqubic>
siraben: I've been using Nixos for about a year now.
<siraben>
iqubic: You still using exwm?
<iqubic>
Yes.
<iqubic>
I have been for like 6 months
<siraben>
I see. More of an i3 fan myself
<iqubic>
That's cool.
<iqubic>
I really should put my .emacs online.
* pie__
used it for months without having a damn clue what he was doing...it was annoying...learn to use your tools lol sigh
<iqubic>
If I should lose that, then all of my WM configuration goes down the drain.
<siraben>
Make sure you move out private info
<pie__>
exwm huh, maybe i should consider that once i know how to use emacs beter
<siraben>
Do you not version control your config?
<iqubic>
No.
<iqubic>
I don't version control any of my configs.
shibboleth has joined #nixos
<siraben>
I don't know what I'd do without "git bisect"
<siraben>
It's helped resolve many issues
<iqubic>
The issue is that the things I want to version controll are in several different places.
<siraben>
You can symlink them
<aleph->
Hmm, not sure if this from nix failing somewhere due to hackiness of it or the ruby code itself. Assuming nix since the code runs fine in nix shell
<siraben>
I'd be great if I could get Firefox's config to be declarative
<iqubic>
And I have an overlay that fetches the latest version of my WM from github that I'd like to include in the backups.
<siraben>
I hate setting up browsers and fixing them when they break
<siraben>
Ah I see.
<samueldr>
aleph-: `installPhase` isn't ran when installing, but when building; it shouldn't do anything related to running the app, only copying the app to make it available
<iqubic>
But really, I'm not sure how to backup things when they are in several different places at once.
<samueldr>
aleph-: what's next is looking into how to make a nixos module to run that
<siraben>
I just realized I don't have a full system backup solution as well
<siraben>
Which is slightly risky
<samueldr>
aleph-: which I don't really have experience, but I think there are modules for rails-based apps already
<iqubic>
siraben: I don't have *ANYTHING* backed up at all.
<aleph->
samueldr: Ah. Hmm, point. Probably should have looked into that, instead of just doing nix build with an installPhase
<samueldr>
:)
<siraben>
iqubic: maybe you should!
<siraben>
^you definitely should
<iqubic>
siraben: I really should.
<siraben>
I hear people use rsync?
<siraben>
Learning curve included, of course.
<iqubic>
I just need to know how to deal with the things I want to be backed up being in several different places.
<samueldr>
aleph-: something to keep in mind: everything `nix build` related can only make things available in the store paths; it can't run servers, services, will never have privileges
<siraben>
Oh there's always easier options like deja-dup
<aleph->
Point...
<aleph->
Bollocks
<aleph->
So I've been chasing down the wrong hole this whole time.
<aleph->
God damnit
<aleph->
>_>
<siraben>
I need to figure out how to get the software I used to "make install" working on NixOS
<iqubic>
siraben: I don't have an external harddrive to put my backups on. I was just planning on putting them on Github.
<{^_^}>
[nixpkgs] @orivej opened pull request #52897 → pythonPackages.sip: rename the module from PyQt5.sip back to sip → https://git.io/fhTsA
<samueldr>
not really, you had to somehow uh... dig? that hole at some point to then make it work on the other side of the fence
<siraben>
Ah right.
<pie__>
i also want this <siraben> I'd be great if I could get Firefox's config to be declarative
<pie__>
should probably work on some stuff for nix-home
<aleph->
samueldr: Oh so this is needed anyway sorta for what I want?
<siraben>
pie__: It should be possible, right?
<siraben>
Isn't it already possible with some sort of profile file?
<samueldr>
aleph-: sure, the nixos things that can make things work and run on the system will want things from store paths
<pie__>
restic seems quite nice actually <siraben> I hear people use rsync?
<iqubic>
But if I do wind up putting things onto github, I'll need to remove my passwords and things from my configs..
<pie__>
i know several people that use it
<samueldr>
aleph-: (not strictly, but makes things easier)
<siraben>
pie__: is it hard to set up?
<samueldr>
aleph-: (and more reproducible)
<iqubic>
but first, I just want to get haskell working on nix.
<samueldr>
aleph-: so you have a reproducible way to make all the runtime components of lobsters
<siraben>
iqubic: which part of haskell?
<siraben>
GHC works
<siraben>
Ah I haven't tried installing hackages
<aleph->
Gotcha.
<samueldr>
aleph-: next step is to use that reproducible build within the nixos module system
<samueldr>
aleph-: ah, thing you should add: -${version} to the name of the gemset ifd
<iqubic>
yeah, but installing libraries from hackage is where things break for me.
<iqubic>
So I need to remedy that.
<siraben>
iqubic: any particular package in mind?
<aleph->
Yeah, hmm actually curious what I need to run during the install or build phase.
<samueldr>
aleph-: that way, if at the next version upgrade (or revision) the output changes, since the name changes it will recompute the sha256 sum (IIRC)
<pie__>
siraben, nix-home by itself isnt much trouble, but actualy externally poking at firefox configs sounds somewhat sketchy without further research
<samueldr>
the redmine one is probably closer to what you'll need
<siraben>
I should dive into it more, I just know the basics from reading "Programming with Haskell" by Hutton, but haven't really applied stuff
<siraben>
Still a Scheme fan
<samueldr>
and you'll probably be able to get some inspiration from the module system if there's a redmine module
<aleph->
samueldr: Cool, thanks for all the help!
<pie__>
samueldr, re the earlier documentation discussion: what i would like if i can set up a developement environment such that i can reasonably write code without access to the internet
<siraben>
Every time I see a dynamic type error I'm tempted to learn Haskell again
<pie__>
i.e. appropriate docs, etc
ensyde has joined #nixos
<iqubic>
I know a smattering of Java, but I really really dislike OOP.
<aleph->
samueldr: Least nixos will get some great software for deploying news aggregators/forums
<iqubic>
Anyways, I have to go now.
<iqubic>
Goodbye all.
<siraben>
iqubic: See ya.
<pie__>
siraben, i dont want to go back to NoneType errors. iqubic: o/
* siraben
caresses his beloved Scheme mutation operator `set!`
<siraben>
Who needs mutation anyway
<siraben>
You have monads!
<pie__>
iqubic, maybe see also #nix-tools idk
<pie__>
whew, *goes back to attempting to make progress on this wine thing*
<hodapp>
chromium - and seemingly just chromium, not firefox - has issues loading certain pages and console is showing a lot of net::ERR_NETWORK_CHANGED as why; not exactly a NixOS question (though I'm on NixOS), but does anyone have ideas on this?
layus has quit [Remote host closed the connection]
<hodapp>
the network appears to be fine. I have SSH sessions staying up for days on end
jackdk_ has quit [Ping timeout: 246 seconds]
<samueldr>
hodapp: strangely the other day firefox exhibited something similar, often following links would show me an error, bur refreshing worked every time. have you nixos-rebuild switch'd since you booted?
layus has joined #nixos
<hodapp>
...but for some reason enp5s0 has 11,378 different inet6 addresses
<hodapp>
samueldr: yes.
<samueldr>
since my networking knowledge is terrible I'm thinking *waves hand* something happens with networking at rebuild time
<samueldr>
hodapp: shoot, too late since I rebooted since, but maybe related
<samueldr>
I would have liked to check at least
* samueldr
checks journalctl log from previous boot
<hodapp>
this inet6 stuff may be a router issue or something, I don't know
<pie__>
hodapp, oh that gajillion ipv6 adresses has something to do with ipv6 privacy extensions i think
<pie__>
and each one should expire i think when it doesnt ahve any more open connections
<pie__>
not sure, only heard something like this from someone else
<hodapp>
hmmmm
<pie__>
if thats ipv6
<hodapp>
also seeing a lot of "IPv6: ipv6_create_tempaddr: retry temporary address regeneration"
<samueldr>
(nothing obvious in my logs)
<hodapp>
but I only need IPv4...
<pie__>
theres a kernel flag for disabling ipv6 *shrugs cluelessly*
<pie__>
err
<pie__>
not kernel flag, sysctl or somethng
<Dagger>
I thought the kernel defaulted to only allowing something like 15 v6 addresses per interface?
jackdk_ has joined #nixos
<hodapp>
well, I tried echo 0 > /proc/sys/net/ipv6/conf/enp5s0/use_tempaddr and then bouncing the interface
<hodapp>
use_tempaddr reset back to 2 when I did, so I did the echo command again
<pie__>
samueldr, hm. so the game ran for you but it doesnt run for me. this is the problem with WINE stuff. its very machine dependent :C or something
<samueldr>
I have mine set to true, needed for steam stuff
<samueldr>
plausible it's required for 32 bit games on wine
<pie__>
hmmm
<jackdk_>
speaking of nix options, is there one for echoing stuff into proc? I think one of my problems might be that my system doesn't echo 1 > /proc/sys/net/ipv4/ip_forward
<pie__>
thats an idea and i always forget about it, will give it a shot
<pie__>
jackdk_, do those usually have kernel param equivalents?
<pie__>
might be able to set it on boot
<samueldr>
jasongrossman: I think it's the tmpfile thing from systemd which is generally used
<pie__>
samueldr, wrong highlight?
<jackdk_>
I don't know. I'm in cargocult mode atm, building wireshark on my pi to see what packets it sees
<samueldr>
yeah
<samueldr>
jasongrossman: systemd.tmpfiles.rules
<samueldr>
URRG sorry jason
<samueldr>
jackdk_: ^
<samueldr>
somehow, my clieny really doesn't want to tab-complete your name :/
<pie__>
samueldr, i will feel ambivalent if i wasted hours yesterday because of this dri issue. on the other hand i wasnt seeing the shell error output with lutris and i didnt think to check it
<pie__>
but at least it will be fixed. *waits for rebuild*
<jackdk_>
samueldr: you are suggesting adding a w-rule to that file? sounds promising.
<samueldr>
I've seen the same on other distros, obviously, since it's a systemd thing
<pie__>
by the way has anyone else been getting randomly failing derivation downloads from the binary cache, and then having to rerun the command / the rebuild, and then it will continue?
<jackdk_>
that particular command also manipulates a sysctl; is it therefore "better" to set it in boot.kernel.sysctl?
<{^_^}>
nixos-org-configurations#57 (by rbvermaa, 10 weeks ago, open): Users are reporting some issues with cache.nixos.org - gather information here
<samueldr>
jackdk_: it might be
<pie__>
samueldr, ah.
<pie__>
samueldr, I kind of hoped it's just me. who was hosting it before?
<jackdk_>
suspiciously relevant-looking sysctl settings are in one of the .nix samples I was given this morning
<samueldr>
pie__: I think it was directly out of cloudfront
jackdk_ has quit [Remote host closed the connection]
jackdk_ has joined #nixos
sir_guy_carleton has quit [Quit: WeeChat 2.2]
pie__ has quit [Remote host closed the connection]
pie__ has joined #nixos
<aleph->
samueldr: So stupid question I just realized, this ifd deriv is just building the gemset.nix right?
<samueldr>
yes
<aleph->
Okay, duh doy.
jackdk_ has quit [Remote host closed the connection]
hamishmack has joined #nixos
<aleph->
Err wait a tick, hold on. I thought this builds the gemset.nix and then passes that into the bundlerEnv where I then do the buildPhase and installPhase for the app?
<samueldr>
it doesn't?
<aleph->
Thought it should... let me check again.
<aleph->
samueldr: Nevermind it does.
appleclusters has joined #nixos
<samueldr>
:)
<aleph->
Just had to give it a unique name.
drakonis has quit [Ping timeout: 250 seconds]
<aleph->
samueldr: Just thought it wasn't since I got on output at the end of the build "trace: /nix/store/ycqywlf0bdazlxgi2x9l8brn853i4zd1-lobsters-gemset.nix"
<samueldr>
oh right
<samueldr>
lol
<samueldr>
I left a `builting.trace`in there
<samueldr>
builtins*
<samueldr>
which I have aptly named `pp` where it both returns and prints the value given
<aleph->
Oh lololol
<aleph->
Cool, guess I'll start reading up on how to create a module tomorrow.
<pie__>
builder for '/nix/store/nrb0cw9qld22fj91jpr1cakinl3rcj2w-wineprefix.drv' failed to produce output path '/nix/store/7wwhymba822crifx6gdmhr51x0y0b6gj-wineprefix'
jackdk_ has quit [Ping timeout: 250 seconds]
hamishmack has joined #nixos
jackdk_ has joined #nixos
<jackdk_>
update on my routing !FUN!: I ended up setting networking.nat.enable and marking the internal/external interfaces and now it routes though god help me if you asked my why that works and my previous wrangling didn't
<jackdk_>
I got as far as working out that my routing machine was receiving packets correctly but was dropping them on the floor for Reasons Unknown
fusion809 has quit [Remote host closed the connection]
<mr_noobs>
Hey how do you go about securing applications with nixos?
<mr_noobs>
Like, say I want to install ZNC
<mr_noobs>
Should I create another user to isolate it? Should it have isNormalUser? What is isNormalUser?
<mr_noobs>
As in, make sure its only user ZNC who runs the service and everything
<mr_noobs>
Also, where do I see the options of a particular package? (I cant "enable" znc, only run it, because it complains about missing options on config.nix
<jbo>
Hi there - I'm trying to rebuild my system following hard disk failure. I've installed nixos, using my old configuration.nix & it isn't working correctly. Seems like most services haven't been started (networkmanager & xorg for instance). `nixos-rebuild switch` works fine. Any ideas? (What do the 4 grub entries "Generation 1 / Generation 2" etc. mean?)
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « doitlive: 4.2.0 -> 4.2.1 »: https://git.io/fhTlB
tzemanovic has quit [Ping timeout: 252 seconds]
<jbo>
aha -- the generations in grub are a new form of output indicating the number of `nixos-rebuilds` I've run. Fair enough. My real problem is during boot, where it's failing to mount the rootfs for generations 2+ -- I can still boot generations 1, which I'm currently stuck in
dermetfan has quit [Ping timeout: 250 seconds]
tzemanov_ has quit [Ping timeout: 252 seconds]
<jbo>
The real problem I have is that the rootfs gets decrypted with the luks password, but then it fails fsck because it's "in use". Ignoring this, the next fsck gets "device busy", then I get a kernel panic
<jbo>
^ figured it out -- I need the device uuid in hardware.nix, then the dm-mapper uuid for the rootfs. Simple really whe you think about it. fscking now :)
<{^_^}>
[nixpkgs] @peti pushed 2 commits to haskell-updates: https://git.io/fhTB0
<{^_^}>
[nixpkgs] @peti pushed 3 commits to haskell-updates: https://git.io/fhTBz
<yosemitesam>
Hi guys. I created the package "wpgkt" some time ago as a "python36Packages.buildPythonApplication" (it is in the official nixos repo). Now after an update it fails to build with "error: invalid command 'bdist_wheel'". I tried adding "python36Packages.wheel" to the buildInputs but it didn't work. What am I missing?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « grml-zsh-config: 0.15.1 -> 0.15.2 »: https://git.io/fhTBS
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « Comment out some obsolete Haskell overrides to fix evaluation. »: https://git.io/fhTB5
jomik has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhTBb
<FRidh>
yosemitesam: expression looks good
oldandwise has joined #nixos
jackdk_ has joined #nixos
<FRidh>
yosemitesam: ahh, python2 and 3 is being mixed
<yosemitesam>
FRidh: How do you mean it is mixed?
<FRidh>
no, 3.6 and 3.7 are mixed
<FRidh>
pywal's expression is for an application. In wpgtk it's added to pythonPath, so it can be used from $PATH. pywal is 3.7 and wpgtk is 3.6. PYTHONPATH contains paths of both, causing trouble. Also note that pywal is actually used as a library.
<yosemitesam>
FRidh: Thank you very much for looking into this! I just sucessfully built wpgtk with pthon3.7 using python3Packages.
<yosemitesam>
FRidh: And pywal is used as library by wpgtk I think. When I add it as buildInput, wpg (the package wpgtk provides) fails to start with "No module named 'pywal'". Is this okay?
<yosemitesam>
Or is there a way to provide pywal as Application AND as library?
<FRidh>
yes, there is
<FRidh>
note we need to fix pywal to include a path to imagemagick's convert/magick in the library code
<jomik>
How do I properly escape a slash inside of "" ? When I write \u I get u out, when I write \\u I get \\u ... ? :D
<duairc>
jomik: \\
<jomik>
duairc: That prints 2 slashes when I dump it to json though.
<duairc>
jomik: Because JSON also uses \\ to escape \?
<jomik>
Is it. Hmm. Perhaps. Lol
<joko>
jomik: how about '' ?
<yosemitesam>
FRidh: Do I understand this properly?: 1. We need to add a library definition for pywal (I think with python3Packages.buildPythonPackage)?
<yosemitesam>
2. this library definition needs the imagemagick paths exposed (with propagated buildinputs or something like that)?
oldandwise has quit [Read error: Connection reset by peer]
<jomik>
joko: Would that change anything? I think what duairc said is correct though
<FRidh>
yosemitesam: correct, we need to tell pywal where imagemagick is
<FRidh>
but because pywal is used as a library, we need to inject those paths in the pywal code
<duairc>
Does Nix have any convenient operators for indexing lists, other than builtins.elemAt ?
<duairc>
I'm actually trying to change the element at a specific index which seems even more inconvenient
<jomik>
joko: Ahh, yah okay. I'll take a look :D
periklis has joined #nixos
agander has quit [Ping timeout: 245 seconds]
__monty__ has joined #nixos
<ottidmes>
duairc: for changing an item at an index, you might use a combination of take and drop, but yeah, its a pitty that there are no more conevenient ways (that I know of)
<{^_^}>
[nixpkgs] @FRidh pushed to master « pywal: move to pythonPackages and inject path to convert »: https://git.io/fhT0F
<jomik>
Maybe something like map is more convenient. Complexity is O(n) either way it seems :D
Radivarig has joined #nixos
Lears has joined #nixos
agander has joined #nixos
[Leary] has quit [Read error: No route to host]
<duairc>
ottidmes: take and drop come from <nixos/lib/lists.nix> ?
periklis has quit [Remote host closed the connection]
tzemanovic has joined #nixos
paulvictor has joined #nixos
<yosemitesam>
FRidh: Man you're crazy fast :D Thank you very much for doing this!! Good to know the "toPythonApplication" function :)
<paulvictor>
I have written a custom package and I can install it in my profile. Using this package, I want to create a custom service only for my `user`
<paulvictor>
Where would I specify this service?
<ottidmes>
> let setElem = list: index: value: take index list ++ [ value ] ++ drop (index + 1) list; in setElem [ 1 2 3 ] 1 5
<{^_^}>
value is a list while a set was expected, at (string):53:61
<ottidmes>
duairc: ^ the above should work, it does in my repl, somehow does not here
<duairc>
ottidmes: Thanks, that's basically what I have, though without the drop part because it's the last element of the list I'm wokring on
<paulvictor>
Is it possible that I can have a user specific version of configuration.nix?
<yosemitesam>
FRidh: One other question. Pywal can use the program "feh" to set a background image. If I add "feh" to the propagatedbuildInputs of wpgtk, this works. But right now it doesn't. Is this also a problem with the pywal package or is this intended and I can just add "feh" to the buildInputs of "wpgtk" to get use of it?
erictapen has joined #nixos
<duairc>
ottidmes: How do I import <nixpkgs/lib/lists.nix>? When I import it I get a function, which, looking at the source code, seems to want lib as an argument. Where does that come from?
ZaraChimera has joined #nixos
periklis has joined #nixos
tzemanovic has quit [Remote host closed the connection]
<ZaraChimera>
Since I am still new to figuring this distro out, I went back with a pretty basic setup. Also, I think the machine it's installed on is dying. Considring the Chromium browser is completely sluggish and laggy.
<ZaraChimera>
But I do have a functional NixOS install to play with. My hardware just sucks.
<ZaraChimera>
Might be time to take the laptop apart and reapply the thermal paste and dust it out properly as well.
<ivan>
ZaraChimera: check chrome://gpu - it can be slower without GPU support
<ZaraChimera>
Ah, that could be it, this is a relatively old crappy E2 APU (equivalent of having a Radeon HD 6320)
<ZaraChimera>
Though Chromium/Chrome based browsers have been acting squirrely on my desktop as well, and that thing has decent hardware.
erictapen has quit [Ping timeout: 246 seconds]
<ZaraChimera>
Palemoon seems to work decenly on the hunk of junk.
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vidbina has quit [Ping timeout: 252 seconds]
cyounkins has joined #nixos
miaoski_tw has joined #nixos
<miaoski_tw>
Hi. I'm new to Nixos. While I following the manuel Ch.17 to setup Weechat, I got this error message.
<miaoski_tw>
$ screen -x weechat/weechat-screen
<miaoski_tw>
Access to session denied.
<__monty__>
ZaraChimera: You use chrome but prefer pale moon to firefox?
<miaoski_tw>
My configuration.nix looks like this, but I'm not sure if I understood the manual right ...
<miaoski_tw>
services.weechat.enable = true;
<miaoski_tw>
programs.screen.screenrc = ''
<miaoski_tw>
multiuser on
<miaoski_tw>
acladd normal_user
<miaoski_tw>
'';
periklis has quit [Ping timeout: 250 seconds]
cyounkins has quit [Ping timeout: 240 seconds]
<ivan>
miaoski_tw: replace normal_user with your username
<ivan>
confusing manual
<miaoski_tw>
ivan: Thanks. Did it and did nixos-rebuild switch. However, it's still the same ...
<miaoski_tw>
Now it reads
<miaoski_tw>
acladd miaoski
<ivan>
might need to restart the service
<miaoski_tw>
ah. Let me try :) I'm too new to have thought nixos-rebuild switch does it automagically
<ZaraChimera>
I prefer to use Vivaldi, but since it is sluggish on my laptop, I tried firefox and had the same issue, then tried Palemoon and it was better.
<miaoski_tw>
ivan: you're absolutely right ;) Thank you!
<ivan>
cool
<ivan>
huh did something land in master today that required a rebuild of half the packages or is that because I gc'ed /nix
boogiewoogie has joined #nixos
<ivan>
ah the pythons
simukis has joined #nixos
waif has quit [Quit: Lost terminal]
tzemanovic has joined #nixos
<{^_^}>
[nixpkgs] @FRidh pushed to master « python.pkgs.pywal: hardcode path to feh »: https://git.io/fhTze
<paulvictor>
Is it possible that I can have a user specific version of configuration.nix?
<FRidh>
yosemitesam: we should indeed also hardcode the path to feh, see ^
<paulvictor>
The reason I want it user specific is because I am using a derivation which is available only for a user.
primeos has quit [Quit: WeeChat 2.3]
Ariakenom has joined #nixos
primeos has joined #nixos
tzemanovic has quit [Ping timeout: 246 seconds]
krksgbr has quit [Ping timeout: 250 seconds]
<{^_^}>
[cabal2nix] @peti pushed to master « cabal2nix.cabal: bump version number for upcoming release »: https://git.io/fhTzm
<{^_^}>
[cabal2nix] @peti pushed 0 commits to refs/tags/v2.13: https://git.io/fhTz3
<yosemitesam>
FRidh: Yeah this was pretty much how I thought it should be :D Thanks for your fix!
krksgbr has joined #nixos
init_6 has quit [Ping timeout: 246 seconds]
iyzsong has joined #nixos
stigo has quit [Quit: WeeChat 2.2]
init_6 has joined #nixos
jasongrossman has joined #nixos
jomik has quit [Quit: WeeChat 2.2]
<yosemitesam>
FRidh: I guess you should remove the "/bin/feh" in the path, I just got this error: "[Errno 20] Not a directory: '/nix/store/dfn7k394j01pap50r5d59ddx29rb2f27-feh-3.1.1/bin/feh/bin/feh'"
<yosemitesam>
FRidh: And there is a new version out for wpgtk. Should I just create a PR or do you want to add that, since you can push directly to master? :D I can send you the new hash
stigo has joined #nixos
<yosemitesam>
FRidh: I mean remoce the "/bin/feh" in the file feh.patch on line 36: return util.disown(["@feh@/bin/feh", "--bg-fill", img])
<ottidmes>
duairc: in case you did not figure it out yet (I was away), you do not import any of those lib files directly, instead you just use lib which contains all the definitions, including those of lists.nix, and it can be accessed through many routes, as part of your module arguments: { lib, ... }:, via pkgs.lib, or via stdenv.lib
<MichaelRaskin>
Hm. So is there a version of ADB built from Apache2 source after the last Android refactoring in Nixpkgs?
<MichaelRaskin>
(I am trying to separate unfree packages in their own controlled subset, but I would like to install adb in a general and root-owned package set)
<yosemitesam>
hmm okay.. I'm wondering because I just updated the package "wpgtk" manually. But the package is on retopoly.org and a new version was has been found from there on the 11th this month
<yosemitesam>
so theoretically it could've triggered a PR...
Anton-Latukha has joined #nixos
<jtojnar>
yosemitesam: yup, it probably would have
<yosemitesam>
jtojnar: Okay so it does just take some days until it triggers a PR? :)
<jD91mZM2>
Aaaah! Home-manager won't install: builder for '/nix/store/10czv1chl1y9mrn1vjc84az7xnaqjmwk-home-manager-install.drv' failed to produce output path '/nix/store/k7dmf9g1maxsgr3q03j5rnhgkcczzwxn-home-manager-install'
<jD91mZM2>
That's the output for both "nix build -f "<home-manager>" install" and "nix-build "<home-manager>" -A install"
<jD91mZM2>
Tried both master and 18.09 home-manager versions
<jD91mZM2>
Speaking of which, is there any reason not to use the home-manager that's in nixpkgs?
<aleph->
samueldr: So I think I'm writing the unicorn Config correctly for this. My question where is it written by default? Just in /etc/? Can I define an exact dir for it to reside in, in /etc>
<samueldr>
(I wrote that before you pasted a link)
<aleph->
Oh lol
<aleph->
infinisil: You have any idea? Looking through module definitions on github but not really seeing anything.
<samueldr>
pkgs.writeText will write to a store path; `unicorn-config` then has a store path that you can use like "unicornrails -c ${unicorn-config} ..."
jonaswouters has quit [Quit: Connection closed for inactivity]
lokado has joined #nixos
jD91mZM2 has quit [Quit: WeeChat 2.2]
pie__ has joined #nixos
dbmikus has joined #nixos
pie__ has quit [Remote host closed the connection]
<aleph->
samueldr: Now I'll just need to test this, already tried just jumping into the lobsters store path and just directly running bundle exec "unicorn_rails -c ..." as a test and had it error out with "bundler: command not found: unicorn_rails"
<aleph->
Probably calling it wrong tbh.
pie__ has joined #nixos
<aleph->
Was just a quick test.
<samueldr>
as your user by cd-ing?
<samueldr>
probably because you don't have the bundler env in your user shell, if so
<{^_^}>
[nixpkgs] @vcunat pushed 2 commits to release-18.09: https://git.io/fhTPU
ddellacosta has quit [Remote host closed the connection]
<Church->
samueldr: For fixing the lack of a bundlerEnv, could I just do something like ${pkgs.lobsters}/bundle exec "..."? Would the bundled env still be contained in that nix store path?
<samueldr>
maybe, but simple would be to use nix-shell I think
<Church->
I'm assuming there has to be some way to do this given that we've had rails apps working on nixos
<samueldr>
(and I am not sure about what I'm saying, mainly hunches)
<Church->
Bollocks. Can I write a service to call out to nix-shell for just a single command?
Radivarig has quit [Ping timeout: 245 seconds]
<Church->
Ah fair enough.
<samueldr>
never use nix-shell inside nixos internals, it's probably not what you intend to do
<Church->
manveru: You've done some Ruby work I assume given bundix. Do you have any thoughts?
<Church->
samueldr: Yeah I didn't think that would be good.
<manveru>
Church-: the trick is to never use `bundle exec`
<manveru>
the bundlerEnv already has a wrapped version of all executables
<Church->
Ahhhhh.
<manveru>
nix already does all the work bundler would do :)
<Church->
manveru: But would that work if I'm doing something like ${pkgs.lobsters}/unicorn_rails -c ... in a systemd service definition?
<manveru>
yeah
<Church->
manveru: Since I have my app stored in the nix store.
<Church->
Oh cool. Let me go write a quick test then.
<manveru>
well, it probably wants to have some kind of writable working directory for logs/cache, so you might have to make one
<Church->
manveru: Eyeppp. Just gonna create one in the lobsters nix store path during the installPhase.
<Church->
mkdir -p $out/{log,cache}
<manveru>
that's not going to work...
<manveru>
all paths in the nix store are immutable
<Church->
Bollocks.
<manveru>
well, unless you run it as root :P
<Church->
Okay... Where should I put one then? Not in /etc. /var/log/lobsters/ then?
<samueldr>
manveru: AND disable the protections
<manveru>
usually somewhere in /var/lib/$nameofyourapp
<Church->
Okay yeah that makes sense.
<wedens>
I'm reading about overlays here https://nixos.wiki/wiki/Overlays and I still don't understand how to use them in nixos. I've created an overlay file, then what?
yosemitesam has joined #nixos
<wedens>
also I'm not sure how to organize my configuration for nixos and non-nixos hosts
<aleph->
What's the command to find a package's path in your nix store?
<aleph->
Nevermind found it.
<simpson>
From within Nix, you can usually use the derivation. What are you building?
<aleph->
simpson: Yeah No I remembered that. Had a new question though, if I'm building something and storing it in the path how would I address it? I can't use ${pkgs.NAME} since it's not from nixpkgs.
<aleph->
Would it just then be ${NAME}
<simpson>
Yep.
<aleph->
Hmm, just getting an undefined variable when trying to interpolate that.
<jtojnar>
wedens: I just put `nixpkgs.overlays = [ (self: super: …) (import ./ovelay-file.nix) ];` to my configuration.nix
<aleph->
And I alreadt confirmed the path exists with a quick "ls /nix/store/*lobsters-TEST"
<simpson>
Do you have `let lobsters-TEST = ...` earlier?
<aleph->
I... do not.
<aleph->
Sigh
<aleph->
So what should I setting it to?
<wedens>
jtojnar: the wiki says about it: "Overlays set here will not be automatically applied by nix tools.". I'm not sure what it means.
<aleph->
Run nix-store to get the path and then set it to the variable?
<jtojnar>
wedens: they probably mean you will not be able to access them using nix-build / nix-env
krksgbr has quit [Ping timeout: 252 seconds]
<aleph->
Okay hard-coding the path worked for now for the test.
<aleph->
Hmm, not showing up under a pgrep
<jtojnar>
wedens: you can use the trick from https://nixos.wiki/wiki/Overlays#Using_nixpkgs.overlays_from_configuration.nix_as_.3Cnixpkgs-overlays.3E_in_your_NIX_PATH if you want that, though
<aleph->
Okay that's why.
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
<simpson>
aleph-: You can hardcode paths into Nix code, if you like, with the understanding that that does *not* create GC roots. (How could it?) So the path could be GC'd if it's not used elsewhere.
<aleph->
simpson: Oh yeah definitely, just doing this as a quick test to even see if I can get systemd to run my app.
<simpson>
Being hardcoded into your active system configuration *will* create a GC root, though, if you're doing something like pinning a configuration and its dependencies onto a remote machine.
<aleph->
Gotcha
<wedens>
jtojnar: it describes mostly per-user configuration. but with nixos you have both, right?
agander_ has joined #nixos
<aleph->
So here's a stupid question, for my ExecStop = "pkill unicorn_rails" I'm getting the error:
<aleph->
" Executable path is not absolute: pkill unicorn_rails"
agander has quit [Ping timeout: 246 seconds]
<simpson>
,locate bin pkill
<{^_^}>
Found in packages: busybox, procps-ng
cyounkins has quit [Remote host closed the connection]
<aleph->
Apologies, that should have occured to me.
cyounkins has joined #nixos
<simpson>
No worries, we all had to relearn.
<simpson>
It seems endemic to capability-aware systems that one has to relearn how to refer to things. Nix is kind of like a package-capability system.
<aleph->
Eyep
tdbgamer has joined #nixos
<{^_^}>
[nixpkgs] @jtojnar pushed to master « gtest: fix includedir in cmake config files »: https://git.io/fhTXg
orivej has joined #nixos
<jtojnar>
wedens: all nix tools follow the same decision tree (nixos-switch uses the nix commands internally)
cyounkins has quit [Ping timeout: 244 seconds]
<aleph->
simpson: So my question is what should I run in my nix config to generate the path for my package in the configuration.nix?
periklis has joined #nixos
tdbgamer has quit [Client Quit]
<simpson>
aleph-: Whatever you used to build the path originally.
tdbgamer has joined #nixos
<aleph->
So just run the derivation that I used to add it to my store inside my nixos config?
<simpson>
Yeah. There's a pile of ways to factor that away, from nixpkgs overlays to custom nixpkgs to NixOS modules, but make things work before making them pretty.
<aleph->
manveru: Yeah so tested it a few times, I can just call unicorn_rails or rails or even bundle from my rails app path. A la "${lobsters}unicorn_rails"
<aleph->
simpson: Yep, have a nixos module mostly written, just need to slot the messy details in.
<aleph->
manveru: That was a can't just call. Not can. Woops.
<aleph->
Man so many typos I see in that sentence now.
<manveru>
:)
<manveru>
Do what happens?
<manveru>
*so
<aleph->
manveru: So it fails out with say... "/nix/store/523pxz0zk4mjcaflmkzbf5m9g9ydhprr-3v87b37j31fd64wb067g6p4wpy57qh2i-lobsters-TEST/bin/bundle could not be executed"
<aleph->
Sub in rails or unicorn_rails for bundle there.
<aleph->
manveru: Let me pm you the derivs for this.
<yosemitesam>
I am trying to create a package which also provides a bash file in $out/share/. How can I tell nix to patch the shebang of this file? The package itsself is built with Rust and it doesn't automatically patch that file. The file has the ending '.bash'
<yosemitesam>
I found the file patch-shebangs.sh in the build tools but I don't know how I can use it in the build process
<yosemitesam>
I'm sorry not in the build tools, it's in the setup-hooks of nixpkgs
<jtojnar>
yosemitesam: it should be used in mkDerivation automatically for all executable files
agander_ has quit [Read error: Connection reset by peer]
<jtojnar>
buildRustPackage does not override fixupPhase, so it should not be an issue
ma9e has joined #nixos
LysergicDreams has quit [Ping timeout: 250 seconds]
agander_ has joined #nixos
<yosemitesam>
jtojnar: thank you! :) I had to add a "chmod +x" in the preInstall phase and now it patched it correctly
<jtojnar>
yosemitesam: if you create the script with writeText, try using writeScript instead, it should make it executable
<yosemitesam>
The script already exists in the root directory of the repository, I just copy it to the directory $out/share...
agander_ is now known as agander
<{^_^}>
[nixpkgs] @stephengroat opened pull request #52935 → remove nox-review from pull request template → https://git.io/fhT1S
lokado has quit [Quit: Connection closed for inactivity]
tzemanov_ has quit [Remote host closed the connection]
vidbina has quit [Ping timeout: 252 seconds]
vidbina has joined #nixos
juhe has quit [Remote host closed the connection]
vidbina has quit [Ping timeout: 260 seconds]
juhe has joined #nixos
juhe has quit [Remote host closed the connection]
jomik has quit [Ping timeout: 250 seconds]
jomik has joined #nixos
tzemanovic has joined #nixos
fusion809 has quit [Remote host closed the connection]
fusion809 has joined #nixos
<aleph->
Anybody know how to set the path for a systemd service def? Trying to include a binary my app needs but keeps erroring out. Def is here: https://bpaste.net/show/80e8a605aedf
<ToxicFrog>
ExecStart should definitely be something different as well, is lobsters in your nixpkgs?
<aleph->
ToxicFrog: Nah this is just a quick little test, lobsters is built on the system.
<aleph->
Just need to grab the package path and sub it in more efficiently.
<ToxicFrog>
Given that you're using a hard-coded path I think the ${...} there is redundant
<ToxicFrog>
Also also, you probably don't even need the execStop, systemd is smart enough to keep track of the service and default to killing its process(es) on stop
<ToxicFrog>
And as an added advantage it won't go wild and kill other unicorn-rails processes on the system the way this would
tzemanovic has quit [Remote host closed the connection]
<aleph->
ToxicFrog: Yeah let me try and take that away, systemd was complaining that I needed both earlier.
tzemanovic has joined #nixos
<jomik>
Where can I see the definition of builtins.toJSON? I suspect that it does not handle escape sequences correctly :(
<jomik>
"\u001b[1;2D" becomes "u001b[1;2D" in the output JSON, which is incorrect :o Tho I guess this may actually be from the way "" is handled?
tzemanovic has quit [Ping timeout: 250 seconds]
<ottidmes>
jomik: yeah, \u means escape u, which is just u, \\ = \
<jomik>
BUt for some reason \\ becomes \\ :P
<fgaz>
Anyone knows how to orverride the Cabal library in ghc?
<fgaz>
for some reason bootPkgs seems not to contain Cabal
<ottidmes>
jomik: well yeah, if it returns a string literal it will return \\
<ottidmes>
jomik: otherwise the meaning will differ
<jomik>
Yeah, that's why I am saying that the toJSON function is flawed.
<jomik>
I use \\u001b[5~ and then I get \\u001b[5~ in the resulting JSON, but with \u001b[5~, I just get u001b[5~
<jomik>
So impossible to dump unicode to JSON.
<{^_^}>
[nixpkgs] @Melkor333 opened pull request #52940 → mcfly: init at v0.3.1 → https://git.io/fhTSs
dermetfan has joined #nixos
<ottidmes>
jomik: thats true
freeman42x[nix] has quit [Quit: Leaving]
<fgaz>
Oh, it's a submodule..
<fgaz>
nvm
<jomik>
Is there a way to handle that then? :/
<jomik>
It is pretty important, to be able to write the config for alacritty.
<ma9e>
anyone know how i can make a minimal squashfs /nix/store? like without manpages and *.a
<elvishjerricco>
jomik: Try putting \u001b[1;2D in a file and doing `builtins.toFile "foo" (builtins.toJSON (builtins.readFile ./foo))`
<elvishjerricco>
ma9e: I don't know, but you can check out the installation CD mix expressions to see how they do it
<elvishjerricco>
Nix expressions*
<jomik>
Yeah, that escapes the backslash in the string, which is incorrect as that is an escape sequence in itself :/
<jomik>
Well, I am not sure if it is actually incorrect. But it is not what I want :P
<ottidmes>
jomik: and I guess you cannot just inject it raw, I believe Nix strings cannot hold such values
<jomik>
Probably not. So that means it is impossible to fully configure alacritty in nix D:
<jomik>
Wait. If I print out "//u001b[1;2D" it should be correct? So I just can not use the toJSON function.
<ottidmes>
jomik: is it something a user might set or is it just used internally by the NixOS module? if the latter you could just work around it with some runCommand and just using shell code to print it, no?
<ottidmes>
jomik: yes, if you print it out "\\u001b[1;2D" it would be valid JSON
orivej has joined #nixos
ambro718 has quit [Quit: Konversation terminated!]
<elvishjerricco>
jomik: `builtins.fromJSON (builtins.readFile ./foo.json)` gives me `error: \u characters in JSON strings are currently not supported`
rawreraw has joined #nixos
<elvishjerricco>
The literal nix expression that evaluates to the JSON encoded \u is `"\"\\u001b[1;2D\"\n"`
doyougnu has joined #nixos
tzemanovic has joined #nixos
<{^_^}>
[nixpkgs] @orivej-nixos pushed commit from @orivej to master « qt5: update nixpkgs directory in readme »: https://git.io/fhTSh
pie__ has joined #nixos
rawreraw has quit [Client Quit]
<samueldr>
elvishjerricco: isn't '"\u001b[1;2D"'' easier to deal with since it reduces the need to escape the escape sequences and quotes?
<samueldr>
oops, missed an initial '
<samueldr>
> ''"\u001b[1;2D"''
<{^_^}>
"\"\\u001b[1;2D\""
<elvishjerricco>
samueldr: Probably :P
<elvishjerricco>
I just copied what nix repl spit out when I did `builtins.readFile ./foo.json`
<jomik>
It is set by the user ottidmes
freeman42x[nix] has joined #nixos
<jomik>
elvishjerricco: I see :O
<jomik>
ottidmes: Actually, it is something the user _must_ set :)
<jomik>
We don't support dumping to YAML, right?
rfold has joined #nixos
pie___ has joined #nixos
<ottidmes>
jomik: considering what elvishjerricco mentioned "error: \u characters in JSON strings are currently not supported", as long as the user only is allowed to set a string value, just write it as a Nix string rather than converting to JSON seems like the only way at the moment
<jomik>
How would I write it as a nix string tho? I am quite literally doing builtins.toJSON cfg; :D
<elvishjerricco>
jomik: Dumping to JSON *is* dumping to YAML.
pie__ has quit [Read error: Connection reset by peer]
<elvishjerricco>
YAML is a superset of JSON
<elvishjerricco>
Any JSON is valid YAML
<jomik>
elvishjerricco: Yeah :P But it is easier to append to YAML than it is to append to JSON. As in, the standard YAML syntax.
<jomik>
Because then I could just append to the end of the file, for these cases.
<elvishjerricco>
jomik: You can't produce a Nix string that would `toJSON` to a `\u` string
<jomik>
elvishjerricco: Exactly :(
<jomik>
Oh.
<jomik>
I could run a postprocessing thing on it all... replace \\u with \u
<ottidmes>
jomik: than just use some placeholder and replace it with your Nix String after calling toJSON?
<elvishjerricco>
Why do you need to use toJSON? Why not write JSON literally?
<jomik>
ottidmes: Example? Would it be better than replacing \\u with \u in the result?
<jomik>
Because it is pretty huge, and if I can use toJSON, then I can let the user add config in an extraConfig thingy.
<jomik>
if I write json literally, then I need to write all options essentially twice.
<jomik>
Sorry, that was for ottidmes , not samueldr O.o Lol, just realized. Anyway, thanks for the help. I think that solves it at least :P Just gotta replace it after the dump to JSON.
aleph- has quit [Ping timeout: 268 seconds]
<rycee>
jomik: `nix-env -f '<nixpkgs>' -qaP -A tmuxPlugins` should list the available plugins
<{^_^}>
[nixpkgs] @PsyanticY opened pull request #52944 → cfn_flip: init at 1.1.0 → https://git.io/fhT5s
<jomik>
rycee: Oooh! Nice to know :D
<jomik>
rycee: I got a sort of "hacky" solution for the Alacritty module.. I am sending a PR in a sec.
steshaw has joined #nixos
freeman42x[nix] has quit [Ping timeout: 244 seconds]
sir_guy_carleton has quit [Quit: WeeChat 2.2]
<rain2>
i can make my custom nix packages repos, but can i also provide prebuilt binaries?
<adisbladis>
etu: Some more ppl here now
<timokau[m]>
rain2:
<timokau[m]>
You can, an easy way is with cachix
<rain2>
thank you
dbmikus has quit [Quit: WeeChat 2.3]
jomik has quit [Ping timeout: 250 seconds]
<etu>
adisbladis: I'll get back there tomorrow:)
tzemanovic has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @domenkozar merged pull request #52942 → linuxPackages_4_{19,20}: works around bug with overlayfs → https://git.io/fhTHv
pie__ has quit [Ping timeout: 250 seconds]
<{^_^}>
[nixpkgs] @domenkozar pushed commit from @samueldr to master « linuxPackages_4_{19,20}: works around bug with overlayfs. »: https://git.io/fhTdx
miaoski_tw has quit [Quit: Connection closed for inactivity]
<samueldr>
AppAraat: nope, packages.html on the nixos website is using the current stable
<samueldr>
so currently, it's 18.09
Radivarig has joined #nixos
<AppAraat>
samueldr: I see. Is there a way I can get the active Nix expression from a query?
init_6 has quit []
<AppAraat>
I understand there's a --file, but that only specifies an expression already present locally.
<duairc>
Are there any operators in Nix or <nixpkgs/lib> for doing bitshifts? Or alternatively for getting integer powers?
<elvishjerricco>
AppAraat: `nix-env -qP` I think
<tokudan[m]>
where can I set parameters for linux kernel modules in nixos?
<duairc>
Fuck it, I'm just gonna do power = m: n: foldl' (a: b: a * b) 1 (genList (x: m) n)
<ottidmes>
tokudan[m]: boot.extraModprobeConfig
<tokudan[m]>
ah, thanks, i didn't find that on the options page
<ottidmes>
tokudan[m]: I had to be told too, initially I configured mine through boot.kernelParams, but it is on the options page though: https://nixos.org/nixos/options.html#boot.extramodprobeconfig
doyougnu has joined #nixos
<tokudan[m]>
i didn't find it when looking for "modules" :)
cyounkins has joined #nixos
<ottidmes>
yeah, same for me, I had not thought to look for it under modprobe
astrofog has quit [Remote host closed the connection]
<AppAraat>
elvishjerricco: "nix-env -qP tmux-2.8" just gives me "0 tmux-2.8"
cyounkins has quit [Remote host closed the connection]
<elvishjerricco>
huh
<elvishjerricco>
weird
cyounkins has joined #nixos
<ottidmes>
AppAraat: so you expect it to return something, because your are supposed to be on the unstable channel which has version 2.8 of tmux? if so, are you sure nix-env is also using the unstable channel?
cyounkin_ has joined #nixos
cyounkins has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fhTbP
<ottidmes>
AppAraat: if I test with my shell function that brings stuff from <nixpkgs/nixos> into scope, I indeed get: nux eval pkgs.unstable.tmux.name ~> "tmux-2.8" and nux eval pkgs.tmux.name ~> "tmux-2.7"
<AppAraat>
I don't doubt that, but I was looking for a way to download the expression file itself (tmux/default.nix) from the commandline - I'm looking to perhaps modify that expression file and build a package using nix-env -f
<ottidmes>
I have to try and not go ranting against nix-channel, so instead, maybe try nix-env -f '<nixpkgs>' -qP tmux-2.8, not sure though if that has any effect
<AppAraat>
nah I still get the "0 tmux-2.8" thing. But it's fine, I'll just browse github and take a look if I can download that file from there.
<AppAraat>
what is the unstable tree called there btw? Couldn't find it.
<ottidmes>
AppAraat: nixos-unstable
civodul has quit [Ping timeout: 252 seconds]
<{^_^}>
[nixpkgs] @hyperfekt opened pull request #52945 → nixos/amazon-init: copy configuration from user data only once (closes #41826) → https://git.io/fhTbd