<jumper149>
iqubic: If you are configuring it for weechat I would advise you to look at that part of my overlay too. Not sure if it's still needed though.
<iqubic>
I'm not configuring it for weechat.
<__red__>
So, when I normally develop expressions for nixos I do it in my fork of nixpkgs, add my thing to top-level/all-packages.nix etc etc...
<__red__>
if I just have a default.nix in a directory
<__red__>
there has to be a way to get that thing to build without having it plumbed in - right?
<__red__>
if I were testing my development with nix-shell, I'd do nix-shell '<nixpkgs>' -A packagename
<__red__>
but taht requires it in my actual nixpkgs repo to test with
LnL- has quit [Quit: exit 1]
LnL has joined #nixos
LnL has quit [Changing host]
LnL has joined #nixos
amir has quit [Quit: Have to disappear. Read you later guys!]
<jumper149>
__red__: You can use something like `with import <nixpkgs> {}; (import .default.nix) { inherit stdenv pkgs; }`
amir has joined #nixos
amir has quit [Client Quit]
<jumper149>
Just inherit everything that you need
<jtojnar>
jumper149 or replace `(import ./default.nix) { inherit stdenv pkgs; }` with `callPackage ./default.nix {}`
<jumper149>
jtojnar: thats sounds better :D
amir has joined #nixos
<__red__>
so I need to make a second file to reference it I guess?
<energizer>
or you can do nix-shell -E '(import ./. {}).foo' or whatever
amir has quit [Quit: Have to disappear. Read you later guys!]
amir has joined #nixos
<__red__>
what does the .foo represent in that case?
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JUv13
<jumper149>
When `s` is an AttrSet, then `s.foo` is the value of that attribute of `s`.
amir has quit [Client Quit]
zangi has quit [Read error: Connection reset by peer]
kveroneau has quit [Quit: Konversation terminated!]
sigmundv__ has joined #nixos
LnL- has quit [Quit: exit 1]
LnL has joined #nixos
LnL has quit [Changing host]
LnL has joined #nixos
griff_ has quit [Quit: griff_]
sigmundv_ has quit [Ping timeout: 265 seconds]
imalsogreg has quit [Ping timeout: 240 seconds]
imalsogreg has joined #nixos
<{^_^}>
[nixpkgs] @alexfmpe opened pull request #96049 → ocamlPackages.ocaml-hidapi: init at 1.1.1 → https://git.io/JUvyU
<imalsogreg>
Having some trouble using a binary cache at nixcache.reflex-frp.org when I run a nix build from travis-ci. I'm using `nix show-config` and can verify that `trusted-users = travis`. But when I perform a nix-build, I get a warning that the untrusted substituter is ignored because I'm not a trusted user; and also the trusted-public-keys setting is ignored because I'm not a trusted user. Any hints about how to troubleshoot?
<siraben>
clever: Ok, so adding that worked, but now I have a situation where one of the dependencies needs the python request library == 2.23.0 and the other needs == 2.24.0
<clever>
siraben: either tell python to shut up and use what nix gave it, or fix the versions of things
<siraben>
clever: how would I do the former?
<siraben>
I'll ask the package maintainer to make the requirement `>= 2.23.0` to match
<clever>
not sure, i dont use python much
<siraben>
Alright
endformationage has quit [Quit: WeeChat 2.7.1]
<siraben>
clever: Can I patch a pypi package? Will it let me?
<siraben>
Having submitted a couple PRs to nixpkgs now, the process of adding a package name to all-packages.nix feels kinda awkward, is there an automated solution for this?
<siraben>
awkward as in maintaining sort order manually, which category to put it in
<kaznak>
I'm now trying to set up Fluentd on a NixOS EC2 instance to build a Docker(or a Kubernetes) cluster. In my plan, the Fluentd collects both hosts and guests(containers) log and sends it to S3 to store or elastic stack to analyze. My docker container sends logs to the Fluentd, but I could not find a way to send logs from the host Journald or to send out logs from Fluentd to S3.
<kaznak>
But I don't know how to install ruby gems persistently in the NixOS and set up the Fluentd with the plugins. the option, services.fluentd.plugins, maybe that I have to set, but I could not find the path variable pointing to fluent-plugin-s3.
<turion>
For which nixpkgs commit am I likely to score the most cache hits? (I primarily need haskell packages)
nocent has joined #nixos
xd1le has joined #nixos
<MichaelRaskin>
I would go to hydra.nixos.org and see a recent evaluation of the desired branch that has finished building
<alexfmpe>
turion: dunno how long hydra usually takes to cache things (does it cache PRs before they're merged?), but you should be fine grabbing like a week old commit
<MichaelRaskin>
And maybe look if it has too many failures in the areas you care about
<Peter_Storm>
Hello! I have tried installing nixos on a MacBook Pro and after failing to connect to WiFi I did it, and everything installed... but now it complains about my /boot drive during boot, so the decency fails. Even though I am booting??
ManiacOfMadness has quit [Ping timeout: 246 seconds]
<turion>
alexfmpe: Ok, I'll try, thanks!
<Peter_Storm>
The uuid is different in fstab from when I do the thing where I can see the uuids, I dont remember the command. But changing the uuid in the hardware configuration does nothing, even though I thought it would
<nerdypepper>
hiya o/ i ran nix-env -i without any args (hit enter my mistake), does this install every single package?
<chloekek>
etu: I saw you changed the way PHP extensions are installed in #82348. IIRC this used to be done by setting flags in the Nixpkgs config, but I cannot find how to do this anymore. Before I start looking, did this change with your patch?
<{^_^}>
[nixpkgs] @nbraud opened pull request #96092 → nixos/modules/security/rngd: Disable by default → https://git.io/JUfTd
<srid>
My issue is now with /nix/store/nv427pgviccfmlwfyw7r669pqy8sys0n-user-environment.drv
<srid>
Specifically what I can do in home.nix to invalidate this
<MichaelRaskin>
Nothing
<MichaelRaskin>
It's a different level
m4ts has joined #nixos
<MichaelRaskin>
But nixos-rebuild should not really try to repair either
<srid>
Found it! Just had to add a new package to `home.packages`
<srid>
Well, a roundabout way of fixing things. Would have been nice to tell Nix to force regenerate a path, but apparently there isn't a way
<MichaelRaskin>
I dunno, with actual Nix commands it always just rebuilds after verify
<MichaelRaskin>
Maybe nixos-rebuild now passes woo many wrong flags to it
ddellacosta has joined #nixos
noudle has joined #nixos
<MichaelRaskin>
Most likely something is still broken now, of course
<srid>
Two are two drvs are still broken yea; if I undo my configuration changes (to eliminate the env var, and home package), I'd see that error. So I have to keep in mind to not ever go to that configuration state.
<srid>
s/Two are/Those/
<MichaelRaskin>
Or rebuild stuff with actual Nix commands…
<srid>
I tried (nixos-rebuild switch), doesn't work
<MichaelRaskin>
It's not a Nix command
<MichaelRaskin>
At some point you will be able to just nix-store --delete all the offending paths…
<superherointj>
I don't have actual multiple monitor, I just seem to have it because I am using FullHD screen mod that disables LVDS1 and enabled DP3 as default monitor. That config in X11 is what I need to replicate in NixOS.
<superherointj>
The X11 config (I pasted on gist) is correct and works properly. I just need to learn how to replicate it in NixOS way of doing things.
<infinisil>
You can either use the option I showed, or alternatively you can just add additional x config with `services.xserver.config = '' <the string> ''`
<superherointj>
Thanks. Will try it.
<{^_^}>
[nixpkgs] @saschagrunert opened pull request #96096 → cri-o: add NixOS test via critest → https://git.io/JUftf
<nf>
playing around with nixos in a vm for the first time; what's the point of having /etc/static rather than symlinking /etc to the store directly?
kraem has quit [Quit: outta here]
<justanotheruser>
Is there a way to see the list of "top level options" within configuration.nix? For example `nix`, `users`, `sound`, `services`, `networking`, `programs`, `fonts`, etc
<justanotheruser>
also, what is the word for this
Spiney has quit [Read error: Connection reset by peer]
rardiol has quit [Ping timeout: 246 seconds]
kraem has joined #nixos
rardiol has joined #nixos
<Thra11>
justanotheruser: just run nixos-option without any arguments
<infinisil>
nf: The system activation happens in multiple phases, one of which is the /etc/static switch. Only after all phases are done is the /run/current-system link changed
<infinisil>
So if /etc/static pointed to /run/current-system/etc, the etc switch wouldn't happen until all phases are done
<nf>
i see
<infinisil>
And some phases might depend on the /etc switching happening before
<infinisil>
(not entirely sure why this specific one depends on /etc though)
<luna>
Hey, so I may have done a git rebase too far back in my PR.. Does someone know a way to reset the rebases to only my commits?
<infinisil>
cap_sensitive: forEach is just `flip map`. It doesn't change the list to a string, but you need a string for interpolation. You can use `lib.concatMapStrings` instead though
<dottedmag>
Is it expected that `nix-instantiate -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix --eval` (ISO build target, taken from manual and --eval tucked at the end) produces infinite output?
nikivi has quit [Client Quit]
jmeredith has joined #nixos
<dottedmag>
It has produced 20 GiB of output for me so far, and it looks like a infinite loop: busybox / busybox / busybox / ...
nikivi has joined #nixos
LnL has quit [Ping timeout: 256 seconds]
nikivi has quit [Client Quit]
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
<infinisil>
dottedmag: Does it happen with nixpkgs master?
<dottedmag>
infinisil: Yes. I have also tried nixos-unstable branch.
<dottedmag>
Same result.
<dottedmag>
Without --eval everything works just fine: .drv is produced and stored in store.
Thra11 has quit [Ping timeout: 265 seconds]
<infinisil>
Oh yeah actually with --eval that might be expected
<infinisil>
You usually don't want to eval derivations, but only instantiate them
<infinisil>
Or build them
matthiaskrgr has joined #nixos
orivej has quit [Ping timeout: 258 seconds]
nikivi has joined #nixos
<dottedmag>
infinisil: All right, how do I understand how the system works? Nix is functional, so I'd like to dump output of whatever Nix evaluator evaluates and read it.
c0c0 has quit [Quit: WeeChat 2.7.1]
<dottedmag>
So, why --evail produces infinite output? Is it because Nix evaluates potentially infinite output (with thunks?)
<infinisil>
dottedmag: It's hard to know exactly what causes this. It's infinite recursion most likely, something referring back to something else in a cycle. But it doesn't share any thunks (because nix could detect that early then)
<dottedmag>
Okay, --eval --json fail with "cannot convert a thunk to JSON" and --eval --xml produces `<derivation><repeated/></derivation>`.
<infinisil>
dottedmag: You'd need to use --strict with --json
<dottedmag>
Weird, it produced a single string - name of iso file in store.
<infinisil>
Hm yeah that's also a bit of a silly thing
<infinisil>
Generally I'd recommend not trying to evaluate derivations strictly
<dottedmag>
And --xml --strict seems to be producing tons of output. Looks infinite loop again.
<infinisil>
(and --eval might do that)
<infinisil>
derivations are represented as attribute sets like `{ outPath = "..."; ... }`
mmohammadi9812 has joined #nixos
<infinisil>
And generally you'd use them like "${drv}", which automatically turns it into the outPath
<dottedmag>
Yes, --xml --strict failed with stack overflow.
kraem has quit [Quit: outta here]
<infinisil>
> let fakeDrv = { outPath = "/nix/store/some-path"; }; in "${fakeDrv}"
kraem[m] is now known as kraem
<{^_^}>
"/nix/store/some-path"
<infinisil>
And this works like that, but if you evaluate a derivation strictly, not only outPath is evaluated, but all other attributes too
<infinisil>
So kind of like this:
Thra11 has joined #nixos
<dottedmag>
Okay. So I have a .nix file somewhere that is evaluating something. I have no clue what it produces due to heavy inherit / with. How do I understand it?
<dottedmag>
I can't evaluate it, apparently.
<infinisil>
> :p let fakeDrv = { outPath = "/nix/store/some-path"; otherAttr = throw "this causes problems"; }; in fakeDrv
<{^_^}>
this causes problems
orivej has joined #nixos
<dottedmag>
Let me explain the concrete problem I'm facing and maybe you could suggest a way to solve this and other similar problems.
<dottedmag>
I'd like to write a .nix file to produce custom .iso image for installer, including some custom code I'd like to add.
domogled has joined #nixos
<dottedmag>
To do so I have created a git repo and a flake.nix in it, and imported nixpkgs into it.
<dottedmag>
Now I'm trying to understand what should I put into outputs there. In order to do so I am trying to understand the structure of nixpkgs argument I'mgetting in outputs = {self, nixpkgs}: ....
domogled has quit [Client Quit]
<dottedmag>
How do I do so? Evaluating does not seem to work, as it includes derivations.
<dottedmag>
Reading the source code does not enlighten, as there are too many layers of indirection.
<dottedmag>
I can't seem to find any documentation about it, there are no types, so I'm stuck.
<dottedmag>
I don't understand how "config.system.build.isoImage" path from manual is exposed in nixpkgs when they are imported as a flake, and whether it is exported at all.
<dottedmag>
infinisil: This even evaluated something, but I've got another error: "value is a list while a set was expected". The code above is still a complete mystery for me. Why modules is a list of a single function that returns a list of a single string? What does lib.nixosSystem produce? What's the type of (...).config.system.build.isoImage? Is it a derivation?
cosimone has quit [Quit: Quit.]
<dottedmag>
I could try to figure out it myself, if I knew where to start.
sangoma has quit [Ping timeout: 258 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<infinisil>
Yes isoImage returns a derivation, though on the Nix evaluation level, it's just an attribute set. So if you did `builtins.typeOf (...isoImage)` you'd get back "set"
<infinisil>
There's also a convenience function for checking whether something is a derivation: lib.isDerivation
<nature>
Is there any of the contributor to Simple Nixos Mailserver around ?
<dottedmag>
infinisil: I don't see modulesPath in the manual - is this specific to flakes?
<infinisil>
dottedmag: Read my expression again, you made a mistake copying it
is_null has quit [Ping timeout: 240 seconds]
<infinisil>
I guess modulesPath isn't documented, but it's essentially just `inputs.nixpkgs + "/nixos/modules"` or `<nixpkgs/nixos/modules>`, so the base path to all NixOS modules
<infinisil>
Not flake specific, this is part of the NixOS module system
<nature>
I also asked on #nginx, they told me to use iptables ^^ I guess I am going with that solution then
<infinisil>
nature: (Well you didn't ask here yet technically)
sangoma has quit [Ping timeout: 240 seconds]
<infinisil>
People can only help if you actually describe the problem :)
<nature>
infinisil: Yes, basically I want my mail server to run inside my vpn which has only a single point of entry and I've been proxying all the services I was running through nginx since they were webapps and I tried to proxy the mail server through nginx as well, turns out iptables would solve my problem much more easily
<dottedmag>
infinisil: Thanks, with this it worked.
<dottedmag>
Now I really need to understand how it worked :)
sangoma has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @saschagrunert opened pull request #96109 → apparmor: fix apparmor_parser path for utils package → https://git.io/JUfnn
LnL- has joined #nixos
LnL- has quit [Changing host]
LnL- has joined #nixos
LnL has quit [Ping timeout: 240 seconds]
Dr8128 has quit [Ping timeout: 256 seconds]
<infinisil>
dottedmag: How what worked exactly?
<mananamenos>
hi, I use nix-copy-closure to move `/nix/store/k34yrxrfdyhr2k4fl10z39ar668sdzfx-demo-project-0.1.0.0` to remote host. Then in remote's configuration.nix I tried to put this nix store path into ExecStart value of systemd service. I got an error " Failed to execute command: Permission denied" when systemd tried to start the service. Also, even if it worked, every time I copied a new closure, I would need to change the path of
<mananamenos>
ExecStart in configuration.nix in remote machine and then nixos-rebuild switch. How could solve this?
<dottedmag>
infinisil: Well, "nix flake show ." succeeded to show me the output. Now I'm building it and checking that the output is fine.
sangoma has joined #nixos
arjen-jonathan has joined #nixos
<infinisil>
mananamenos: How did you produce that store path
matthiaskrgr has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net - currently broken?]
<mananamenos>
with `nix-build --attr exe`
<infinisil>
mananamenos: Can you also run that on the remote host?
<Ke>
would it be completely silly to check the permissions on that binary?
<mananamenos>
infinisil, of course, but im just learning and trying things. And in this case I want to build on my desktop machine and then copy closure only.
<infinisil>
Ke: Sounds very reasonable actually :)
<mananamenos>
I tried nixops for this basic solution and it works very nicely but i need to have the complete configuration.nix of remote machine and just wanted to try this nix-copy-closure approach
<infinisil>
I see, well if you manually nix-copy-closure you can't have it automatically update
<infinisil>
But yeah nixops or other deployment tools allow you to automate that
nikivi has joined #nixos
dsx has quit [Quit: dsx]
<infinisil>
Well, you still need the whole configuration.nix locally with those
matthiaskrgr has joined #nixos
<mananamenos>
infinisil, I expected that nixos-rebuild switch would be enough :) but now I dont even know how to referenced the copied closure from my configuration.nix in remote machine. Putting the hardcoded path of the copied closure into ExecStart has not worked.
<infinisil>
And generally it's a bad sign to embed a /nix/store path manually into a Nix file
<infinisil>
mananamenos: Copy the Nix files over to the remote host, then insert `ExecStart = "${(import ./the/file.nix {}).exe}/bin/exe"`
h0m2 has quit [Quit: WeeChat 2.9]
<infinisil>
Assuming it evaluates to the same store path you copied, Nix won't build it again
<mananamenos>
oh that's nice :) i'll try it
<infinisil>
You can also run `nix-build -A exe` on the remote host to check that, it shouldn't build it if you copied it already
<Church->
For the unifi package and service, is there a reason it doesn't prompt you with a setup wizard to generate an account?
<Church->
Been so long I don't remember how to configure it, heh
LnL- has quit [Ping timeout: 256 seconds]
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
turlando has joined #nixos
ezemtsov has joined #nixos
<{^_^}>
[nixpkgs] @benmezger opened pull request #96116 → i3-gaps: Set platform to BSD and Linux like → https://git.io/JUfWz
<ezemtsov>
Hi people. I'm trying to write a derivation for some VST plugins. Everything works just great except creating a link to plugins in `/run/current-system/sw/lib`. Is there a way to define that in default.nix? VST plugins are expected to be in a standard $VST_PATH directory, how does that work in nixos?
meh` has quit [Ping timeout: 265 seconds]
nekochen has joined #nixos
<ezemtsov>
To be more precise plugins must be at`/run/current-system/sw/lib/vst/<root-folder>/*.so`
<{^_^}>
[nixpkgs] @jtojnar opened pull request #96117 → swfdec: drop → https://git.io/JUfWV
BenjiProd has quit [Remote host closed the connection]
<foobar1998>
hey, does anyone have any advice for solving audio issues on an x1 yoga 5th gen? i'm using the config from nixos-hardware for the x1 carbon 7th gen (which shares most of the same guts) which looks like it's supposed to fix things
<foobar1998>
but unfortunately no sound comes out...