jmeredith has quit [Quit: Connection closed for inactivity]
redmp has joined #nixos
<redmp>
i'm trying to use nixops to deploy a systemd service to a vm
ASHKITTEN is now known as ashkitten
<redmp>
however nixops doesn't create a systemd service unit on the target machine
mbrgm_ has joined #nixos
mbrgm has quit [Ping timeout: 264 seconds]
mbrgm_ is now known as mbrgm
m0rphism1 has quit [Ping timeout: 245 seconds]
cinimod` has quit [Ping timeout: 264 seconds]
<jonreeve[m]>
Does anyone have a dead simple example of writing a Python derivation in a Nix flake, that has a GitHub dependency and a PyPi dependency?
<figgyc>
Hi, theres a service in nixpkgs (its quassel but i dont think thats important) that i'm looking to change some of the settings on. Specifically I want to try and add an argument string to the end of systemd.services.quassel.serviceConfig.ExecStart (so a string), but i don't think there's a good way to add on to an existing value defined elsewhere
<figgyc>
without overwriting it? no extraconfig etc either. So is there a good way to do that and if not what would be the best way to change that setting?
Rainy_Day has quit [Remote host closed the connection]
<infinisil>
The reason for this is that ExecStart is a (listOf str), and that's bad because lists aren't overridable, you can only add extra items, not change existing ones in a modularized way
leah2 has quit [Ping timeout: 260 seconds]
apache801 has joined #nixos
<infinisil>
I've been wanting to deprecate listOf for a while now, replacing lists with better alternatives that let you override them
danderson has quit [Remote host closed the connection]
danderson has joined #nixos
<andoriyu>
guess It's on my end, bad kernel config
ddellacosta has quit [Ping timeout: 256 seconds]
evils has joined #nixos
delroth has quit [Ping timeout: 264 seconds]
fl0_id has quit [Ping timeout: 256 seconds]
reactormonk1 has quit [Ping timeout: 272 seconds]
jonringer has quit [Remote host closed the connection]
Swant has quit [Ping timeout: 606 seconds]
aei has quit [Ping timeout: 240 seconds]
dbmikus has joined #nixos
xelxebar has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
xelxebar has joined #nixos
jbox has joined #nixos
Swant has joined #nixos
delroth has joined #nixos
fl0_id has joined #nixos
reactormonk1 has joined #nixos
<andoriyu>
nope, can't build kernel no matter I try
<matthewcroughan>
error: opening file '/nix/store/nq040czpwjc61jx63vlvb3g9q1qf0wgg-kitty-0.19.3/nix-support/propagated-user-env-packages': No such file or directory
<matthewcroughan>
anyone know why I can't use this ?
<matthewcroughan>
the cli was "./nix run --store $HOME/.cache/nix/store -f channel:nixos-20.07 kitty"
<redmp>
clever: oh, i haven't heard of that.. i'll look for docs
tomberek has joined #nixos
palo has quit [Ping timeout: 276 seconds]
palo1 is now known as palo
<jawr>
how dangerous is it for me to make a symlink of say: /run/current-system/sw/bin/lvm -> /usr/bin ?
<jawr>
a docker container isnt able to pick up the PATH correctly and is failing
CMCDragonkai1 has joined #nixos
Emantor has quit [Remote host closed the connection]
ronthecookie has quit [Excess Flood]
ronthecookie has joined #nixos
Emantor has joined #nixos
<tomberek>
jawr: sounds like an XY problem
<jawr>
im trying to run rook.io on kubernetes, it requires lvm to be present on the host (it looks like it just mounts the host as a rootfs in the container) and so paths dont seem to be working
<redmp>
how can i import my own machine's `config` in nix repl?
<clever>
redmp: `nix repl '<nixpkgs/nixos>'`
<94KAAA9XC>
[nixpkgs] @berbiche opened pull request #114955 → lib/modules: provide a better error message when "imports" contains a list → https://github.com/NixOS/nixpkgs/pull/114955
<jawr>
the only mention of a way to mount anything is via an env variable, but i havent quite detangled yet if and how it effects this particular container
<redmp>
clever: .. is this backend specific? I think the link i found was for aws
<redmp>
hoping to find a generic way to do this, or at least something that works in both virtualbox & ec2
<clever>
redmp: looks like its time to file a bug on nixops!
<clever>
redmp: also, nixops will populate /etc/hosts with all of the other machines for you
<redmp>
eh? why? it's not possible?
<clever>
so you can just refer to them by name, and the ip is handled for you
<redmp>
oh, that's amazing
cinimod` has quit [Ping timeout: 260 seconds]
Boomerang has joined #nixos
<redmp>
clever: i'm looking now at the hosts file; i have a network of two machines, a and b, and in a's host file there's b and b-encrypted
<redmp>
what's b-encrypted?
<redmp>
aaand... does this hosts file trick work on both ec2 and virtualbox? (i'm currently developing with virtualbox)
<clever>
redmp: the -encrypted is a rarely used feature where nixops can create dedicated vpn links between machines
<redmp>
i guess i can just branch based on what attributes are ste
<redmp>
are set*
<clever>
i think ec2 also creates hosts entries for both the public and private ip
<redmp>
clever: i haven't enabled a vpn feature..? is it just on by default?
<clever>
its off by default, but the /etc/hosts entries are still made
<redmp>
ahh, ok, then i'll just ignore them ; thanks
<redmp>
might come in handy in the future though
<jawr>
hmm nixops hasnt made hosts entries for me.. everything in the same deployment should be in there?
<clever>
jawr: yes
ahmedelgabri has joined #nixos
mananamenos has joined #nixos
<redmp>
so, i have a `defaults = { ... }` stanza on my top level nixops network, but it seems that the services.openssh.ports = [ 22 ]; setting in there was ignored :(
cinimod` has joined #nixos
<redmp>
so my virtualbox vms have started up using the port meant to be used on ec2, and now nixops can't communicate with them (because it is trying to connect on 22)
<mvnetbiz_>
How can I get an nixos image as a flake output? (iso, aws, etc.) I think i'm missing a hint in nixpkgs/flake.nix maybe
<simonpe^^>
I'm using strings and readelf from binutils for my builds but when cross compiling they are prefixed with the arch triplet so I need to "calculate" the executable name to call in the derivation which is pretty ugly. Is there a better way to do this?
<clever>
simonpe^^: $READELF and friends, i believe
<mvnetbiz_>
and, it's just the 4 I listed. I was wondering what would be the neatest way to reference nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix from a flake.nix? I guess I could do ${modulesPath}/../maintainers maybe?
respawn_ has joined #nixos
<clever>
mvnetbiz_: or pkgs.path
<clever>
> "${pkgs.path}"
_novafacing has quit [Read error: Connection reset by peer]
strikerlulu has quit [Ping timeout: 245 seconds]
<simonpe^^>
clever: I'm actually inspecting the env and it seems to actually be there, not sure what derivation it comes from though
<srhb>
*crickets*
<simonpe^^>
In general, what's the difference with xxx and xxx-unwrapped packages?
<clever>
simonpe^^: the cross compiler should set all of those env vars
ahmedelgabri has quit [Ping timeout: 240 seconds]
<simonpe^^>
clever: thx
<clever>
simonpe^^: the wrapped one will properly respect buildInputs and knows where to find libc
strikerlulu has joined #nixos
RyuKurisu[m] has joined #nixos
<simonpe^^>
thx: while we're at it - do you know of the cross contamination problems from the gcc suite, is there any best practices there to not end up with host glibc in the cross binaries? I'm having some problem with the gdbserver (I think) for aarch64/armv7l pulls in host glibc
<mvnetbiz_>
I was hoping I could do something like this in a flake.nix, but I get infinite recursion.
<clever>
simonpe^^: ive not had any problems with the arm binaries linking to an x86 libc
<simonpe^^>
I've seen a few PR that "solved" this but I am still having problems with it
<clever>
simonpe^^: but they do depend on the x86 libc, and thats not been simple to fix
<simonpe^^>
clever: do you know of some package that does post processing to filter that out? my current hack is to just use readelf -h and check that the Machine: field of every file in $out is alright
<clever>
simonpe^^: the linker should refuse to even try to link a library from the wrong arch
<simonpe^^>
clever: I'm not sure how patchelf --print-needed works but I do that AND something like `strings $binary | grep /nix/store` to find all the store refs, so it could maybe be something else than a .so dependency
<clever>
simonpe^^: patchelf ignores the rules and can break a lot of things
<clever>
one minute
<clever>
simonpe^^: also, you need to respect the rpath of each library, recursively
<clever>
simonpe^^: and a program to do exactly that already exists
<simonpe^^>
I kind of just search the file from `writeReferncesToFile`
n-osborne has quit [Remote host closed the connection]
<simonpe^^>
what program is that?
<clever>
simonpe^^: find-libs, on line 164 of stage-1.nix
<redmp>
i have an expression `foo.nix` which is roughly `{option1,option2}:{pkgs,...}: { stuff }` .. in another file i do `import foo.nix {option1,option2}` which _should_ return a function `(pkgs,...):{ stuff }`
<clever>
redmp: `{option1,option2}` is a syntax error
<redmp>
ah, sorry, they have values in the callsite
<redmp>
anyway, that part is all working
<clever>
then it should do what your expecting
ddellacosta has joined #nixos
<redmp>
the part i'm having trouble with is this: i'd like to override the `{ stuff }` so i'm trying to change the callsite to `args: (import ./foo.nix {inherit option1; inherit option2;}) args`
<simonpe^^>
clever: whoah, this function is basically what I've been writing myself
<redmp>
ie. i've wrapped the original callsite with `args:( ... ) args`
graf_blutwurst has quit [Remote host closed the connection]
<clever>
redmp: sounds like you want to play with overlays
graf_blutwurst has joined #nixos
ahmedelgabri has joined #nixos
respawn_ has quit [Quit: Leaving]
<redmp>
clever: i have a paper submission due tonight :P
<clever>
redmp: line 3-51 defines the initial package set, in the form of `packets = self: { ... };`
<simonpe^^>
clever: it's hidden behind a `let = ...; in`, do you know of some way that I could import it into my code without copy pasting it?
<clever>
redmp: you use self.callPackage to load sub-components, and that new callPackage will search in this set first
<clever>
redmp: then you do `self = pkgs.lib.makeScope pkgs.newScope packages;` to spawn an instance of that, against a given pkgs tree
<redmp>
clever: i don't see callPackage in th efile?
<mvnetbiz_>
clever: I need to fix some other eval errors, but the flake image issue is using ${pkgs.path} in imports, I think since pkgs isn't fixed because of potential overrides yet to come. Does that make sense? using ${modulesPath}/../ works though
<clever>
redmp: and then line 54, `self.overrideScope' (self: super: { ... })` will inject an overlay, between the return value and self
<clever>
redmp: yeah, i'm not using the callPackage bit in this case, just direct self.foo references
<clever>
simonpe^^: there is a pending issue to rewrite half of stage-1.nix into reusable tools
<clever>
simonpe^^: mobile-nixos and rpi-tools both need the initrd building part, with different rules
<redmp>
honestly, none of that feels simpler than wrapping a callsite with `args: ( ... ) args` .. :)
<clever>
redmp: how is that failing?
ddellacosta has quit [Ping timeout: 245 seconds]
<redmp>
it's saying that it's no longer getting the required argument `pkgs` in `foo.nix`
<clever>
redmp: then the `{ pkgs, ... }:` step isnt being ran with a set containing pkgs
<redmp>
but it is if i remove the wrapping `args: ( ... ) args`
<redmp>
and just leave the ...
ahmedelgabri has quit [Ping timeout: 240 seconds]
<clever>
redmp: `args: ({pkgs, ... }: stuff) args` will need an `args.pkgs`, does that exist?
<clever>
redmp: since you didnt explicitely ask for pkgs, nixo(p)s didnt give pkgs
<simonpe^^>
clever: thank you man, you saved me a LOT of work! I swapped out my custom dependency search for findLibs and now I don't get any cross contamination :)
<redmp>
so `{pkgs,...}:{}` is not the same as `args:({pkgs,...}:{}) args` ?
<clever>
redmp: in the nixos case, yes
<redmp>
oh, that clears up this confusion then
<clever>
redmp: for infinite recursion reasons, nixos will specially call you with exactly what you asked for and nothing more
<clever>
simonpe^^: originally, it was written using ldd, but ldd doesnt work for cross
<redmp>
i'm going about this the wrong way
<clever>
redmp: mkMerge will be a much better solution anyways
<redmp>
i'm trying to change out a use of `defaults = { ... };` with something that will override instead
<clever>
redmp: this lets you specify multiple nixos modules, and each one can be in the form of { config, pkgs, ... }:
<simonpe^^>
I've been for a couple of days on this ticket :D
<clever>
redmp: and then you can freely use mkForce like you would normally in nixos
<clever>
simonpe^^: qemu-user also breaks ldd, if qemu was dynamic
<clever>
simonpe^^: you wind up with qemu's deps, not the targets deps!
<redmp>
clever: why is module2 applied to module1?
<clever>
oops, parens shouldnt be there
<clever>
typo
<redmp>
ah, ok. makes sense then
<simonpe^^>
clever: I'm not sure we'll ever run these closures with qemu as we can build them for host for the integration testing of our apps
<simonpe^^>
we do run the unit tests with qemu and that works beautifully with nix because of the rpath magic and global nix store
<simonpe^^>
but for those we don't have to package it up in a container/tarball/whatever
simba1 has joined #nixos
<clever>
simonpe^^: i once made an SD card, that had both arm and x86 builds of the same configuration.nix, with bootloaders for both x86 and rpi
<simonpe^^>
that is wicked
cole-h has quit [Ping timeout: 264 seconds]
<clever>
simonpe^^: so the same rootfs could boot on either, and nixos-rebuild switch on either
jonringer has quit [Ping timeout: 240 seconds]
<simonpe^^>
I truly love nix and introduced it with my current customer for deploying microservices to embedded arm devices, but I have a hard time keeping my two close collegues equally enthusiastic because they don't understand it well. That is the only drawback of nix that I've seen since tinkering with it for a few years then working with it professionaly for 8 months
<redmp>
clever: so, `machine1 = lib.mkMerge [ module1 module2 ];` doesn't work because i'm generating a list of machines, with distinct specs, and i want to apply a single override attrset against all of them
<simonpe^^>
I think it might be the lack of a background with functional programming that is the major roadblock for most people - they call it *magic*
<redmp>
i'd have to push the mkMerge call down into the file that defines `{pkgs,...}{ stuff }`
<clever>
redmp: use map to turn a list of things into a list of `lib.mkMerge [ common per-machine ]` ?
<clever>
redmp: or use defaults to set common stuff?
<redmp>
defaults doesn't override
<clever>
simonpe^^: i learned nix and haskell at the same time
<clever>
redmp: defaults will merge, mkForce can then override, same rules as nixos
<redmp>
oh, cool
<simonpe^^>
ouff, that's a mouthful haha. I did the haskell part first
<clever>
simonpe^^: as i was learning nix, i wanted to know, how can you write a functional lazy language in c??
<clever>
simonpe^^: so i just tore open the nix source, and looked at the implementation!
zupo has joined #nixos
<clever>
haskell's implementation is far more complex, due to it being native rather then more interpreted
<clever>
simonpe^^: for nix, the entire functional AST is just translated directly into a tree of value/thunk classes in c++, and lazy things are just a c++ function pointer and some args, forceValue then just recursively evals each thunk, until the required value is known
ETU is now known as etu
<clever>
simonpe^^: but haskell, is a complicated web of tail-calls of native code...
<mvnetbiz_>
I like the idea of functional languages. besides nix I haven't programmed in much, besides some toy programs in haskell or lisp. give specific algorithm to implement, I can figure it out, but I don't understand well how to make programs that actually do something with outside state
<simonpe^^>
clever: I never looked into the implementation but what you're saying makes complete sense. Translating lazy code into machine instructions have been witch craft for me and I can't say I know anything about how compilers work more than the birdseye view
<redmp>
clever: is this what's called "naive graph evaluation"?
<simonpe^^>
I can imagine the GHC people had a hard time making sure that all these tail-call optimizations actually happen when they're not guaranteed
<clever>
redmp: maybe?
<clever>
simonpe^^: its all tail-calls, thats all GHC can generate!
<mvnetbiz_>
I want a Nix shirt that says "all my programs were compiled in 1969"
<clever>
simonpe^^: the native stack is basically unused, every chunk of ghc generated code will tail-call into the next, and maintain the haskell stack within the haskell heap
<clever>
simonpe^^: and userland threads are then simple to context switch, no native stack to deal with, just save the haskell stack+PC, and jmp somewhere else!
aminechikhaoui has quit [Read error: Connection reset by peer]
aminechikhaoui8 has joined #nixos
<simonpe^^>
it sounds like it should be pretty reliable then
yourfate has quit [Remote host closed the connection]
alp has quit [Remote host closed the connection]
zfnmxt has quit [Ping timeout: 272 seconds]
eyJhb has quit [Read error: Connection reset by peer]
alp has joined #nixos
kwork has quit [Quit: No Ping reply in 180 seconds.]
ddellacosta has joined #nixos
yourfate has joined #nixos
eeva has quit [Ping timeout: 272 seconds]
eyJhb has joined #nixos
zfnmxt has joined #nixos
kwork has joined #nixos
<redmp>
clever: where did you get your familiarity with ghc's compilation?
<mananamenos>
hi, i've installed haskell-language-server in nixos and trying it with basic haskell proyect. Many things work, but others don't (go to implementation hangs with a message: lsp-request: Timeout while waiting for response. Method: textDocument/implementation.) Also when I create a new module I get "Multi cradle: No prefixes matched". I remember having tried this before https://github.com/Infinisil/all-hies/tree/master/templat
<mananamenos>
es/nixpkgs-cabal and did not have any these issues
codezero has quit [Read error: Connection reset by peer]
codezero has joined #nixos
<eyJhb>
ma27[m], ajs124 : Ping regarding Nextcloud. Does your instances work with automatically updating the view in the browser, when text change in e.g. Deck, if you use that? Currently I have to force a refresh, and I am told that should not be required.
figgyc has joined #nixos
zupo has joined #nixos
zupo has quit [Client Quit]
ddellacosta has joined #nixos
meh` has joined #nixos
<immae>
eyJhb: Did you investigate your browser javascript and network console already?
<immae>
For instance you should have regular calls to /ocs/v2.php/apps/notifications/api/v2/notifications in your network tab (which I suppose is what makes the view "dynamic"), do you have them?
riksteri has joined #nixos
<redmp>
hmm.. so i'm trying to spin up a bunch of nixops VMs all with basically the same configuration except for the arguments passed to a systemd service, and it's _compiling the systemd service_ separately for each machine :(
<eyJhb>
immae: Let me check
<immae>
redmp: look at it, it’s just a small text file (the systemd service config)
<immae>
So nothing unexpected (since you change the arguments of that service)
ddellacosta has quit [Ping timeout: 276 seconds]
<redmp>
it's configured like this in nix: ExecStart = "${import ../. {}}/bin/example ${args}"
<redmp>
should i instead pass that in as an argument to prevent duplicate evaluations?
<pinpox>
Maybe someone can give me a few hints on best practices of how to speed up system rebuilds, I'm managing a few servers and my personal machines. I've also setup github actions to build my configuration on push, would be nice if that result could be cached somewhere so that when I update my machines they don't have to build much themselves
domogled has quit [Quit: domogled]
domogled1 has joined #nixos
<domenkozar[m]>
hey pinpox, Cachix works as a business since people pay for it, I have no intention of injecting anything into your caches
<pinpox>
If I understand correctly, I would then run "nixos-rebuild switch" as usual, just that it uses an additional cache (cachix) which happenes to have everything already build in it that I need
__monty__ has joined #nixos
ddellacosta has joined #nixos
<domenkozar[m]>
adisbladis: I don't mind dropping it
<pinpox>
domenkozar[m]: thanks. Will work through that, I just wanted to make sure I was understanding this correctly and not doing something stupid
<domenkozar[m]>
note that if you're using free tier your binary cache is public
<domenkozar[m]>
so if you leak build log for example, anyone can see store paths and get them from your binary cache
<domenkozar[m]>
I don't know what you deploy there, maybe some proprietary software, secrets in store, etc
<pinpox>
domenkozar[m]: Secerts should all be in env files or in /secrets (outside the nix store).. I'm a bit concerened to misconfigure something though and accidently put a secret into the store in the future
<pinpox>
Can I self-host an instance of cachix aswell privately?
ddellacosta has quit [Ping timeout: 276 seconds]
<domenkozar[m]>
No, but you can pay to have private binary cache
<adisbladis>
pinpox: I have a hack that poisons secrets and makes them unbuildable
<pinpox>
adisbladis: So you could make my systems not build?
<pinpox>
hm that is not very good
<adisbladis>
No, but I mean to prevent them ending up in the store
<pinpox>
adisbladis: how?
<domenkozar[m]>
pinpox: I generally advise not to take that risk, but everyone has to decide for themselves. I think if you can allow human mistake it's better than hoping it never happens.
<pinpox>
domenkozar[m]: Yes.. thats in the lines of what I was thinking. I'm pretty sure there are no secrets in my store, but I definitely could mess that up in the future
<pinpox>
I'm not sure I have the money to pay for the private tier at this point, I'm doing this privately and not for a company or so
<pinpox>
domenkozar[m]: wait, can I configure the cachix action so that it's only "input source" is the github repository with my config? because that definitely does not contain any secrets so there would be no way for them to end up in cachix?
<domenkozar[m]>
pinpox: you can't really force that it's the only source, but if you only push from there it should be good as long as you don't commit anything to your repo
<adisbladis>
pinpox: So your secret is still in the drv file, but at least it becomes painfully obvious that you have done something wrong
<94KAAA9XC>
[nixpkgs] @orivej-nixos pushed 2 commits to master: https://git.io/JqeQq
<pinpox>
adisbladis: I see. But my secrets are not in drv files I think, they are only files in a directory that get's scp'ed
<pinpox>
domenkozar[m]: If I push a secret to git I'm screwed anyway. The only thing I have to make sure is that the servers only read from the cache when updating, but never write
<domenkozar[m]>
you can generate write/read per-cache tokens on Cachix
<pinpox>
It should be something like "use the official cache + my cachix cache to find as much as possible prebuild. If both caches miss, build yourself"
<pinpox>
domenkozar[m]: Do the servers need a token at all since the cache is public?
<kenran>
Is the following scenario achievable? : I build something locally via nix-build, then "put" it on a remote machine. When I (or my colleagues) need to build the same thing again, I'd like to get a "cache hit" and use the built one from the remote machine.
<pinpox>
domenkozar[m]: Would it be enough to add a write token to the github action and no tokens to the servers using the cache?
<kenran>
I found out about Distributed Builds, but those seem to be for when the remote machine actually builds the stuff. I'd be looking for something that's "just a cache".
<pinpox>
kenran: Exactly what I'm just asking, maybe you can use my solution aswell
<kenran>
pinpox: ohhhh I didn't expect that, thanks for pinging me.
<domenkozar[m]>
pinpox: yeah, nixos-rebuild will copy stuff over
<domenkozar[m]>
it might be faster from the cache, but this is really details :)
<adisbladis>
kenran: There are plenty of solutions ranging everywhere from commercial off the shelf (cachix) to hosting your own on s3/whatever to just doing `nix copy` in a post build hook to a remote server
<pinpox>
domenkozar[m]: Sorry for asking again, but I have to be sure: With "copy" you mean only cache -> machine running rebuild, never server -> cache, right?
<domenkozar[m]>
kenran: note that cachix is free if your cache is public and S3 is also commercial and not free (also harder to setup) :)
<pinpox>
domenkozar[m]: I don't want it to "auto-update" if you mean that. Github doesn't have my secrets, so it won't be able to provision my machines
<pinpox>
I want to keep the update process manual for now, just use a cache so that it doesn't have to build stuff on the machines (just fetch from the cache)
<domenkozar[m]>
pinpox: ah, so you run nixos-rebuild swtich on the server?
<pinpox>
Ok cool. Thanks domenkozar[m] I'll try that out then. The other option I was considering would be to use on of the servers as build host and set it up like in https://nixos.wiki/wiki/Distributed_build#NixOS but I guess I can archive the same thing using cache and only a write token for github then
whald has joined #nixos
<domenkozar[m]>
pinpox: yeah there are many ways to do it, but the core of it is to have a cache between builds to avoid rebuilding :)
<tad-lispy[m]>
Committing changes to a git repository and pushing to a remote seems like an idea. But I don't want to be bothered with typing extra commands - I would surely forget to do so. It would be nice to have a mechanism to do it on every `nixos-rebuild switch`.
vs^ has quit []
EDEF is now known as edef
<tad-lispy[m]>
Is there some kind of hook I could use to run commands when switching?
<dutchie>
just use flakes, then it nags you when you haven't committed
<sterni>
DigitalKiwi: I hope it won't be too painful splitting all those changes into logical ones with git add -p
<DigitalKiwi>
Mar 03 13:32:03 mvp-nixos xserver-wrapper[3286]: (EE) event5 - USB-HID Keyboard: client bug: event processing lagging behind by 15ms, your system is too slow
<attila_lendvai>
supersandro2000, my idea is to extract the "effectiveInstanceCount" into a let variable in the implementation, and hope that it won't break the manual
graf_blutwurst has quit [Ping timeout: 240 seconds]
D_ has joined #nixos
<sterni>
attila_lendvai: in the implementation you can also use lib.mkDefault to add a low priority "default" value
<sterni>
attila_lendvai: this way you could ensure that the 0 you're detecting is not explicitly set without adding another case like null
<sterni>
not sure if this is necessary in your case though
<attila_lendvai>
sterni, i tried for a while but it has always lead to infinite recursion.
<sterni>
sounds about right :/
<{^_^}>
[nixpkgs] @SuperSandro2000 opened pull request #114989 → remove many unused inputs; mark some packages broken; serf: switch to pname + version → https://github.com/NixOS/nixpkgs/pull/114989
<attila_lendvai>
now the error moved from the manual to the actual service: The option `services.bee-clef.instanceCount' is used but not defined.
<attila_lendvai>
it works, but ugly... is there a better way to do this: optional (0 < (if x == null then 0 else x))
domogled has joined #nixos
<sterni>
x != null && x > 0
cfricke has quit [Quit: WeeChat 3.0.1]
<attila_lendvai>
i tried the (x or 0) idiom, but it doesn't seem to be equivalent; it has lead to cannot compare null with integer error
* attila_lendvai
tries
<sterni>
attila_lendvai: or only works for attributes of sets
orivej has quit [Ping timeout: 246 seconds]
gustavderdrache has joined #nixos
<attila_lendvai>
sterni, are you sure it's only that? i get "cannot compare an integer with null" using this: optional (0 < (config.services.bee-clef.instanceCount or 0)), while the !=&& form, that you have suggested above, works.
<sterni>
attila_lendvai: foo.bar or baz will only ever return baz if the attribute set foo has no attribute bar
Dr8128 has quit [Quit: Leaving.]
<sterni>
i. e. it is roughly equivalent to if foo ? bar then foo.bar else baz
Dr8128 has joined #nixos
<attila_lendvai>
sterni, oh, right. i was slow... sorry!
<sterni>
or returns its left if it has any value
<attila_lendvai>
...and i need that config to default to null to differentiate when the user is setting it to 0 to activly turn off the service.
kenran has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @primeos pushed to master « chromium: Add my script to generate the commit messages »: https://git.io/JqvkV
miatomi[m] has quit [Quit: Idle for 30+ days]
pheoxy has quit [Quit: Idle for 30+ days]
schmim[m] has quit [Quit: Idle for 30+ days]
<sterni>
allowing for unset options in modules at some point would be really nice
<sterni>
you can already have that but not if the option is to be documented
<sterni>
I find the nullOr pattern a bit ugly, but it is the only way I know of
<RyuKurisu[m]>
You know what's awesome about Nixos? That if you wonder if something can be easily installed then you probably can **and** in multiple configurations!
<RyuKurisu[m]>
E.g. Bitwarden_rs and Bitwarden_rs-vault 😎👍
<levels>
I've tried everything I could find, watched videos, did tutorials, nothing worked so far. As soon as I connect my nixos desktop, all I can do is ping the VPN server, everything else is unreachable
<fiveseven[m]>
I use SoftEther instead
<{^_^}>
[nix] @edolstra pushed to master « nix repl :doc: Don't return docs for partially applied primops »: https://git.io/JqvmG
<cizra>
Hi! I'm trying to set up a VM with libvirt, with secure boot enabled for the VM. I set qemuOvmf=true, which doesn't do secure boot. There's a OVMF-secureBoot package though. How do I tie it into libvirt's configuration?
<JaakkoLuttinen[m>
`setuptoolsShellHook` installs the Python package in editable mode and then adds the created egg-link directory to `PYTHONPATH`. Why not just directly add the source directory to `PYTHONPATH`? Why is this editable installation needed at all?
Acou_Bass has quit [*.net *.split]
microcolonel has quit [*.net *.split]
IRCsum has quit [*.net *.split]
mz` has quit [*.net *.split]
clever has quit [*.net *.split]
m_hackerfoo has quit [*.net *.split]
HackerFoo has quit [*.net *.split]
mupf has quit [*.net *.split]
jluttine has quit [*.net *.split]
nisstyre has quit [*.net *.split]
Cale has quit [*.net *.split]
cransom has quit [*.net *.split]
itorres has quit [*.net *.split]
orbekk1 has quit [*.net *.split]
<JaakkoLuttinen[m>
* `setuptoolsShellHook` installs the locally developed Python package in editable mode and then adds the created egg-link directory to `PYTHONPATH`. Why not just directly add the source directory to `PYTHONPATH`? Why is this editable installation needed at all?
levels has joined #nixos
Guest24629 has quit [Ping timeout: 246 seconds]
<levels>
I'v tried with openVPN before, this has become the struggle of my life, just unbelievable how hard this stuff is, for a seemingly simple task
<emilsp>
is there any way one can add enough nftables rules to circuvent nixOS's builtin firewall?
<levels>
One thing I noticed in the wg-quick section of the nixos wiki is that its using the presharedKey feature, I was convinced this was optional so I havent tested with this
lsix has quit [Ping timeout: 240 seconds]
<emilsp>
levels, the preshared key is strictly optional.
chisui has quit [Quit: Connection closed]
<levels>
ok, so that shouldnt cause the troubles I'm facing
<levels>
too bad though.. it was my last hope
<emilsp>
I can't see any of your previous messages because of the netsplit, but are your allowed IPs set correctly?
<levels>
Has anyone here managed to get this working?? NixOS box on VPS with dnsmasq / wireguard as server, NixOS box local as wireguard client?
sangoma has joined #nixos
<emilsp>
there are no wireguard servers, just peers.
<levels>
emilsp should we dm?
<emilsp>
sure
mz` has joined #nixos
dbmikus has joined #nixos
<levels>
have to register first, almost there
saschagrunert has quit [Remote host closed the connection]
bn_work has joined #nixos
wrench has quit [Read error: Connection reset by peer]
<Luker>
Has anyone managed to boot nixos on raspberry pi4, usb, gpt and >2TB drive?
<kiwi_73>
Hello everyone. I am mastering nixos. Anyone have any good experience with opencl on amdgpu? After searching, I did not find a solution. There is only rocm, which requires hardware support from the processor and motherboard. Maybe someone has a working config with amdgpu-pro or opencl-mesa?
<levels>
@kiwi_73 I remember setting up an eth miner on debian, allthough I'm not a compile expert, I find the nix way pretty convenient to build packages from sources using mkDerivation rec
<{^_^}>
[nixpkgs] @SuperSandro2000 merged pull request #114989 → remove many unused inputs; mark some packages broken; serf: switch to pname + version → https://github.com/NixOS/nixpkgs/pull/114989
<shla>
how do you pass nixos configuration to an EC2 instance?
<shla>
echo with inline config in the userdata?
<shla>
and then few additional commands to rebuild & reboot the machine?
fendor has quit [Remote host closed the connection]
<jared-w>
ok so if I wanna create an ova with zfs as the root file system there's no nice way to do it with any of the standard nix stuff from what I'm seeing. Is that correct? (Actually I couldn't find *any* way to do it online)
<jared-w>
pinging gchristensen cause this seems like the kinda jankery you'd get up to
<tomberek>
shla: the amazon-init module detects if it's nix and will nixos-rebuild for you, there's also a PR in flight right now to detect if it's a script and just run it.
<jared-w>
bless. Why are you so consistently perfect? damn. Leave some glory for the rest of us
<gchristensen>
lol
fendor_ has joined #nixos
<gchristensen>
hardly perfect, I haven't even tested it enough to merge it
<srid>
What's the recommended way to declaratively configure VMs in a NixOS host? (don't want to use nixops and such things; as this is for a single home-server)
kenran has quit [Ping timeout: 276 seconds]
evils has quit [Ping timeout: 256 seconds]
<srid>
I've tried lxc, but running nixos as a lxc container has all sorts of issues
<srid>
*lxd
<shla>
tomberek, does amazon-init module support configuration in the userdata? or it needs to be a script?
fendor has quit [Remote host closed the connection]
AndreyCherkashin has left #nixos ["User left"]
<jared-w>
gchristensen: is that module gonna mark the 5th-ish instance of the same image building stuff a-la `!!! should use XML`?
fendor_ has quit [Remote host closed the connection]
<gchristensen>
at this point it is like sacred water you sprinkle on top of image building code
apache801 has joined #nixos
lsix has quit [Ping timeout: 258 seconds]
<gchristensen>
jared-w: do you have a suggestion on how to do it nicer?
<gchristensen>
I'm seeing a lot of K-Lines happening in #postgresql, and noticed "orivej (orivej@gateway/vpn/mullvad/orivej) has quit (K-Lined)" in another channel, but orivej is a contributor I know
<jess>
would you like to enter my private messages
<xAr86>
I tried to setup fingerprint for plasma/sddm - security.pam.services.sddm.fprintAuth = true; and for kde also, but I need to first enter password wrong once I'm prompt for fingerprint. Can I change the order of the entries by config?
<eyJhb>
I have completely forgotten this. If I have a systemd service, that runs a script and I want that script to have "awk" available. Then how can I do that? I am thinking of just updating the path with it, but I am unsure how to go about it
cmk_zzz_ has joined #nixos
<eyJhb>
Somebody showed me a cool way of doing it a long time ago, and I simply gannot remember it
Boomerang has quit [Remote host closed the connection]
cmk_zzz has quit [Ping timeout: 260 seconds]
wolke has joined #nixos
citadelcore has quit [Quit: Connection closed]
<fiveseven[m]>
why wouldn't it already be available?
<fiveseven[m]>
I don't understand the issue
<eyJhb>
fiveseven[m]: Running it in a systemd service, awk is not available in coreutils (which I guess is in the path), so I get `/nix/store/84ij5vxqv3iyymvjd3cdjlgci6h7gq0y-smartmon.sh/bin/smartmon.sh: line 162: awk: command not found`
<eyJhb>
But I might have to add gawk to my buildinputs maybe?
<eyJhb>
fiveseven[m]: This is what I am trying to run, which needs awk - https://termbin.com/3rvd
<vldn>
i tryed to create a archlinux chroot with the bootstrap image from archlinux.org but after chroot /tmp/root.x86_64 /bin/bash i only get the busybox.. someone knows what to do?
<redmp>
what's the difference between doing `blah.override { attrs... }` and doing `blah.override (old: { attrs... })` ?
<redmp>
is it just about having access to the old values?
<immae>
Are you sure the second one is correct?
<immae>
Maybe you confuse with overrideAttrs ?
<tpw_rules>
the second one should be overrideAttrs
<tpw_rules>
yeah
<samueldr>
redmp: different functions, different signatures, different uses
<samueldr>
.override should be called .overrideArgumentsPassedToCallPackage
<samueldr>
(but that's a mouthful)
<samueldr>
.overrideAttrs could maybe have been called .overrideAttrsOnTheActualDerivation
apache801 has quit [Ping timeout: 265 seconds]
<samueldr>
.overrideAttrs gives you the current attributes, as otherwise it would be awkward to get append to e.g. buildInputs or something along the line
<redmp>
ok, i may be confused because i'm talking about the function at nixpkgs.haskellPackages.override, which might not be the "normal" one
<cole-h>
samueldr: overrideDrvAttrs and overrideDrvInputs
<samueldr>
cole-h: those are not mouthfuls
<cole-h>
:D
<samueldr>
(and .override does not act on derivations exclusively!)
<samueldr>
redmp: AFAIK it's the same override
<samueldr>
but maybe I'm wrong
justanotheruser has quit [Ping timeout: 240 seconds]
<samueldr>
cole-h: you can .override on a function! or a string! as long as it's the resulf of a callPackage (or makeOverridable)
<samueldr>
the result*
<cole-h>
:(
<cole-h>
overrideAttrs and overrideInputs :D?
<redmp>
ok, here's a different question: i have nixpkgs and i want to add a package to nixpkgs.haskellPackage and then return the new changed nixpkgs .. i already know how to get a new haskellPackages, but i'm not sure how to attach it back to nixpkgs
<redmp>
nixpkgs doesn't have override or overrideAttrs
<immae>
That’s a trick question :D
<sterni>
redmp: note that you have to use haskell.lib.overrideCabal to achieve something like overrideAttrs for haskellPackages