<Henson>
hi everyone, I'm having difficulty figuring out how to disable scrolling emulation on my trackpoint pointer in NixOS. I've tried hardware.trackpoint.enable = true with hardware.trackpoint.emulateWheel = false to no effect. I've tried services.xserver.inputClassSections with settings copied from my old Ubuntu configuration that fixed this problem.
<durka>
Has anyone successfully set up an Android environment? I can't even get adb to work... I installed android-udev-rules, added myself to plugdev and adbusers, but adb still says no permissions
<Henson>
but despite the inputClassSections options appears in an xserver.conf derivation file that is built and is apparently rooted in the current system, I can't find the xserver.conf file anywhere in the actual system path and it doesn't appear to be having any effect
tv has quit [Ping timeout: 268 seconds]
lassulus has quit [Ping timeout: 268 seconds]
sigmundv_ has joined #nixos
ddellacosta has joined #nixos
samrose has quit [Ping timeout: 240 seconds]
samrose_ has joined #nixos
<durka>
Hmm... even though android-udev-rules is installed in configuration.nix, udev doesn't see its rules file
<durka>
this package is just a tease apparently...
<durka>
man... google really does not want people developing for android, huh
switchy has quit [Ping timeout: 246 seconds]
switchy has joined #nixos
ixxie has quit [Ping timeout: 240 seconds]
<durka>
is there a way to get nix to show download speed/progress while "copy path ... from cache.nixos.org"?
<vika_nezrimaya>
the new nix command does it
<vika_nezrimaya>
durka: `nix build -f '<nixpkgs>' hello` is the new `nix-build '<nixpkgs>' -A hello`
<durka>
oh? can I use that instead of nix-env / nixos-rebuild?
<vika_nezrimaya>
I use home-manager instead of nix-env, and both it and nixos-rebuild use the old commands sadly
<vika_nezrimaya>
but I think one could patch them to use new commands
<vika_nezrimaya>
wait a minute...
<durka>
yeah I was 100% sure I was about to get called a noob for using nix-env, haha
<vika_nezrimaya>
nix-env is good for quick ad-hoc stuff but ultimately I think it's not the spirit of NixOS
<vika_nezrimaya>
home-manager is a nice tool that actually wraps nix-env though
<durka>
I'm looking into home-manager yeah
<vika_nezrimaya>
it's really good, especially when you start writing your own modules (it's easy! if you can configure a program by hand, you can do it with HM)
liberiga has quit [Quit: Leaving]
<vika_nezrimaya>
btw `nix build -f '<nixpkgs/nixos>' system` would yield a system configuration that nixos-rebuild would build
<durka>
ok yeah, I've seen that on github as a workaround
<vika_nezrimaya>
you could then do `result/bin/switch-to-configuration switch` and it'll work
<durka>
so that command will show me the progress and then nixos-rebuild will be close to instant?
<vika_nezrimaya>
the only thing left is wrap it in a nice interface
<durka>
or I don't even run nixos-rebuild
<vika_nezrimaya>
durka: you could run nixos-rebuild! it'll see the closure in nix store and instantly (almost) switch to it
<vika_nezrimaya>
due to nature of Nix, you don't rebuild same stuff twice. Same input == same output, so Nix doesn't repeat useless work
<vika_nezrimaya>
that's why I <3 nix
lassulus has quit [Ping timeout: 268 seconds]
tv has quit [Ping timeout: 240 seconds]
<vika_nezrimaya>
as a developer, I can do quick rebuilds and equally quick deployments due to Nix caching my work
<vika_nezrimaya>
don't forget to do rm result afterwards, as it keeps a reference link to what you've built
<vika_nezrimaya>
you won't need it once the configuration is deployed
<vika_nezrimaya>
(it's there to prevent garbage collection in that little bit of time between activation and build process)
<durka>
yeah I discovered that initially, since I ran the command with cwd on a filesystem that didn't support links...
<durka>
can I make it put that under /tmp or something
<durka>
or I'm just going to put `rebuild() { cd /tmp; nix build -f '<nixpkgs/nixos>' system && sudo nixos-rebuild switch && rm result; }` in my bashrc
<vika_nezrimaya>
durka: you basically reinvented nixos-rebuild :3
<vika_nezrimaya>
it does the same thing mostly
<durka>
except I get the nice output
<vika_nezrimaya>
and the original has a bit more features such as remote building, remote activation and it also bootstraps the newest version of Nix from Nixpkgs in case the new configuration has some features that your version of Nix didn't get yet
<durka>
so the question is whether we want to upgrade nixos-* or just make a new `nixos` that is like better in the same way `nix` is better than `nix-build`
<durka>
if I've learned anything about sysadminning, anything can be solved by another layer of unifying wrapper scripts
<vika_nezrimaya>
There's a reason you shouldn't though. It'll be simpler to rewrite nixos-rebuild to be more modern than wrap it, as the duplication of functionality is not good
<clever>
2019-09-28 22:25:39 < durka> or I'm just going to put `rebuild() { cd /tmp; nix build -f '<nixpkgs/nixos>' system && sudo nixos-rebuild switch && rm result; }` in my bashrc
isHavvy has quit [Ping timeout: 265 seconds]
<clever>
both nix build, and nixos-rebuild are going to eval the nixos exprs
<clever>
and thats going to be a slow-down
<clever>
pathToConfig="$(nixBuild '<nixpkgs/nixos>' --no-out-link -A system "${extraBuildFlags[@]}")"
<clever>
nixos-rebuild will build it once with nix-build, then use nix-env to store it to a profile
<clever>
but you could also just: nix-env -f '<nixpkgs/nixos>' -A system --profile $profile --set
<vika_nezrimaya>
nix-env won't give you the pretty output tho
<durka>
this is 100% about me wanting colorful output
<vika_nezrimaya>
I bet I'll write the `nixos` unifying command with colorful output and all features of nixos-rebuild and probably nixos-container
<{^_^}>
[nixpkgs] @Ma27 pushed commit from @jonringer to release-19.09 « pythonPackage.datatable: 0.8.0 -> 0.9.0 »: https://git.io/JeZHj
<vika_nezrimaya>
everything good about nixos in a simple easily discoverable shell script
aveltras has quit [Quit: Connection closed for inactivity]
<durka>
speaking of discoverability, is there some common "beyond the basics" guide that picks up where the manual leaves off but suggests home-manager, direnv, etc
dycan has quit [Read error: Connection reset by peer]
tv has quit [Ping timeout: 265 seconds]
<drakonis>
its the same kind of benefits that you gain from using nix's hydra instance for serving packages
<drakonis>
someone else's covering the builds
o1lo01ol1o has quit [Ping timeout: 276 seconds]
<iqubic>
Is there a way I can write a shell.nix so that I can avoid typing 'nix-shell -A env' everytime? I know that the nix-shell command is reading my default.nix
<jD91mZM2>
Are there any good resources on nixos container? I'm trying to set up a container with its own networking stack, but doing it declaratively seems to require me to specify a public interface, which isn't desireable as I want it to work both when I'm on ethernet and when I'm on wi-fi.
<jluttine>
how can i set `setterm --blank 1` so that it'd be the global setting and effective even if nobody logs in? i tried `environment.extraInit` but that seems to be something that gets evaluated when a shell session is started.. :/
<jluttine>
i just want the screen to go blank in 1min (even) if i have a non-x tty login screen
<jD91mZM2>
jluttine: What about in programs.bash.interactiveShellInit (or that for whatever shell you're using)?
ilyagotfryd has quit [Ping timeout: 245 seconds]
<jluttine>
jD91mZM2: i don't want it to depend on any shell anyone's using. i want the screen to go blank if even nobody logs in. i think i can use `boot.kernelParams=["consoleblank=60"]`. i'll try that.
<jluttine>
jD91mZM2: oh, interesting! i've looking for something like that. :) let's see if that solves my problems with screensaving+screenlocking in x :)
<{^_^}>
[nixpkgs] @FRidh opened pull request #69994 → dbus: set datadir again → https://git.io/JeZFt
<{^_^}>
[nixpkgs] @FRidh closed pull request #69994 → dbus: set datadir again → https://git.io/JeZFt
tg has quit [Excess Flood]
<{^_^}>
[nixpkgs] @FRidh pushed commit from @worldofpeace to master « dbus: set datadir again »: https://git.io/JeZFq
tg has joined #nixos
<jluttine>
how to use mkBefore and mkAfter? i'm trying to add `security.sudo.extraRules` but they appear before the standard wheel-group rule, so they have no effect (#58276). i tried both mkBefore and mkAfter in my own rule, but it always goes before the standard wheel-group rule..
<{^_^}>
[nixpkgs] @FRidh pushed 3 commits to release-19.09: https://git.io/JeZFB
<jD91mZM2>
jluttine: Yeah seems like it. The way I see it (I've only just learned this recently though), mkBefore/mkAfter are used on the whole lists so the complex merging system knows in what order to concat the entire list
<Guest84>
Its kind of stupid. I want to read `/sys/class/dmi/id/product_version` and find out what computer I'm on and accordingly import subconfigs into `configuration.nix`
<Guest84>
So a single git repo for all my computesr
<Guest84>
all 1 of them (since my laptop died 3 days back)
<Guest84>
:(
<jD91mZM2>
Right. Oof. Going against Nix' purity is not entirely simple. I wonder if runCommand could be used
<Guest84>
That would create a new package (which would come into effect _after_ the whole thing has been evaluated)
<Guest84>
at least as far as my limited understanding goes
<Guest84>
Also, technically you always have to assume some state in life.... :) I mean there's builtins.currentSystem :).
wfranzini has quit [Remote host closed the connection]
<Guest84>
If you look at this- the problem isn't even with purity, the problem is nix just fails to read something that the kernel is exposing as a file.
wfranzini has joined #nixos
<Guest84>
the following fails in `nix repl`: builtins.readFile /sys/class/dmi/id/product_version
<jD91mZM2>
Thing is something like "${...}/bin/thing" requires the package ${...} to be evaluated before the rest of the string can be
<{^_^}>
[nixpkgs] @FRidh pushed 16 commits to release-19.09: https://git.io/JeZbm
<jD91mZM2>
"${pkgs.runCommand "a" {} "echo hi"}", for example, returns a derivation path that must be able to be used, surely?
<jD91mZM2>
builtins.readFile "${pkgs.runCommand "a" {} "cat /proc/cpuinfo > $out"}"
<Guest84>
Oooooh
<Guest84>
I see what you're saying
<jD91mZM2>
Guest84: Thanks for asking this, I've myself been wondering similar things for a while: How does one run arbitrary commands during the evaluation
<Guest84>
let me try
<jD91mZM2>
(Spoiler: It works)
<gyroninja>
Guest84: If you are curious the problem is that linux is reporting that the file is 4KiB, but the actual size is much less
<gyroninja>
at least that's what is probably happening
<Guest84>
jD91mZM2: >Thanks Well yeah this is somethign that does come in handy
<Guest84>
jD91mZM2: ALthough in this case looks like the sandbox doesn't recognize the path
<gyroninja>
It doesn't really matter that it's the block size. Since it's a dummy value that does not represent the actual file size it doesn't really work with builtin.readFile
<gyroninja>
that's why when you try reading something from /proc/ with a size of 0 it will just give an empty string
<{^_^}>
[nixpkgs] @domenkozar pushed to master « pkgsStatic: fix curl, boost, openssl and libsodium »: https://git.io/JeZb8
<tyrion-mx>
Hello, I am trying to make gnome-keyring work (I would like to have a graphical prompt when I need to use my ssh key). I put `security.pam.services.sddm.enableGnomeKeyring = true;` in my configuration.nix but I am not sure it is correct (it doesn't seem it's doing anything). Any suggestions?
<tyrion-mx>
Looking here: https://nixos.org/nixos/options.html#keyring I see `security.pam.services.<name?>.enableGnomeKeyring` but I am not sure what should go under <name?> and if `sddm` is correct
xok has quit [Quit: Leaving.]
Ariakenom has joined #nixos
<worldofpeace>
tyrion: the actual gnome keyring module does security.pam.services.login.enableGnomeKeyring
<worldofpeace>
are you using services.gnome3.gnome-keyring?
<freeman42[NixOS]>
is it possible to make a Windows 8 bootable USB by using dd with an iso file?
<tyrion-mx>
<worldofpeace "are you using services.gnome3.gn"> No, I am not explicitly using gnome-keyring. Should I enable it and remove the security.pam.services line?
<worldofpeace>
yes tyrion It's essential to use that module
<worldofpeace>
Though if it doesn't work with sddm still, let me know. I've never checked that.
<tyrion-mx>
Ok, thanks
<gchristensen>
freeman42[NixOS]: dunno, but `dd`'d a Windows installation from a partition on my hard disk to a USB drive and it worked ifne
alex`` has quit [Ping timeout: 268 seconds]
<gchristensen>
to this day it is how I run firmware updates on my thunderbolt dock :)
<tyrion-mx>
worldofpeace: I need to reboot after that right?
<worldofpeace>
I once installed windows to a vm and through some steps got an image you can dd to a usb
<worldofpeace>
tyrion: yes, it's conditioned to autostart on a new session and there's probably pam stuff to reload too
alex`` has joined #nixos
<gchristensen>
worldofpeace: oh, yeah, that is how I did it :)
<worldofpeace>
gchristensen: lol, I bet we have the same notes with the steps :D
cinimod` has joined #nixos
cinimod` has left #nixos [#nixos]
cinimod` has joined #nixos
<gchristensen>
hehe I bet we do :P
<tyrion-mx>
worldofpeace: I restarted the X session and now I see gnome-keyring running. Nice, anyway I still don't get a graphical prompt when trying to use my ssh key with git. Do you know how to fix it?
<tyrion-mx>
ok, so. Just to recap, I have gnome-keyring enabled and programs.seahorse as well. gnupg is not handling ssh. I have a pretty basic setup so far (with i3) so probably not even dconf is running/installed. It should be everything I need to make the keyring work for ssh keys right?
<yuken>
Well, I'm not using the default launcher hyperfekt.
<jluttine>
running that kind of command as a systemd service, that is
<hyperfekt>
yuken: Well, that derivation is for the default launcher. You will not be able to adapt it for packaging the entire game or any other launcher with Nix.
<{^_^}>
[nixpkgs] @peti pushed to master « esniper: update to latest git revision »: https://git.io/JeZAl
<hyperfekt>
yuken: Usually a launcher is responsible for downloading minecraft including most of its dependencies. You may want to look at the envLibs part of the new default launcher derivation for libraries that Minecraft needs but that aren't provided by the launcher.
<infinisil>
jluttine: You might need to use systemd.services.*.script for that
<hyperfekt>
yuken: You should probably make yourself familiar with the nixpkgs derivation pattern, they all take these arguments. When used from nixpkgs, they are usually provided by a callPackage call, which takes them from the global top-level name space.
ilyagotfryd has joined #nixos
<jluttine>
perhaps jD91mZM2 has some insight as the author? have you written any systemd service for xidlehook?
<infinisil>
jluttine: With `script`, when you look at `systemctl --user cat xidlehook`, does the ExecStart point to the script with all '' intact?
<hyperfekt>
yuken: But you shouldn't necessarily need most of those except of those listed under envLibsPath, because they are dependencies of the default launcher and not Minecraft.
<hyperfekt>
Strange, I can't find where the whole callPackage thing is documented in the nixpkgs manual. I don't even recall learning it from there. Or learning much about packaging from there at all...
chloekek has quit [Ping timeout: 245 seconds]
<yuken>
infinisil, looking at it like that, it makes sense, but it doesn't really... help me figure any of this out.
<yuken>
Like, making my own packages.
<hyperfekt>
I mean on a guide-level. It works as a reference, not here to dunk on the manual.
<infinisil>
jluttine: Because that would be really ugly
<infinisil>
jluttine: It's like the argument list in htop
<jluttine>
infinisil: ah, thanks. ok, then it's something else
<infinisil>
jluttine: No no the empty args are there
<infinisil>
See the slightly larger space where the empty arguments are?
<jluttine>
i'm getting warning: failed to invoke command: No such file or directory (os error 2)
<infinisil>
Ah something else that causes the error, yeah probably
<jluttine>
i don't know which file or directory the service isn't able to find but the script runs fine when i run it manually
<infinisil>
yuken: I just linked you to them..
<yuken>
I... have read those.
<yuken>
And the various Nix pills.
<infinisil>
yuken: Ah, so then do you have any specific questions?
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
<yuken>
infinisil, I've got no clue where to even start writing derivations. Telling it what dependencies are needed, for example.
<infinisil>
jluttine: You can put an strace in it, or `strace -e trace=file -f -o out <command>`, this outputs all syscalls that touch files to a file "out"
<yuken>
Unless I'm just... inheriting from nixpkgs, which doesn't seem right
<infinisil>
yuken: Ah so you're asking about the weird argument list, how that works?
dansho has joined #nixos
<yuken>
That's one of the questions, yeah. It's being given the jvm, jdk, etc - from where?
<jluttine>
infinisil: thanks!
<yuken>
What's calling that to give it those arguments?
<infinisil>
yuken: Take a look at the file nixpkgs/pkgs/top-level/all-packages.nix
<infinisil>
yuken: And search for the file minecraft/default.nix
<infinisil>
Or rather `../games/minecraft`
<hyperfekt>
TODO: Add 'architecture' section to the nixpkgs manual
<infinisil>
There minecraft is defined as `minecraft = callPackage ../games/minecraft {}`
<{^_^}>
[nixpkgs] @marsam pushed commit from @jonringer to release-19.09 « pythonPackages.streamz: 0.5.1 -> 0.5.2 »: https://git.io/JeZAP
<infinisil>
yuken: What this essentially does is `minecraft = import ../games/minecraft pkgs`
<yuken>
Well that... makes sense, kind of.
<infinisil>
So it imports the file, which is a function with all dependencies as arguments, and calls it with pkgs, so all of the dependencies get filled out
<infinisil>
callPackage is a bit smarter than just `import ../games/minecraft pkgs` though, because it doesn't pass dependencies that aren't declared in the argument list
<infinisil>
> callPackage ({ hello }: "This is a derivation that has ${hello} as a dependency") {}
<{^_^}>
"This is a derivation that has /nix/store/rr3y0c6zyk7kjjl8y19s4lsrhn4aiq1z-hello-2.10 as a dependency"
<infinisil>
callPackage also works with expressions directly, not just paths to expressions, so it's possible to show-case its functionality easily like this ^
<infinisil>
yuken: Does that explain it well enough?
<yuken>
It explains how the packages work, infinisil, still dunno how... I'd really do anything.
<infinisil>
To package something into nixpkgs you'd add such a callPackage call in all-packages.nix, and a file that takes such arguments at some path in nixpkgs/pkgs
<yuken>
What if I just want a separate environment for it, rather than making it into a package? or... anything else, I have no clue
<infinisil>
Not sure what you mean, to just have a standalone package not in nixpkgs?
<yuken>
That might be what I mean, I'm not completely sure. I don't like functional languages in the first place, and still don't understand _how_ to use Nix.
<{^_^}>
[nixpkgs] @mweinelt opened pull request #70020 → ferm: wait for DAD timeout before testing → https://git.io/JeZA7
Henson has joined #nixos
<hyperfekt>
yuken: Yeah, you'll have trouble packaging most things without nixpkgs because most software depends on other software, and you don't want to have to create packages for everything in the stack.
<hyperfekt>
yuken: Sorry, by 'the rest' I meant 'the rest of how a package works'
jacki has joined #nixos
<Henson>
hey all, I'm trying to adjust the nixos/modules/services/x11/hardware/synaptics.nix to adjust some of the options and roll that into my NixOS system. But since it's a nixos module, is it possible to bring in the changes as an overlay? Should I be working on my own clone of the nixpkgs repository?
<yuken>
egh, maybe I just can't figure out Nix, hyperfekt. Maybe if it was a language more akin to C I could do it, but this is just...
<yuken>
too different of a mindset.
<hyperfekt>
yuken: The best introduction to the mindset you'll probably not find with Nix but with Haskell tutorials.
<infinisil>
yuken: What do you want to use Nix for? I think it's usually a good idea to ask the question "I want to do X, but I'm stuck at this step, ..."
<infinisil>
hyperfekt: Ehhhh, recommending Haskell tutorials for learning Nix?
<hyperfekt>
yuken: Although for packaging you mostly don't use it as a programming language and more for configuration, having to write your own functions should be rare and thus having to grok functional programming isn't really essential.
<yuken>
I was originally interested in Nix to have my setup not rely on a ton of... random config files everywhere that might be a pain to move to another system.
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
fling has joined #nixos
<fling>
Is there export_kernel_fpu_functions.patch for 5.3?
<hyperfekt>
You'll see that in many places you're just calling functions and defining attribute sets, not that different of a mindset.
knupfer has quit [Client Quit]
<hyperfekt>
infinisil: Nah, I wouldn't usually, because unless you plan to do proper programming in Nix I don't think you really need to be a functional programmer.
<Henson>
I found learning how to use Nix to be quite a learning curve, and I knew Haskell before learning Nix.
<infinisil>
Haskell is very far from Nix in a lot of aspects
<yuken>
Less of a learning curve, more of a learning 90 degree incline
jacki has quit [Remote host closed the connection]
<infinisil>
A lot of people seem to think they're very similar because they're both functional and lazy, but that's not really the case
<hyperfekt>
Nix really isn't that difficult, nixpkgs however...
<Henson>
figuring out how all of the different pieces fit together in the Nix ecosystem took a bit of understanding.
knupfer has joined #nixos
<yuken>
Afteer reading pills, nix-1p and such, I know how the Nix language kinda works, how to... write a function
knupfer has quit [Client Quit]
<Henson>
one thing that would really have helped me in the beginning was reading more of the documentation. I also was somewhat led astray by the nix pills documents, as they describe how to do things in a way that is actually quite different from how nixpkgs works.
<yuken>
I have no clue how to really do anything with it -w riting a package, for example. Most complex thing I've done is importing nixpkgs, making a python37 environment & overriding buildInputs to get the libraries I need.
<infinisil>
Henson: Yeah I won't recommend nix pills because of that
<Henson>
yuken: I started learning Nix by writing packages that mangled closed-source binary software into nix packages. Quite challenging and mostly undocumented. Learning how the nix expression language works is very helpful. Whenever I get stuck in understanding how something works, reading the source is very helpful.
<Henson>
yuken: if you're trying to write your own packages then understanding how to build packages using callPackage and mkDerivation is a good place to start. Then you can use nix package search to find a package similar to what you want to do, then just copy its derivation and modify it as you like. Looking at how things are done in other packages is very helpful
<hyperfekt>
Someone was writing an introduction alternative to the Nix Pills, where was that? (I really need to fix bookmarking)
<Henson>
yuken: reading the Nix package contributors guide is also very informative. Using nix package overlays is also a good way of blending your own software into the nix packages your system can see.
jacki has joined #nixos
<Henson>
yuken: first understanding how the nix expression language works is key, as everything is based on it.
xkapastel has quit [Quit: Connection closed for inactivity]
Soo_Slow has quit [Remote host closed the connection]
fling has quit [Ping timeout: 240 seconds]
<Henson>
what's a good way to add a clone of nixpkgs to my NixOS distribution? I'd like to add and edit some packages and use those with the Nix tools (nix-env) and the NixOS tools (nixos-rebuild).
<infinisil>
Henson: I like setting `nixpkgs=/path/to/nixpkgs` in NIX_PATH
<ajs124>
Henson: if you only want to modify some packages, you could also use an overlay
<infinisil>
And I have a ~/.nix-defexpr/default.nix file with `import <nixpkgs> {}` such that `nix-env -iA hello` works with the nixpkgs in NIX_PATH
jacki has quit [Remote host closed the connection]
<Henson>
ajs124: I'm trying to modify nixos/modules/services/x11/hardware/synaptics.nix which isn't a package, but one of the xserver configuration options for NixOS
<ajs124>
you can use disabledModules and imports for that, although I wouldn't recommend it.
<immae>
infinisil: that’s a very good trick, I was looking for a solution to that kind of problem for a long time!
emily has quit [Remote host closed the connection]
<immae>
(not having to specify -f "<nixpkgs>" for every nix-env command)
<Henson>
is working on one's own nixpkgs tree a good idea? That way any modifications I make could potentially be offered up as a pull request.
emily has joined #nixos
<immae>
Henson: it adds quite a lot of maintenance burden to you, having to keep up with the upstream and rebase etc.
<immae>
But if it suits you... (personnally I prefer overlays)
markus1189 has quit [Ping timeout: 250 seconds]
fling has joined #nixos
<emily>
Henson: immae: you can avoid those by sending the changes upstream
<emily>
then they become (at least partially) everyone else's problem too
<immae>
emily: I would, but I know noone from the nix community to "patron" me, so I fear my pr will be forgotten forever
markus1189 has joined #nixos
<emily>
right, that's understandable
<emily>
FWIW the bot does automatically ping maintainers of the code you modify
<infinisil>
Henson: I prefer having a modifiable nixpkgs, mainly for cherry-picking nixpkgs patches. Makes it easy to try out PRs and fix the occasional thing, which would be a pain with overlays
<emily>
and maintainers of relevant packages are always a good bet to cc on the PR if nothing else
<emily>
but yeah, the PR backlog is large
<immae>
well, there are so much PR on nixpkgs which are waiting for a review, that I don’t see why my prs would have any different treatment
<Henson>
immae: is it possible to use overlays to make changes to NixOS, like the nixos/modules/services/x11/hardware/synaptics.nix file, or does that have to be done in another way?
<immae>
Henson: Hmm, it’s more complicated, but there are ways. overlay is not the way to go then
<Henson>
ok
<immae>
(or maybe, but not that I know of)
<infinisil>
overlays can't do that no
<Henson>
infinisil: to use my own nixpkgs tree, is there a way to adjust NIX_PATH system-wide, so all users and the nixos-rebuild tool are all working on the same thing?
<infinisil>
Henson: Yeah, the NixOS option nix.nixPath
knupfer has joined #nixos
<Henson>
infinisil: ok
<Henson>
thank you, everyone, I'll give this a try
<{^_^}>
[nixpkgs] @vbgl pushed commit from @r-ryantm to master « ocamlPackages.zarith: 1.8 -> 1.9.1 »: https://git.io/JeZxF
markus1189 has quit [Ping timeout: 240 seconds]
markus1189 has joined #nixos
<Henson>
infinisil: thank you for the suggestions. I found something similar for a system-wide overlay in the NixOS wiki, and I guess extending that to nixpkgs also works.
<immae>
clever: yes it makes sense, I just never thought about it :D
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @mweinelt to release-19.09 « nixos/tests/ferm: wait for DAD timeout before testing »: https://git.io/JeZxx
<immae>
(I never use the channels, I’m happy with setting NIX_PATH environment usually, but it has drawbacks, with nix-env for instance if I don’t specify the -f)
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @jonringer to release-19.09 « pythonPackages.supervisor: 3.3.5 -> 4.0.4 »: https://git.io/JeZpJ
<m1cr0m4n>
Hi folks. I'm trying to overrideAttrs on glusterfs in my configuration.nix. I've tried packageOverrides and overlays. The former gives me undefined error, the latter causes infinite recursion. What's the correct way for me to do this?
<clever>
m1cr0m4n: you must use super.glusterfs on line 12
<clever>
m1cr0m4n: pkgs.glusterfs refers to the attr your setting on line 12, so infinite recursion
<clever>
m1cr0m4n: and on 16, you want to use self.fetchFromGitHub
knupfer has quit [Quit: knupfer]
rauno has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<infinisil>
jluttine: Oh maybe a simple way to figure it out, set PATH= and run the binary in a terminal
<Henson>
infinisil: ohh, sorry, I didn't know you were waiting. This is what I found for overlays, and what I'll try to use for nixpkgs: https://nixos.wiki/wiki/Overlays#Using_nixpkgs.overlays_from_configuration.nix_as_.3Cnixpkgs-overlays.3E_in_your_NIX_PATH
<infinisil>
Henson: Hm well overlays can't change modules
acarrico has quit [Ping timeout: 265 seconds]
<yuken>
Henson, I'm fairly sure I know how the Nix language works (although I'm not 100% confident in that), I just don't know how to... really use it.
<yuken>
Writing derivation, packages or environments.
<Henson>
infinisil: right, but in the same way they add overlays to the nix search path, I can rewrite the nixpkgs path and have a system-wide redefinition of nixpkgs
<m1cr0m4n>
clever, oh of course that makes sense :) Thanks yet again!
<jluttine>
infinisil: yeah, i get errors if i run like this: PATH="" /nix/store/wqsnqp514wyh7wig7k6scw0255w8wmhm-xidlehook-0.7.0/bin/xidlehook --timer normal 5 "echo hello" "echo goodbye"
<infinisil>
Henson: Hm not entirely, because the options defaults already include a nixpkgs definition
phreedom has quit [Remote host closed the connection]
<infinisil>
Depending on the order one or the other is used
knupfer has joined #nixos
<Henson>
infinisil: right, but in the same section of the Wiki they don't use the defaults so you can specify the path to nixpkgs
<infinisil>
Ah yeah
phreedom has joined #nixos
<{^_^}>
[nixpkgs] @domenkozar pushed to master « busybox: flip around logic how musl is determined »: https://git.io/JeZps
aveltras has quit [Quit: Connection closed for inactivity]
Guest94434 has quit [Quit: leaving]
ixxie has joined #nixos
ng0 has quit [Remote host closed the connection]
ng0 has joined #nixos
<Orbstheorem>
How can I run `nixos-rebuild` with a custom path to nixpkgs?
<Orbstheorem>
I'd rather prevent adding my dev path to the nix channels
jimmyeatworld has joined #nixos
<Orbstheorem>
Got it: `sudo nixos-rebuild test --fast -I nixpkgs=./nixos-dev/nixpkgs`
ixxie has quit [Ping timeout: 240 seconds]
ddellacosta has joined #nixos
ilyagotfryd has quit [Ping timeout: 265 seconds]
ddellacosta has quit [Ping timeout: 265 seconds]
growpotkin has joined #nixos
ddellacosta has joined #nixos
<edcragg>
silly question... how to suppress 'no Makefile, doing nothing' etc? i've set configurePhase = ""; and buildPhase = ""; but these messages seem to still occur on build
<Henson>
infinisil: with adding nixpkgs to the nix.nixPath do I still need to have a nix channel defined?
<qyliss>
edcragg: dontBuild = true I think
<edcragg>
oh fancy, thanks
<{^_^}>
[nixpkgs] @hedning pushed commit from @evenbrenden to master « jotta-cli: init at 0.6.18626 (#69326) »: https://git.io/JeZhY
<hyperfekt>
Does anyone know if snack is actually usable for building Haskell projects? nmattia (the author) switched niv to use cabal directly...
rmeis has joined #nixos
<ddellacosta>
I'm trying to add some iptables rules and getting 'can't open lock file /run/xtables.lock: Permission denied'. Is this known behavior on NixOS, or is there something else going on with my environment?
<ddellacosta>
I'm not finding anything online related except for an issue with fail2ban, and otherwise seems like everyone adds iptables rules in /etc/nixos/configuration.nix or what-have-you
<{^_^}>
[nixpkgs] @domenkozar pushed to master « busybox: remove the missing diff »: https://git.io/JeZhr
<shreyansh_k>
hello, how do you override a derivation's buildCommand?
<hyperfekt>
ddellacosta: It's possible that the iptables rules are managed by NixOS which would mean that the file is linked to the Nix store and thus read-only. You'd have to add rules through your NixOS configuration or prevent NixOS from managing them for you if that's indeed the case.
wfranzini has quit [Remote host closed the connection]
<ddellacosta>
hyperfekt: yeah, that's what I'm wondering about exactly. Wish I knew where to find some more detailed documentation on it
<chris__>
I'm having an issue trying to modify `/etc/nix/nix.conf`: `chmod: changing permissions of '/etc/nix/nix.conf': Read-only file system`. I'm root, I've also tried `chattr -i` with no luck. Any ideas?
<hyperfekt>
ddellacosta: Actually from a cursory search it doesn't seem like NixOS manages iptables for you.
<emily>
nixos does have iptables stuff
<emily>
mostly script-based though i think
jimmyeatworld has quit [Ping timeout: 240 seconds]
<emily>
you probably should add it in configuration.nix though :)
<hyperfekt>
emily: Yeah, any match I get for iptables is just calls to the iptables binary.
<ddellacosta>
hyperfekt: I'm pretty sure it does, per the networking.firewall.enable config directive
<ddellacosta>
it's not clear how I'd script changes to iptables for making changes outside of configuration. I guess maybe NixOS doesn't want me to do that for some reasn
<ddellacosta>
*reason
<hyperfekt>
ddellacosta: Yeah, but it doesn't generate the file, it just runs commands for you, meaning you should in theory be able to run commands too.
<hyperfekt>
but emily is right, it's probably a better idea to do that in the configuration
<ddellacosta>
hyperfekt: hmm I'm not sure I follow
<ddellacosta>
it seems pretty clear it's generating a set of rules for me
<hyperfekt>
chris__: What does readlink -f /etc/nix/nix.conf say?
<ddellacosta>
emily: re: "mostly script-based," does that mean I can write scripts to enable/disable rules outside of the configuration, or am I misunderstanding?
<hyperfekt>
ddellacosta: That's true. My initial thought is that the file is symlinked to the store and you get permission denied because of that. I simply discarded that possibility.
<chris__>
hyperfekt: Ohh it's pointing to the store. `/nix/store/icsbd2jvvn0xygpfrvm5rg6vr5dknaa1-nix.conf
<emily>
it might be that the scripts are used to produce the some immutable file in /nix/store and you can't run your own scripts
<emily>
ddellacosta:
<emily>
in which case the easiest way is just to use configuration.nix
<ddellacosta>
okay. I guess this is my fault because I'm not using the built-in wireguard...because it also doesn't allow me to configure things the way I want. Grr
orivej has joined #nixos
<clever>
chris__: what are the first 3 lines of your nix.conf?
<ddellacosta>
emily: the thing is that I'd really rather not run `nixos-rebuild switch` every time I simply want to add/remove rules. Is there a way around that?
<chris__>
hyperfekt: sorry sent that too early. I'm trying to add a binary cache though - but I'm not sure where in configuration.nix (or somewhere else) this would be configured?
<emily>
ddellacosta: not really. use --fast and get used to the few-second delay
<emily>
you also pay that cost whenever you add packages declaratively
<emily>
do you really fiddle with firewall rules that often, out of curiosity...?
<emily>
ah, you mean because of wireguard automation?
<emily>
my best suggestion there is just to improve whatever automation nixos already has, probably
<ddellacosta>
emily: yes. And more to the point, this seems like an impedance mismatch between how iptables should be able to be used and how NixOS expects us to use it
<ddellacosta>
but, anyways, I'll stop complaining about it. Thanks for the help, emily and hyperfekt
<chris__>
clever: Ah that makes sense. I was reading straight from the manual though which mentions "just adding a line to the nix.conf"... None the less - do you know what options I need to set?
<clever>
chris__: nix.extraOptions
<emily>
ddellacosta: Linux is an imperative, mutable system. Nix is a declarative, immutable package/configuration manager. NixOS is inherently in an impedance mismatch, and the abstraction is often leaky.
<emily>
ddellacosta: for all I know there is a way to use manual iptables on NixOS though, I just don't know it myself
<alexarice[m]>
anyone have a systemd service that works for dropbox?
<chris__>
clever: Thanks :) will try do a PR for the manual too
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @r-ryantm to master « wireshark: 3.0.3 -> 3.0.5 »: https://git.io/JeZh5
<emily>
ddellacosta: but the impedance mismatch is kind of the point -- if you live in the NixOS world and don't try and circumvent it, you benefit from all its guarantees and capabilities
<clever>
emily: you can still run iptables manually to mutate things, after nixos has applied its rules, but nixos will undo those changes next time you nixos-rebuild, potentially breaking things
ambro718 has joined #nixos
<chris__>
Regarding the manual, is there a way I can figure out which file refers to a chapter?
<ddellacosta>
emily: yep, totally get that, but NixOS doesn't also insist that we should update configuration.nix every time we want to e.g. edit a file. Insisting that configuration can only happen in one way leads to frustrating outcomes. I ran into the same thing trying to get a nginx config that I could modify as a user without configuring the entire operating system every time. The black and white perspective isn't
<ddellacosta>
really appropriate for an OS. That doesn't mean that immutability is pointless, it just means a simplistic application leads to unnecessary rigidity.
<clever>
chris__: simplest thing is to just let grep search the whole thing for a common string
<ddellacosta>
clever: okay so, I'll go back to my original question: do you have any idea why I'm seeing 'Fatal: can't open lock file /run/xtables.lock: Permission denied' when I try to add an iptables rule (with sudo to be clear)?
<chris__>
clever: Thanks once again!
nalck has joined #nixos
<clever>
ddellacosta: that should work..., what is the exact command you ran?
<ddellacosta>
clever: iptables -A FORWARD -i foo -j ACCEPT; iptables -A FORWARD -o foo -j ACCEPT
<ddellacosta>
(basically)
<clever>
ddellacosta: sudo only affects the 1st command, the ; runs the 2nd without root
<ddellacosta>
clever: haha, d'oh
<ddellacosta>
thanks! bonehead mistake
<clever>
ddellacosta: for things like this, i prefer `sudo -i` to drop you into a root shell
<clever>
then everything is root
<ddellacosta>
yeah that makes sense. Somehow I totally spaced the semi-colon. Thanks!
jonny2 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
<{^_^}>
[nix] @chrissound opened pull request #3111 → fix docs because nix.conf is a store file on Nixos (read only) → https://git.io/JeZjT
joepie91 has quit [Remote host closed the connection]
<evanjs>
Not at my computer right now, but any thoughts on why my JetBrains fonts "suddenly" look awful? "Suddenly" as in I change my config so much I have no idea what I did last
<evanjs>
But, I have changed nothing related to JetBrains or Java lately
<evanjs>
Though I did enable core fonts and add a few others. Currently using Fura Mono via NerdFonts... I think? In my JB apps
alex`` has quit [Ping timeout: 245 seconds]
<DigitalKiwi>
WilliamHamilton: I had problems too
jgeerds has joined #nixos
<WilliamHamilton>
DigitalKiwi did you return to a previous version of nixpkgs?
<DigitalKiwi>
for unrelated reasons
<DigitalKiwi>
i have it setup so that it's easy to use old versions
<DigitalKiwi>
i might switch back since the unreleated reasons are still broken
alex`` has joined #nixos
fenedor has quit [Ping timeout: 240 seconds]
<otwieracz>
Hi. I haven't developed any nixos packages for years - and I need to create one. Where can I find any guidelines, best practices, etc? Also how can I, with stable system, test bleeding edge packages? I remember something with packageOverride?
<{^_^}>
[nixpkgs] @hedning pushed to gnome-3.34 « squash! gnome3.mutter: fix animation related crashes »: https://git.io/JeZj5
ixxie has joined #nixos
<inkbottle>
Where do I find a description of the package like qttools; it seems it might contain qdbus, but that doesn't show with `nix search`
<{^_^}>
[nixpkgs] @ck3d opened pull request #70027 → make-disk-image: replace nixos-install by nix-env calls → https://git.io/JeZjp
<bhipple>
Also this one: https://github.com/NixOS/nixpkgs/pull/69218. The current libcerf package is broken, because upstream moved the src tarball download URL, so it'd be nice to fix
<tek>
hello! I'm installing in a chroot and I'm encountering the nested chroot problem, which used to be solvable by specifying "sandbox = false" in nix.conf, but as of 18.09 this doesn't take anymore when running `nixos-install`, it still fails with the inability to clone(). I tried running `nixos-install --option sandbox false`, but that doesn't help
<inkbottle>
I have a very confusing issue: on a new and basic install, which has worked several days already, plasma menu has stopped showing
<inkbottle>
I did several logout and reboot and removing of the panel
<inkbottle>
but the issue remains
<inkbottle>
The menu shows sometimes, but not often
o1lo01ol1o has joined #nixos
<inkbottle>
It is a bit as if it were showing but for 100th of s only
<infinisil>
gnidorah: activationScripts should run every time
<infinisil>
gnidorah: What do you use this for?
<inkbottle>
evanjs: the only things I've done lately is adding packages; I've added them "at the end of the list"; It was working with (included) bluez-tools: https://paste.debian.net/1103290
<rsoeldner_>
When using `callHackage` , does it lookup the current sources etc, independent of my nixpkgs pinning? Trying to use `proto3-suite` package but receive cabal file not found
ilyagotfryd has quit [Remote host closed the connection]
ilyagotfryd has joined #nixos
<gnidorah>
infinisil: run "dconf update"
wucke13 has joined #nixos
<higherorder>
Quick question: since hashes are computed from derivation inputs, does Nix assume that the build script is pure? What if the build script, say, wanted to download a file or do an API call?
<gnidorah>
infinisil: ok i checked with other command, yes it runs every time but makes no changes for me. perhaps it doesn't work because config files are regenerated later than this command is called?
<infinisil>
gnidorah: Yeah that can be the case, you need to use `stringAfter` or `stringBefore` to order your activationScript before/after others
ilyagotfryd has quit [Read error: Connection reset by peer]
<inkbottle>
evanjs: I removed th 4 last packages; didn't help. So I went back, a bit randomly, to generation 6 (current gen is 11th). I'll see what that does
<infinisil>
gnidorah: However I'd recommend using a systemd unit for doing this kind of thing
<infinisil>
gnidorah: Then it's much more of a self-contained action, can be called multiple times, doesn't have to run with full privileges, etc.
<infinisil>
It is more complicated to set up though
<inkbottle>
evanjs: still not working, a bit strange
<{^_^}>
#68906 (by edolstra, 1 week ago, merged): Revert systemd interface version to 2
<infinisil>
Now I gotta reboot again
<bhipple>
higherorder: When builds are run, they are run in sandboxes that cut off internet access, filesystem, access, hostname, etc., so if the build script tries to download dependencies dynamically it will just fail
ee1943 has quit [Read error: Connection reset by peer]
ee1943 has joined #nixos
chloekek has joined #nixos
<infinisil>
higherorder: Yeah
<infinisil>
/dev/random is available
<infinisil>
And if reasonable, a deterministic rng can be used with a fixed seed
fusion809 has joined #nixos
rsoeldner has quit [Ping timeout: 246 seconds]
<bhipple>
higherorder: yeah, the underlying build system can still be non-deterministic in certain ways, but all the common and most dangerous ways are blocked (e.g., it can't dynamically download stuff of pypi by mistake)
<bhipple>
higherorder: That said, nix has some tooling to determine if a re-run of a build is bitwise identical, and there are some members working on getting as much as possible to build like this: https://r13y.com/
rsoeldner has joined #nixos
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #nixos
<simpson>
higherorder: And yeah, it's not really to extend purity beyond machines that one has control over, in any case. The closest we can get is noticing when some stuff changes and ought not to have changed.
bhipple has quit [Read error: Connection reset by peer]
jgeerds has joined #nixos
rsoeldner has quit [Remote host closed the connection]
bhipple has joined #nixos
rsoeldner has joined #nixos
wfranzini has quit [Remote host closed the connection]
JosW has joined #nixos
JosW has joined #nixos
JosW has quit [Changing host]
wfranzini has joined #nixos
alex`` has quit [Ping timeout: 276 seconds]
alex`` has joined #nixos
<higherorder>
bhipple: infinisil simpson thanks!
stzsch has quit [Ping timeout: 276 seconds]
nexgen has quit [Remote host closed the connection]
nexgen has joined #nixos
jimmyeatworld has joined #nixos
chloekek has quit [Ping timeout: 245 seconds]
ilyagotfryd has joined #nixos
rsoeldner has quit [Read error: Connection reset by peer]
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
<gyroninja>
I'm having trouble with installing hydra. The PostgreSQL unit is not able to finish starting. Like PostgreSQL comes up and it is able to be used but systemd is just hanging and eventually kills it due to a timeout. Has anyone ran into this issue?
ilyagotfryd has quit [Ping timeout: 268 seconds]
rsoeldner has quit [Remote host closed the connection]
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
<peanutbutter144>
hello, does anyone know who i should cc on github if i am submitting a new package to nixpkgs? the section in the nixpkgs manual only specifies "maintainers of the package"
<peanutbutter144>
Acou_Bass: i am submitting a new package
<peanutbutter144>
hexa-: thanks, that's what i thought originally
<peanutbutter144>
worldofpeace: i am the maintainer of the package :P
<hexa->
peanutbutter144: so highlight yourself, duh!
<{^_^}>
[nixpkgs] @mkf opened pull request #70035 → nixos/cwm: init. Added windowManager cwm, basing on the module for dwm. → https://git.io/Jenf9
<Acou_Bass>
just submit it as a PR then, I did it that way and besides getting a grea tmany responses trying to fix my crappy PR, it *was* eventually accepted without anyone being CC'ed in
rsoeldner has quit [Ping timeout: 246 seconds]
<worldofpeace>
Yeah, anyone in nixpkgs-committers should be taking their time to review new submissions
ilyagotfryd has joined #nixos
gnidorah has quit [Quit: Connection closed for inactivity]
zupo has joined #nixos
<gyroninja>
It looks like postgresql in general is broken for me
<peanutbutter144>
Acou_Bass: yeah that's what i did
<peanutbutter144>
worldofpeace: i'll get back to your comment on my pr tomorrow, gotta sleep :)
<worldofpeace>
👍️
asymptotically has quit [Quit: Leaving]
nexgen has quit [Quit: Leaving]
Ariakenom has quit [Read error: Connection reset by peer]
jimmyeatworld has quit [Quit: leaving]
rsoeldner has joined #nixos
<gyroninja>
Does anyone know how to pin nixpkgs for nixops? I think postgresql is broken on unstable?
<{^_^}>
[nixpkgs] @minijackson opened pull request #70036 → rx: init at 0.2.0 → https://git.io/JenJt
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
<gchristensen>
gyroninja: just set NIX_PATH=nixpkgs=...path to whatever nixpkgs you want...
<WilliamHamilton>
infinisil do you know anything about why cabal2nix doesn't seem to work on nixpkgs unstable?
<infinisil>
WilliamHamilton: I think it's fixed in master
<WilliamHamilton>
infinisil thanks!
<gyroninja>
gchristensen: That's what I'm trying now, but it does mean that it means that the whole deploy will use the same version of nixpkgs
<worldofpeace>
I'm not sure what to do, so any outside thoughts could help.
<apv>
I've got a systemd socket unit that depends on network.target. This seems to create a dependency loop. Is that supposed to happen? relevant log section: https://pastebin.com/MMs4Yzam
tertl3 has quit [Quit: Connection closed for inactivity]
<Navi>
Stupid question, what would be the way to overload a service to add some custom env variables?
rsoeldner has quit [Ping timeout: 246 seconds]
<Navi>
Aside from just using a local copy of the service and disabling the one contained in nixpkgs.
<infinisil>
worldofpeace: Alternatively, config.networkmanager.gnome could be used to control this in the networkmanager build directly
<infinisil>
Then the modules could set nixpkgs.config.networkmanager.gnome in their modules
rsoeldner has quit [Remote host closed the connection]
<infinisil>
worldofpeace: Another alternative is to make types.package merge without error for multiple equal definitions
rsoeldner has joined #nixos
<infinisil>
> types.bool.merge [] [ { value = true; } { value = true; } ]
<{^_^}>
true
noudle has quit []
<infinisil>
This already works for the simple types ^^ because of mergeEqualOption being used in the type. For types.package, this would however mean that it needs to evaluate the full package, which may or may not be a bad thing
<worldofpeace>
the one with networkmanager is probably the worst issue there
l33333 has joined #nixos
<infinisil>
Oh another alternative: Use nixpkgs.overlays to change the configuration of networkmanager in the modules
rsoeldner has quit [Remote host closed the connection]
rsoeldner has joined #nixos
<__red__>
General Question: Is nixconf always in Europe because there are generally more nix developers in Europe?... or that no-one in other continents have had sufficient motivation to put one on?
o1lo01ol1o has quit [Remote host closed the connection]
Jackneill has joined #nixos
<__monty__>
Nix shirt?
<__red__>
I just bought a nix shirt ;-)
yuken has left #nixos ["Leaving"]
<__monty__>
Oh, thought I'd missed a T-shirt cannon.
<infinisil>
__red__: Yeah most people are in europe, at least judging from the relative silence here during european night times
<__red__>
it's funny - my work has a contract with a company called "Nix"
<__red__>
and I double-take every time I see their name come up