zoya-kosova[m] has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
hiroshi has joined #nixos
<zybell>
yeah you will need mkOption and you will have to block greeter less mode (or modify it,how idk,its autologin special)see the checks beginning l172. You need to mod the template,inserting your opts...and *debugging*!
<Ben_______>
...and the rabbit hole beckons! ;)
benkolera1 has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
taohansen has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
rain1 has joined #nixos
purewater[m] has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
Oo[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
xcmw has joined #nixos
<zybell>
you will need to *define a standard* for these hooks and implement them possibly on other dm!
<Ben_______>
Right, that's not something I can comfortably do by myself.
steshaw[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
hm, sorry, I'm a bit out of the loop here, what are you trying to achieve exactly?
<samueldr>
I see it's related to backlight, and lightdm, but not sure how
<Ben_______>
And at any rate, it's not something I would do just to get it working on this one box.
dpc has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
The basic issue is me trying to set up nixos as the primary os on my laptop.
FRidh[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<zybell>
clean solution<->hack ;)
<Ben_______>
Right, that too ;)
<samueldr>
yes, sorry, I mean the currentmost one :)
<samueldr>
is it to get the hardware keys on your laptop to control the brightness?
<Ben_______>
Yeah, that's the current sub-task.
<samueldr>
good, and with lightdm, how did you plan to achieve that? (to see if there is an easier or less hacky solution)
<Ben_______>
I figured out that the brightness key is mapped to a key code that shows up in xev, and i've setup xorg.xbacklight to control it via console.
<samueldr>
I think most users will solve this solution in their desktop environment, or x session instead of at the system level
<Ben_______>
zybell suggested i'd have to add a hook to the display manager.
<Ben_______>
I'm running lightdm & i3 right now.
<Ben_______>
I'm open to any solutions, but would prefer something as close to "best practice"(tm) as possible.
<Ben_______>
You know, reliable & reproducible as much as possible ;)
<samueldr>
the nixos spirit there!
lukeadams[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
jbarthelmes[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
okay uh, I don't use actkbd, looks neat, does it work under X11 too?
<Ben_______>
I'm not here by accident! :D
<samueldr>
if so, is the issue that xbacklight needs X* environment variables to work and actkbd is at the system level and not running under your user?
<Ben_______>
Haven't made an entry that I could actually test yet.
jlle[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
uh, possibly...
<samueldr>
okay, while I check how actkbd works (I might like to use it myself) could you try to see if `light` works to control your backlight? it doesn't depend on X
chedi has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
johnazoidberg[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
retrry[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
Yeah, i tried with nix-shell -p light, but not sure it's working right
<Ben_______>
light -G doesn't give anything back, but light -L lists intel_backlight
<samueldr>
nix-shell won't be able to create suid wrappers
<samueldr>
suid wrappers are ways to run programs with other rights, e.g. superuser
wmertens[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
light uses superuser rights to work, so you could try using `sudo light` in a nix-shell
matrixkrav has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
and if it lists intel_backlight, I'm 99% sure it'll work since that's what I have right here
<Ben_______>
Ah, got it!
srini[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
That worked, sudo light -G gives a percentage.
castordamon has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
leoleoleotest[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
aw, inconvenient, I have to "undock" my laptop to get to the keyboard to get a keycode for use with actkbd to test :)
benasse has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
<samueldr>
(I'm not sure how to reference the suid wrapper in an actkbd wrapper yet)
<samueldr>
(though in theory using the well-known path /run/wrappers/bin/light should work)
<samueldr>
(assuming the wrapper is enabled using either the .enable config option or through the generic means)
<Ben_______>
What model are you using?
<Ben_______>
(I'm on Lenovo T440)
<samueldr>
an ASUS laptop, but intel backlight support is pretty standard on linux
<Ben_______>
Got it
imbigbrother[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
Okay, light also works on tty1.
randomenduser[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
turok9[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
if you use the full path, enable the service, you could try before I even have the keycode with actkbd :)
lazygun[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
moosh_vectra[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
efx[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
alexoundos7[m] has left #nixos ["Kicked by @appservice-irc:matrix.org : removing from IRC because user idle on matrix for 30+ days"]
<Ben_______>
Yeah, no, I'm not that proficient in nix to know what that means, exactly ;)
joelpet has quit [Remote host closed the connection]
<Ben_______>
By full path I assume you mean the direct path to light in the nix store?
<samueldr>
ah, your configuration for actkbd that you had before, change the command to `/run/wrappers/bin/light -A 5` (to increase brightness)
<samueldr>
then also add `programs.light.enable = true;` to your configuration
<Ben_______>
And which service do you mean? actkbd?
enick_217 has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
yes
blahblah has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
well, both actkbd (for the keys) and `programs.light.enable` to create the suid wrapper for light
thc202 has quit [Ping timeout: 264 seconds]
<samueldr>
well, that's awkward, I thought I had configured keyboard control for the backlight, but it seems it's done at the kernel level on my laptop, so I can't check with brightness keys :/
averell has joined #nixos
<samueldr>
(though I can easily do it using another key!)
Criena[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
m4rv33n[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
Yeah, I did exactly that. No dice after nixos-rebuild test. Would reboot be required?
thunker[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
roygobeilantoine has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
I don't know, it shouldn't be, but I don't know (yet) actkbd
zie[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
I just now had the same realization "it doesn't work"
briansteffens[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
Right, I'll just try.
<clever>
Ben_______: `nixos-rebuild test` wont persist after a reboot
<clever>
you have to `switch` or `boot` for it to persist across a reboot
baconicsynergy[m has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<Ben_______>
Oh, right, thanks for reminding me!
AllanDaemon has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
revoltmedia[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<hodapp>
uhh, trying to debug this build in nix-shell... how do I make unpackPhase *not* quit because it doesn't know what to do with a .deb file?
mankyKitty[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
iohidtbhfam[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<clever>
also, unpackPhase in the shell runs the original, not the redefined one
<clever>
`phases="unpackPhase" genericBuild` runs the new one you define
<hodapp>
is this workflow documented anyplace?
<clever>
the file i linked has an example of dealing with a .deb file
<clever>
it may also be in the nixpkgs manual
<hodapp>
yeah, I use a .deb file in this build, but I'm trying to update it and I always forget the process of how to "properly" go through the build steps in a nix-shell
ison[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<clever>
just running genericBuild, without root, should do it all
<clever>
or run nix-build directly so nix does it all for you
<hodapp>
the build is broken; I'm going through the steps to figure out why
krey has quit [Ping timeout: 240 seconds]
jperras has joined #nixos
<clever>
genericBuild should try to run all the steps, and stop when it fails
<Ben_______>
Rebooted, brightness keys don't work, but light -A 10 works for user now.
lolipducker[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<hodapp>
oh, I see what you mean
ajmccluskey[m]1 has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
fgaz[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<hodapp>
and the build... didn't fail
enick_376 has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
johnnydread[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<clever>
how did it fail with nix-build?
<samueldr>
Ben_______: just found out that xev key codes are not the ones actkbd wants
<samueldr>
and also found how *how* to get those
<hodapp>
clever: "checking for references to /build in /nix/store/87lnwkwz6h8738v68kza1dv887zp567i-draftsight-2018-SP2..."
<samueldr>
Ben_______: I can't tell you the keycodes, but I can show you the configuration to make them work with the volume keys :/
<Ben_______>
Ah, actkbd -n -s works, but doesn't report a code for the brightness keys. It does on pressing the Fn key, though.
doyougnu has quit [Ping timeout: 240 seconds]
<clever>
there is also a program readkeys, ran as root, that intercepts things before xorg gets it
<clever>
and be careful, xorg may not get any keys once started
<clever>
read its man page for the exit sequence
<hodapp>
ugh, why does this binary package ship with something symlinked to /home/builduser/workspace2/BUILD_ARES_2018.2.0_COMPILE_LinuxX64/Argon/_build/linux_release64/draftsight/DraftSight/APISDK/lib/cpp/libdsLibrary.so.1
<hodapp>
how did this ever work on anything
chreekat[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<zybell>
that will be the F-keys
<hodapp>
that's not a path nor a user I've ever seen
<samueldr>
Ben_______: just for fun, which kernel version are you using? maybe it's like this asus laptop and the kernel will handle it in a later version
<zybell>
normally brightness is handled by acpi events and not by keycode
<samueldr>
eh, could work both ways
ploud777[m] has quit [Quit: removing from IRC because user idle on matrix for 30+ days]
<samueldr>
depends on implementation
<Ben_______>
samueldr: 4.14.37 (via uname -r)
<samueldr>
ah, then carry on
<samueldr>
(in 17.09 the default kernel was 4.9, which didn't support my machine's brightness keys)
<zybell>
only X contains code to snatch the keys before acpi gets them
<clever>
my laptop runs xfce, and the brightness control keys open a gui that shows the brightness as they adjust it
<Ben_______>
Ah, so this might be settable via an acpi option?
<clever>
oh
doyougnu has joined #nixos
<clever>
i think an xfce power util has to be running
<clever>
i ran into trouble with that initially
<samueldr>
(the fun times with non-standardized things!)
Neo-- has quit [Ping timeout: 256 seconds]
<Ben_______>
Hmm.
<Ben_______>
samueldr: I've tried "sudo actkbd -v9 -n -s -d /dev/input/event__", but it says there's an error in actkbd.conf.
<samueldr>
yes and no, it's the default (empty) configuration, well, it was for me :)
<hodapp>
weird, patchelf is giving "Permission denied" on one particular library
<Ben_______>
On inspection, that fiel contains only a comment. I'd have expected the entries i made in configuration.nix to show up there?
<samueldr>
when the systemd service starts it, it tells it to use another configuration file
freeman42x]NixOS has quit [Ping timeout: 260 seconds]
<samueldr>
if you use the configuration from my gist, I'm 99% sure your backlight will be controlled by your volume keys (if you want to at least rule out issues with actkbd)
<clever>
read the unit file nixos generated in /etc/systemd/system/
<clever>
or the journal for that unit
<Ben_______>
Okay then, that may not have been the error: it also says "failed to read event from /dev/input/event__: Success"
<samueldr>
clever: fun thing, actkbd doesn't seem to log to the journal :/
<clever>
samueldr: oh
<clever>
systemd should save stdout and stderr to the journal
<samueldr>
yeah, I didn't look where it logged, but there was no log there for unit actkbd, while systemd *did* log starting it
<samueldr>
if I understand it correctly, it's started by udev on the /dev/input/event* descriptors
<samueldr>
(I removed the configuration already from my computer)
<Ben_______>
Is 114 and 115 some standard for the volume keys?
<samueldr>
I'd guess so, since the configuration for actkbd and alsa did use them too
<Ben_______>
And indeed it works!
<hodapp>
err... so what might cause "open: Permission denied" from patchelf?
<clever>
hodapp: the file your trying to open isnt writable
<zybell>
the store is readonly even for root
drakonis_ has joined #nixos
<clever>
yeah, it must only ever be modified from inside a derivation
<hodapp>
yeah, I'm not just trying to manually patchelf something in /nix/store here
drakonis has quit [Ping timeout: 256 seconds]
<hodapp>
"RPATH of binary /nix/store/z6a77hb3a3hmq1qmn2l730s3rf5lqjb8-draftsight-2018-SP2/draftsight/opt/dassault-systemes/DraftSight/APISDK/Samples/C++/Complex/PropertyWidgets/_lib/release64/libPropertyWidgets.so.1.0.0 contains a forbidden reference to /build" ugh, I could patch these but it seems like deleting them since they're never used would just be easier
<Ben_______>
samueldr: what do you mean by "one of the descriptors", exactly?
<clever>
hodapp: try running patchelf --shrink-rpath on it after you chmod +w
<Ben_______>
Can I use any one, does it have to be the right one, and how do I know?
<clever>
hodapp: or just nuke all samples
<samueldr>
one of the different /dev/input/event* files, there is one per input device (keyboard, mouse, and some keys)
<samueldr>
e.g. the power key on my laptop is one whole event device
<samueldr>
and it has to be the right one
<hodapp>
clever: can't shrink rpaths, it appears to require those paths for some things it dlopen()'s
<samueldr>
I don't know how to know, other than tell you *wait until I upstream this tool I forgot to upstream months ago* :/
<samueldr>
if the keycodes work, don't forget to tell us the codes here! this could help others in the future too!
<Ben_______>
It's /dev/input/event6, and the brightness keys report "Event: 224:key\nEvent: 224:rel"
ertes has joined #nixos
<zybell>
and check if the names are the same after reboot
<samueldr>
both 224?
<samueldr>
zybell: actkbd hooks to all event files
<Ben_______>
And:"Event: 225:key\nEvent: 225:rel"
<samueldr>
so it won't matter
Supersonic112 has joined #nixos
Supersonic has quit [Disconnected by services]
<Ben_______>
No, but each key reports two lines, one with :key and one with :rel
<samueldr>
I think (unsure) it's key down and key up
<samueldr>
I seem to remember seeing this too with my volume keys
<Ben_______>
rel for 'released'
Supersonic112 is now known as Supersonic
<zybell>
that is down (key),repeat (key again) and up (rel)
<zybell>
repeat only if set for
stephenjudkins has joined #nixos
doyougnu has quit [Ping timeout: 256 seconds]
mbrgm has quit [Ping timeout: 264 seconds]
stephenjudkins has quit [Remote host closed the connection]
mbrgm has joined #nixos
stephenjudkins has joined #nixos
<Ben_______>
Aaaaand ... It's working!
<Ben_______>
Thanks, guys!
stephenjudkins has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @matthewbauer pushed 0 commits to bmake-compat: https://git.io/vprLV
Fare has quit [Ping timeout: 268 seconds]
<samueldr>
Ben_______: easy, now to the next problem ;)
<samueldr>
(by this, I mean: don't hesitate to ask again!)
<Ben_______>
My next problem is probably to find my way to bed before first light ;)
<Ben_______>
(I'm in Europe)
<samueldr>
close the blinds!
Fare has joined #nixos
iqubic has joined #nixos
<zybell>
wait for light,you may see better;-)
<samueldr>
hmmm, it may not be a coincidence, (xev keycode - 8) gives me the actkbd keycodes for backlight, and it looks like it may for your brightness keys Ben_______
<Ben_______>
Well, considering that I just installed light a few minutes ago ...
<iqubic>
What is light?
<iqubic>
Is that a tool to change brightness?
<samueldr>
a tool to control backlight, like xbacklight, on most laptops
<samueldr>
it has different peculiarities
<samueldr>
xbacklight uses X to talk to the backlight (overly simplified) while light doesn't
<samueldr>
(which is why xbacklight doesn't need the suid wrapper or sudo)
<iqubic>
I just use xbacklight. Should I switch to Light?
<samueldr>
probably not :)
<samueldr>
I mean if it works for your use case
sir_guy_carleton has joined #nixos
<samueldr>
in this particular instance, it was to make use of the hardware backlight control keys through actkbd
<iqubic>
Alright. That's good.
<samueldr>
actkbd doesn't know about X
<samueldr>
so using light instead of xbacklight is easier
<iqubic>
See my issue is my multimedia keys for controlling sound levels.
<zybell>
if you need it on console.
<leary`>
It's kinda weird that xbacklight would need to know about X anyway. On my laptop I literally just write a value to the intel_backlight/brightness file..
<Ben_______>
So, the way it's set up for me now, a user with a remote terminal can shut down the monitor for the user in front of the laptop...
<iqubic>
Is there a way command to set the sound levels to a value larger than 100%?
<samueldr>
leary`: I'm not entirely sure, but I think it's related to an X protocol and X drivers implementing backlight control
<samueldr>
and it would be a separate system than the /proc/ files you talk about
<samueldr>
(that's from fuzzy memory)
<iqubic>
I have my sound keys set up to run things like this: "amixer set Master unmute; amixer sset Master 5%+"
<Ben_______>
Is there a section on the Wiki where we could put solutions like this?
<iqubic>
The one issue is that if I go into pavucontrol and set the sound levels to a value greater than 100%, running that command drops it back to 100% before trying to increase the volume.
<{^_^}>
[nixpkgs] @Hodapp87 opened pull request #40020 → draftsight: 2017 SP2 to 2018 SP2, remove gstreamer → https://git.io/vprLA
<Ben_______>
I mean, it's not an uncommon problem I'd imagine.
<iqubic>
Is there a way I can fix that?
<leary`>
"100%" is a lie, iqubic. pactl will happily let you destroy your ears and your speakers if you want to set your volume to 10000%.
<iqubic>
oh, it will? How?
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<iqubic>
What command should I run instead of that alsa command?
<leary`>
pactl set-sink-volume <sink> [+/-]n%
<leary`>
sink is probably 0, but it might change if you plug in headphones.
<iqubic>
Is there a way to use pactl to toggle whether a sink is on or off?
<iqubic>
"amixer set Master unmute; amixer sset Master 5%+" Is there a pactl version of that command?
<zybell>
on some mute works only if you set 0% first.
<iqubic>
Weird.
<Ben_______>
samueldr: Great, I will!
freeman42x]NixOS has joined #nixos
<leary`>
You can set-sink-mute <sink> false before you bump the volume.
<zybell>
on those wher mute needs 0% you cant,unmute needs more than 0% first.
<samueldr>
Ben_______: be sure to add your configuration with actkbd, verbatim, it's probably universal (though you should add that this was only tested on your hardware)
<Ben_______>
Right
<samueldr>
I say probably universal only because of a hunch; your keycodes were offset by the same amount than mines for the volume keys
<infinisil>
Aww yeah, I got something nice to show here
<iqubic>
Also: Can I use the same sort of script to pipe info from xbacklight into dzen2.
<leary`>
iqubic: I took another look at the script and I'm using awful regexp to parse it out of `pactl list sinks`. I did it ages ago and it still works so I never changed it ... I'm sure there's a much better way, but I can still paste it somewhere if you want.
<Ben_______>
samueldr: Okay, I think it's looking okay for now.
<iqubic>
I think I'll look for a better solution. You keep your ugly script to yourself.
<{^_^}>
[nixpkgs] @aszlig pushed to master « dockerTools.pullImage: Fix build with sandboxing »: https://git.io/vprqX
jperras has quit [Ping timeout: 256 seconds]
andreabe_ has joined #nixos
nolanv has joined #nixos
andreabedini has quit [Ping timeout: 256 seconds]
<drakonis_>
ah i'm getting back on the nixpkgs train
rosa has quit [Quit: rosa]
<drakonis_>
time to start submitting pull requests again
<drakonis_>
time for excitement
<jcrben>
this whole nix thing is seriously hard
<Ben_______>
Thanks for your help guys, by the way!
<drakonis_>
i suppose
<drakonis_>
it does get better later
<drakonis_>
i'll admit the learning curve sucks
<jcrben>
doubt I'll be able to get many of my programmer friends into it
<Ben_______>
It's not just nix, it's also the missing tutorials & documented best practices.
<{^_^}>
[nixpkgs] @aszlig pushed to master « gopass: Add xclip to wrapperPath »: https://git.io/vprme
<jcrben>
my journey started like a year and a half ago, when I dove all the way into adding traces and assertions to the core to understand why packages weren't showing up my on mac
<jcrben>
(and of course the answer: allowUnfree = true) - basically a rite of passage for people who start on mac
<Ben_______>
I guess the easiest targets are those who have felt the pain ;)
<drakonis_>
let's be honest though
<drakonis_>
its a catch 22
<Ben_______>
What do you mean?
<drakonis_>
actually, it is a chicken and egg problem
<jcrben>
spent some time today reading ye old composableDerivation (used by vim_configurable) to see if I could figure out how to get a vim plugin (not yet packaged) to work - ended up going with wrapNeovim instead
<drakonis_>
you can't have good documentation without users, if you don't have users, you can't have good documentation
<drakonis_>
a catch 22 is a circular problem, a deadlock if you will
<drakonis_>
a paradox
<drakonis_>
can't have one without the other
<TimePath>
throw 22
<TimePath>
deadlock resolved :)
<drakonis_>
if nobody writes the docs, how are you going to have more users to write more docs
<jcrben>
I had to read all the manuals and work my way thru the nix pill series
<drakonis_>
and so on
<Ben_______>
Right, but you do have users. I can see a lot of them on the right ;)
<drakonis_>
do you mind helping out with the docs?
<simpson>
TimePath: Lucky 10000: 'Catch-22' is a classic novel.
<drakonis_>
well, those aren't all active users
<jcrben>
and browse probably hundreds of issues
<drakonis_>
its that we urgently need more people
<jcrben>
drakonis: I've made a couple docs PRs
<drakonis_>
nice
<drakonis_>
hmm
<jcrben>
I will make more
<drakonis_>
thanks
<Ben_______>
Well, I've started today with a wiki article :)
<drakonis_>
gotta smooth up the learning curve
<jcrben>
I'll probably focus on the wiki since there's more friction with the docs
<drakonis_>
hmm, that gives me an idea
<drakonis_>
move all documentation to the wiki
<jcrben>
but you may have heard that grahamc set up autoformatting (like prettier) for the docs a few days ago
<drakonis_>
everything available on nixos.org
<jcrben>
dunno about that
<drakonis_>
do a general clean up then move the major stuff back there
<drakonis_>
keep it as a snapshot for the current release while the wiki moves fast
<jcrben>
one thing that needs to be more clear is that even as a general user right now, you're probably going to have to get your hands dirty and package
<jcrben>
so you should expect to spend a lot of time reading the source tree
<drakonis_>
yes that might be an issue
iyzsong has joined #nixos
<drakonis_>
the source tree also needs improvements like generating the top level packages file
<Ben_______>
In order to really expand the target audience, there needs to be way to use it without going all the way down into the muck.
<jcrben>
I do feel like this will be a bit of a secret weapon when I master it
<drakonis_>
the plan is to actually do that over time
<drakonis_>
nix 2.0 will be helpful towards the goal
<Ben_______>
Right
<drakonis_>
but its not like i can snap my fingers
<Ben_______>
I took a look at Eelco's thesis, and to the very end he has a section about feature modeling.
<drakonis_>
you reminded me of something that'd be good
<drakonis_>
have an spec
BombStrike has quit [Quit: ZNC 1.6.6 - http://znc.in]
<Ben_______>
For the language?
<drakonis_>
yes
BombStrike has joined #nixos
<drakonis_>
nix itself, nix the language, nixos
<drakonis_>
so if something changes, it can be registered somewhere
BombStrike has quit [Max SendQ exceeded]
<Ben_______>
I've never actually read & understood a language spec.
<drakonis_>
its probably not in high demand right now
<drakonis_>
not until hnix is ready
BombStrike has joined #nixos
andreabedini has joined #nixos
rosa has joined #nixos
<drakonis_>
okay i feel like i'm throwing out a lot of stuff right now
<Ben_______>
I think as an ecosystem, what would be helpful is some restrictions on the complexity.
<drakonis_>
abstract away some of the complexity for the common user?
<Ben_______>
It's more like ... since it's a full language, there's a million ways to get the same thing done. It fragments the solution space.
<drakonis_>
ah i see
andreabe_ has quit [Ping timeout: 264 seconds]
freeman42x]NixOS has quit [Ping timeout: 260 seconds]
<Ben_______>
For common tasks there should be a pretty nailed down 'right' way to do it.
<drakonis_>
so, implement an traditional package manager that sits on top of nix for the regular tasks
<Ben_______>
And ideally, that should be flow from sound theory.
<drakonis_>
but how to deal with the likes of python
<drakonis_>
which requires entering shell to develop on
<drakonis_>
it also requires cleaning up the most common major packages, which shouldn't really be an issue
<Ben_______>
Well, I've done some reading on FOSD (feature oriented software development), and I think there are some synergies there.
andreabe_ has joined #nixos
jperras has joined #nixos
<drakonis_>
there's a plugin system for nix now
<jcrben>
I'm hoping that I'm over the hump with nix. one of the bigger pain points for me is that nix comes from that very functional perspective where runtime introspection is kind of viewed as being something for dumb people
<drakonis_>
runtime introspection?
<Ben_______>
Feature modeling has long been established in industry.
sir_guy_carleton has quit [Quit: Leaving]
<jcrben>
in homebrew, when it's doing something weird, I'd load it up in a debugger, step to the weird spot, then run a few commands in my repl
<neonfuz>
hmm, monitor stopped being detected
<jcrben>
in nix, I can use trace, but I get the impression that it's not very popular
andreabedini has quit [Ping timeout: 256 seconds]
<drakonis_>
hmm
<drakonis_>
runtime introspection seems like it'd be useful
<drakonis_>
there's code written for modifying ELF executables
<drakonis_>
seems like using runtime introspection would be nice for relinking the executables on the fly
<drakonis_>
precompiled binaries
<drakonis_>
the issue however, is that those things have to be implemented in the first place
<drakonis_>
words are cheap
<neonfuz>
I know nixos had some graphics updates recently (something to do with mesa and vulkan iirc?), could be why it can't detect my monitor anymore?
<drakonis_>
hmm
<drakonis_>
do you have an graphics card?
<drakonis_>
sorry about the spam
schoppenhauer has quit [Ping timeout: 240 seconds]
<neonfuz>
intel hd5xxx something
<neonfuz>
it's a laptop
schoppenhauer has joined #nixos
<drakonis_>
hmm
<infinisil>
Alright, the nix bot can now do a lot of evaluations
<drakonis_>
these shouldn't be an issue
<infinisil>
(I'll wait for a bit before demo)
Ross has quit [Ping timeout: 256 seconds]
Ross has joined #nixos
jperras has joined #nixos
<infinisil>
So, now the nix repl in here does have a nixpkgs in it
<leary`>
> let f = n: if n == 0 then 1 else n * f (n - 1); in f 20
<{^_^}>
2432902008176640000
jperras has quit [Ping timeout: 256 seconds]
<leary`>
It seems to ignore PMs infinisil.
<infinisil>
Indeed, helps somewhat with abuse I'd think
<infinisil>
And you have a nix repl on your own system probably, so you can just use that :)
<infinisil>
>builtins.currentTime
<{^_^}>
1525580002
<leary`>
Of course, but when people are using the bot enough to make it spammy (as is common with lambdabot for example) it's nice to be able to tell them to take it to PM.
<infinisil>
leary`: Hmm good point, I'll consider adding that
<infinisil>
One last demo: (I declared "nixos" as a nixos system evaluation before)
<jD91mZM2>
There a default_cxx_stdlib_compile option which might be that
<kuri0>
jD91mZM2, cxx = c++ what about for c?
<kuri0>
there don't seem to be default compiler flags in that file
<jD91mZM2>
I'm afraid I don't know the answer. Hopefully you can find something inside the pkgs/build-support directory though
<kuri0>
i think there aren't any default compiler flags
<kuri0>
because i see some packages manually specify -O2
<kuri0>
most distros use -O2 by default
rosa has joined #nixos
<elvishjerricco>
kuri0: There definitely are a bunch of default compiler flags.
<kuri0>
elvishjerricco, if you know one of them then i can search the source for it
<elvishjerricco>
The cc-wrapper is a good place to start, but I don't really know exactly how to track them down
stephenjudkins has joined #nixos
jperras has quit [Ping timeout: 240 seconds]
<elvishjerricco>
kuri0: For example, the `hardeningDisable` argument to `mkDerivation` lets you configure which hardening flags get passed to the compiler
<kuri0>
i want to change it to -Ofast and enable LTO and FDO
<kuri0>
so performance might be similar to clear linux
<jD91mZM2>
The stdenv/generic/linux/ seems related
<kuri0>
only the person who wrote the code knows for sure
<jD91mZM2>
pretty much
orivej has quit [Ping timeout: 248 seconds]
andreabedini has quit [Ping timeout: 256 seconds]
andreabedini has joined #nixos
stephenjudkins has quit [Remote host closed the connection]
eqyiel has quit [Remote host closed the connection]
jethroksy has joined #nixos
<kuri0>
fdo seems to make almost everything faster
<kuri0>
thats why i want to enable it
<kuri0>
it doubles compile time though
rosa has quit [Quit: rosa]
aminechikhaoui has quit [Ping timeout: 264 seconds]
tertle||eltret has quit [Quit: Connection closed for inactivity]
endformationage has quit [Ping timeout: 264 seconds]
iyzsong has quit [Read error: Connection reset by peer]
asuryawanshi has quit [Remote host closed the connection]
wchresta_ has joined #nixos
smichel has joined #nixos
<jD91mZM2>
Does nixos have libbamf anywhere? I can't find it in `nix search`
olto has joined #nixos
jacob_ has joined #nixos
eta has joined #nixos
wchresta_ has quit [Ping timeout: 264 seconds]
dvim has joined #nixos
blankhart has quit [Ping timeout: 264 seconds]
iqubic` has joined #nixos
iqubic has quit [Ping timeout: 240 seconds]
Ridout has quit [Ping timeout: 248 seconds]
smichel has quit [Quit: smichel]
<octe>
i have a nix-os installation without internet access, but i need to install packages to get wireless internet access.. what would be the simplest way to get packages to it?
<tilpner>
octe - If you have another machine with Nix installed, you can copy the packages you need over
<tilpner>
(With nix copy and a usb stick)
<tilpner>
You will have to make sure to use the exact same nixpkgs version though
jperras has joined #nixos
<tilpner>
(But a cable would still be a good idea, if you can get one)
<octe>
not sure if usb tethering from android would work without any special drivers/utils
<octe>
looks like it works since the wiki suggests it
<octe>
i think i'll give that a try
<octe>
just need to get a usb cable hehe
<tilpner>
I think that guide section assumes you are running the live ISO, but you said you already installed
<tilpner>
You could of course boot the live ISO again, and fix your installation from that
jperras has quit [Ping timeout: 264 seconds]
rosa has quit [Quit: rosa]
rosa has joined #nixos
eta has quit [Quit: Page closed]
asuryawanshi has joined #nixos
nolanv has quit [Read error: Connection reset by peer]
coot has joined #nixos
celph has joined #nixos
celph has left #nixos [#nixos]
<jethroksy>
say I want to download a file and read it into a string for my nixos configuration. is builtins.readFile (pkgs.fetchurl { ... }) the best practice?
nolanv has joined #nixos
rosa has quit [Quit: rosa]
rosa has joined #nixos
<tilpner>
Yes, though sometimes there's a corresponding fooFile for the option foo
<tilpner>
Like with users.users.<name?>.openssh.authorizedKeys.keys vs users.users.<name?>.openssh.authorizedKeys.keyFiles
Hdphn has quit [Quit: Leaving]
mduggie has quit [Ping timeout: 264 seconds]
<jethroksy>
ahh, I looked through and there wasn't
<sphalerit>
How can I get a reference to the a compiler that can compile programs for the system we're building on, even when cross-compiling? I think it would be a build-build compiler
<{^_^}>
[nixpkgs] @joachifm pushed commit from @fadenb to master « nixos/matrix-synapse service: url_preview_url_blacklist fix (#40027) »: https://git.io/vprC6
<sphalerit>
jD91mZM2: I don't think nix provides one, but you may be able to do it manually by rejiggering the symlinks. Don't blame me if that breaks everything horribly though :p
<jD91mZM2>
btw I found out how to make passwordless sudo for specific binaries
<jD91mZM2>
Should I make sudo rm -rf --no-preserve-root / work without password?
<sphalerit>
that is entirely up to you.
<sphalerit>
I'd suggest not to though :)
<jD91mZM2>
orly? I thought it was a great idea!
<jD91mZM2>
What about sudo nixos-rebuild?
seanparsons has quit [Read error: Connection reset by peer]
<jD91mZM2>
btw my ~/.xprofile is sourcing my ~/.profile, which sets $PATH
<jD91mZM2>
yet $PATH remains unchanged
<jD91mZM2>
If I source ~/.profile from a terminal it works
<sphalerite>
I don't know how this stuff works exactly.
<sphalerite>
Have you considered using environment.variables or environment.sessionVariables?
<jD91mZM2>
I mean it's user specific
<jD91mZM2>
~/.cargo/bin for example
maingo has quit [Quit: Connection closed for inactivity]
seanparsons has joined #nixos
katona has joined #nixos
srid has quit []
srid has joined #nixos
<{^_^}>
[nixpkgs] @Mic92 merged pull request #40026 → mkcast: drop and replace with `xscast` → https://git.io/vprn1
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @Ma27 to master « mkcast: drop and replace with `xscast` (#40026) »: https://git.io/vprWM
<{^_^}>
→ f8351ba5 by @marsam: pythonPackages.scrapy: enable darwin build
<{^_^}>
→ 6013c959 by @Mic92: Merge pull request #40021 from marsam/feature/enable-scrapy-darwin
<sphalerite>
hm I suppose you could make a custom session using services.xserver.displayManager.session that sets everyhting up right. It's not pretty though :/
kreetx has joined #nixos
<jD91mZM2>
TIL about that
logzet has joined #nixos
<jD91mZM2>
Honestly I'm really confused why LightDM doesn't source ~/.profile in the first place (and I have to use `~/.xprofile). It does this on pretty much all other distros
<jD91mZM2>
Is NixOS disabling it or something?
<infinisil>
I think maybe xprofile is supposed to source profile
blankhart has joined #nixos
<jD91mZM2>
infinisil: Pretty sure no
<infinisil>
Heh alright
phdoerfler has joined #nixos
<jD91mZM2>
Well, at least I never needed to do it on any other system before (Ubuntu or Arch)
scott has quit []
scott has joined #nixos
<kreetx>
hi! what is a good procedure to find out how to install and configure how to install any package in nixos? What I mean is if I want to set up a LAMP stack, there must be a better way that just googling for examples..
<jD91mZM2>
kreetx: Also, `nixos-option <whatever>` is great
<jD91mZM2>
For example: `nixos-option services.xserver` prints most X-related settings
<kreetx>
thanks! was just going to ask if that could be the one. Would you say that the options page is the same as browsing apt in debian?
<kreetx>
i.e it's named options, but really it shows what custom options all these packages have?
<infinisil>
Packages are something different than nixos options
thc202 has quit [Ping timeout: 240 seconds]
<kreetx>
is it the difference between packages vs modules?
<infinisil>
Yeah more or less
Synthetica has joined #nixos
<infinisil>
Packages usually don't have any nixos-like options, you just refer to them like pkgs.hells
b5509cd has quit [Quit: WeeChat 2.1]
Tritlo has quit []
<infinisil>
And options usually don't build a package, but rather change other options
jxf has quit []
Tritlo has joined #nixos
cherrybl0ss0m_ has joined #nixos
jxf has joined #nixos
<infinisil>
And options exist only at the nix level, you can't "build" an option (unless the option has a type of package)
thc202 has joined #nixos
<Synthetica>
globin: Did you setup a Hydra build for `gcc: 7->8`?
<infinisil>
Not sure if that's what you were asking for
Hdphn has joined #nixos
acarrico has joined #nixos
<infinisil>
Oh and: options are nixos only, packages are usable without nixos
<kreetx>
infinisil: yes, it's very helpful -- I'm just trying to figure out a deterministic procedure to find out how to do things in nixos. :) The current way of googling is just too stressful..
Hdphn has quit [Remote host closed the connection]
<infinisil>
Haha, deterministic, i doubt that, we are human after all
Hdphn has joined #nixos
ambro718 has joined #nixos
<infinisil>
But what I usually do is search through options (preferably `man configuration.nix`)
acarrico has quit [Max SendQ exceeded]
<kreetx>
well, perhaps not "deterministic" deterministic, but a procedure which I can trust in..
<kreetx>
like, I'm pretty sure setting up apache/mysql is possible in nixos, but how to I find out how
<woffs>
Nixos is very non-deterministic. Very variegated instead :-P
<infinisil>
If I can't find anything I'll search through packages (I usually just ripgrep through nixpkgs)
acarrico has joined #nixos
<infinisil>
I found the mysqp options rather quick, then just read through what suboptions are available, or just use the enable = true; one and see if that already does what you need
<joko>
Any idea which package contains the gio command?
thoughtpolice has quit []
jperras has joined #nixos
dmj` has quit []
thoughtpolice has joined #nixos
<kreetx>
thanks again infinisil, I guess just getting the hang of it takes time
dmj` has joined #nixos
<infinisil>
kreetx: do you have any problems with just looking at the options? It's super easy
mpickering has quit []
<kreetx>
no. I think I just didn't realize how central they were
<joko>
It was the glib one
mpickering has joined #nixos
acarrico has quit [Ping timeout: 264 seconds]
<infinisil>
joko: you can use nix-index to find out which package contains a specific binary
jperras has quit [Ping timeout: 260 seconds]
<infinisil>
After running `nix-index`, `nix-locate bin/gio` will reply with all attributes that contain a gio* binary
joehh has joined #nixos
<joko>
infinisil: thanks for the tip!
jrolfs has joined #nixos
<infinisil>
Hmm, it would be nice if the bot could do that
<jD91mZM2>
infinisil: I am mad that google didn't tell me this sooner than you did
gridaphobe has quit []
<jD91mZM2>
I've searched for something like that previously and found nothing
gridaphobe has joined #nixos
<infinisil>
The nix-index thing?
<jD91mZM2>
yeah
phdoerfler has quit [Ping timeout: 255 seconds]
<joko>
So, what I am trying to do for today is to get pcmanfm working with smb share browsing over my xmonad environment. I have installed pcmanfm and gvfs as user packages, but pcmanfm still complains about "operation not supported" whenever I type an smb:// address
<joko>
Any idea what could be wrong?
<infinisil>
jD91mZM2: yeah nix sometimes isn't all that well indexed
<joko>
dbus, polkit, anything else?
<infinisil>
jD91mZM2: in search engines i mean
<jD91mZM2>
It doesn't help that the wiki doesn't really mention nix-index anywhere either
<jD91mZM2>
Only in the Nix->Debian handbook
<logzet>
Hi, how do I increase the ulimit settings in Nixos? For a single systemd user unit would be enough
<jbetz>
getting this error when building a haskell library:`error: anonymous function at /nix/store/[...]-cabal2nix-<project name>/default.nix:1:1 called without required argument 'common', at /nix/store/[...]-source/pkgs/development/haskell-modules/make-package-set.nix:87:27` how do I make sure that 'common' is installed and being passed to this function?
<kreetx>
jbetz: if common is a local package that you're depending on, then you need to add it to haskell packages first
<{^_^}>
→ b21da370 by Timo Kaufmann: nodePackages_8_x.three: Init at 0.92.0
<{^_^}>
→ 4e9892f8 by Timo Kaufmann: nodePackages_8_x.mathjax: Init at 2.7.4
<{^_^}>
→ 67ef59fd by @svanderburg: Merge pull request #39405 from timokau/node-three-mathjax
<logzet>
infinisil: Thanks
seanparsons has quit [Quit: ZNC 1.6.5 - http://znc.in]
<kreetx>
jbetz: i.e the target you're compiling you've probably created a default.nix for, and this expression takes all its dependencies, including common. If this is the case, then the common is simply not there -- and that is what it is complaining about
logzet has quit [Remote host closed the connection]
yurrriq has quit []
yurrriq has joined #nixos
xplat|work_ has quit []
xplat|work_ has joined #nixos
acarrico has joined #nixos
<joko>
infinisil: It must be, yes. My workaround was to set GIO_EXTRA_MODULES = "${pkgs.gvfs}/lib/gio/modules"; in home.sessionVariables (I really like home-manager)
<kreetx>
cherrybl0ss0m_: is having an overlay the newer version how to do it?
<kreetx>
i.e have an overlay of one's own local packages for quick use
<infinisil>
,home-manager = home-manager allows you to manage your per-user configuration similarly to NixOS' configuration.nix: https://nixos.wiki/wiki/Home_Manager
<{^_^}>
home-manager defined
philips has quit []
philips has joined #nixos
<cherrybl0ss0m_>
kreetx: overlays are newer but AFAIK packagesOverrides will be supported for forseeable future. Give me a sec on getting a paste of a simple Haskell overlay that I use.
<kreetx>
infinisil: I think (but might be wrong!) that home-manager has another purpose -- it's for having a set of nix packages available for use in one's own machine. While the overlay is meant for if I want to deploy some app on nixos, but this app depends on packages which are not on nixpkgs but in your private git or hard disk
<mpickering>
Is there some kind of neat way of creating a docker image from a shell.nix file? Or a recommended way of augmenting the nixos image with an additional package?
<kreetx>
these dependencies need not to be installed on the local machine -- it's just the app that depends on them, they need to be available/referenced somehow
<kreetx>
*building the app depends on them
<infinisil>
kreetx: Yeah, but isn't that configuration too?
<jtojnar>
jD91mZM2: well nix does not really care, it just adds everything from *BuildInputs to path
<jtojnar>
and other variables
<jD91mZM2>
Jeez ok I've been misunderstanding this whole thing completely. This needs to be documented better
katona has quit [Quit: Connection closed for inactivity]
<jD91mZM2>
So if I require a static library I put it in nativeBuildInputs, and if I require a dynamic library I put it in buildInputs?
<jtojnar>
jD91mZM2: it is more of a cross-compilation thing – programs that need to run on the builder go to nativeBuildInputs
<jtojnar>
but libraries and other things for target platform go to buildInputs
<infinisil>
,runtimeDeps = For runtime dependencies, either wrap the resulting binaries with the dependencies you need, or patch the source to refer to the dependencies directly
<jD91mZM2>
So makeWrapper and gcc goes in native, but all libraries (even if only needed statically) go in buildInputs?
<jD91mZM2>
,runtimeDeps = For runtime dependencies not automatically added to RPATH, either wrap the binaries using makeWrapper or patch them using patchelf*
<jD91mZM2>
makes more sense, no?
timB has joined #nixos
timB has quit [Client Quit]
servAlot has joined #nixos
<jtojnar>
jD91mZM2: you could also patch the dlopen calls to absolute paths before compilation
<jD91mZM2>
In termplay's case, RPATH seems to be handled properly :)
akl has quit []
<jtojnar>
that is usually preferred, but I am not sure how feasible it is with rust libraries
akl has joined #nixos
<infinisil>
MichaelRaskin: Had to restart it, it terminated for some reason, will fix it
<MichaelRaskin>
Needs auto-respawn
<infinisil>
jD91mZM2: I've honestly never seen the RPATH thing
<servAlot>
hello guys, is it somehow possible to start a postgres-server inside a package-derivation?
<MichaelRaskin>
Yes it is
terrorjack has quit []
<MichaelRaskin>
You just need to do everything manually for that…
<servAlot>
damnit
seanparsons has quit [Quit: ZNC 1.6.5 - http://znc.in]
<servAlot>
like $postgres/bin/startwhatever.sh ?
<infinisil>
,runtimeDeps = For runtime dependencies, either wrap the resulting binaries with the dependencies you need (makeWrapper), patch it (patchelf), or patch the source to refer to the dependencies directly
<{^_^}>
runtimeDeps defined
terrorjack has joined #nixos
<infinisil>
Feel free to refine this definition
<MichaelRaskin>
servAlot: I think the main part is that you need some kind of config for that
logzet has quit [Remote host closed the connection]
seanparsons has joined #nixos
<infinisil>
I think "runtime dependencies" usually means binaries looking for stuff on PATH
<jtojnar>
infinisil: it is quite common when package has an runtime-optional dependency on a library (it uses dlopen, instead of linking against the library)
<jD91mZM2>
jtojnar: Pushed buildInput changes
<infinisil>
jtojnar: I see, and dlopen looks for stuff in RPATH?
<jtojnar>
infinisil: I would assume it uses the same lookup as ld.so
<Dezgeg>
say you run your app from the store, which uses libfoo version 1, which then launches the browser to open a web link or something, which then needs libfoo version 2
<Dezgeg>
so if the app put libfoo v1 in LD_LIBRARY_PATH, the browser probably gets hosed
<infinisil>
Dezgeg: But wouldn't the browser link to libfoo directly? and if it were to require LD_LIBRARY_PATH, then it would be wrapped with the libfoo 2 version
<Dezgeg>
LD_LIBRARY_PATH takes precedence over RPATH
<{^_^}>
→ bf65cf4d by @periklis: skhd: 0.0.12 -> 0.0.14
<{^_^}>
→ e6d55581 by @LnL7: Merge pull request #40014 from periklis/darwin-skhd
<jD91mZM2>
Dezgeg: So in other words if every single program made wrappers using LD_LIBRARY_PATH it'd be fine? /s
<infinisil>
Dezgeg: Okay, so you'd use patchelf over LD_LIBRARY_PATH, and what do you mean by having to be careful that --shrink-rpath doesn't get rid of it?
<jtojnar>
it is also little confusing since we use RPATH to refer to DT_RUNPATH, which we use today, instead of the older DT_RPATH, which cannot be overriden by LD_LIBRARY_PATH
<Dezgeg>
if you do it before fixupPhase, stdenv will run patchelf --shrink-rpath from everything and undo your changes
<Dezgeg>
*for everything
<infinisil>
Ah I see
<jtojnar>
also sometimes patchelf is buggy and your program will segfault if you strip it
<Dezgeg>
I guess you could do patchelf --add-needed libfoo.so --set-rpath $oldRpath:${libfoo}/lib
<Dezgeg>
but then you need to trust patchelf handles 2 flags at the same time correctly :)
<jtojnar>
it's the fun world of runtime dependencies
<jD91mZM2>
Where should you do it in? postFixup? postInstall?
<infinisil>
,runtimeDeps = In order of preference: Patch source OR ((if it uses PATH -> wrap with new $PATH) AND (if it uses dlopen, (patchelf --set-rpath in postFixup OR wrap with new LD_LIBRARY_PATH)))
<{^_^}>
runtimeDeps defined
andreabe_ has joined #nixos
andreabedini has quit [Ping timeout: 240 seconds]
<infinisil>
Feel free to refine it
jethroksy has joined #nixos
<jethroksy>
anyone using nix to install the nix-mode emacs package? i'm getting `emacs-nix-mode-20180215.1331`, which is a little dated, and I'm on nixos-unstable, wondering if this is the latest package on nixos-unstable (not sure how to check).
phdoerfler has joined #nixos
<jD91mZM2>
jtojnar: If it works locally, I don't need to wrap it, right?
logzet has joined #nixos
phdoerfler has quit [Client Quit]
<jtojnar>
how does buildRustPackage work? it seems to download thing even in sandbox
<infinisil>
jtojnar: fixed output derivations can download stuff freely
<jD91mZM2>
jtojnar: Download what thing?
<jtojnar>
jD91mZM2: the crates termplay depends on
<jD91mZM2>
Well I mean it needs them to compile?
<infinisil>
jtojnar: and since you need to provide a sha256 hash for cargoDepsSha256 it's a fixed-output one
acarrico has quit [Ping timeout: 260 seconds]
<jtojnar>
oh, right, I did not notice that
<jD91mZM2>
Can patchelf somehow add something to rpath without modifying it completely?
<jtojnar>
jD91mZM2: I think you need to use --print-rpath
<jD91mZM2>
Not in xidlehook
<jD91mZM2>
Oh, I didn't even notice --print-rpath. Seems like the man page isn't sorted
Rusty1_ has joined #nixos
<jD91mZM2>
(totally not just an excuse for me being bad at reading)
<kreetx>
is there a way to mount a folder into nixos on virtualbox in nixos' deploy configuration, or should this be done in virtualbox itself (somehow)?
acarrico has joined #nixos
<jethroksy>
wow i've been on nixpkgs-unstable and not nixos-unstbale all this time...
joehh has quit [Ping timeout: 240 seconds]
<jD91mZM2>
jethroksy: Congrats, I too wish I had a rolling distro that worked so smooth that I didn't know about it :^)
<jtojnar>
jD91mZM2: hmm, I do not see any video in GNOME Terminal or xterm, but hear the sound
<jethroksy>
jD91mZM2: haha my configuration ain't so complex so it's all good
<MichaelRaskin>
I just build from master checkout, I don't care anymore
<jD91mZM2>
jtojnar: Some encodings don't work completely in gstreamer
<jD91mZM2>
jtojnar: Try some other video file, or
<jD91mZM2>
for example webm*
<jethroksy>
would that lose the benefits of the binary caches though?
<zybell>
.profile only login shells: .profiles purpose is to set env vars for the *session*! DM starts a session->DM sets env! Why not all shells? *In* the session you should be able to change env vars and the shell should not mess with it. Simple, right?
LysergicDreams has quit [Ping timeout: 264 seconds]
wchresta_ has joined #nixos
Neo-- has quit [Ping timeout: 276 seconds]
rosa has joined #nixos
ertes has joined #nixos
<jD91mZM2>
zybell: Although, if you change an env in the session it doesn't update until you relog
civodul has joined #nixos
<zybell>
it works if you *change* it. It doesnt work if you write the change to .profile.
agile has quit [Ping timeout: 240 seconds]
<jD91mZM2>
I don't see why the shell messes with environment variables in any different way by sourcing .profile on startup
agile has joined #nixos
thc202 has quit [Ping timeout: 240 seconds]
<zybell>
?
<zybell>
parser error
<zybell>
at: different
leat has joined #nixos
<zybell>
from clause missing
wchresta_ has quit [Ping timeout: 276 seconds]
jD91mZM2 has quit [Ping timeout: 264 seconds]
freeman42x]NixOS has joined #nixos
jD91mZM2 has joined #nixos
cnu- has quit [Ping timeout: 256 seconds]
acarrico has quit [Ping timeout: 240 seconds]
s33se has joined #nixos
Fare has quit [Ping timeout: 240 seconds]
blankhart has joined #nixos
acarrico has joined #nixos
cnu- has joined #nixos
wangoe has quit [Ping timeout: 260 seconds]
seanparsons has quit [Quit: ZNC 1.6.5 - http://znc.in]
<xjdorn>
Trying to install a printer driver into cups, however the driver relies on a filter. I am trying to figure out how I can add the filter to the specific nix-store directory. I've attempted to RTFM, but I'm not really finding what I need. Any help would be appreciated
<xjdorn>
specifically, cups is complaining "Idle - "File "/nix/store/ia9dc0m6sifrwp4sqrcqnzanrlgg5vvx-cups-progs/lib/cups/filter/pt2500Filter" not available: No such file or directory""
zielmicha_ has quit []
rosa has quit [Quit: rosa]
<jD91mZM2>
What's your configuration? xjdorn
zielmicha_ has joined #nixos
<xjdorn>
hi jD91mZM2, could you be more specific? nixos configuration.nix?
<jD91mZM2>
xjdorn: Anything related to printing
wangoe has joined #nixos
<jD91mZM2>
It's easier if we know what you have tried and not tried
leat has quit [Ping timeout: 260 seconds]
<xjdorn>
I have the following in the nixos/configuration.nix
<xjdorn>
jtojnar: Thanks. I appreciate the feedback. Is there a diferent way to move a file to this destination?
<jtojnar>
usually, you would set something in your configuration.nix
seanparsons has quit [Client Quit]
maingo has joined #nixos
<jtojnar>
looking, have not really set up printing either
Fare has joined #nixos
seanparsons has joined #nixos
<xjdorn>
jtojnar: This specific printer does not have a package to install. I ripped the PPD file from the debian package, and the CUPS web interface allowed me to attach said file. The file references a filter, which I cannot add via the web interface.
asuryawanshi has quit [Remote host closed the connection]
tertle||eltret has joined #nixos
asuryawanshi has joined #nixos
<jtojnar>
xjdorn, usually you would create the package
<xjdorn>
jtojnar: I'll probably need to dive into creating packages. I'm not a developer, but do understand the overall concept.
<ambro718>
so not finished, thanks, I'll see if I can get it working
Ariakenom has joined #nixos
<jD91mZM2>
Is it sane to use both home-manager and vim-plug? The vimPlugins NixOS module simply isn't for me, but I do like having my config linked in place automatically.
<jtojnar>
ambro718: if you need help, feel free to ping me
<ambro718>
right, not sure when I will mess with it, I need to be a bit more annoyed by Plasma :) Maybe in a few days...
<ambro718>
thanks
mkoenig has quit [Remote host closed the connection]
<jcrben>
Well, the propagation explanation is tough for me: "The dependency is propagated when it forces some of its other-transitive (non-immediate) downstream dependencies to also take it on as an immediate dependency"
xcmw has quit [Client Quit]
Xal has joined #nixos
<jcrben>
The word 'it' is overused there
xcmw has joined #nixos
mmlb has quit [Ping timeout: 240 seconds]
xcmw has quit [Client Quit]
<octe>
tilpner, usb tethering worked great on an installed system!
<tilpner>
Oh, good to know
xcmw has joined #nixos
monad_cat has quit []
seanparsons has quit [Read error: Connection reset by peer]
<jD91mZM2>
It's actually the only thing that actually finally made me sort of understand what it means
<jcrben>
"that is, the dependencies listed here are added to the buildInputs of any package that uses this package as a dependency. So if package Y has propagatedBuildInputs = [X], and package Z has buildInputs = [Y], then package X will appear in Z’s build environment automatically" - was this definition removed due to being incorrect in a tricky way?
jml has quit []
Sonarpulse has quit [Ping timeout: 255 seconds]
<jtojnar>
the explanation using natural deduction has to suffice to everybody /s
jml has joined #nixos
leothrix has joined #nixos
leat has joined #nixos
<jtojnar>
jcrben: it was less precise wrt cross compilation
periklis has joined #nixos
<jcrben>
jtoknar I'm inclined to make a PR adding it back with that caveat. Also I really think the math formula belongs in an appendix or advanced guide
<nh2[m]>
aszlig: hey, I'm implementing a custom partitioning mode for Hetzner nixops where the user can give a custom script for partitioning. Do you have a moment for a question?
<aszlig>
nh2[m]: sure
<clever>
nh2[m]: have you seen my justdoit script?
<tmplt>
I'm rerunning a lot of compilations trying to make a package build correctly. Is it possible to use ccache when building derivations?
xcmw has joined #nixos
<clever>
ccache would be an impurity, nixpkgs needs a fairly heavy redesign to cache .o files properly in a pure manner
<clever>
nh2[m]: that handles automated partitioning, formatting, and installing
<nh2[m]>
clever: it has some opinions on how to format though, right? I'm trying to make a quite specific setup (ext4 with external journal, with both of them being on RAID)
<clever>
nh2[m]: currently, it only supports zfs, but it could be augmented to also support ext4
<clever>
just needs an if around line 94-104
<nh2[m]>
clever: have a look what I write below, maybe you can chime in your thoughts:
sydney has joined #nixos
<nh2[m]>
aszlig: so the Kickstart script cannot do my custom partitioning setup. So I'm now trying to add `deployment.hetzner.partitioningScript` that can be given as an alternative to `deployment.hetzner.partitions`. With that, the user can run arbitrary commands in the rescue mode, and then has to manually say what `fileSystems` should be
<sydney>
hiho, could it be that nix-env -qaP doesn't show all downloadable packages? For example, it doesn't show geogebra. And proprietary packages, of course
<aszlig>
nh2[m]: yeah, good idea, even for the new nixpart version
<nh2[m]>
Can you tell me what mounting that does? Because I will have to do that manually, can't get it from blivet (because I'm not running blivet)
<aszlig>
nh2[m]: the mounting is done by blivet, which infers the mount points from the given device tree
<nh2[m]>
aszlig: do you know if I could do the mounting manually? I suppose it mounts the `/` from the kickstart config somewhere and then lets the nixos installer run / chroot against that
<clever>
nh2[m]: i'm not sure how it would interact with the rescue system, but an extreme option you could do, is to just upload the kexec tarball, and run it with something a bit higher level then deployment.hetzner.partitioningScript
<clever>
nh2[m]: and that tarball, once ran, would do the entire install, and leave you with root ssh to nixos
stephenjudkins has quit [Remote host closed the connection]
<jD91mZM2>
How do you read an environment variable in nix?
<jD91mZM2>
Or, more specifically, $HOME?
<clever>
nix-repl> builtins.getEnv "HOME"
<clever>
"/home/clever"
<aszlig>
nh2[m]: well, those mounts then either need to be included in the partitionScript or can alternatively be inferred from fileSystems/swapDevices if that exists already
<jD91mZM2>
clever: Thanks!
<tmplt>
A derivation I wrote depended on derivation A and B. B also depended on A, but did not have A in its propagatedBuildInputs. As a result, when using `${A}/include` in the top-most derivation, ${A} appeared to be undefined. Is this expected behavior?
<nh2[m]>
aszlig: it's fine if the user using partitioningScript has to specify what devices to mount, but I need to know *where* to mount them I think
<aszlig>
nh2[m]: in /mnt
<clever>
nh2[m]: something else ive thought about before, what if we had a way to do: fileSystems = { "/" = { fsType = "ext4"; device = "LABEL=nixosroot"; nixpart.size = "remaining"; }; "/boot" = { fsType = "ext4"; device = "LABEL=nixosboot"; nixpart.size = "200m"; }; };
<clever>
nh2[m]: then a script can extract the labels, types, and sizes, create them, and nixos will already know the labels and where to mount
lll_ has joined #nixos
<tilpner>
clever - How would that determine partition order?
<tilpner>
(If you had three of them)
<clever>
tmplt: all of the buildInput values come into play at bash time, not nix time, so you still need to pass the value in at the nix level
<clever>
tilpner: and also require that the size="remaining" one be last in priority
<clever>
so it can eat whatever is left
<lll_>
I can't upgrade from 17.09 to 18.03 or 18.04, it says it can't install nvidia stuff. What can I do? Help!
<tilpner>
clever - That would be restrictive. There would be no way to do "all the space | 200m"
<lll_>
I already tried to set channel to 18.03 and 18.04
<nh2[m]>
clever: so what you're suggesting is that it would be nice if we could specify partitions in Nix instead as e.g. an Anaconda Kickstart string, is that right?
<hydraz>
Have locales been broken for anyone else on nixos-unstable?
<clever>
nh2[m]: yeah
<clever>
nh2[m]: and then have a derivation that can read the nix, and generate whatever you need, like an Anaconda Kickstart
<clever>
tilpner: i also try to avoid doing things like /boot after /, because then you can never resize the / partition
<nh2[m]>
clever: yeah I think that would cover many use cases. Not my current one though, because Anaconda has no primitive for external journals (or mke2fs invocations in general)
<tilpner>
You can shrink it, no?
jD91mZM2 has quit [Quit: WeeChat 2.0]
<aszlig>
nh2[m]: that's only relevant if you're not installing the machine, but basically you also need to make sure that the mounted partitions are in the physical spec of the machine (like eg. using nixos-generate-config)
<tilpner>
(Yes, you meant enlargement... I know)
<clever>
tilpner: i would have to either a: move /boot to the end of the bigger drive, and then resize the / before it
<clever>
tilpner: or b: delete /boot, shift / 200mb forwards (ouch!), make a new /boot at the start, then expand /
<clever>
nh2[m]: if your not limited to Anaconda, you can just pick another tool, and have nix generate its config, or just have nix generate a script that partitions things directly
<aszlig>
clever/nh2[m]: regarding specifying partitions in nix directly... this is what's the goal of the nixpart branch
blankhart has quit [Ping timeout: 260 seconds]
<clever>
ive also recently been experimenting with nix-bundle, and getting it to work as root
smichel has quit [Quit: smichel]
<clever>
currently, it starts a new user namespace, and that drops all capabilities, so even when ran as root, and having uid0 in the namespace, you cant mount anything or kexec
<nh2[m]>
clever: aszlig by the way, you should totally try out the external journal thing, it's awesome. You get the speed and IOPS of SSDs with the size of spinning disks
<clever>
ive got a fork where it just doesnt create a user namespace for root
<johnw>
does anyone know how to patch a Ruby gem that's being installed by travis CLI? The dependency it's using gets included by gemdir = ./.;, so I'm not sure how to inject the changes
<nh2[m]>
clever: yes
<clever>
nh2[m]: zfs can already do that by setting the log device to an ssd
<drakonis>
ah, nix assimilate will be available soon?
<aszlig>
nh2[m]: ... if you use ext4?
<aszlig>
drakonis: soon[TM] X-D
<drakonis>
valve time
s33se has quit [Quit: s33se]
<aszlig>
drakonis: first need to get the nixpart stuff ready
<nh2[m]>
clever: yeah I've read about that, but I haven't used zfs much yet and don't know yet how it fails
vaninwagen has joined #nixos
<aszlig>
drakonis: "3d realms" time X-D
<clever>
nh2[m]: ive never had it fail on me
<nh2[m]>
aszlig: yes, for ext4
iqubic has joined #nixos
<aszlig>
nh2[m]: i'm not running ext4 on any machine
<drakonis>
valve at least delivers the goods
<clever>
nh2[m]: and ive only seen one other nixos user having it fail, and he was having an NVME drive fail with unreadable sectors, and he had zero redundancy in his array config
<aszlig>
drakonis: duke nukem forever did release at some point, too :-D
<aszlig>
drakonis: but anyway, that's not what i'm aiming for =)
<aszlig>
nh2[m]: oh, wait a second... i do actually... for the hydra build slaves
<aszlig>
nh2[m]: they're running mdraid0 with ext4
<nh2[m]>
aszlig: do you also use zfs?
<aszlig>
nh2[m]: so i'm not sure whether an external journal would make sense there
raynold has joined #nixos
<aszlig>
nh2[m]: on one machine only
<aszlig>
others use either xfs or btrfs, depending on the workload
<nh2[m]>
clever: I'm a bit scared of using ZFSoL in production because every couple months I see some quite severe bugs discussed on their Github (but maybe it's the same for ext4 and I just don't have as much visibility into their bugs)
<clever>
nh2[m]: i use zfs on my NAS, laptops(2 of them), and my primary desktop
aarvar has joined #nixos
<clever>
nh2[m]: i also have statsd utils that can monitor zfs and iostat, and confirm if something like an L2 cache or a log device are doing anything useful
<nh2[m]>
aszlig: what motivated me was that I'm using consul/etcd which run fdatasync() in a tight loop (that's what they have to do). On a spinning disk that totally thrashes seeks and everything becomes slow. A RAID0 would possibly cut that thrashing by 2 but putting an SSD in makes those access times 100x faster
wchresta_ has joined #nixos
<aszlig>
nh2[m]: i'm speaking about NVMe with raid0, so no spinning disks involved
griff_ has joined #nixos
<aszlig>
nh2[m]: i mean, they're build nodes... so i don't care about data loss
<nh2[m]>
aszlig: ah I see, then it's irrelevant. I have to use spinning disks because I have a lot of data and the SSDs would be too expensive
<nh2[m]>
aszlig: yeah that makes sense
<nh2[m]>
clever: in case you have some time, would you care to make a benchmark with/without ZFS log being on an SSD and main being on a spinning disk? I would love to compare it to ext4
<nh2[m]>
I'm using this to measure small writes latency for the fsync() simulation: `dd if=/dev/zero of=mnt/testfile bs=1 count=100 oflag=dsync`
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #40040 → gnu-config: Update, allowing hacks to be removed → https://git.io/vprXB
<nh2[m]>
and a 10 GB write to test throughput
wangoe has joined #nixos
<nh2[m]>
on the spinning disk the small write takes 0.03 s, with external journal it takes 3 s
<clever>
nh2[m]: not sure i have any sizeable spinning rust disks that are unused
sucaml has quit [Quit: WeeChat 0.4.3]
<nh2[m]>
clever: no worries then, I can also do the zfs test if I get a bit of time
<clever>
nh2[m]: zfs is also a lot more flexible, you can add and remove the log device without reformating the system
<clever>
nh2[m]: so you can just take out the log device and see how much worse things get
periklis has quit [Ping timeout: 276 seconds]
<nh2[m]>
clever: ext4 can do that too, but yes, I like zfs's flexibility in general
bitchecker has joined #nixos
<johnw>
I need to override a file in the travis-1.8.8 gem, but can't seem to find the override incantation via google...
Sonarpulse has quit [Ping timeout: 240 seconds]
lll_ has quit [Quit: leaving]
blankhart has joined #nixos
<iqubic>
Well, I had a reason to use my ZFS snapshots today.
<iqubic>
I accidentally wiped out my home directory today.
<{^_^}>
[nixpkgs] @samueldr opened pull request #40042 → input-utils: init at 1.3 → https://git.io/vprXh
<iqubic>
What flag do I need to set to get 15min snapshots?
<clever>
services.zfs.autoSnapshot.enable = true; and zfs set com.sun:auto-snapshot=true poolname
<clever>
then it does all of them
<iqubic>
Oh, that's cool.
<clever>
id also recomend doing zfs set com.sun:auto-snapshot=false poolname/nix
<iqubic>
I just went in a enabled each time manually.
<clever>
otherwise, it keeps backups of everything you try to garbage collect
<iqubic>
Is there a way to set all the zfs options back to the default settings?
<iqubic>
I've made a mess of this so far.
<clever>
`zfs inherit optionname dataset`
<clever>
that will inherit the value from its parent in the dataset tree
<iqubic>
Can I just do that for all the datasets at once?
<nh2[m]>
clever: fyi my friend and I put together a reasonably decent ceph service on nix service, can't wait to try it out on real hardware
<clever>
iqubic: not sure
<nh2[m]>
(I meant "nixos service")
<iqubic>
Also that inherit command didn't actually change the state of anything.
<clever>
iqubic: check `zfs get all dataset` as well
katona has joined #nixos
<clever>
[root@amd-nixos:~]# zfs get all amd/root
<clever>
NAME PROPERTY VALUE SOURCE
<clever>
amd/root dedup off inherited from amd
<clever>
amd/root compression gzip-9 local
<clever>
dedup is inherited from the amd level, while compression is set locally on amd/root
<clever>
so if you grep for 'local' you should see everything that has been set and can be undone with inherit, up to the root node
<iqubic>
I'd really just like to set all the "com.sun:auto-snapshot:<TIME FRAME HERE>" options to the default.
<iqubic>
Which I'm not sure I can do.
<clever>
*doh*, `zfs get all amd/root -s local` saves you the grep
<clever>
i'm not sure how to unset those non-standard options
<tmplt>
I have a collection of tarballs I want to fethurl and then unpack in the same way. Is there some convenient way of doing this?
<iqubic>
Oh, darn.
<tilpner>
tmplt - fetchTarball?
Mateon3 has joined #nixos
<clever>
tmplt: use mapAttrs or map to run a function over everything
Mateon1 has quit [Ping timeout: 264 seconds]
Mateon3 is now known as Mateon1
<iqubic>
Well, I just went ahead and set them all to false. And then set the top level "com.sun:auto-snapshot" to ture.
<iqubic>
s/ture/true/
<tmplt>
clever: I'll look into that, thanks
<clever>
iqubic: i think that might disable all timeframes
blahdodo has quit [Quit: Bye bye]
<clever>
iqubic: man page claims `Use the zfs inherit command to clear a user property.`
<clever>
`If the property is not defined in any parent dataset, it is removed entirely.`
<iqubic>
You think the more specific properties override the more general ones?
<clever>
yeah
<iqubic>
Oh. So what should I do?
<clever>
run inherit on those param names
<clever>
inherit also has -r, to recursively apply it to all children
<iqubic>
Cool, I'll try that.
<nh2[m]>
aszlig: clever: I'm having another small problem: I want to make it so that if you use partitioningScript, you have to set `partitions = null`. But it seems if you set something null in nix, it completely disappears from `x = xml.find("attrs/attr[@name='hetzner']/attrs")`
<clever>
and save them for later, they help to diagnose low disk space issues
<balsoft[m]>
Guys, sorry to interrupt, but that's pretty important for me: this evening I couldn't update my system because some of nixos channel IP's were blocked by our f***ing censor, Roskomnadzor. Is there any way to run system updates through tor?
<iqubic>
Is that the dataset for the root of the filesystem?
<clever>
iqubic: yeah
<clever>
iqubic: replace that with a dataset whose snapshots your wanting to list
<iqubic>
I see. Thanks for the information.
chisui has joined #nixos
<MichaelRaskin>
balsoft: you might need to specify --fallback to build even if the binary cache is unreachable
<ambro718>
jtojnar: nice, thanks, I'll try it out now
<{^_^}>
[nixpkgs] @jfrankenau opened pull request #40044 → lynx: enable IPv6 and update → https://git.io/vprM8
<ambro718>
jtojnar: this is on top of what?
<balsoft[m]>
MichaelRaskin: thanks for the tip, could you expand the explanation a bit? Googling didn't get me immedeate results.
<jtojnar>
ambro718: just gnome-flashback-metacity
<iqubic>
The largest snapshot I have is a 4G snapshot of my home directory.
<jtojnar>
ambro718: we do not have compiz packaged
<ambro718>
jtojnar: is compiz necessary
<MichaelRaskin>
balsoft: install the package badvpn
<balsoft[m]>
`It is hard, but not impossible, to use tun2socks with Tor on a single host without a virtual machine, since the OS would have to route tun2socks outgoing connections differently from other programs. This can be achieved using policy routing, but this guide does not provide any more information.` - from the manual
<balsoft[m]>
MichaelRaskin: done
<jtojnar>
ambro718: I think it is dead
<iqubic>
Clever: Thank you for helping me with zfs snapshots.
sydney has quit [Quit: Leaving]
<balsoft[m]>
oh wait, no
<balsoft[m]>
it hung....
<MichaelRaskin>
Hm
<iqubic>
I know have all levels of snapshots going.
<MichaelRaskin>
It should hang, in a sense
<MichaelRaskin>
Does ip a show you an extra interface?
<balsoft[m]>
hydra seems to be banned as well....
<iqubic>
Clever: For some reason I accidentally got a single snapshot of /nix.
<ambro718>
balsoft[m]: btw, I'm the author of tun2socks :)
<iqubic>
Is there a way to delete that snapshot?
<MichaelRaskin>
Well, banning parts of both Cloudfront and Cloudflare has happenned even before the Telegram circus
<balsoft[m]>
I mean binary cache
<clever>
iqubic: run zfs destroy on the full name including the timestamp
<MichaelRaskin>
badvpn is a small build, you should be able to install with --option binary-caches ''
<aszlig>
nh2[m]: that's fine too, the Hetzner backend was written back then where there was no config argument, so it's a good idea to switch to it
<balsoft[m]>
Build in progress
<nh2[m]>
aszlig: OK great, I'll do that
<aszlig>
nh2[m]: thanks a lot
knupfer has quit [Remote host closed the connection]
<balsoft[m]>
at least Github is working :)
<iqubic>
I wanted to destroy that, because any /nix snapshots would be redundant, and make garbage collection useless. Also, because that wuld be the only /nix snapshot I have, it would just stay around.
<iqubic>
And now I have to do.
<nh2[m]>
aszlig: well thank you really for all the previous work, it saved me so much time
<MichaelRaskin>
balsoft: the idea is that you add routes just for specific addresses or subnets that you know are banned and actually needed to you
<clever>
MichaelRaskin: russia has banned a fairly massive chunk of the internet
<balsoft[m]>
MichaelRaskin: Thanks a lot for your help, but now it seems OK again. I just tried the system upgrade again and it seemed to download the channels and now it's downloading stuff from binary caches. Thanks again, sry for false panic.
<ambro718>
balsoft[m]: MichaelRaskin is right, with tun2socks you just need routes for specific hosts or address ranges to go through the tun, no policy routing
<MichaelRaskin>
This way the Tor connections are untouched, and the things that are not blocked remain at the native speed, but you get access to the things needed
<balsoft[m]>
But I steel would like to set up tor for system upgrades.
<MichaelRaskin>
clever: want to go to -chat to discuss how a message in Morse code is being written on the DNS-ban statistics plot?
<balsoft[m]>
ambro718: thank you, I will try that tommorow :)
<MichaelRaskin>
balsoft: well, even after unblocking of the largest AWS chunk there is a lot of mindless splash damage in the remaining 14 000 000 addresses
<MichaelRaskin>
You can always train on routing web.telegram.org
<ambro718>
there could only be a circular forwarding issue if one of the IPs you route through the tun happens to be a tor entry point that you use, which seems very unlikely
<balsoft[m]>
MichaelRaskin: what? haven't heard of that
<balsoft[m]>
I mean what morse code?
<MichaelRaskin>
Join #nixos-chat
<clever>
ambro718: openvpn and android vpn's get around the issue by specially routing the ip of the vpn server to not go thru the vpn, and relying on the server having 1 ip
<MichaelRaskin>
Handcrafted routing rules are fun
<ambro718>
clever: right. With tor the issue is that the IPs that tor connects to are not predictable.
<clever>
ambro718: yeah, one option is to have a second network namespace (either a vm, namespace, or 2nd machine), that acts as a gateway
<ambro718>
if you wanted to fix it reliably you'd need to make tor modify the routing table for each host it uses (policy routing may be aanother solution)
<MichaelRaskin>
(I think on matrix it should be #freenode_#nixos-chat:matrix.org)
johnw has quit [Ping timeout: 240 seconds]
<clever>
ambro718: it would only force tor on things coming into a given interface, and not force tor on itself
<MichaelRaskin>
Well, in Russia between 0.1% and 0.5% of address space is blocked
<ambro718>
clever: problem with policy routing (and network namespace) is that is is very hard to use, since you basically need to reproduce the correct routing table by hand.
stephenjudkins has joined #nixos
<iqubic>
So I'm wondering if there is any way to get nixos to automatically clone the latest version of a github repo for me.
<MichaelRaskin>
And most of the unintended damage is in large blocks
<infinisil>
iqubic: My recommendation for periodically updating something on nixos is to create a systemd service/timer that periodically uses `nix-prefetch-git` to fetch the latest version and output it to a json file, then import that json file from your nixos config. Enable autoUpgrade to rebuild it automatically also
<MichaelRaskin>
So it is easier to just add target-specific overrides via Tor for this usecase
<clever>
ambro718: my rough idea, is what if i make a 2nd computer, with 2 interfaces, that will only apply the tor routing to packets coming in on eth1, and eth0 is the wan
<ambro718>
clever: not sure, I don't have the complete picture of what you are doing
<heatm1s3r>
I cannot update a new user (created in configuration.nix via users.extraUsers...) password with `passwd` after a fresh nixos-install. After reboot I can login to this new user remotely via ssh but executing `passwd` asks me for a current password that shouldn't exist. I try to loging to `root` with the password set after `nixos-install` on both the GUI and over ssh but it does not work. Any ideas on next troubleshooting
<heatm1s3r>
steps? Thanks for any help.
<iqubic>
and what do I do with that timer? Where do I put that?
<ambro718>
clever: but I think that yes if you have a router you own between you and the WAN, that can be done
<infinisil>
iqubic: in your configuration.nix: `imports = [ ./timer.nix ]`
<iqubic>
All I really want is a script that runs once at boot up, checks if there is a new version of either EXWM or XELB and clones that in to the right spot.
<iqubic>
I don't think I need a timer for that, do I?
<clever>
ambro718: and in theory, you could maybe create such a router with virtualbox, or network namespacing in linux
<iqubic>
With EXWM and XELB being two separate github repos.
muzzy has quit [Ping timeout: 240 seconds]
muzzy__ has quit [Ping timeout: 256 seconds]
muzzy_ has quit [Ping timeout: 256 seconds]
<ambro718>
clever: Of course you could. But you'd have to give control of your NIC to that guest OS or whatever kind of thing it is, and your "main" system would only see the virtual interface to it.
kriztw has quit [Ping timeout: 256 seconds]
<iqubic>
But I really do have to go now, sorry about that.
<clever>
ambro718: yep
<ambro718>
clever: so say goodbye to wireless connection GUI etc
<ambro718>
(unless you have a GUI in that VM)
<clever>
ambro718: you could potentially access the wpa_supplicant unix socket between namespaces
<ambro718>
right, but that doesn't get the networkmanager gui working for example
kriztw has joined #nixos
<ambro718>
you could run networkmanager in a separate namespace?
<ambro718>
huh that might just work
<ambro718>
I mean network namespace
balsoft has quit [Quit: balsoft]
<iqubic>
Anyone have advice for my github cloning issue?
codygman has joined #nixos
<codygman>
Hi all, I'm having a problem after updating to nix 2. I'm getting "package has an unfree license, refusing to evaluate" even though ~/.config/nixpkgs/config.nix contains "allowUnfree = true;".
zybell has joined #nixos
<ambro718>
clever: do you know what that tor-router thing is doing? I hope they're not using tun2socks, I don't feel very comfortable with all the lwip bugs being found and fixed, and me updating it not more than once a year...
<iqubic>
infinisil: How might nix-git-prefetch help me in my issue?
<tmplt>
codygman: if you're getting this error when installing system-wide packages I believe the flag must be set in /etc/nixos/configuration.nix
<infinisil>
iqubic: have you looked at its output?
<iqubic>
No.
<iqubic>
I'm not even sure how to use the command.
seanparsons has quit [Read error: Connection reset by peer]
<iqubic>
infinisil: I feel like a systemd timer is overkill for something that I just want to run once per boot.
blahdodo has joined #nixos
<infinisil>
Yeah, you can just trigger the service on bootup instead by adding `wantedBy = [ "multi-user.target" ]`
<infinisil>
But otherwise I'd still recommend nix-prefetch-git
<iqubic>
huh. I have no idea how to do this.
<infinisil>
Just look up the options..
<iqubic>
One thing at a time: How does nix-prefetch-git work?
Wharncliffe has quit [Ping timeout: 240 seconds]
<infinisil>
Have you tried to run it?
<iqubic>
I ran the command and I am presented with a list of options.
balsoft has joined #nixos
<iqubic>
I suppose I need to give --out and --url flags.
<iqubic>
Anything else?
<infinisil>
just pass it a single argument of the git repo you are interested it
<infinisil>
Because nix works best without a random path for a checkout
<iqubic>
No. I don't want to build this at all. I literally just want to clone the repo.
<iqubic>
Sorry I wasn't very clear.
<iqubic>
I literally just want to have the repo cloned, if there is a new version.
<infinisil>
Oh, well then just run a git command in the service
<iqubic>
Yeah, I will.
<codygman>
tmplt: I'm getting the error with a very simple haskell project that has a default.nix and a shell.nix. I can no longer build the haskell project.
<iqubic>
Question is, how do I get it to only run once?
stephenjudkins has quit [Remote host closed the connection]
stephenjudkins has joined #nixos
<zybell>
clever:but key can be a string "" too?
<clever>
zybell: yeah
<clever>
> { "key.with/funnychars" = "value"; }
<{^_^}>
{ "key.with/funnychars" = "value"; }
<zybell>
I wanted to see if '' works
<clever>
> { ''key.with/funnychar'' = "value"; }
<{^_^}>
[31;1merror:[0m syntax error, unexpected IND_STRING_OPEN, at [1m(string)[0m:8:13
<clever>
ah, it doesnt
<infinisil>
I didn't actually know that
<ambro718>
clever: seems like that uses iptables redirect. I guess tor does some magic to figure out the original destination of connections before they were redirected to tor listening socket.
<tilpner>
> { ${"foo" + "bar"} = 42; }
<{^_^}>
{ foobar = 42; }
<tilpner>
Key can be computed too
<clever>
ambro718: ah, yeah, using iptables, you can force the browser to connect to the "wrong" ip
<clever>
ambro718: tor can then use the Host: header and SSL SNI to figure out what host to connect to
<clever>
ambro718: transparent proxies do that all the time
<ambro718>
ah so they hack it like that. It's protocol specific though.
<clever>
yeah, it only works on http and https
<zybell>
> { ${''foo'' + "bar"} = 42; }
<{^_^}>
{ foobar = 42; }
<clever>
> let foo = "bar"; in { ${foo} = 42; }
<{^_^}>
{ bar = 42; }
dbe_ has joined #nixos
<zybell>
> { ${''foo'' } = 42; }
<{^_^}>
{ foo = 42; }
<{^_^}>
[nixpkgs] @matthewbauer pushed to staging « treewide: cleanup phases from last commit »: https://git.io/vprSL
Tehnix has quit [Remote host closed the connection]
<tilpner>
> let self = { ${self.foo} = 42; foo = "bar"; }; in self
<{^_^}>
{ bar = 42; foo = "bar"; }
Tehnix has joined #nixos
sir_guy_carleton has quit [Quit: Leaving]
<infinisil>
Heh nice
<infinisil>
Fancy exprs
fendor has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @matthewbauer pushed to staging « Revert "gettext: add dev output" »: https://git.io/vprSB
aither has quit [Ping timeout: 240 seconds]
sir_guy_carleton has joined #nixos
aither has joined #nixos
olto has quit [Ping timeout: 240 seconds]
griff__ has joined #nixos
<makefu>
> > builtins.getEnv "NIX_PATH"
<{^_^}>
[31;1merror:[0m syntax error, unexpected '>', at [1m(string)[0m:8:11
<makefu>
> builtins.getEnv "NIX_PATH"
<{^_^}>
""
griff_ has quit [Read error: Connection reset by peer]
<makefu>
> builtins.getEnv "HOME"
<{^_^}>
""
toppler has quit [Remote host closed the connection]
toppler has joined #nixos
toby1851 has joined #nixos
toby1851 has quit [Client Quit]
<simpson>
> ./.
<{^_^}>
/
<tilpner>
simpson, makefu - #bottest if you want to try to break it
<makefu>
on my way!
<simpson>
tilpner: Thanks. I was just curious, mostly.
dbe_ has quit [Ping timeout: 240 seconds]
griff__ is now known as griff_
simukis has quit [Remote host closed the connection]
<mkaito>
anyone's got a working nix highlightger/indenter for kakoune?
<sir_guy_carleton>
does anybody know to use services.xserver.xrandrHeads to configure monitors?
<sir_guy_carleton>
i've want to set a higher resolution for a monitor of mine
<sir_guy_carleton>
i can do it manually with xrandr commands.
<sir_guy_carleton>
but the system doesn't save it
stephenjudkins has quit [Remote host closed the connection]
stephenjudkins has joined #nixos
<sir_guy_carleton>
so i want to set in configuration.nix with the aforementioned option, but the example in the documentation doesn't make it all that clear
<{^_^}>
[nixpkgs] @rycee opened pull request #40050 → dunst: add wrapper to find librsvg → https://git.io/vprQO
<taktoa>
err, minimal _nonworking_ example
hiratara has quit [Ping timeout: 265 seconds]
barrucad1 has joined #nixos
Willi_Butz has joined #nixos
<taktoa>
clever solves it again: need to use `runhaskell Setup.hs configure` instead of `cabal configure`
barrucadu has quit [Disconnected by services]
barrucad1 is now known as barrucadu
hiratara has joined #nixos
griff_ has quit [*.net *.split]
b has quit [*.net *.split]
Mateon1 has quit [*.net *.split]
xcmw has quit [*.net *.split]
Fare has quit [*.net *.split]
endformationage has quit [*.net *.split]
jrolfs has quit [*.net *.split]
monotux has quit [*.net *.split]
averell has quit [*.net *.split]
jedai42 has quit [*.net *.split]
globin has quit [*.net *.split]
jmiven has quit [*.net *.split]
anderslundstedt has quit [*.net *.split]
ijsicle has quit [*.net *.split]
mkaito_ has quit [*.net *.split]
WilliButz has quit [*.net *.split]
zemm has quit [*.net *.split]
d6e has quit [*.net *.split]
hyper_ch has quit [*.net *.split]
stammon has quit [*.net *.split]
tkral has quit [*.net *.split]
page has quit [*.net *.split]
ent has quit [*.net *.split]
Aleksejs has quit [*.net *.split]
orbekk has quit [*.net *.split]
andromeda-galaxy has quit [*.net *.split]
shachaf has quit [*.net *.split]
lsyoyom has quit [*.net *.split]
hyper_ch_ has joined #nixos
hyper_ch_ has quit [Changing host]
hyper_ch_ has joined #nixos
srhb has joined #nixos
zemm has joined #nixos
griff_ has joined #nixos
b has joined #nixos
ijsicle has joined #nixos
xcmw has joined #nixos
jmiven has joined #nixos
mkaito_ has joined #nixos
Fare has joined #nixos
d6e has joined #nixos
stammon has joined #nixos
jedai42 has joined #nixos
globin has joined #nixos
anderslundstedt has joined #nixos
jrolfs has joined #nixos
monotux has joined #nixos
Mateon1 has joined #nixos
endformationage has joined #nixos
averell has joined #nixos
Aleksejs has joined #nixos
page has joined #nixos
andromeda-galaxy has joined #nixos
ent has joined #nixos
orbekk has joined #nixos
hyper_ch_ is now known as hyper_ch
xcmw has quit [Max SendQ exceeded]
b has quit [Max SendQ exceeded]
shachaf_ is now known as shachaf
b has joined #nixos
knupfer has quit [Remote host closed the connection]
xcmw has joined #nixos
Mateon3 has joined #nixos
concatime has joined #nixos
<concatime>
Hi there. Dis someone managed to get Android Emulator working on NixOS? When using android-studio-preview, I get `KVM is required to run this AVD. Unknown Error`.
<clever>
2018-05-06 19:19:41 < {^_^}> Don't install libraries through nix-env or systemPackages. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<clever>
nix-env wont install headers
<akkad>
ok thanjks
akkad has left #nixos ["ERC (IRC client for Emacs 25.2.50.1)"]
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos
katona has quit [Quit: Connection closed for inactivity]
<elvishjerricco>
Seems to be a pinentry problem. If I run `gpg-connect-agent updatestartuptty /bye` manually, it fixes it
rosa has joined #nixos
<clever>
elvishjerricco: i have `gpg-connect-agent /bye` in my `.xsession`
<clever>
and the gpg service in nixos is disabled
<elvishjerricco>
clever: Oh so you don't use `programs.gnupg.agent`?
<clever>
that auto-runs a similar command every time you login over ssh
<clever>
to the pinentry runs on a random ssh session, and pops up on the wrong pc
<elvishjerricco>
clever: Why doesn't it just prompt the tty that's asking?
<clever>
elvishjerricco: dont know
<elvishjerricco>
clever: Ok. So as it stands, you can't really use gpg-agent instead of ssh-agent if you want to have more than one login session?
<clever>
yeah, ive configured it to always ask on :0 of xorg
<clever>
so the only anoyance is when i ssh into the laptop i left upstairs, and it asks in another room
<elvishjerricco>
clever: That's unfortunate. Seems like a dealbreaker to me.
<clever>
i also have synergy configured, and i treat the laptop like an extra monitor for the desktop
rosa has quit [Quit: rosa]
<clever>
so it mostly just acts like a 4 monitor setup, and gpg asks on one of 2 monitors
<clever>
depending on which host the cmd ran on
<clever>
changing the expire timeout also helps
Fare has joined #nixos
sanscoeu_ has joined #nixos
sanscoeur has quit [Ping timeout: 264 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
ambro718 has quit [Quit: Konversation terminated!]
cryp2nomicon has joined #nixos
<cryp2nomicon>
why is my cgdb/gdb do not correspond to lines
<cryp2nomicon>
did a hello-world for-loop, and i cannot step debug because it did not correspond to lines
<clever>
cryp2nomicon: did you compile it with -Og ?
<elvishjerricco>
clever: Well I consider it somewhat important to be able to ssh into my machine and use ssh from that session, which doesn't sound like it will be possible
<clever>
elvishjerricco: if you instead use `ssh -A`, the local agent will be forwarded
<clever>
then it will cause the local gpg instance to ask
<clever>
though that doesnt work in my setup, because i use screen heavily
<elvishjerricco>
clever: Hm. That's an improvement... Still, probably better to just keep using ordinary ssh keys.
<cryp2nomicon>
clever: yes
<clever>
cryp2nomicon: gcc will often re-order things, so with smaller code blocks, it can be pretty unpredictable
<cryp2nomicon>
clever: not this one... i've been using cgdb/gdb before
<Dezgeg>
probably you still need this hardeningDisable=all on 18.03 so it doesn't get compiled with -O2
phdoerfler has joined #nixos
<cryp2nomicon>
Dezgeg: how do i find out?
<Dezgeg>
eexport that in your nix-shell
<Dezgeg>
or pass hardeningDisable = ["all"]; to mkDerivation
<cryp2nomicon>
env var?
<Dezgeg>
yes, env var in nix-shell
<{^_^}>
[nixpkgs] @jtojnar pushed to master « firefox-bin: use native notifications »: https://git.io/vprdK