<{^_^}>
[nix] @Ericson2314 opened pull request #3802 → WIP: Constant space daemon `wopAddToStore` -- contains #3801 → https://git.io/JJYQ6
luna has joined #nixos
shibboleth has quit [Quit: shibboleth]
azure has joined #nixos
azure is now known as Guest3398
Guest3398 is now known as zangi
zanc has quit [Ping timeout: 272 seconds]
verdys_ has joined #nixos
verdys has quit [Ping timeout: 272 seconds]
moet has joined #nixos
<Graypup_>
I'd really love an interactive nix namespace browser. the REPL (probably?) doesn't quite do it: I want a listing of all the members of a set with their types without fully evaluating each member (if that makes any sense at all)
<Graypup_>
basically ls it
<Graypup_>
and I also want it to not have to reload the entire declarations every time I query something
<Graypup_>
and it would be fantastic to have the line location of the definition of each thing
<cole-h>
`rg 'your-packageset' pkgs/top-level`
simba2 has quit [Ping timeout: 272 seconds]
<Graypup_>
cole-h, I guess so, that just seems far clumsier than it strictly needs to be (I do use rg regularly on a git checkout of nixpkgs but it is a rather non-solution IMO)
<cole-h>
It would be nice, but it's not currently possible (as far as I understand) -- they're usually marked `dontRecurseIntoAttrs`, because it would blow up evaluation times.
<Graypup_>
if I wanted to do this, what is the best approach? try to hack it into nix repl? build my own thing using the nix library? try to parse it out of the nix declarations directly using the rnix crate
<cole-h>
You could see if replacing `dontRecurseIntoAttrs` with `recurseIntoAttrs` works for your use case.
<Graypup_>
cole-h, i don't want to, though, since, that would almost certainly make it slow to the point that I would literally do better to go ripgrep and read it in vim (which is a horrific perf problem but anyway)
m0rphism has quit [Ping timeout: 256 seconds]
<Graypup_>
to be clear, I want to just single level "what are the declarations below this level, don't evaluate them"
<cole-h>
Then, I don't see a whole lot of solutions.
<Graypup_>
what if I evaluated the entire thing once and made a map of it that could be queried later?
<cole-h>
I'm perfectly content with `rg 'haskellPackages =' pkgs/top-level` and `nvim <file> +<line number>`, so I haven't done any work towards that.
<Graypup_>
(assuming "evaluate" is defined as "don't try and build the entire tree")
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JJY7v
<Graypup_>
cole-h, this is mostly re: finding library functions and the hierarchy of things rather than finding packages
<Graypup_>
and i get the feeling that nix as a language is not really conducive to building this since it is too turing complete lol
<cole-h>
Hm. How is the repl not suitable enough?
<cole-h>
`lib.<TAB>` -> list of lib functions
<cole-h>
And what do you mean "all the members of a set with their types"? Nix isn't typed. We have pseudo-types in the module system, but other than that, nothing that would make it possible to get a type signature a la Haskell or Rust.
<Graypup_>
cole-h, I want to know if they are sets or functions or strings. past that I can look into them further
<infinisil>
Hmm I'd also like something like that
<Graypup_>
how /did/ they implement tab completion?
<Graypup_>
I think I had a broken terminal for a while so didn't notice it was there
<infinisil>
I mean you can just use builtins.attrNames
<Graypup_>
so might require investigation into materialization (have not researched this literally at all)
<infinisil>
> :p mapAttrs (name: value: if (builtins.tryEval value).success then builtins.typeOf value else null) pkgs
<infinisil>
Graypup_: materialization how? I've only heard this in combination with haskell.nix, but that doesn't have anything to do with this
<Graypup_>
as i said, haven't researched it at all lol
<Ankhers>
Does anyone have experience using gtk through rust? I'm not sure which nix packages I need installed in my env in order to build.
growpotkin has quit [Ping timeout: 246 seconds]
<Ankhers>
Or maybe, how can I install glib into my environment?
<clever>
,libraries Ankhers
<{^_^}>
Ankhers: Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<Ankhers>
Right, I am using lorri for this. Maybe I shouldn't have said environment.
<infinisil>
Graypup_: I'll be in #nix-lang thinking about some things regarding this
<Ankhers>
nevermind, I forgot the default lorri generated shell.nix file required pkgs.glib instead of just glib.
<clever>
my problem with things like lorri, is that when you get such eval errors, it just silently uses the old env
<clever>
and you never notice that its not using the new shell.nix
growpotkin has joined #nixos
<Ankhers>
Yeah, I have noticed that.
<cole-h>
That's why I run lorri watch in a separate window, when I plan on doing fiddling that could fail to eval
reanimus has quit [Ping timeout: 256 seconds]
codygman has quit [Read error: Connection reset by peer]
reanimus has joined #nixos
philr_ has joined #nixos
codygman has joined #nixos
codygman has quit [Read error: Connection reset by peer]
capt_zap_ has quit [Read error: Connection reset by peer]
capt_zap_ has joined #nixos
sigmundv has quit [Ping timeout: 258 seconds]
ddellacosta has quit [Ping timeout: 258 seconds]
slack1256 has quit [Remote host closed the connection]
MidHotaru has joined #nixos
zangi has quit [Read error: Connection reset by peer]
zangi has joined #nixos
MasseR has quit [Ping timeout: 272 seconds]
MasseR has joined #nixos
stoile has quit [Ping timeout: 246 seconds]
moet has joined #nixos
stoile has joined #nixos
domogled has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 256 seconds]
kleisli_ has joined #nixos
<pjt_014>
I'm trying to specify a package version in my config file and it's not working. what is the right way to do this?
<pjt_014>
yggdrasil.package = pkgs.yggdrasil-unstable *should* be it
<pjt_014>
I think
<pjt_014>
It gives me "error: attribute 'yggdrasil-unstable' missing, at /etc/nixos/configuration.nix:166:17"
<pjt_014>
I've looked in man configuration.nix and foo.package = pkgs.foo-unstable seems to be the syntax
proofofkeags has quit [Remote host closed the connection]
proofofkeags has joined #nixos
rardiol has quit [Ping timeout: 264 seconds]
rardiol has joined #nixos
emmanuel` has joined #nixos
<raghavsood>
pjt_014: I presume you want yggdrasil from nixpkgs-unstable, as there's no `yggdrasil-unstable` package
<raghavsood>
You want to import the unstable channel for that, then refer to it as `unstable.yggdrasil`
proofofkeags has quit [Ping timeout: 272 seconds]
<tskc[m]1>
Are you saying first we should mention channedl.packagename ?
<tskc[m]1>
* Are you saying first we should mention channel.packagename ?
<raghavsood>
`foo-unstable` is usually used when the package packs a revision that isn't part of the most recent release from the upstream project, usually done to include some patches or fixes that are required
<raghavsood>
At least, that's my understanding of it
<pjt_014>
had to do 'let [...] in {whole config}' though
<raghavsood>
Yup, that's what my gist above does - once you have the channel added to your system, you can import it and refer to it in your config
<pjt_014>
not sure if that scope can be tightened
<raghavsood>
I usually modularize my config to keep it cleaner, otherwise you eventually end up with huge `let..in` sections
<pjt_014>
did not notice that gist, thanks though
domogled has joined #nixos
kayg04 has quit [Read error: Connection reset by peer]
<raghavsood>
As an aside, you might want to try with `nixpkgs-unstable` vs `nixos-unstable` if all you need is the bleeding edge version of a package, and not OS components
stoile has quit [Ping timeout: 272 seconds]
<raghavsood>
Additionally, you should have `pkgs.bspwm` even in the stable channels - you only need to go to `nixpkgs-unstable` if the version in 20.03 is too out of date for you
kayg04 has joined #nixos
palo1 has joined #nixos
palo has quit [Ping timeout: 256 seconds]
palo1 is now known as palo
Rusty1 has quit [Quit: WeeChat 2.3]
nixbitcoin_ has joined #nixos
nixbitcoin has quit [Ping timeout: 240 seconds]
<superbaloo>
I'm trying to override a derivation and remove an input from it
<superbaloo>
(building lvm2 statically and removing systemd)
<cole-h>
btw raghavsood, in case you didn't notice, ofborg is functional again :^)
<{^_^}>
[nixpkgs] @cdepillabout pushed 2 commits to release-20.03: https://git.io/JJYbY
alexherbo2 has joined #nixos
<cole-h>
superbaloo: systemd is in the closure of libfido2, which is in the closure of openssh, which is in the closure of git (see: `nix-store --query --tree $(nix-instantiate '<nixpkgs>' -A lvm2)`)
<sephii>
I'm can't get caddy2 to work on NixOS 20.03. I'm getting an error "[ERROR] first argument must be a subcommand; see 'caddy help'". Looking at the service file, there's indeed no subcommand in it. Maybe it's not compatible with caddy2? I tried looking in the issues, but GitHub times out :/ https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+caddy
fling has quit [Ping timeout: 246 seconds]
reanimus has quit [Ping timeout: 256 seconds]
<freezeboy>
I have some applications (newman, commitizen) that I put on my machine using node2nix, what is the best practice to put it in nixpkgs ?
<pjt_014>
freezeboy: find a few other node packages and use one as a template. I suspect there shouldn't be too much variance since node has some level of infastructure.
<pjt_014>
many were prob. generated from n2nix too I imagine
<pjt_014>
then clone nixpkgs (I think you can do --depth 5 or such to save space), make changes, do a pull req, voila.
dermetfan has joined #nixos
<pjt_014>
do pay attention to the required format of "pkgname: init at 0.0.0"
<pjt_014>
This is basically how I did my 1st pkg contribution
<freezeboy>
pjt_014 it looks like spacegun was packaged this way, I will do the same thank you
emmanuel` has joined #nixos
simba2 has joined #nixos
<pjt_014>
^_^
turion has joined #nixos
emmanuel` has quit [Ping timeout: 260 seconds]
simba2 has quit [Ping timeout: 260 seconds]
freezeboy has quit [Quit: Ping timeout (120 seconds)]
<eyJhb>
Not sure I understand propagatedBuildInputs correctly. Is this only things that will be available during build, or also after?
m0rphism has joined #nixos
simba2 has joined #nixos
<eyJhb>
I feel like updating pixman updates the world
<Ashy>
buildInputs is only during the build, propagatedBuildInputs is available in the output derivation
<eyJhb>
raghavsood: I might be blind, but which subcommand?
<raghavsood>
eyJhb: If you have not committed your changes yet, try `nix-shell -p nixpkgs-review --run "nixpkgs-review wip"`. If you have committed them, try `nix-shell -p nixpkgs-review --run "nixpkgs-review rev <your commit hash>"`
<raghavsood>
Note that this will attempt to actually rebuild them
<raghavsood>
There might be an option to just list them, haven't really looked into that
<raghavsood>
It won't swap your system over to using the newly built ones though, just tries to make sure they still compile
<eyJhb>
raghavsood: I just want a list of all the packages that needs to be rebuild, as I am currently building FireFox, so nice to know if there are a lot of other things that need to be rebuild as well :p
<eyJhb>
Also, is it possible to task another system with building my config on its own? So that I can shutdown my laptop, open it later and pull the compiled build?
<raghavsood>
You can have remote builders, but I believe they need your laptop to still control the process
<raghavsood>
For a fully standalone remote build, you probably want to run your own hydra and binary cache mix
<symphorien>
If the ssh connection is cut, then the remote builder cancels the builds
<eyJhb>
Damn it...
<eyJhb>
Hard to keep SSH alive while in the car :p
<raghavsood>
The trick is to have a server as your daily driver, and ssh into that from a laptop
<freezeboy>
otherwise, you need a vps and start the build direclty there
<symphorien>
you can nix copy the drv, and run nix-build on the drv on the builder via ssh in tmux or screen
<AlpineLlama>
Hey all! I'm trying to get my nix configuration to pull in my personaly dotfiles from git. I know of the fetchGit builtin function. but I can't quite puzzle out how to link or copy these directly to my home folder on install
alp has joined #nixos
<srhb>
AlpineLlama: You may want to take a look at home-manager for that.
<srhb>
AlpineLlama: Nix itself is not concerned with anything outside of /nix/store
<srhb>
NixOS and home-manager implement system services and scripts to bring this "outside of the /nix/store" in a reproducible manner (usually by clever linking).
C-16 has joined #nixos
<AlpineLlama>
srhb: thanks. I briefly saw home-manager but it seemed more concerned with writing the dotfiles in the nix way. I really just wanted to copy them over for the moment. thought there might be something simpler
<AlpineLlama>
but If that's the way I'll take a closer look. Thanks man!
<srhb>
AlpineLlama: You absolutely could rip out the parts of home-manager that does just that, but I'd say you gain way more by going to home-manager directly. It does support the simple linking case, as well as a ton of other stuff.
<freezeboy>
I tried to modify the definition of the librealsense package to optionally compile with cuda support, but on my current computer it freezes my machine, whereas another computer I used to use worked perfectly, do you think it is ok to submit the PR and let someone with a better machine compile it ?
<raghavsood>
If you open a PR, ofBorg will give it a shot compiling it for you, should be useful as a sanity check
<freezeboy>
oh yes true
<AlpineLlama>
Is it possible to add a nix channel from the configuration.nix? I would like to add the home-manager git channel directly in order to include it in my config
<AlpineLlama>
they only way I can find onlin is running nix-channel. But I would like this to happen automatically in my config
<srhb>
AlpineLlama: You're probably better off fetching a certain commit directly
<AlpineLlama>
srhb: I was trying that actually. I wrapped the set in a let home-manager = fetchGit {...} in
<raghavsood>
AlpineLlama: You can do `let home-manager = builtins.fetchGet{} in`
<AlpineLlama>
alright then it must be my import that's wrong
<srhb>
AlpineLlama: I do just that (but with pkgs.fetchFromGitHub)
<AlpineLlama>
Oh how is that different ?
<raghavsood>
Mine works with `fetchGit`
<srhb>
AlpineLlama: It's not, with respect to your problem
<srhb>
AlpineLlama: My import is: imports = [ (home-manager-src + "/nixos") ];
trewqasad1[m] has joined #nixos
<srhb>
(with home-manager-src being the source gotten from fetchFromGitHub/fetchGit, or whatever other fetcher :))
<{^_^}>
[nixpkgs] @freezeboy opened pull request #92997 → librealsense: refactor to allow use of cuda, and prepare for python integration → https://git.io/JJOvH
<raghavsood>
The link also works alright if you remove the comma :)
<AlpineLlama>
srhb: yeah awesome thanks. I was actually doing that with fetchGit but then messed up the expansion synctax in my path. Used "$(thing)/nixos" instead of "${thing}/nixos".......
pbb has quit [Read error: Connection reset by peer]
litschi has quit [Ping timeout: 260 seconds]
pbb has joined #nixos
litschi has joined #nixos
<freezeboy>
does anyoe tried to setup a local hydra + ofborg cluster ? is it easy to do ?
domogled has quit [Read error: Connection reset by peer]
<AlpineLlama>
srhb: sorry to bother you again.. I'm so close ... I'm just getting an error for my .emacs.d the line I'm using in ```home.file = bultins.readDir (builtins.fetchGit {...})```. But then it says that home-manager.users.llamagod.home.file..emacs.d in`/etc/nixos/configuration.nix' is not of type `submodule'
<freezeboy>
raghavsood ofborg seems happy, but it was so fast, I wonder if it compiled everything
<AlpineLlama>
maybe readDir is the wrong function for this ?
<freezeboy>
AlpineLlama you should have ".emacs.d" in your option name, no ?
<srhb>
AlpineLlama: And I do doubt you want readDir as well. Presumably you want emacs.d to be exactly the checked out source.
<AlpineLlama>
freezeboy: not sure I understand what you mean. yes .emacs.d is a directory and I just want it linked into my home folder from the git clone
<AlpineLlama>
srhb: Ah ok thanks. I wasn't sure how to input the dot name
<AlpineLlama>
but the git actually contains the .emacs.d as well as other files
<freezeboy>
or maybe not recursive ...
<srhb>
Probably not recursive, but ymmv.
kleisli has quit [Ping timeout: 260 seconds]
<srhb>
AlpineLlama: Then you do the same thing as you did with your home manager path, concatenate the dir onto the checked out path
<srhb>
AlpineLlama: you might run into a problem with the dot though
<freezeboy>
then you have a variable let repo = fetchgit ... in ... home.file.".emacs.d".source = "${repo}/.emacs.d"; }
<srhb>
So you'll probably want builtins.path to fix that up
<srhb>
Ah, actually, as a subdir that's probably fine
<AlpineLlama>
ok I'm seeing a little clearer. but I should probably just apply this through a map or something right?
<srhb>
No, no map.
<AlpineLlama>
(still just picking up the language here..)
<srhb>
You'll be symlinking the directory directly.
<AlpineLlama>
But I have several files to add this way
<srhb>
So there's only one source and target.
<srhb>
Okay, sure, you can do that then :)
<srhb>
It'll probably be clearer how to do that if you do a few by hand first though
<srhb>
But yes, if that's your goal you'll likely want to use readDir and mapAttrs.
<AlpineLlama>
srhb: fair. I'll already try to get emacs working then
<AlpineLlama>
thanks guys! I'll try it now
<duairc>
Is there any way to write a string to a temporary file from Nix that doesn't involve that file ending up in the world readble /nix/store ?
<srhb>
duairc: Sort of, as long as it's only used by the build, it'll stay in the sandbox if you delete it afterwards. It must be the same build though. But in general, avoid this, as it's easy to leak secrets to the store like this.
<srhb>
And I'm actually not sure the sandbox is read safe, come to think of it, so that might just punt the problem to /tmp. :)
<duairc>
srhb: Hmmm. Speficially I'm using NixOps and I want to set boot.initrd.network.ssh.hostKeys to a key that comes from resources.sshKeyPairs.<foo>.privateKey
<duairc>
But that gives me a string whereas I need a file
<duairc>
I can pkgs.writeText "initrd-ssh-key" the string, but then obviously it ends up in the global store
_ris is now known as ris
<duairc>
But with the boot.initrd.secrets stuff, I'm also bit hazy about if the construction of the initrd-secrets is being run on the machine I'm running NixOps on or the machine that it's deploying too
<clever>
duairc: i think you want to use deployment.keys to put the key on the machine, and set boot.initrd.network.ssh.hostKeys = "/path/on/remote/box"; to the path you told deployment.keys to use
andymandias has quit [Ping timeout: 265 seconds]
<{^_^}>
[nixpkgs] @primeos merged pull request #92996 → vaapiIntel: Refactor and improve the build expression → https://git.io/JJOvZ
<{^_^}>
[nixpkgs] @primeos pushed to master « vaapiIntel: Refactor and improve the build expression (#92996) »: https://git.io/JJOf8
<duairc>
clever: Ah, I guess you can use a directory other than /run/keys for deployment.keys, I forgot about that. My concern was that I would need to unlock the disk before I could do nixops send-keys, but I need the initrd SSH daemon to have the hostKey before I can unlock the disk
<duairc>
I think there's still a circular dependency here somehow, but I'll try this
<clever>
duairc: when updating /boot, the scripts will read whatever path you gave it, and copy the secret into the initrd
<raghavsood>
Anyone know how to do `recv-keys` declaratively? Ideally using home-manager
<stigo>
raghavsood: via gpg?
<raghavsood>
Yes
<raghavsood>
I have gpg installed, but I'd also like it to import my keys
<raghavsood>
Saves me from importing them on a bunch of servers manually
noudle has joined #nixos
mvnetbiz_ has quit [Quit: Bye!]
mvnetbiz_ has joined #nixos
<clever>
raghavsood: i'm thinking a systemd-user service, that just runs `gpg recv-keys < ${./keys}`
<clever>
when nix parses that, it will turn into `gpg recv-keys /nix/store/hash-keys`
<raghavsood>
Hmm, I guess that could work. A oneshot seems like a simple solution
<raghavsood>
But having an entire systemd service dedicated to a one time operation seems bloaty
<clever>
yeah, it would be one-shot, so it only runs on login and wont stay running
<clever>
systemd is about the simplest modern way to run something on startup
<raghavsood>
I was kind of hoping for something like `services.gpg-agent.keys = [ "0x..." "0x..." ];`, but I can see how that would be difficult to work with
<raghavsood>
Oneshot it is then, thanks!
<raghavsood>
clever++
<{^_^}>
clever's karma got increased to 473
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
ixxie has joined #nixos
captn3m0 has joined #nixos
<stigo>
raghavsood: something that runs `gpg --import my-keys.gpg` ?
<raghavsood>
stigo: Yup - I got it working with a oneshot service for now
<AlpineLlama>
I have a totally trivial question but I can't seem to find the answer in the manual. How do I add the lib module in my configuration.nix?
seanparsons has joined #nixos
<simpson>
Add `pkgs` to your signature, like `{ pkgs, ... }:` at the top, and then you can access `pkgs.lib`.
<ixxie>
what happens if a program installed by Nix updates itself?
<freezeboy>
ixxie it cannot
werner291 has quit [Ping timeout: 272 seconds]
zupo has joined #nixos
<ixxie>
freezeboy: right, because it doesn't get a right to mutate the store
<ixxie>
freezeboy: I mean, nothing gets that right obviously :D
<freezeboy>
exactly
proofofkeags has joined #nixos
Rusty1 has joined #nixos
meh` has joined #nixos
markus1189 has quit [Ping timeout: 256 seconds]
markus1189 has joined #nixos
<clever>
ixxie: some programs try to edit themselves in /nix/store, that will just hard fail
<clever>
ixxie: but i have seen that dropbox tries to put its update into something like ~/.dropbox/ and then the old ver runs the new ver automatically
<clever>
except the new ver isnt patchelf'd so it fails after the update, when it next launches
Melkor333 has joined #nixos
<clever>
so some just fail to update and keep working, others "successfully" but then brick itself, and wont work even if you do update with nix (you have to clear the right state)
litschi has quit [Ping timeout: 265 seconds]
litschi has joined #nixos
<Melkor333>
The following code is in a Repo which I'm using, but it's broken since 20.03
<freezeboy>
or nix-channel and use <unstable> in your configuration
proofofkeags has joined #nixos
<AlpineLlama>
freezeboy: thanks. I'll try to keep as much as possible in my config. I'm trying to use this accross my desktop and laptop so the more declarative the better
<freezeboy>
AlpineLlama using fetchFromGitHub in your configuration, you simply need to run from time to time nix-prefetch-github to find the rev/sha256 combination
<AlpineLlama>
freezboy: I don't seem to have that command though. only nix-prefetch-url
markus1199 has joined #nixos
<freezeboy>
nix run nixpkgs.nix-prefetch-github is your friend ;) or you can put it in your systemPackages
proofofkeags has quit [Ping timeout: 246 seconds]
<freezeboy>
the nix-prefetch-* is a big family
<AlpineLlama>
freezeboy: Ah thank you I found it now
<m1cr0m4n>
Hey folks, any notions what would cause an exit code 4 on switch-to-configuration? I'm writing some tests in nixpkgs, using nix-build to run them, and one of the nodes is doing this.
<clever>
424 print STDERR "reloading the following units: ", join(", ", sort(keys %unitsToReload)), "\n";
<infinisil>
Yeah exit code 4 is for when systemd units fail to start
<AlpineLlama>
freezeboy: thanks man. So in my config I would have {config, pkgs, ...}: {... nix.package = pkgs.nixUnstable; }. Is that right?
<m1cr0m4n>
clever: Interesting! thanks :) That will definitely help me track down what's going on. I can see one unit actually completes after switch-to-configuration so I must be missing some systemd dependency for it
noudle has quit []
<freezeboy>
AlpineLlama yes this line will set the unstable version of nix on your system, and if you need some other package from unstable, you use the fetchFromGitHub stuff
<AlpineLlama>
freezeboy: sweet! it seems that nixUnstable isn't new enough to have that submodules option though. I'm getting the error unsupported argument fetchSubmouldes
<Melkor333>
I am trying to fix a custom Nixos Module "nixcloud-webservices" which always gives me "attribute 'submodule' missing". The module wants to remap the submodule type of users.users.x to a custom option 'webserver.user.userOptions'. I would really like to fix it but I have no clue what I need to do...
<Melkor333>
It worked with 19.09 but doesn't anymore with 20.03
<Melkor333>
I assume it has to do with the change to types.submodule where one should use "path (submodule ...)" instead of "(submodule ...) path" but I don't really understand what is meant with that
<AlpineLlama>
which module is fetchFromGitHub in ? I had assumed it was in builtins but I'm actually getting an attribute 'fetchFromGitHub' missing
<{^_^}>
#75031 (by Infinisil, 31 weeks ago, merged): Module system improvements for NixOS as a submodule
<infinisil>
Just a guess though, could verify it by checking if it works before and after the PR
gustavderdrache has joined #nixos
<freezeboy>
AlpineLlama it is in pkgs
<AlpineLlama>
freezeboy: thanks man
<AlpineLlama>
really wish the documentation would use the full name every time....
<freezeboy>
the problem is that in packages, the convention is to let callPackage fetch from the pkgs to populate your parameters, but modules are not using this mechanism, so the two codes look different, and usualy fetch* are used in packages
domogled has quit [Ping timeout: 272 seconds]
waleee-cl has joined #nixos
<Melkor333>
Infinisil: I can test if that is the cause, but I don't get what I would have to change to make it work again. Your PR seems quite complicated!
domogled has joined #nixos
cmk_zzz has quit [Ping timeout: 240 seconds]
cmk_zzz has joined #nixos
<infinisil>
Melkor333: I could help with that if that's the case
<infinisil>
But looking at the code a bit better, I have no idea how this should ever have worked
Havvy has quit [Ping timeout: 244 seconds]
<infinisil>
Like for the `map (m: m.submodule) submodules` part, I have no idea where "submodule" is even defined like this
<infinisil>
I can't find it anywhere in nixpkgs or nixcloud-webservices
detran has quit [Ping timeout: 256 seconds]
<infinisil>
Ohh yeah no I can find it, in 19.09
<Melkor333>
oh wow, thank you for looking into it!
<Melkor333>
Wait, so it has nothing to do with your change then?
<freezeboy>
do you know how many people can review/approve/merge the PRs ?
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
<Melkor333>
Oh I see... Is there an easy way to rewrite it without using "submodule"?
<Melkor333>
damn I'm trying to wrap my head around what's happening there but I have absolutely no clue.. Guess I gonna dig a bit into the module.nix bc I really wanna understand what's going on there
<infinisil>
Melkor333: I think `type = lib.types.submodule toplevel.options.users.users.type.functor.wrapped.functor.payload.modules` should work
<Melkor333>
oh woww
<Melkor333>
haha that looks like a bunch of magic :D let me try it
<Melkor333>
oh okay, thanks for the explanation! That's pretty much the thing I was logically searching for but could've never found by myself :D
cosimone has quit [Quit: Quit.]
<infinisil>
Coping option types like this is rather messy, I wish there was a better solution
<Melkor333>
I mean it's not better but one could instead just use webserver.user = someuser; users.users.someuser = { extraconfigs };
<Melkor333>
it just gives a bit of extra convenience
nabataeus has quit [Quit: ERC (IRC client for Emacs 26.3)]
<infinisil>
Not sure how that would work
<Melkor333>
wait, that doesn't work?
<infinisil>
I'm not even sure what you mean by that
<infinisil>
Ah I guess maybe `webserver.user = "someuser"` and then `users.users.${config.webserver.user} = { <extra> };`?
domogled has quit [Quit: domogled]
<Melkor333>
yeah exactly
<Melkor333>
hmm i get "value is a list while a set was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:532:12"
<infinisil>
Melkor333: Are you using 20.03?
<Melkor333>
But i did some other changes to my config so it might also be something else, let me investigate
<Melkor333>
jup
<m1cr0m4n>
clever: Got any other recommendations on how I could debug switch-to-configuration return code 4? I've gone so far now as printing all services after fail and I can't see any errors
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
m1cr0m4n is now known as m1cr0man
<gulplante>
Using systemd-boot have anyone had the following occur to them?; During boot the efi selection menu is blank, but if I enter UEFI setup then exit then the selection menu shows up. I know the menu is just "blank" normally because if I hit any arrow key to cancel auto-choice count down I am stuck on a blank screen forever.
knupfer has quit [Client Quit]
knupfer has joined #nixos
cosimone has joined #nixos
<srhb>
gulplante: EFI selection menu as in the firmware one (not systemd-boot itself)?
knupfer has quit [Client Quit]
knupfer1 has joined #nixos
knupfer1 has quit [Client Quit]
knupfer has joined #nixos
<gulplante>
srhb: yes exactly
<srhb>
gulplante: No, but I'd try fiddling with the firmware boot options (like, splash screen disable/enable) if possible. And probably get the firmware updated to see if that resolves it.
detran has joined #nixos
<srhb>
I've also had a lot of firmwares misbehave when the number of boot entries is high, might also want to explore that.
<gulplante>
srhb: sorry, let me rephrase my first message: if I let the system boot without interfering, the sytemd-boot menu is blank. If I enter BIOS/UEFI setup during post and then immediately exit, then the systemd-boot menu will show up. The firmware has not been updated in a few years so might still be the problem, yeah? I'll try to fiddle with splash screen first
<srhb>
Yeah, I parsed it that way the first time. :)
<srhb>
There's also the possibility of doing a full reset of it -- if your boot loader is installed as "removable" (which systemd-boot should always be) you should still be able to boot simply because the first trivial disk entry will be able to locate the BOOTX64.EFI loader (but keep a rescue system handy anyway)
<srhb>
But yeah, not an easy problem to debug aside from tweaking all the knobs when it's that early.
<gulplante>
Enabling splash screen did the trick. Thanks! :D
<srhb>
heh, magic.
ixxie has quit [Quit: Lost terminal]
turion has quit [Ping timeout: 272 seconds]
teto has quit [Ping timeout: 272 seconds]
user_0x58 has joined #nixos
sheepfleece has joined #nixos
sb__ has joined #nixos
<sb__>
hi. I have a repository that I retrieve using fetchgit, and then a number of derivations use one file each from that repository. when the repository is updated, I want only those derivations that depend on files that have been modified to be rebuilt
<sb__>
each derivation depends on exactly 1 file from that repos
<sb__>
I tried using 'src = builtins.toPath (repos + "/file")' in the derivations but that does not work
<freezeboy>
sb__it is not possible the fetchgit gives one derivation, so anytime one file changes the whole repository's hash is changed
<sb__>
and also tried to hack it using fetchurl file:///repos/file but fetchurl of a store path is blocked
cole-h has joined #nixos
<sb__>
src = ./path_relative_to_nixfile has the right behavior
<raghavsood>
Not sure how to get nix-build to use it though
<symphorien>
with ssh-based remote builders ?
<raghavsood>
Yes
<symphorien>
I assume you can enable compression via ssh in /root/.ssh/config
<raghavsood>
I guess that's an option
jb55 has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @lukegb opened pull request #93013 → oven-media-engine: init at 0.10.4 → https://git.io/JJOtz
jb55 has joined #nixos
<infinisil>
Melkor333: :D
<infinisil>
Note that you probably want to make this backwards compatible
johnny101m has quit [Remote host closed the connection]
__monty__ has joined #nixos
<raghavsood>
Well, I did turn on compression, but it seems slightly less helpful than expected (or its the world's lightest compression algo, my local CPU is sitting at 0.01%)
<paraseba>
Is there a way to declaratively add entries to the EFI boot menu?
<nDuff>
Hmm. On Nix 2.3.6, I seem to have run into a situation where evaluating the same expression twice at the REPL, the first invocation succeeds (evaluating to what I'd expect), but the second one returns an error that appears to be caused by the wrong value being cached for a portion of that expression. Haven't yet built a standalone reproducer; hoping it sounds familiar to someone from the high-level description.
proofofkeags has quit [Remote host closed the connection]
proofofkeags has joined #nixos
<puck>
nDuff: pretty sure you're hitting the GC bug again
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #nixos
<srhb>
oh, hm, that probably needs a bit deeper consideration
zupo has joined #nixos
<srhb>
How on earth does that even work. O:-)
<jakobrs>
My current hypothesis is that `libvirtd.service` is launched because it's a dependency of `libvirt-guests.service`, which is wantedBy `multi-user.target`
<jakobrs>
And libvirtd dies after 2 minutes (because it's launched with --timeout 120)
philr_ has quit [Ping timeout: 272 seconds]
<jakobrs>
Although I can't tell why libvirtd.service is re-launched when libvirt-guests.service isn't
pamplemo1sse has joined #nixos
<jakobrs>
srhb: Do you have nixos/libvirt set up? Could you tell me what `systemctl status libvirt-guests.service` says under "Loaded"?
<jakobrs>
I think libvirt.service is launched directly by switch-to-configuration since switch-to-configuration sees it is 1. dead and 2. a dependency of multi-user.target (through libvirt-guests)
<srhb>
Ah, right, looking at the wrong unit.
<jakobrs>
Disabling libvirt-guests.service (using systemd.services.libvirt-guests.enable = false) makes the issue go away, which is how I know that it's related
<karetsu>
I'm having some issues installing kde, adding `services.plasma5.enable = true;` causes nixos-rebuild to have a hissy fit because plasma5.nix and seahorse.nix have conflicting values for programs.ssh.askPassword but I don't have seahorse anywhere in my list
<freezeboy>
you can force the value with mkForce
kim0 has joined #nixos
<karetsu>
nvm, seems we just aren't allowed to have both of services.gnome.enable and services.kde.enable
<karetsu>
that distinction is still solid XD
<karetsu>
gotta be either/or
karetsu has quit [Client Quit]
asymptotically has quit [Quit: Leaving]
freezeboy has quit [Remote host closed the connection]
zangi has quit [Quit: WeeChat 2.3]
pamplemo1sse has joined #nixos
<hyperfekt>
is there any documentation on how ryantm's bot updates a package? apparently it has trouble with git repos??
<{^_^}>
Found in packages: mediawiki, python27Packages.pygments, python37Packages.pygments, python38Packages.pygments
slack1256 has joined #nixos
KarlJoad has left #nixos [#nixos]
pamplemo1sse has quit [Ping timeout: 272 seconds]
pistache has quit [Ping timeout: 246 seconds]
<colemickens>
What should I troubleshoot if suddenly it seems like `nix build` isn't even trying the --builders I'm passing it?
<colemickens>
This was just working and now it insists it needs more build cores (which is how it acts when it can't do the build remotely as I'm trying to forcE).
<ma27[m]>
anything interesting when increasing the verbosity level (e.g. `-vvv`)?
<colemickens>
`considering building on remote machine 'ssh://root@nixos'
<colemickens>
hook reply is 'decline'`
<ma27[m]>
yeah, was just a wild guess I stated before you mentioned that `-vvvvv` provides more context :)
alexherbo2 has quit [Ping timeout: 272 seconds]
<colemickens>
ma27: it still very well could be.
<ma27[m]>
colemickens: does your host have many running builds atm (you probably want to recheck with `systemctl status nix-daemon`)? Asking because of the `decline`-reply.
<colemickens>
ma27: the builder host does not, I even rebooted it
<ma27[m]>
any other feature may be causing the trouble as well though
<colemickens>
That looks relevant. Idk about 'big-parallel' but I know azureImage makes the image via VM and I think that requires 'kvm' feature similarly.
<ma27[m]>
that sounds even more likely in your case IMHO
<colemickens>
Yeah, and it's my gaming PC's hyperv builder so probably not going to bother. I'll suffer the local build.
<colemickens>
Thanks a ton, this saved a lot of self hair pulling
<colemickens>
ma27++
<{^_^}>
ma27's karma got increased to 1
<ma27[m]>
iirc my handle should be ma27[m] in irc btw :p
<pbb>
I just packaged a big python application (pretix, a web app for selling stuff, mostly tickets for events). But it has many python dependencies with strict version requirements. What is the usual way to handle this? Package this version in addition to the most recent version? Patch out the version requirements and hope nothing breaks?
<colemickens>
hmm ma27[m]++ I tried.
<{^_^}>
ma27[m]'s karma got increased to 18
__monty__ has quit [Quit: leaving]
<ma27[m]>
colemickens: may I ask what's wrong with setting `supportedFeatures = [ "big-parallel" "kvm" ];` for the builder in question?
<colemickens>
ma27: it's more of "I don't want to RDP to the machine and figure out how to enable nested virt in hyperv"
pamplemo1sse has joined #nixos
<colemickens>
It seems like it might just be a single Powershell command, maybe between games of Overwatch later.
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to release-20.03: https://git.io/JJOcQ
<ma27[m]>
pbb: if there are too many specific version constraints, you probably want to package the required versions of the python deps as well (as an example, you may want to take a look at `pkgs.paperless`). If it's too uch effort in the end, you may want to consider publishing an overlay/a flake somewhere.
cosimone has quit [Remote host closed the connection]
<pbb>
I see
<pbb>
I think it would be a huge win to have it upstream, so I'll try at least
cosimone has joined #nixos
<pbb>
It has 67 python dependencies and more than half of them are locked to a specific minor version