justanotheruser has quit [Ping timeout: 264 seconds]
<worldofpeace>
,help
<{^_^}>
Use `,` to list all commands, `,foo = Foo!` to define foo as "Foo!", `,foo =` to undefine it, `,foo` to output "Foo!", `,foo somebody` to send "Foo!" to the nick somebody
<Henson>
hello everyone. I'm trying to define a nixops network that shares some common options between the machines in the network. I see in the nixops manual that they use the set union to combine attribute sets, but can I also use mkMerge?
<worldofpeace>
,nixos-gm = A social channel for gender minorities in the NixOS community
<{^_^}>
nixos-gm defined
<abathur>
Henson: if you don't get an answer here, there's also a #nixops channel (less active, but more likely someone with nixops knowledge will see it at some point when they come back from afk and such)
<{^_^}>
[nixpkgs] @AndersonTorres pushed 3 commits to master: https://git.io/JflAR
<Henson>
or perhaps another question is: is there a function that combines configurations together?
<Henson>
if I just do an attribute set union, I'm having a problem where a sub attribute set is defined completely in one set, but only partially defined in another, and that seems to be causing problems.
<cole-h>
Man, building gcc10 sure takes a long time...
ilikeheaps has joined #nixos
<Henson>
for example { foo = { bar = 1; baz = 2;}; } // { foo.bak = 3; }
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
mrpi has joined #nixos
Scriptkiddi has joined #nixos
das_j has joined #nixos
ajs124 has joined #nixos
lovesegfault_ has joined #nixos
<keithy[m]>
all I want to do is read in the whole folder of files ./*.nix
<keithy[m]>
its been a month now
<keithy[m]>
cant find an example anywhere
<keithy[m]>
always part examples without context.
<keithy[m]>
I looked through every nixos repo I could ind on github
<clever>
keithy[m]: first, what do you get when you `builtins.readDir ./.` in `nix repl` ?
<keithy[m]>
a bunch of stuff in an assoc
<clever>
keithy[m]: now what about `builtins.attrNames (builtins.readDir ./.)` ?
<clever>
it may need a :p at the front
<keithy[m]>
the names
lovesegfault has quit [Ping timeout: 260 seconds]
<keithy[m]>
-?
<clever>
keithy[m]: now you can use `builtins.match` to see if its a .nix file, and import to import it
<clever>
and map to iterate over the list
<keithy[m]>
yes but how does that go into a configuration.nix
<keithy[m]>
thats the bit im missin
<clever>
keithy[m]: what do you want to then do with that list of nix files?
<keithy[m]>
import them
<clever>
and then?
<keithy[m]>
but the configuration.nix doesnt import them it has a list of imports
fresheyeball has joined #nixos
<clever>
keithy[m]: will each file contain nixos options?
<keithy[m]>
I think so
<keithy[m]>
options?
<clever>
keithy[m]: then just put that whole list of filenames into the imports list
<keithy[m]>
but if I assign the list of files to avariable it tells me off for not having that option
<clever>
keithy[m]: can you pastebin the code you used?
<keithy[m]>
how can I browse the result?
<clever>
keithy[m]: nix repl
<keithy[m]>
you guys need a smalltalk front end
<keithy[m]>
but then you might as well reimplement in smalltalk so you have a live object model rather than a text file drv.
<simpson>
keithy[m]: I'm working on something like that, but it'll take more than a month and also you probably won't find it more ergonomic than standard NixOS.
<keithy[m]>
maybe one day
<keithy[m]>
if you use smalltalk then you can save the image which the whole object model and all the browser tools
turona has quit [Ping timeout: 265 seconds]
<keithy[m]>
Ill do it when I get around to it
<keithy[m]>
people always using static languages to do a dynamic job
<simpson>
keithy[m]: If your goal is just to factor your configuration into multiple files, then start by hard-coding `imports = [ ./foo.nix ./bar.nix ];`
<keithy[m]>
yep done that
<keithy[m]>
now I want to spread those configs accross folders synced formmultiple machines
turona has joined #nixos
<keithy[m]>
So the large.nix file is contributed form the large project
<keithy[m]>
and the small.nix file is contributed formt he small project
<clever>
keithy[m]: most people define things in the nix file, and dont make it magically change when files get added
<clever>
keithy[m]: look at lines 16-29 in the above link
<energizer>
clever: where do i put that line?
<keithy[m]>
yes its a hard coded list
<clever>
energizer: _modules is a normal config option
<clever>
keithy[m]: because i dont want things like router.nat.nix to activate on other machines, and all of these files are in one directory
<cole-h>
srid: 2.4 is not released, no. You can watch the GitHub releases at https://github.com/NixOS/nix to be notified on GitHub when a new release is tagged.
<keithy[m]>
im not getting the imports array vs the import function
<clever>
keithy[m]: the import function takes a single path, parses the nix within, and returns whatever expr is within
<clever>
keithy[m]: the imports list is part of the module system, it will recursively load every file in the imports list, then fix-point them all together
<clever>
keithy[m]: the config and options returned by every module gets merged, and then the merged result is passed as input back into every module
<clever>
a module is something in the form of `{ config, pkgs, ... }: { config = { something; }; options = { something; }; imports = [ something ]; }`
<clever>
the module system will then run the function to get access to the set within
<clever>
read the imports list
<clever>
then recursively repeat on every file in imports
<clever>
then merge the .config and .options of everything together
<clever>
if a file is missing both config and options, it gets wrapped with a config = { ... }; automatically
hlisp_ has quit [Remote host closed the connection]
<clever>
keithy[m]: yep, that will silently ignore any file that doesnt exist
danimal-moo[m] is now known as cellofhuman[m]
hlisp has quit [Ping timeout: 256 seconds]
<keithy[m]>
so the plan is that if the user subscribes to a project folder via syncthing, that folder comes with the config to subscribe to other folders.
luna has quit [Ping timeout: 264 seconds]
jb55 has quit [Remote host closed the connection]
<keithy[m]>
mind you this scheme doesnt feel very safe and secure! lol
jb55 has joined #nixos
<clever>
keithy[m]: thats why everybody just uses static lists, and only if you decide to edit the cfg, will things change
<keithy[m]>
I just need some data from each project, not a module file (dangerous)
<pjt_014>
one sec and I can have a paste of the output
<pjt_014>
it pulls in some truly whack deps for a text only cli util
<balsoft>
pjt_014: Why don't you build it in qemu or something? I'm pretty sure cross-compiling stuff is pretty hard sometimes
<clever>
balsoft: ive been cross-compiling an entire nixos and deploying it with nixops
<clever>
balsoft: but i have recently discovered, that half the #! scripts are using the x86 bash, and yet it somehow still boots
<pjt_014>
balsoft: most of the time it's fine. I just x-comp'd something for riscv-64 just to see if I could
<pjt_014>
I don't even own a riscv-64 board
<pjt_014>
and I x-comp for raspi with no probs all the time
<pjt_014>
this one is just weird. It wants gtk3+ which simply *cannot* be right
<bqv>
adisbladis: you added a flake.nix <3
<pjt_014>
..yeah it wants to build like 200 things. wat
hlisp has quit [Remote host closed the connection]
<atemu12[m]>
<clever "balsoft: but i have recently dis"> clever: binfmt?
<clever>
atemu12[m]: nope
<clever>
atemu12[m]: if bash cant execute something, it just blindly assumes its a bash script, and runs itself on that file
<pjt_014>
while I'm waiting clever, is there any way to pin the deps of a build even if the whole thing fails? Like right now the recutils build cmd is building gdb, any easy way I could pin that with a result symlink?
<clever>
pjt_014: lorri might do that, you can also just run `nix-store -r /nix/store/foo --add-root result-1 --indirect` to make a root for any given path
<clever>
pjt_014: personally, i use hydra to do similar, it roots the entire build-time closure
palo1 has joined #nixos
<energizer>
which languages can output nix code? afaik only haskell?
drakonis has quit [Quit: WeeChat 2.8]
<clever>
energizer: rnix is also a thing
<energizer>
clever: any golang or python?
<clever>
energizer: nixops has some internal stuff, to turn a hashmap into a set
lightbulbjim has joined #nixos
palo has quit [Ping timeout: 260 seconds]
palo1 is now known as palo
ntqz has quit [Ping timeout: 260 seconds]
<energizer>
mhm
ntqz has joined #nixos
<{^_^}>
[nixos-hardware] @pmyjavec closed pull request #157 → Add a shared HiDPI Configuration, use it. → https://git.io/JfsL1
<{^_^}>
[nixos-hardware] @pmyjavec reopened pull request #157 → Add a shared HiDPI Configuration, use it. → https://git.io/JfsL1
eoli3n_ has joined #nixos
<balsoft>
clever: Cool, I tried to do that to my rPi a couple of years ago and it didn't work in the slightest. After looking at how many things failed (with --keep-going) I just gave up
<balsoft>
clever++
<{^_^}>
clever's karma got increased to 415
<balsoft>
I need to try this again
<clever>
balsoft: i'm also running custom firmware in the bootcode.bin as well
<balsoft>
pjt_014: I'm probably just a broken man who tried to cross-compile too much (especially painful was trying to cross gtk to musl/static some time ago)
eoli3n__1 has joined #nixos
<pjt_014>
yeah for gui stuff that's def reasonable
_kwstas has joined #nixos
_kwstas has quit [Remote host closed the connection]
<pjt_014>
10/200 deps built, wowee we movin
`_ has joined #nixos
<`_>
I'm having a bit of an issue with lightdm. I intend on upgrading to 20.03 and learned that SLIM has been removed, so I'm changing to lightdm. Everything seems to work, except when lightdm starts i3, it opens an xterm shell, and if I close that shell lightdm stops. Anyone know a way to prevent this?
<clever>
`_: your likely using the xterm window manager, there is a nixos option to disable that, which will switch you to another one
<`_>
clever: I'm assuming `services.xserver.desktopManager.xterm`? If so, that's set to false.
<clever>
`_: not sure then
<`_>
I should say, in reality, it's not set, however the options seem to say the default is false
eoli3n__ has joined #nixos
<`_>
I'll try rebuilding and testing and report back.
<{^_^}>
turlando: Overlays look like `self: super: { foo = ...; }`. Use the self argument to get dependencies, super for overriding things and library functions (including callPackage). More info: https://nixos.org/nixpkgs/manual/#sec-overlays-install
<turlando>
Thanks srk
<srk>
turlando: yw, if it's still confusing I can find an example
<pjt_014>
srk: if you have cachix you can do `cachix use cross-armed` to speed things up. I think there's a few other caches too, like clever's one
<srk>
pjt_014: yup, testing new computer ;)
<pjt_014>
also, you shouldn't need to build it natively if you're using the pkgsCross cmd I put
<pjt_014>
but if you wanna sure I guess
<srk>
pjt_014: I might roll my own farm for arm again soonish
<turlando>
srk I will read the documentation a bit more and ask if I can't still grasp it. Thanks again
<srk>
pjt_014: with all the spare rpis, imx6q and unused laptops :))
FRidh has joined #nixos
<pjt_014>
imx6whatnow?
<srk>
bootstrapping was hard and I wouldn't be able to use recent nixos on imx6q without caches of the|floweringash but now I can also cross things so it's much better
<srk>
pjt_014: Novena laptop with freescale imx6q
<pjt_014>
ah. also what is that cache? does it have armv6l things? because I've been waiting for armv6l guile to build for ~30min
<turlando>
I have another question about the Nix syntax: I can't really understand what is the purpose of the semicolon after the with expression. Is it like so "just because" or is there a reasoning behind it?
<arianvp[m]>
It's just because
<arianvp[m]>
Afaik.
<arianvp[m]>
Nixs syntax is rather ad hoc in my experience
<pjt_014>
did you have armv6l result symlinks lying around for guile and openssl and other huge-ass deps?
<srk>
no, looks like it stopped before that due to atk failing early
<pjt_014>
huh
<pjt_014>
did it even try and build llvm?
<srk>
yep
<srk>
but cancelled
<pjt_014>
hm. is this on 20.03?
<srk>
no, staging
<pjt_014>
hmm. well, I'll see if my build eventually fails in the same way (might take overnight). In the meantime, any idea what migt be causing this? or why it needs gtk3?
<quinn>
srk: are you using nixos on arm for desktop?
<pjt_014>
not sure about srk (think they have a headless cluster?) but I have used a rpi3b as a desktop device before. It's a bit finicky but it's managable.
<quinn>
that's super cool! what did you do with it, and in what ways was it finicky?
<srk>
quinn: yes!
<quinn>
very cool!! i have the same question for you!
<srk>
depends on hardware, my needs few kernel patches but it's pretty stable and good experience now
<srk>
except for browsers, using netsurf-gtk :D
alp has joined #nixos
<srk>
this one is pretty powerful with 4x1.4Ghz cores, 4G ram and SATA SSD, was using it as a headless builder for years before since mainline support for display was lacking
<quinn>
what's up with the browsers? does netsurf gtk work good but you're not very happy with having to use it instead of firefox/chrome, or is netsurf the best option and still pretty bad?
<srk>
due to build time requirements, I could build firefox or chromium but it would take a week or so :)
<srk>
netsurf-gtk is quite nice, w3m too :D if you don't require javascript
<srk>
it does have some js support but pretty minimal
<pjt_014>
quinn: I tried building qutebrowser for it, can't remember if it worked. But it would be a good choice for a minimal browser with js support, up there with palemoon
<quinn>
srk: i see. can't you cross compile firefox? also, i do some """pro""" audio, do you have any experience with how that works?
lsix has joined #nixos
<pjt_014>
as for quirks, I had to alter some kernel stuff related to the gpu
mallox has joined #nixos
<srk>
quinn: I would say same as with x86, haven't tried jack or pipewire yet as my sound is broken and needs more kernel patches
<quinn>
pjt_014: i hope qutebrowser works well because it's python lol! unfortunately i have found qutebrowser a little buggy (maybe 8 months ago i used it), but the ui is very nice. is gpu necessary for desktop ARM?
<quinn>
srk: does "needs kernel patches" mean "needs kernel patches to be ported to nix" or "i need to write kernel patches"?
<quinn>
and are these kernel patches and modifications you guys have been mentioning just .config things, or actually patching the C?
cjpbirkbeck has quit [Quit: cjpbirkbeck]
<srk>
quinn: they are written already but for 4.19 so they need porting to more recent kernel or switching to 4.19
<srk>
quinn: I'm on 5.7-rc2 :D
<quinn>
actually working on a RT kernel package for 5.6-7 right now on x86
<srk>
display was a priority for me
<srk>
musnix?
<quinn>
musnix is behind the kernel for stable at this point. i am using it as a reference though
<{^_^}>
[nixpkgs] @vbgl pushed commit from @ggreif to master « ocamlPackages.wasm: 1.1 -> 1.1.1 »: https://git.io/Jf8q1
<pjt_014>
srk: thanks
<pjt_014>
but as a general concept, which would seem better: to remove the emacs extension/mode thingie and put it into a new recutilsFull package, or to keep this one as-is and make a new recutilsMinimal package without it?
<pjt_014>
I'm thinking the 2nd because it would break less
icey_ has joined #nixos
acowley has joined #nixos
orivej has quit [Ping timeout: 260 seconds]
<srk>
yeah, that sounds reasonable, if it's not required for its function it can be optional
<pjt_014>
until I can write and push/PR a new minimal version, you know how I could write a definition that doesn't require it?
<pjt_014>
srk: I don't really know what to overlay or how though. Any good examples of overlays that disable something like this? Also how do I know what flags there even are to disable?
<srk>
maybe less confusing if you rewrite it like this (import <nixpkgs> { system = ".."; }).pkgs.recutils..
obadz has quit [Ping timeout: 272 seconds]
obadz has joined #nixos
cfricke has joined #nixos
<pjt_014>
cant figure out that version of the syntax, but the 1st ver is correct now. though I'm getting 'error: missing bootstrap url for platform armv6l-linux'
<srk>
oh, that's weird
<pjt_014>
also just to make it easier, what would this look like in a .nix file?
alp has quit [Ping timeout: 244 seconds]
obadz has quit [Ping timeout: 256 seconds]
FRidh has joined #nixos
<srk>
the same
obadz has joined #nixos
<srk>
but depends if you want to call it with callPackage or directly via nix-build as default.nix
<zakkor>
hi guys, looking through my /nix/store after a year or so of using nixos, and I can see that there's 160GB of software in there (!!) 99% of it old versions of software that just won't get garbage collected
<zakkor>
any idea what to do?
<pjt_014>
Zakkor: nix-env --list-generations
<pjt_014>
how many lines does that give?
<pjt_014>
actually pipe it thru | nl to number the lines
<zakkor>
`error: '/nix/var/nix/profiles/per-user/ed/profile' is not a symlink`
<zakkor>
running it with sudo gives nothing
<pjt_014>
that's..odd.
<srk>
pjt_014: I think you need to pass system to nixpkgs as before
<zakkor>
oh, this may be useful, I got a bit daring and did `sudo rm -rf /nix/store`
<zakkor>
it didn't seem to do much as it's a read-only FS
<pjt_014>
...
orivej has quit [Ping timeout: 246 seconds]
orivej_ has joined #nixos
<pjt_014>
next time, maybe lead with "oh yeah I did an rm -rf .."
<zakkor>
I guess that would have been useful, yeah :P
<pjt_014>
it probably did do stuff.
<zakkor>
if it helps, I've never used nix-env to install stuff
<pjt_014>
in the future, please do NOT rm -rf to clean the store.
<srk>
pjt_014: in repl.. :b (import ./default.nix {}).recutils
<srk>
error: expression does not evaluate to a derivation, so I can't build it
<ashkitten>
Zakkor: next time if you really need to clear up space, don't try and delete stuff directly. nix-collect-garbage exists for a reason
steevveen has joined #nixos
<zakkor>
yeah, but I ran it and it doesn't work though
<pjt_014>
Zakkor: nix-collect-garbage --delete-older-than 5d for example
<ashkitten>
what do you mean it doesn't work
<pjt_014>
Zakkor: what does nix-env --delete-generations +5 do?
<ashkitten>
pjt_014++
<{^_^}>
pjt_014's karma got increased to 3
justanotheruser has quit [Ping timeout: 272 seconds]
civodul has joined #nixos
<zakkor>
runs with no output pjt_014
<ashkitten>
i'm goin to bed now
<ashkitten>
have fun
smatting has joined #nixos
<srk>
o/ night
<pjt_014>
thanks fopr that I guess
<zakkor>
ashkitten: it says theres nothing more to remove, but nothing is removed
<pjt_014>
try with +2?
<zakkor>
no output
<zakkor>
this may be because i nuked the store
<pjt_014>
can you do a rebuild?
<zakkor>
yep a rebuild works
thc202 has joined #nixos
<pjt_014>
that might restore things
<{^_^}>
[nixpkgs] @filalex77 opened pull request #87652 → vultr-cli: init at 0.3.0 → https://git.io/Jf83v
<zakkor>
this is not what i'd want the store to look like after running collect-garbage -d
<steevveen>
Hi!I'm trying to write my first derivation using callPackage, but I can't understand my syntax error:
<zakkor>
is it possible to run a command to check why a derivation is being kept alive? pjt_014
<steevveen>
in default.nix : with import <nixpkgs> {}; callPackage ./derivation.nix {}in derivation.nix : {config,pkgs,...}: pkgs.stdenv.mkDerivation { name = "basic-build-derivation"; env = pkgs.buildEnv { name = name; paths = buildInputs; }; buildInputs = [ git ]; }
<steevveen>
nix-shell complains undefined variable name. Althought it is what I had in my original default.nix: with import <nixpkgs> {};stdenv.mkDerivation rec { name = "env"; env = buildEnv { name = name; paths = buildInputs; }; buildInputs = [ git ];}
<pjt_014>
steevveen: if you have that in a file, can you do cat file.nix | curl -F file=@- 0x0.st please? It's a bit dizzying to try and read on one line
<pjt_014>
Zakkor: yes, I think it's nix-store -qR /nix/store/,,,
<srk>
steevveen: config variable doesn't make sense for packages
<srk>
steevveen: that's used by module system
sigmundv has joined #nixos
<srk>
steevveen: you want something like { stdenv, git, buildEnv }: so callPackage fills that from pkgs scope
<zakkor>
pjt_014: seems to print a list, with the target drv at the bottom, and glibc-2.27 at the top, and a bunch of packages I didn't install in the middle
<pjt_014>
steevveen: yeah, the callPackage line is not added here
<NobbZ[m]>
I've already posted the following on the discord, though no response so far. In general it seems to be more active there during european evenings, therefore crossposting here:
<NobbZ[m]>
A GC is very slow on one of my systems. Not only that my laptop staled 25 minutes between removing store pathes and and removing .links, each individual link takes quite a lot time...
<NobbZ[m]>
Intel core2duo, 4GB of Ram, 500GB HDD, ZFS.
<zakkor>
`231 2020-05-12 11:12:44 (current)`
<pjt_014>
Zakkor: yeah, I guess that gc got the system path too
opthomasprime has left #nixos [#nixos]
<pjt_014>
NobbZ[m]: yeah the irc room is prob more active
<zakkor>
you know those options in the grub boot menu that you can pick to rollback to? pjt_014
<zakkor>
is there anyway i can force the creation of one of those
<NobbZ[m]>
pjt_014: yes, but often to active to be able to follow a single conversation…
<pjt_014>
Zakkor: they're just the result of rebuilds. you do a nixos-rebuild with either boot or switch
<zakkor>
yeah, but the rebuild is one of those where almost everything is cached
<pjt_014>
NobbZ[m]: is there any other slowness, esp. with random access disk activity?
<zakkor>
i just wanna make sure it actually creates something
<pjt_014>
Zakkor: it's a bit jank, but you could make a minor change to your config. like add hello to your list of packages
<pjt_014>
otherwise the hash is the same and there's nothing to be done
<zakkor>
sweet thanks
<zakkor>
thanks for all your help!
<NobbZ[m]>
pjt_014: yes, but not as anooying as with GC.
ntqz has quit [Ping timeout: 256 seconds]
pingiun has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ntqz has joined #nixos
<pjt_014>
Zakkor: glad I could help :)
<pjt_014>
NobbZ[m]: how much you cleaning on average? also what nixos version?
Jackneill has quit [Ping timeout: 256 seconds]
<NobbZ[m]>
pjt_014: That box runs on 19.09, and I'm not sure about average clean up. I can say for sure though, that the run this morning took 45 minutes and cleaned less than 200MB
<pjt_014>
okay that's bit mmmh.
dnlkrgr has joined #nixos
<pjt_014>
still, I'd suspect the disk itself. how many cores btw?
<pjt_014>
NobbZ[m]: just to be sure, I'd personally try installing dbench and running it just to be sure it's not the disk
<pjt_014>
dbench num-cores-to-use > logfile.txt # and wait 10min
hmpffff has quit [Ping timeout: 265 seconds]
<pjt_014>
NobbZ[m]: your clean speed was 200MB/45min = ~74KB/s
<NobbZ[m]>
I tried bonnie++ yesterday, it says combined 25M/s which is also my observation when doing copying on the disk. The major annoyance are the roughly 20 minutes of a stale laptop where I can not use it at all.
<pjt_014>
does bonnie discern between contiguous and random runs?
<pjt_014>
If not, I'd still consider trying it with dbench. It does a bit extra, and some extra io/latency info might tell us more
<NobbZ[m]>
There was a lot of output… Don't remember the details. Also a coworker of mine summarized it for me… Though `time find /nix/store/.links -links 1` took 15s CPU, 4m wall time
<NobbZ[m]>
`nix run nixpkgs.dbench -c dbench 2 > dbench-log.txt`
<fps>
how would i go about adding a package to a custom image build? the code lives in its own github repo. i can write a nix expression for it to nix-build it. how to incorporate it in the target system's configuration.nix such that it can be rebuild, etc?
<pjt_014>
NobbZ[m]: also I just tried that find command and got nothing after 1min+ on my hdd machine sooo
noudle has joined #nixos
cfricke has quit [Read error: Connection reset by peer]
cfricke has joined #nixos
sigmundv has quit [Remote host closed the connection]
<pjt_014>
is that all of it? The summary section appears to be missing
bqv has joined #nixos
chloekek has joined #nixos
<pjt_014>
NobbZ[m]: also, note the line "failed to create barrier semaphore". Not sure what that is but google that plus "slow disk" maybe?
bkv has quit [Ping timeout: 252 seconds]
<pjt_014>
that latency feels pretty high too, though I don't have a good comparision from my own hdd
<NobbZ[m]>
Well, you said I shall have it run for 10 minutes, so I CTRL-C'd it after 10 minutes…
<srk>
fps: you can use something like (pkgs.callPackage ./my-package.nix {}) in environment.systemPackages or where you need to refer to it like a service
<srk>
or create an overlay
<srk>
,overlay fps
<pjt_014>
NobbZ[m]: 10 min is the default, then it prints the summary
<{^_^}>
fps: Overlays look like `self: super: { foo = ...; }`. Use the self argument to get dependencies, super for overriding things and library functions (including callPackage). More info: https://nixos.org/nixpkgs/manual/#sec-overlays-install
<pjt_014>
either way, I just ran it for a bit on my device and yeah
<pjt_014>
mine is ancient but my latency is like 1/3 yours
<NobbZ[m]>
pjt_014: I have another disk to spare, will transfer the dataset tomorrow and try if that works better
<pjt_014>
maybe. I can help more in about 20 hrs
<srk>
pjt_014: btw you can also pass overlays directly via (import <nixpkgs> { overlays = ...; })
<pjt_014>
do try dbench on that disk too, see if there's a difference
<NobbZ[m]>
The drive is ancient as well. Its still from my first DELL, which I purchased in 2006…
pingiun has joined #nixos
<fps>
srk: thanks. i'll go with the callPackage option i guess. less magic involved. i like explicit more than implicit :))
<pjt_014>
NobbZ[m]: actually can you quick do dbench 2 -t 30 > log.txt?
<srk>
fps: overlays compose better and allow you to refer to pkgs.your_package but either way works
<NobbZ[m]>
pjt_014: its running
<pjt_014>
for the future the -t flag is how you set te time, 600 is te default
<NobbZ[m]>
Throughput 9.70042 MB/sec 2 clients 2 procs max_latency=494.871 ms
Jackneill has quit [Ping timeout: 264 seconds]
klntsky has joined #nixos
orivej has joined #nixos
orivej_ has quit [Ping timeout: 272 seconds]
NeoCron has joined #nixos
<pjt_014>
don't know how old my disk is (at least older than 2014), but I get:
<pjt_014>
Throughput 11.0057 MB/sec 2 clients 2 procs max_latency=467.137 ms
<pjt_014>
with the same cmd
<pjt_014>
would be better to know average latency instead of max though
<NobbZ[m]>
Yeah, difference in max latency is not significant I'd say…
<NobbZ[m]>
Though the difference in throuput might be…
<NobbZ[m]>
The other disk I have is of the same age though…
<pjt_014>
I doubt that is the key, pretty sure I've gc'd 200mb in less than ~20min
<pjt_014>
NobbZ[m]: either way I must sleep
<NobbZ[m]>
Good night!
<pjt_014>
try your thing; I'll be here in like 18 hours
<pjt_014>
or 16-20 ish hours
<pjt_014>
NobbZ[m]: also
<pjt_014>
if you give that paste of the run with -t to a filesystem nerd and point to the operation section, they could prob tell you much more than me
<nixbitcoindev>
How do I setup a network namespace bridge with internet access without knowing the name of my users interface?
wnklmnn_ has quit [Remote host closed the connection]
<{^_^}>
[nix] @prusnak opened pull request #3588 → Introduce NIX_INSTALLER_NO_CHANNEL_ADD which skips nix-channel --add → https://git.io/Jf8nR
zupo has joined #nixos
zupo_ has quit [Ping timeout: 256 seconds]
<srandom>
I updated my system with guix pull && guix package -u, but the check failed during python-parso build, what should I do?
<srandom>
sorry, wrong channels
hlisp has joined #nixos
<srandom>
:-(
<betaboon>
Mic92: on the pixiecore+qemu problem: i got it to work. but only when running the pixiecore myself as root. when running it as systemd unit it wont work. weird. i dont understand it
ravndal has quit [Ping timeout: 246 seconds]
<arianvp>
I'm trying to set up dm-integrity but our kernel isn't compiled with it it seems
<arianvp>
"Kernel doesn't support dm-integrity mapping."
<Mic92>
betaboon: ah. I might have an idea why
noudle has quit []
<betaboon>
Mic92: and it fails in a very weird way, when running it as systemd unit, the machine fails to boot with "stage 2 init script (/mnt-root//init) not found"
hlisp has quit [Ping timeout: 272 seconds]
<Mic92>
betaboon: does dhcpNoBind = true help?
pingiun has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mpickering>
How can I point nix-shell to use an older nixpkgs tarball?
<betaboon>
Mic92: the weird thing is: running pixiecore with exactly the same arguments (that the systemd-unit creates) but in a shell as root works just fine
<Mic92>
betaboon: so narrow this: Does it work if you run pixiecore as root in the systemd service?
<mpickering>
For some reason xpdf 4.0 programs don;t have half the options of the programs from version 3.3
<mpickering>
so am trying an older commit
<Mic92>
betaboon: you should be able to override systemd.services.pixiecore.User
<betaboon>
Mic92: i tried. when i override `..pixicore.serviceConfig.User = mkForce "root"` doesnt work
<betaboon>
Mic92: when i override `AmbientCapabilities = mkForce []` doesnt work either
<Mic92>
that would have been my next question
<Mic92>
betaboon: but if you run the exact same command from 'systemctl cat pixiecore' as root it works?
_deepfire` has quit [Ping timeout: 246 seconds]
<betaboon>
Mic92: yeah. when i run the `ExecStart` part it just works.
<betaboon>
i dont understand how that makes a difference
<betaboon>
and how that might influence how the vm actually boots. it fetched the kernel, the initrd, starts the kernel. this just doesnt make sense to me
<Mic92>
betaboon: So it should fail as well if you use systemd-run?
rauno has joined #nixos
<Mic92>
Maybe you can see in `tcpdump -i any -n` if something is different on the protocol level.
steevveen has quit [Remote host closed the connection]
<Mic92>
betaboon: does it fetched in both cases the initrd properly?
<betaboon>
Mic92: when using `systemd-run` should i just pass the command from `ExecStart` ?
<Mic92>
PXE is awesome when you have a working setup. Every motherboard I encountered supported it so far, better than usb-sticks...
<betaboon>
I'm especially interested in getting this working with qemu. I'm creating a cluster of qemu-vms using terraform. one vm is running pixiecore, the others are supposed to be booting via pxe from the first one xD
o1lo01ol1o has quit [Remote host closed the connection]
thc202 has quit [Ping timeout: 260 seconds]
o1lo01ol1o has joined #nixos
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #nixos
<Mic92>
betaboon: do you think you can get a shell there?
<Mic92>
and then see if you find a /nix-store.squashfs ?
cfricke has quit [Read error: Connection reset by peer]
<evils>
i seem to recall using the example config does affect the kernel version
<evils>
with `bash -x` it seems to work but then i can't use `-I nixpkgs=~/nixpkgs`
cfricke has quit [Quit: WeeChat 2.8]
pca has quit [Remote host closed the connection]
<turlando>
Is it possible to override allowUnfree only for a single package?
<NobbZ[m]>
`allowUnfreePredicate`
<turlando>
thanks NobbZ[m]
alp has quit [Ping timeout: 260 seconds]
<turlando>
NobbZ[m] since I'm already creating an overlay to compile ffmpeg with a nonfree library, is it possible to use allowUnfreePredicate in its specific overlay?
<turlando>
sorry for the noob question
<NobbZ[m]>
No, you need to enable allowUnfree always at the system level
<turlando>
got it, thank you
<{^_^}>
[nixpkgs] @flokli merged pull request #73530 → nixos/nvidia: include systemd power management → https://git.io/JeoPW
<turlando>
Last question I hope, the example in the documentation suggests: builtins.elem (lib.getName pkg) [ "pkg1" "pkg2" ]; Can I do something like builtins.elem [ pkg.ffmpeg-full ];?
hlisp has joined #nixos
<{^_^}>
[nix] @edolstra pushed to master « tests/binary-cache.sh: Improve incomplete closure test »: https://git.io/Jf8l2
aveltras has joined #nixos
Ariakenom has joined #nixos
tv1 has quit [Quit: WeeChat 2.6]
tv has joined #nixos
hlisp has quit [Ping timeout: 246 seconds]
<evils>
Mic92: yea seems like the trouble is with `-I nixpkgs=~/nixpkgs`
<evils>
Mic92: side issue, `nixos-shell --version` throws an error and doesn't show the version
<betaboon>
Mic92: i now used boot.debug1 and got a shell in stage-1 right after the error about (mnt-root
<tbdcit>
Hi there, sorry if this is the wrong place to ask this... does anyone know how I can include a local package in my nixpkgs/config.nix? Suppose I have a repo containing a nix package which I can install with "nix-env -f . -i pkgname" , how can I include this package in my packageOverrides in nixpkgs/config.nix?
<Mic92>
hexa-: it could be the case though that it is deeper in the dependency chain.
<hexa->
hmm, I don't follow
gxt_ is now known as gxt
<hexa->
node2nix parses package{,-lock}.json into node-packages.nix
<hexa->
that gets me sources."typescript-3.8.3" = { ... }
<turlando>
Still trying to compile ffmpeg... now I get 'build input 1 does not exist'. The following lines are not about any ffmpeg dependency. What is input 1?
<epic_guy[m]>
for some reason the terminal is always root...any ideas how to remove it?
iyzsong has quit [Ping timeout: 258 seconds]
<wnklmnn>
epic_guy[m] do you have another user setup?
<simpson>
$(sudo -i -u $DESIRED_USER) will create the desired terminal session. I'm guessing that you logged into X as root?
gustavderdrache has joined #nixos
<epic_guy[m]>
yes i have one more user setup..but im logged out of it
o1lo01ol1o has joined #nixos
<infandum>
How can I have nix-shell use the paths set in the postInstall for a derivation?
jakobrs has quit [Quit: leaving]
<epic_guy[m]>
<simpson "$(sudo -i -u $DESIRED_USER) will"> umm this command doesnt give a proper output..sorry im kinda noob here
<{^_^}>
[nixos-homepage] @garbas pushed to fix-commiting-to-master « fix commiting to master branch from cron action »: https://git.io/Jf8EH
<epic_guy[m]>
* @wnklmnn yes i have one more user setup..but im logged out of it
<{^_^}>
[nixos-homepage] @garbas opened pull request #423 → Fix commiting to master branch from cron action → https://git.io/Jf8Ed
<emily>
cole-h: I'm not sure the doas module should have keepenv on for root by default. it doesn't allow root to keep env but rather silently keeps all of the env by default. I think that's a confusing difference in behaviour to normal users and could cause problems. the sudo module seems to default to letting users set any environment variable (I think this might be implicitly always on in doas? not sure) but only keeping a few by default
<{^_^}>
[nixos-homepage] @garbas merged pull request #423 → Fix commiting to master branch from cron action → https://git.io/Jf8Ed
<{^_^}>
[nixos-homepage] @garbas pushed 2 commits to master: https://git.io/Jf8EA
<epic_guy[m]>
> <@freenode_simpson:matrix.org> $(sudo -i -u $DESIRED_USER) will create the desired terminal session. I'm guessing that you logged into X as root?
<epic_guy[m]>
* umm this command doesnt give a proper output..sorry im kinda noob here, yes..Im the root
<{^_^}>
error: syntax error, unexpected '<', at (string):310:1
<{^_^}>
[nixos-homepage] @garbas pushed 0 commits to fix-commiting-to-master: https://git.io/Jf8Ex
<simpson>
epic_guy[m]: I intended for you to insert the username which you wanted to use in your session. The idea is to tell sudo to start an interactive shell with -u to choose the username.
<emily>
cole-h: (also, a nitpick: that default root rule should probably be in extraRules rather than being hardcoded?)
<epic_guy[m]>
<simpson "epic_guy: I intended for you to "> yes..i did
<simpson>
FWIW logging into X as root is always dangerous, securitywise. Used to be, but probably still is.
<wnklmnn>
epic_guy[m] Then why are you logged in as root if you have another user?
ddellacosta has joined #nixos
cosimone has joined #nixos
<epic_guy[m]>
umm..cause the other user isnt a sudoer...and i cant make him sudo
<epic_guy[m]>
and tried to make him sudo..didnt work...
<epic_guy[m]>
well, i simply want my current root user account to be logged out of the root terminal...I can't...also whenever i open the terminal, it starts at root..
<wnklmnn>
epic_guy[m] Have you added "extraGroups = [ "wheel"];" To your user in the /etc/nixos/configuration.nix?
<epic_guy[m]>
yeah...also i did try to add sudo to that list...the build fails, i dont wanna mess that..the other user is simply a dummy though
<emily>
cole-h: (also also: did you know the postgres service depends on sudo? 😱)
<wnklmnn>
epic_guy[m] as the others said it's not smart to always run as root. so getting the user working might be a good idea. If you login as your regular user and run "groups" is the "wheels" group listed there?
<epic_guy[m]>
<wnklmnn "epic_guy as the others said it's"> yup
<wnklmnn>
epic_guy[m] what kind of output do you get when you run "sudo whoami" ?
<epic_guy[m]>
> <@freenode_wnklmnn:matrix.org> epic_guy as the others said it's not smart to always run as root. so getting the user working might be a good idea. If you login as your regular user and run "groups" is the "wheels" group listed there?
<epic_guy[m]>
* yup, Right, so i think i need to move all my files and reinstall a bunch of apps in the other user
<{^_^}>
error: syntax error, unexpected '<', at (string):310:1
<epic_guy[m]>
<wnklmnn "epic_guy what kind of output do "> in the other user??
<epic_guy[m]>
<wnklmnn "epic_guy yes as the regular user"> it asks me the password..after i enter it, it says im not a sudoer and the incident will be reported
vidbina has quit [Ping timeout: 246 seconds]
<wnklmnn>
epic_guy[m] well thats odd. if your user is in the "wheel"-group you should be able to run commands as root priviliges
<epic_guy[m]>
umm..well, its a VM, so i can simply reinstall the whole OS if its advisable
<simpson>
"the build fails" meaning that you can't change your NixOS configuration because nixos-rebuild fails? You should definitely fix that, as root, first. Once you've established that your other user is wheeled up, then you can switch to that user and use sudo sparingly as necessary.
<epic_guy[m]>
<simpson ""the build fails" meaning that y"> how can i fix that, as a root?
fabianhjr has joined #nixos
<simpson>
Edit /etc/nixos/configuration.nix until it looks like you want, run nixos-rebuild, repeat as needed.
<epic_guy[m]>
right, for the past 3hrs im messing up with that file, well i guess i need to play more with it
<simpson>
If you tell us how the build failed, then we can help you with that. Is it a syntax problem, or a runtime error?
codygman has quit [Read error: Connection reset by peer]
codygman has joined #nixos
OmnipotentEntity has joined #nixos
noudle has joined #nixos
<{^_^}>
[nixos-org-configurations] @edolstra pushed 6 commits to master: https://git.io/Jf8zv
cole-h has joined #nixos
leotaku has quit [Ping timeout: 256 seconds]
wnklmnn has quit [Read error: Connection reset by peer]
wnklmnn has joined #nixos
<infandum>
When setting the PATH environmental variable in a derivation, how to I have it prefix? Like PATH = "somepath:$PATH", what is $PATH in a default.nix file?
chloekek has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<simpson>
Hm. Normally, for environment variables, just put them as keys in the derivation. But for PATH, I think that it's almost always better to reference the desired binary either in buildInputs or inlined into the call site.
<simpson>
> "${pkgs.jq}/bin/jq" # an example of the latter
<OmnipotentEntity>
I think he was asking how you get it to automatically prefix properly, ie, if PATH is empty then don't add the trailing :
<cole-h>
yournewpathentry${PATH:+:}$PATH
<cole-h>
^
<cole-h>
Note that you'll need to escape the `${}` somehow if inside a Nix string
<simpson>
Yeah, I had to read the question a couple times before deciding to attempt an answer. Sorry if I got it wrong.
<OmnipotentEntity>
at least that's how I interpreted it, and I thought there was some nix function to do it, but a cursory search turns up nothing. I guess you'll have to do it the bash way. :) cole has you covered.
Darkmatter66_ has joined #nixos
Darkmatter66 has quit [Ping timeout: 272 seconds]
leotaku has joined #nixos
<emily>
it's generally a pretty safe bet that $PATH isn't empty
<OmnipotentEntity>
So, I'm having an issue with CUDA (surprise) where there seems to be a version mismatch between the compiler and the static libraries. My derivation works on 20.03 with gcc 8.3.0 but not on master with gcc 8.4.0. Any suggestions?
<sasyctu>
Does anyone have any experience adding new ibus input methods per-user? I speak a language with a non-standard input method that I have an ibus file for, but no knowledge of how to get it to work on nix.
morgrimm_ has joined #nixos
mastarija has joined #nixos
<mastarija>
Hi there, does anyone know how to change console resolution on Hyper-V? I've enabled hyperv-guest module and set the resolution there but there's no change.
morgrimm has quit [Ping timeout: 258 seconds]
<morgrimm_>
^ Same issue with virtualbox, I never found out how to even with the guest module enabled
<OmnipotentEntity>
sasyctu, you've probably already seen the i18n.inputMethod.ibus configuration option. But on the off hand I thought I'd mention it.
<OmnipotentEntity>
off hand chance (that you haven't)*
<makefu>
hey all, what is currently the "correct" way to use the nix daemon through a proxy?
<sasyctu>
Yeah, I've enabled it, but not only does the language I use not have an input method in ibus-engines, when I run ibus-setup it says the namespace IBus is not available.
cosimone has quit [Remote host closed the connection]
<mastarija>
Ohh... wait a second. I think I got it.
cosimone has joined #nixos
<mastarija>
I put in 600x800 resolution
jakobrs has joined #nixos
<mastarija>
Instead of 800x600
FRidh has quit [Ping timeout: 256 seconds]
<mastarija>
Although I'd expect it to still work, because why wouldn't I be able to have 600x800 resolution?
FRidh has joined #nixos
dingenskirchen has quit [Remote host closed the connection]
<OmnipotentEntity>
sasyctu, this isn't that big of a distro, you might be the first nixos user who requires this. There's a handful of people who have touched this file. Maybe you can knock noggins with one of them and come up with a PR. @jtojnar @delroth @infinisil you're all contributors to the ibus file, any ideas?
dingenskirchen has joined #nixos
<sasyctu>
I'd be happy to work with them on that.
paws has joined #nixos
<OmnipotentEntity>
mastarija, might be a monitor firmware thing? no idea.
<jakobrs>
No wait why would Tor be considered an essential when something like tmux or nmap isn't?
<sasyctu>
so ignoring the fact that I am trying to get a Language for which there is currently no support, I'm seeing an error indicating the IBus namespace doesn't exist when running ibus-setup. Has anyone run into that before?
nixbitcoindev has quit [Remote host closed the connection]
<la-s>
what is the option to force nix-build to build locally?
<la-s>
or is there not one?
nixbitcoindev has joined #nixos
<cole-h>
As opposed to fetching from the cache?
<infandum>
omnipotententity: I'm not on NixOS
<cole-h>
infandum: Why can't you use the rm that is provided by default? e.g. just run `rm somefile` in whatever phase you're changing.
wnklmnn has quit [Read error: Connection reset by peer]
<cole-h>
stdenv contains `coreutils` by default (which contains the rm binary)
<la-s>
cole-h: yeah
wnklmnn has joined #nixos
Ariakenom has quit [Quit: WeeChat 2.7]
<cole-h>
la-s: I think `--option substitute false` should do what you want, then.
<infandum>
And it seems like I need makeWrapper for setting environmental variables for executables (nix-env install), but just the environmental variables as a variable when using nix-shell
<infandum>
cole-h: Well without PATH = "somepath:$PATH" in the overrideAttrs there is no warning
<cole-h>
la-s: If you already have it in your local nix store, you can `nix-build {attr} --check` to rebuild from source
<infandum>
so it's related to setting PATH
<la-s>
oh, thanks!
<cole-h>
infandum: What are you trying to do and what isn't working?
proofofkeags has joined #nixos
evanjs- has joined #nixos
<cole-h>
e.g. why is it necessary to get the rm binary from your system instead of relying on the one in stdenv?
zupo has joined #nixos
orivej has quit [Ping timeout: 246 seconds]
<la-s>
Is it just me who misunderstands what flags derivations using meson are compiled with, or are no optimization options used at all?
<la-s>
--buildtype=plain seems to be the default, but e.g. wlroots has nothing to set any optimizations besides that
<infandum>
cole-h: I'm not messing with rm at all, the only thing is changing PATH so it sees a correct binary (that is not set by rWrapper)
<immae>
Hello there, I’m curious about something (no real issue behind it except that it happened when helping to solve https://github.com/digital-asset/ghcide/issues/560): why does `ldd /nix/store/somehash-glibc-x.xx/lib/librt.so` directs me to a libc.so (and pthread and ld-linux) that is not in the same directory (it gives me the one coming from ldd). Is there any reason why the libraries in
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @dotlambda to master « qutebrowser: 1.11.0 -> 1.11.1 »: https://git.io/Jf8KW
<clever>
immae: when a program is ran normally, the ELF header says which ld.so to start with, and what the needed libs are and the RPATH
<clever>
immae: that ld.so will then recursively load the libs
<clever>
but if LD_TRACE_LOADED_OBJECTS=1 has been set, ld.so will print debug, and never run your main()
<immae>
ok
<clever>
ldd is then a shell script, to run `LD_TRACE_LOADED_OBJECTS=1 /path/to/ld.so ${yourbinary}`
<clever>
which technically uses the wrong ld.so for the debug, giving different results
<immae>
ok, that part makes sense
<{^_^}>
[nixpkgs] @jansol opened pull request #87682 → draco: init at 1.3.6 → https://git.io/Jf8KR
<clever>
and can even mislead you more, when the ld.so hasnt been patchelf'd
<clever>
and ldd says it found an ld.so
<immae>
by ld.so you mean ld-linux-foo.so right?
<clever>
yeah
<immae>
ok
<clever>
different arches have renamed it some
<immae>
yes, just to make sure I wasn’t missing something else
<immae>
I’ll play with that a little to get a better grasp, thanks clever
endformationage has joined #nixos
<immae>
clever: For the issue I had, I suggested to LD_PRELOAD=/lib64/librt.so to use the same librt library as his system libc and avoid the incompatibilities (because I had no control of what happened in the middle with ghc), would you have suggested somethign different?
<clever>
immae: how is a different librt causing problems?
<immae>
I have no idea
<immae>
somewhere ghc called /nix/store/...glibc/lib/librt.so, which called /lib64/libc.so and failed
<immae>
(it was the same 2.30 version on both side)
<{^_^}>
[nixpkgs] @adisbladis pushed to master « emacsPackages.emacspeak: Fix meta »: https://git.io/Jf8KD
<immae>
as a workaround, I suggested that he preload /lib64/librt.so, so that it would move the compatibility one layer up and it worked so I stopped there
<maralorn>
infisinil: There is at least a trick to cache the fonts by putting a symlink in /etc somewhere that way you only ever need to download nerd fonts again, when it is actually bumped.
<lordcirth>
shouldn't it be cached in the nix store already?
<infinisil>
maralorn: lordcirth: It's downloading it again because I'm updating the system
<infinisil>
(and there probably was a new nerdfonts release since last time)
<{^_^}>
[nixos-homepage] @garbas pushed to fix-commiting-to-master « run github action on a branch »: https://git.io/Jf8XK
<infinisil>
Ahh, actually it looks like you can now override nerdfonts to only download the fonts you need
<lordcirth>
I was about to ask if you couldn't select a subset
<maralorn>
lordcirth: Yes, but no. The font sources get for some reason garbage collected because they are only buildtime and not runtime requirements of the system.
dsg has quit [Remote host closed the connection]
<maralorn>
At least that was definitely the problem a while ago.
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python37Packages.bidict: 0.18.3 -> 0.19.0 »: https://git.io/Jf8Xd
<infinisil>
Yeah that makes sense, font builds depend on the font's source and some other dependencies
<maralorn>
infinisil: I don‘t understand it either. I got it from andi- and it helps.^^
dsg has joined #nixos
mallox has joined #nixos
eoli3n__1 has quit [Quit: WeeChat 2.8]
eoli3n_ has quit [Remote host closed the connection]
<infinisil>
But neither of those are runtime dependencies, so they wouldn't be persisted over a GC (by design, since you don't need the source and the deps anymore)
<evanjs>
infinisil: re nerd fonts. I know the feeling. Esp when it fails at work due to queue trees and etc lol
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python37Packages.asdf: 2.5.2 -> 2.6.0 »: https://git.io/Jf81Z
floscr has quit [Remote host closed the connection]
<evanjs>
Maybe I should set it to only download JB Mono and powerline, etc...
<infinisil>
andi-: No I'm just instructing nerd fonts to download a subset of fonts now. Not using the caching thing, that was just some talk by me explaining why it would help
<pjt_014>
cyberia: in short, most of what I need I get from `man configuration.nix` and `nix search packagename`
user_0x58 has quit [Quit: Leaving]
<pjt_014>
unless I'm tryna do something fancy, which is often :L
<{^_^}>
[nixos-homepage] @github-actions[bot] pushed commit from @garbas to master « Update flake.lock and blogs.xml [ci skip] »: https://git.io/Jf8Mr
shibboleth has joined #nixos
<{^_^}>
[nixpkgs] @vbgl opened pull request #87694 → ocamlPackages.ppxlib: minor refactoring → https://git.io/Jf8MK
<cyberia>
I found the stuff on nixos/learn.html inadequate for deep diving into how the filesystem is managed etc.
<cyberia>
I'll have a look at infinisil's comment, thanks :)
<emily>
cyberia: the source code ^_^
<infinisil>
Though the booting and co. is another part of NixOS' internals I haven't addressed in my comment
Soo_Slow has quit [Quit: Soo_Slow]
<emily>
cyberia: there's no substitute for diving into nixpkgs when you want the gory details beyond what the public docs address currently imo
knupfer has quit [Remote host closed the connection]
<emily>
it'd make a great (and faintly horrifying?) book though
knupfer has joined #nixos
<cyberia>
hmm ok
alp has quit [Ping timeout: 260 seconds]
<emily>
asking on IRC is also a good option, of course
<cyberia>
yes true
<emily>
also, the Nix(OS) papers are quite in-depth, if a bit outdated in places, if you can stand reading academic papers
<cyberia>
worth a shot I guess
orivej has quit [Ping timeout: 256 seconds]
<cyberia>
I guess what I'm saying is I fired up the VirtualBox demo image and checked out the filesystem. I noticed /bin and /usr/bin didn't have much in them and all my binaries were in /run/current-system/bin which is obviously unusual. then I checked out /etc and saw loads of symlinks (to /etc/static mostly), which was confusing too.
eoli3n_ has quit [Remote host closed the connection]
<cyberia>
and I wonder if there's docs as to how all of that stuff is managed
orivej has joined #nixos
eoli3n_ has joined #nixos
<pjt_014>
how much do you know of the basics?
<cyberia>
I've used Nix a little on an Ubuntu system
<cyberia>
I get the concept of building packages with a SHA prefix and symlinking current versions into your $PATH
<cyberia>
(and how that means you can use packages with dependencies on different versions of libraries etc. etc.)
<pjt_014>
I do have one other possible helpful thing I know of:
<jjwatt[m]>
cyberia: I'm fairly new, too. I've read the nix pills, and I'm re-reading them again more slowly. I think they're a little out of date. One minor breakthrough I had that is still somewhat basic is looking at the "derivations" section in the manual, like really pouring over it. I hadn't really understood how the packaging worked until then, even though I thought I had.
<cyberia>
that's helpful, thanks
hmpffff has joined #nixos
<emily>
cyberia: you can think of NixOS as being based around building "an entire Linux system, binaries, configuration and all" as a pure Nix derivation
<jjwatt[m]>
and it's close to what you're talking about re: files and where they go, but there are higher level things that manage like the global directories where the symlinks live and gc roots
<emily>
cyberia: that means that each system configuration is as reproducible and hermetic as possible, and you can rollback arbitrary system configuration changes
<cyberia>
right
m0rphism1 has joined #nixos
<cyberia>
sounds like I need to grok derivations as a concept then
<emily>
but as a result, /etc and your $PATH and the like are just symlinks to more forests of symlinks built by Nix :)
<{^_^}>
[nixpkgs] @shuhaowu opened pull request #87696 → WIP: Updated kind from 0.7 -> 0.8.1 → https://git.io/Jf8DT
<cyberia>
yes
knupfer has quit [Quit: knupfer]
<emily>
the basic idea is that the <hash> in /nix/store/<hash>-<name> contains all the information about the build scripts and recursive dependencies for a package
hmpffff__ has quit [Ping timeout: 256 seconds]
knupfer has joined #nixos
<emily>
so it should always (if the builds are properly reproducible) build to the same result and can always be recreated from the original derivation
<cyberia>
and a derivation is essentially a specification of what the package contains/how to build it?
<emily>
that way, different versions of packages and configurations are always automatically isolated, and everything has its exact dependencies pinned (which also means that runtime dependencies are automatically managed and can be easily transferred across machines, etc.)
hmpffff_ has joined #nixos
<cyberia>
yes that part is clear to me
<emily>
yep -- "the source is this tag from github with hash <...>, we have these build dependencies, and this is the build script"
<cyberia>
yes
<emily>
the reason you can download binary packages on nixos is that Nix goes to build the derivation of each package you install, hashes all the information for that, but then notices that the cache already has a build with the exact same hash
<NobbZ[m]>
Together with nix-community.cachix.org, you don't even need to compile
<M776f6c66[m]>
Hey, I am also looking to install NixOS and have been lurking to learn. Since the conversation about NixOS for newbie is ongoing, can someone help me with this: I use a rice of some tiling WM. Recently found someone who would create ansible playbooks to deploy his system in case of a crash to exact state as defined in the playbook. I know in terms of the packages that is handled by configuration.nix. Are the custom
<M776f6c66[m]>
configs handled so, too?
proofofkeags has quit [Remote host closed the connection]
<infinisil>
cyberia: Yeah, NixOS system derivation is linked to from /run/current-system
<M776f6c66[m]>
Secondly, in case I come across a package that not in the nix-store, how do I go about creating a package for it for others to use maybe?
<srhb>
M776f6c66[m]: With the a Nix tutorial under your belt, the nixpkgs manual open in one window and this chat in another :)
<infinisil>
cyberia: You'll also find /run/current-sytem/etc being a symlink to the /nix/store derivation containing all of /etc
<srhb>
M776f6c66[m]: Many a first-package has been born that way.
<infinisil>
cyberia: Which is also where /etc/static will point
<pjt_014>
M776f6c66[m]: y'want an example of what my 1st package lokos like?
<niso>
M776f6c66[m]: also: checking the nixpkgs repo for samples is quite helpful
Peter_Storm has quit [Quit: Connection closed for inactivity]
<srhb>
M776f6c66[m]: Yeah, it usually helps to copy a similar project (if it's not too complicated) in terms of how to handle dependencies etc.
<infinisil>
cyberia: How do all these /etc/foo -> /etc/static/foo links and /etc/static itself get set up you might ask. The answer is the activation script at /run/current-system/activate, which gets run when you `nixos-rebuild switch` and when you boot up
<srhb>
M776f6c66[m]: Packages of the same "breed" tend ot look alike
<niso>
M776f6c66[m]: and yes, custom and system configuration works the same way
<{^_^}>
[nixpkgs] @bjornfor merged pull request #86313 → lib.version: change pre-git to post-git on the release branch → https://git.io/JfYtQ
<{^_^}>
[nixpkgs] @bjornfor pushed to release-20.03 « lib.version: change pre-git to post-git on the release branch »: https://git.io/Jf8D6
<infinisil>
cyberia: I guess underneath NixOS is an activation script that changes the system into the desired state with a rather small number of atomic steps (like changing where /etc/static points to)
<M776f6c66[m]>
niso srhb pjt_014 thank you for the links and everything. Lemme go and try installing.
<pjt_014>
If you're on 20.03 or the unstable branch nix-env -iA shou work for that one
Maxdamantus has quit [Ping timeout: 256 seconds]
<niso>
why are there for each release branches for nixpkgs, nixos etc?
Maxdamantus has joined #nixos
proofofkeags has joined #nixos
dingenskirchen has quit [Remote host closed the connection]
<maralorn>
infinisil: That nerdfonts line is very sweet. I now have only Jetbrains Mono from Nerdfonts. much much quicker install. And less disk space usage!
<maralorn>
Thx
alp has joined #nixos
<infinisil>
:D
<{^_^}>
[nixpkgs] @yimmt opened pull request #87699 → pam: fix spelling mistake in configuration → https://git.io/Jf8yJ
<infinisil>
Props to the person introducing this override mechanism
virus_dave_ has quit [Ping timeout: 258 seconds]
<jjwatt[m]>
776f6c66: Some people do custom configs themselves with nix expressions, but others use home-manager. I've been using home-manager lately for stuff like that. It basically applies nix stuff to your home directory and even your systemd user session
<maralorn>
Yeah, them too.
<maralorn>
unknownHero++
<balsoft>
Oh my god! It's been almost two years since I switched to sway, and I finally found out why GTK apps have incorrect font rendering when GDK_BACKEND=wayland. It's because of GTK_USE_PORTAL.
<jjwatt[m]>
776f6c66: I mean, you still use nix with home-manager, it just makes it easier and cleaner and it has like a lib for various packages, including window managers. So, you can write configs as text snippets, but for a lot of window managers and other apps people have made the configs into functions on attributes, so you can say like "sway.color = it" or whatever and it will turn it into a config file.
orivej has quit [Ping timeout: 264 seconds]
<M776f6c66[m]>
jjwatt I have been looking at home manager. Couldn't be sure about if I was the correct audience for that. I thought I'd get back to it later. Thanks for your input, I'll surely go for home manager now.
virus_dave has joined #nixos
<jjwatt[m]>
it's super easy to make it "take over" a config file. Like, I recently went to managing my spacemacs from home-manager and it's literally just a line like ".spacemacs".source = conf/spacemacs where conf/spacemacs is a path to the one I want to use. Even better, I have a "home.file" attribute that pulls spacemacs at a pinned revision.
<aterius>
I prefer to manually write the files and have home-manager merely manage them, similar to gnu stow
domogled has joined #nixos
<Woutifier>
Ok, finally managed to find the issue with the nodejs project I was trying to node2nix'ify. Turns out there is a thing called webpack, which in turn can call something called a babel-loader. The babel-loader is responsible for compiling typescript into javascript, it has an exclude attribute which was set to "node_modules". Normally, that would be ok since it contains all the dependencies, but in the node2nix
<Woutifier>
case our whole package is in a folder called node_modules.....
<Woutifier>
so it just silently didn't compile the tsx to js, and the build failed without any meaningful error. On the plus side I now know more about nodejs than I wanted to.
<virus_dave>
here's a probably poorly forumlated question: I have a prod nix cache, and i want to ensure a particular cache entry is present in my local nix store. I don't have the original derivation available. How can I ensure this? I assume it'll use FODs somehow, perhaps?
<jjwatt[m]>
yeah, definitely seems to be trade-offs. I haven't settled on an approach yet. similarly to managing different ones on different machines. Like, right now I have different directories for different hosts. It would be less code to do "logic" in them to include different imports/settings based on the host, but I don't love that either. Kind of reminds me of uncertaintly I have with stuff like ansible, too. At some point, I'd
<jjwatt[m]>
rather repeat myself and/or generate the yaml than have it be too smart.
<srhb>
Woutifier: Imagine if you had just put that node ecosystem explanation in some novel as generic technobabble. It all sounds made-up. :-)
<jjwatt[m]>
srhb: lol. Joe Armstrong did a talk where he starts off with a story about js/node woes and "grunt can't update" or something. "The mess we're in" great talk
<srhb>
jjwatt[m]: Thanks ;)
<quinn>
jjwatt[m]: i have my own stow configuration i'm looking to merge with home-manager, but i'm very off-put by the unstable warnings on the github page. do you have a sense of how unstable it actually is?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jjwatt[m]>
quinn: It's not too unstable for me so far. I have it managing X on my laptop, but only in its own xsession launched from xdm/gdm.
<quinn>
jjwatt[m]: can you elaborate on "not too unstable"?
<M776f6c66[m]>
jjwatt : how host agnostic would the configuration be? It is all laptops btw. I frequently switch laptops. And maybe down the line consider a macbook with a nix alongside. I know of the woes of ansible but didnt think much of it because if I use ansible, the OS itself has to be installed beforehand so pretty safe(I could be grossly wrong, let me know if I misspoke)
<jjwatt[m]>
776f6c66: It can be totally host agnostic. The only reason I mentioned hosts is that I do have different configs on different hosts
<srhb>
M776f6c66[m]: I think most multi-system NixOS users tend to group their config into host-specific and host-agnostic files.
<emily>
quinn: tbh tons of people use home-manager at this point, I doubt it's terribly more unstable than NixOS ecosystem average
<srhb>
M776f6c66[m]: The host-specific file then serves as the otop level configuration and imports the host-agnostic one.
<jjwatt[m]>
776f6c66: And, I could be "smarter" about it. Some people split everything up into different $(hostname).nix files and I've seen people even pick configs in their nix files based on actually reading the hostname and stuff like that. I think one person even selected config bits based on IP address or timezone or something. Right now, I just have different directories.
<{^_^}>
[nixpkgs] @mkaito opened pull request #87700 → prometheus: Split options listenAddress and port → https://git.io/Jf8yb
<M776f6c66[m]>
Thank you guys jjwatt and srhb. I think it is time to get my hands dirty and install NixOS. Be sure to come back in case of hiccups or otherwise :D
lovesegfault_ has quit [Quit: WeeChat 2.8]
<jjwatt[m]>
776f6c66: but, as I do split things into different files, I could move them to a "common" area and import them from the different directories, etc. It's very flexible since everything gets turned into attribute sets, really, and it all can get merged and all that.
orivej has joined #nixos
<quinn>
emily: you have a point, thank you.
<jjwatt[m]>
776f6c66: Yes! do it. And, you can try home-manager after you mess around with the system config which is awesome in its own right! /etc/nix/configuration.nix :)
<srhb>
M776f6c66[m]: Have fun :)
<M776f6c66[m]>
No wonder people prefer NixOS for Devops. That would really solve a lot of problems my organisation faces in terms of deployment
<srhb>
M776f6c66[m]: Yes, that's exactly it. ;-)
<M776f6c66[m]>
It hits me harder. What, you ask? "Fearless tinkerer" :p
<emily>
quinn: mostly, the basic functionality of templating files and setting up symlinks should be pretty simple since it's the kind of thing nixos does already, I expect any instability is more in terms of breaking interface changes, incomplete/buggy modules, etc.
m0rphism has quit [Quit: WeeChat 2.7.1]
<emily>
quinn: that said, I haven't gotten around to home-manager-ifying my system yet, so I can't speak from personal experience
<{^_^}>
[nixpkgs] @Mic92 merged pull request #87690 → kexectools: always pass host and target to configure → https://git.io/Jf81o
<quinn>
emily: do you think it would be crazy to just port the modules i need into my system configuration?
<emily>
quinn: you can integrate home-manager directly from the nixos config without using the tool I think
<jjwatt[m]>
quinn: One thing I remember with starting with home-manager: the warnings about letting it manage your shell, etc. made me think it was going to take over my home directory entirely at first. That is definitely not the case!
<emily>
that was my plan
<srid>
How can I tell what exactly nix uses for the auto value in `nix-build -j auto`?
<quinn>
emily: ohh, i see. that is not in the README, but it is in the manual. that is a lot more compelling
<quinn>
jjwatt[m]: i see. it basically just symlinks in templated config files for you?
<jjwatt[m]>
quinn: Yes, and only the stuff I tell it to. As I specify more programs and more configs there, I do remove them from 'nix-env' to avoid any conflicts, but I still have stuff that I haven't "ported over" yet, and it doesn't try to do anything to system services and stuff like that, only user ones, and only if you tell it to.
<jjwatt[m]>
and like emily said, it's even a seperate attribute to specify "extra packages" or programs to be installed by home-manager, 'home.packages', so it can likely co-exist and even be specified from the system config
<qbit>
i am looking to make #nix-openbsd for openbsd related nix things - freenode let me create it - but I would like to get signoff on being official or not
eoli3n_ has quit [Remote host closed the connection]
eoli3n_ has joined #nixos
<Jonathan54>
Hi! I have an application in NixPkgs which is throwing this error `cannot exec /usr/bin/wget`. Does that just mean that wget needs to be added to the dependencies, or does it need some sort of patch-elf to change the hard-coded path?
<LnL>
probably both
<Jonathan54>
*not my application, I just have it installed, and was looking to see if I could fix it.
o1lo01ol1o has quit [Remote host closed the connection]
<clever>
Jonathan54: you may need libredirect
o1lo01ol1o has joined #nixos
<emily>
Jonathan54: if it's built from source, then we should be able to just patch the source
<pistache>
what command can I use to evaluate my current NixOS configuration and get an attribute's value ?
pjstadig has quit [Ping timeout: 258 seconds]
<pistache>
I remember there's a way to this, but I didn't note it unfortunately, and can't remember..
eoli3n_ has quit [Ping timeout: 264 seconds]
morgrimm has joined #nixos
Maxdamantus has quit [Ping timeout: 256 seconds]
gxt has quit [Ping timeout: 240 seconds]
Maxdamantus has joined #nixos
<pistache>
ah, "nix-instantiate --eval "<nixos/nixos>" -A attr" seems to do what I want
<emily>
nixos-option
<emily>
that works too, but is less fancy
<pistache>
ah yes ther's also nixos-option
<pistache>
nixos-option says "error: while evaluating 'walkOptions' [...]# and "error: undefined variable 'config' [...]"
<typetetris>
Hi there! How can I get haddock documenantion for a haskell packages built with callCabal2nix ?
cjpbirkbeck has joined #nixos
gxt has joined #nixos
palesz has quit [Remote host closed the connection]
plutes has joined #nixos
morgrimm has quit [Ping timeout: 264 seconds]
KeiraT has quit [Ping timeout: 240 seconds]
fendor has quit [Read error: Connection reset by peer]
Maxdamantus has quit [Ping timeout: 260 seconds]
Maxdamantus has joined #nixos
<virus_dave>
folks, if i have a `#! nix-shell --pure -i bash -A my-der ./default.nix -I "nixpkgs=/some/path" ` , it seems i'm getting `bash` from the channel at `/some/path`. I really want my script to be executed by the bash in `my-der`'s build environment though. How can i make that happen?
jumper149 has joined #nixos
m0rphism has joined #nixos
jkachmar has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 256 seconds]
<glittershark>
does anyone have a cached build of graalvm from nixpkgs anywhere?
<glittershark>
it is a really remarkably slow and resource-intensive build
<jumper149>
I'm writing a service module and the service shouldn't run as root. So I wonder if I should give the user a hand-chosen uid and gid?
knupfer has quit [Ping timeout: 260 seconds]
<emily>
jumper149: yes, or set serviceConfig.DynamicUser
<emily>
oh, you don't need to specify the uid/gid specifically, yeah
<emily>
nixos will infer generate ones
<jumper149>
So I just can generate the user with `users.users.name = {};`?
<emily>
just set users.users.blah = { group = "blah" }; users.groups.blah = {};
<jumper149>
Ok dok that sounds good :)
<glittershark>
typetetris: doHaddock = true, or `pkgs.haskell.lib.doHaddock pkg`
<jumper149>
emily++
<{^_^}>
emily's karma got increased to 24
<emily>
jumper149: but if you don't need files with specific permissions shared between services or such, serviceConfig.DynamicUser = true in the service is potentially better
<emily>
since it does some sandboxing and avoids the need for a statically-defined user
<emily>
(you can still have locally-owned state in /var/lib by setting e.g. StateDirectory)
<jumper149>
That sounds good too :)
SunWuKung has quit [Ping timeout: 260 seconds]
kraem has quit [Ping timeout: 272 seconds]
lsix has joined #nixos
lsix has quit [Client Quit]
<infinisil>
Yeah DynamicUser is preferred if possible (see RFC)
<infinisil>
jumper149: That doesn't document anything other than DynamicUser use on NixOS. For knowing what DynamicUser and other attributes do, you need to look in `man systemd.service` and `man systemd.exec`
alp has quit [Ping timeout: 260 seconds]
<infinisil>
jumper149: Or `man systemd.directives` which then tells you that you can find out about DynamicUser in `man systemd.exec`
<jumper149>
infinisil: Ohh yeah, I kinda forgot that it's configuring systemd x)
<azazel>
mmm... i didn't knew of systemd.directives...
FRidh has quit [Quit: Konversation terminated!]
__monty__ has quit [Quit: leaving]
<emily>
me neither, infinisi1++
<{^_^}>
infinisi1's karma got increased to 1
<emily>
eh, infinisil++
<{^_^}>
infinisil's karma got increased to 288.00000000000000004
MmeQuignon has quit [Ping timeout: 240 seconds]
<infinisil>
I kind of want to implement {^_^} randomly mentioning useful tips
<infinisil>
This would be one of them
<dsal>
nix-shell seems to modify my prompt to stick newlines everywhere. What's doing this and how do I fix it? :)
<srid>
(assuming you are not using reflex-platform cache)
<srid>
(i.e., only cache in use is the nixos official one)
<colemickens>
Who buys threadrippers? I don't understand how to choose between TR and EPYC?
<colemickens>
Oops, definitely not on-topic, never mind.
<Ashy>
colemickens: i think epyc has even more pcie lanes than threadripper so that could factor in, but yeah youd want to know you can keep that machine crunching some workload that makes you money (or saves a bunch of money)
<Ashy>
srid: running now, i've never heard of reflex-platform-cache
daGrevis has quit [Remote host closed the connection]
<Ashy>
srid: ghc seems to be only keeping one core busy...