<NixOS_GitHub>
nixpkgs/master 287415a Lengyel Balazs: wine-stable: 2.0.3 -> 3.0
<NixOS_GitHub>
[nixpkgs] MP2E pushed 1 new commit to master: https://git.io/vNEgj
<elvishjerricco>
How does everyone configure your maxJobs and buildCores? There are some cases where I really want to give all my cores to one build (I have a 32thread CPU), and other cases where I want to distribute them over many builds. Is there any nice way to do this?
xcmw has joined #nixos
<MichaelRaskin>
elvishjerricco: normal users can pass --option build-cores 32
<MichaelRaskin>
(and the same for build-max-jobs)
<elvishjerricco>
Yea, but this won't budget things automatically
<elvishjerricco>
Like, say I have a build where there's only one node that I want to give 32 threads to, and I want to give everything else like 4.
<MichaelRaskin>
build-cores is -l, so it is approimately over all the builds
<MichaelRaskin>
approximately
<elvishjerricco>
I end up having to wait for the build to reach the big derivation, stop it, start it with --cores 32, then stop and start it again with the cores lowered again
<MichaelRaskin>
I think your desires are more complicated than what Nix handles
<elvishjerricco>
Yea, I think so
<MichaelRaskin>
Nix fails even much simpler build juggling
<elvishjerricco>
It'd be nice if Nix could budget cores.
<elvishjerricco>
Like if derivations could provide estimates about how many cores they'll need
dramforever has joined #nixos
<MichaelRaskin>
Why don't you want to give more cores to the rest of the derivations?
<elvishjerricco>
Most C derivations would say "as many as possible" and most Haskell derivations would say something like 4
<MichaelRaskin>
If a build cannot take more than 4, it won't take more than 4
<dramforever>
So, Haskell question
<elvishjerricco>
MichaelRaskin: If you ask for 8 jobs with 8 cores each, you'll end up with a lot of thread contention, which slows things down a lot
<elvishjerricco>
If they all use 8 threads, that is
<dramforever>
How do I tell nix-shell to give me something in haskellPackages?
<elvishjerricco>
dramforever: How do you mean? Like you want to use a haskell package in ghci?
<MichaelRaskin>
elvishjerricco: first, with Linux scheduler contention is more complicated
<elvishjerricco>
dramforever: It's quite annoying, so I tend to use `callCabal2nix` instead. Do you have a cabal file for your project?
Capprentice has joined #nixos
<dramforever>
No! I'm exactly trying to avoid that because when I play with Haskell scripts I usually only have a .hs file
<elvishjerricco>
MichaelRaskin: Why would it do that? I dont think I've ever seen a derivation with `NIX_BUILD_CORES` set to something less than `--cores`
detran` has joined #nixos
<dramforever>
This worked perfectly! nix-shell -p 'haskellPackages.ghcWithPackages (p: [p.logict])'
<dramforever>
elvishjerricco: Thank you
<elvishjerricco>
dramforever: I'm surprised you can just do that in a `-p` argument. TIL :P
<MichaelRaskin>
elvishjerricco: because make -l8 -j8 is not the same as make -j8
detran has quit [Ping timeout: 268 seconds]
jb55 has quit [Ping timeout: 248 seconds]
<elvishjerricco>
MichaelRaskin: If Nix spawns 8 derivations, each with `make -l8 -j8`, how would 8 independent instances of `make` be able to know not to use 8 threads?
<elvishjerricco>
Or is that precisely what `-l` does? Does that require asking the kernel for the entire system's current load?
<MichaelRaskin>
Yes, it tries to look at global system load
<elvishjerricco>
I see. Regardless, this unfortunately doesn't help with Haskell derivations, who don't have such a smart mechanism.
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
<elvishjerricco>
gwang: Did you recently update your nix channel?
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
<gwang>
no I didn't
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
<elvishjerricco>
gwang: It looks like you must have. Your system has switched to GHC 8.2 by default, which doesn't seem compatible with the package set you're building.
<elvishjerricco>
gwang: I think they recently fixed a bunch of such build errors by bumping the haskell packages in nixpkgs to LTS 10
swayf has quit [Remote host closed the connection]
<elvishjerricco>
So maybe updating to the latest unstable channel will fix it?
<gwang>
I'll give a try. Thanks!
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
nixpkgs/release-17.09 4447281 Andreas Rammhold: wireshark-gtk: explicitly disable the Qt build when building Gtk...
<elvishjerricco>
vaibhavsagar: Yea. The only reason it works there is because cabal2nix is depending on Cabal as a library dependency, not as a setup dependency
hakujin has quit [Ping timeout: 256 seconds]
<vaibhavsagar>
ah, I see
justan0theruser has joined #nixos
ivanivan has joined #nixos
justanotheruser has quit [Ping timeout: 248 seconds]
fresheyeball has joined #nixos
barrucadu has quit [Ping timeout: 256 seconds]
hamishmack has quit [Quit: hamishmack]
jekor has quit [Ping timeout: 240 seconds]
`_ has quit [Ping timeout: 264 seconds]
echo_oddly has quit [Remote host closed the connection]
magnetophon has quit [Remote host closed the connection]
<Drakeson>
I am presented with a "dead" grub screen (just the text "GRUB" on it). What could be the problem, and how can I actually see some error messages?
fresheyeball has quit [Ping timeout: 240 seconds]
AllanEspinosa has joined #nixos
yegortimoshenko has quit [Ping timeout: 255 seconds]
orivej has joined #nixos
AllanEspinosa has quit [Client Quit]
yegortimoshenko has joined #nixos
MP2E has quit [Remote host closed the connection]
hamishmack has joined #nixos
ryanartecona has joined #nixos
yegortimoshenko has quit [Remote host closed the connection]
yegortimoshenko has joined #nixos
schoppenhauer has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #nixos
Guanin has quit [Remote host closed the connection]
rauno has quit [Remote host closed the connection]
<Ralith>
nearly everything to do with rust on nix is badly broken ;_;
<simpson>
Yay?
* Ralith
flails despondently
<Ralith>
we've got the fancy new stuff that tries and fails to replace cargo entirely, we've got the slightly old stuff that triggers some horrible nondeterministic jobserver-related bug in rustc, the new stuff's upstream is in a version control system that nix has no working package for
<Ralith>
I just want to package my damn software
Rusty1_ has quit [Quit: Konversation terminated!]
el_putin has joined #nixos
la_putin has quit [Read error: Connection reset by peer]
mrkgnao has quit [Ping timeout: 260 seconds]
__red__Away is now known as __red__
la_putin has joined #nixos
ma27 has joined #nixos
newhoggy has joined #nixos
el_putin has quit [Ping timeout: 276 seconds]
Wharncliffe has quit [Quit: Lost terminal]
rauno has joined #nixos
kier has quit [Ping timeout: 240 seconds]
<fearlessKim[m]>
Ralith: I feel your pain, with Lua (no infra) and the rust packages I can't use because cargo fails.
<ertes-w>
(reasking my question from yesterday) what's the proper way to customise NIX_PATH to point to my user channel? right now <nixpkgs> points to root's channel
<ertes-w>
i'd just customise it in my shell profile, but i'm afraid that's not future-proof
<rauno>
hum, i'm trying to just build one library out of bigger package
<rauno>
baiscally buildcmd chould be make librbd
<fgaz>
* nixpkgs ARM
raynold has quit [Quit: Connection closed for inactivity]
Isorkin has quit [Ping timeout: 240 seconds]
<rauno>
to be precise then i'm trying to get from ceph new package librbd installed on my system
FRidh has quit [Ping timeout: 240 seconds]
hyper_ch2 has joined #nixos
klntsky has joined #nixos
<rauno>
ah okay, seems like something is happening
johann__ has joined #nixos
<rauno>
had some problems with directory changes during phases
johann__ has quit [Client Quit]
johann__ has joined #nixos
johann__ has quit [Client Quit]
<sphalerite>
fgaz: the official binary cache does not provide ARMv7 and lower binaries, only aarch64 (ARMv8)
<sphalerite>
fgaz: Dezgeg runs a binary cache which contains a small subset of nixpkgs for ARMv7 though, see also https://nixos.wiki/wiki/NixOS_on_ARM
<fgaz>
oh i see
<fgaz>
i probably only tried things from that subset
<sphalerite>
yeah but you haven't set up Dezgeg's binary cache presumably :)
<fgaz>
wait, then why is it downloading a precompiled gcc?
<rauno>
but another question, atm my new package is building this specific library from bigger packages, is there an example how this new library becomes accessible by system and its components?
<fgaz>
(I'm on armv7)
<sphalerite>
fgaz: for bootstrapping. You have to start somewhere :)
<fgaz>
duuh >.
<fgaz>
>.<
<sphalerite>
that precompiled gcc will only be used for building the toolchain that compiles everything else
<fgaz>
...i'll have to setup that cache then
asuryawanshi has quit [Remote host closed the connection]
<fgaz>
it _is_ small
<fgaz>
I hoped to find ghc
<pauldub>
How would one use nix to provision servers (without nixops nor installing nixos on the servers)? Would nix-deploy handle that use case?
FRidh has joined #nixos
marusich has quit [Quit: Leaving]
<sphalerite>
pauldub: first thing in the description of nix-deploy is "Deploy a NixOS system configuration"
<sphalerite>
pauldub: I think disnix might be helpful for what you're trying to achieve, but I'm not sure
<srhb>
pauldub: nix-deploy just uses nix-copy-closure, so it relies on Nix being present (for deploying nix build artifacts) or NixOS (for deploying NixOS systems)
<rauno>
why not pxe boot them with nixos ?
<rauno>
depends is baremetal ofc
<srhb>
rauno: PXE booting can be a quite pleasant experience. :)
<rauno>
i know, i have done some tests and probably in near future need to continue with it and automatic configuration of nixos :D
<pauldub>
ok so I could bootstrap hosts with nix and use nix-deploy to install software and manage configuration? I'd like to use nix only for basic provisioning of the hosts. As for using PXE i'm not familiar with it, but it might be supported by the hosting provider as it is what they use to boot the servers anyway
<srhb>
Yeah, that's what I've done
ThatDocsLady_ has joined #nixos
FRidh has quit [Ping timeout: 248 seconds]
<srhb>
pauldub: What are you trying to accomplish really? Getting a barebones OS, or provisioning a barebones OS?
<pauldub>
Btw provider is scaleway and i've tested the kexec method of installing nixos, it works but finding your way through the management ui is not so easy
<pauldub>
provisioning barebones OS
ThatDocsLady_ has quit [Client Quit]
<srhb>
Well, once you have a basic NixOS, nix-deploy will work just fine
<pauldub>
Basically setup habitat and a few other things on the machines
FRidh has joined #nixos
<pauldub>
and then use habitat supervisor
<pauldub>
I'd rather use nix than chef, puppet, ansible and co
<rauno>
and if then iPXE, PXE probajly will give just more headache
lexwhat has joined #nixos
<lexwhat>
Hellog guys!
<sphalerite>
pauldub: can't you install nixos using the kexec method then snapshot the installation into an image on the scaleway console?
asuryawanshi has joined #nixos
<lexwhat>
I'm very stupid, and nix is very complex, so I need your help. I have this file ~/.config/nixpkgs/config.nix , what should I write there to add 'ffmpeg' package to my current user? and which command should I run to apply this configuration?
<pauldub>
You can, but then I'd like to have /nix/store on a separate disk and attaching them means going through snapshots and volumes and that's where it gets messy because you cannot attach a volume on server start and such. I'll give it a little bit more thinking
ThatDocsLady has joined #nixos
<sphalerite>
lexwhat: there are quite a few ways of achieving declarative user profiles
<NixOS_GitHub>
[nixpkgs] mnacamura opened pull request #34041: rPackages.data_table: OpenMP support on Darwin (master...r-datatable-openmp) https://git.io/vNuvJ
NixOS_GitHub has left #nixos [#nixos]
<sphalerite>
you can also do nix-env -iA nixpkgs.userprofile or nix-env -iA nixos.userprofile (depending on whether you're on nixos or nix-on-other-OS) but -f '<nixpkgs>' is just more consistenyly reliable :)
blym has joined #nixos
<LnL>
yeah, that's exactly what my thing does, but with a nix-rebuild wrapper
notedge has quit [Ping timeout: 264 seconds]
<lexwhat>
thank you! <3 you great! this is probably what I want. If this will not bother you, could you shortly explain why overlay is better than 'packageOverrides' in ~/.config/nixpkgs/config.nix ?
<sphalerite>
lexwhat: it's more composable
<lexwhat>
k
<lexwhat>
will try that now
<sphalerite>
you can easily combine multiple overlays, whereas with packageOverrides you can get problems with self-reference
<LnL>
well you can get to self with pkgs.pkgs, but config.nix is a single file
<LnL>
you can drop a bunch of stuff in overlays and if they are written well nothing should conflict
notedge has joined #nixos
notedge has quit [Client Quit]
notedge has joined #nixos
swayf has quit [Remote host closed the connection]
swayf has joined #nixos
sigmundv_ has joined #nixos
Itkovian has joined #nixos
<manveru>
makefu: just noticed you removed swiftclient :|
<lexwhat>
but nix-env -f '<nixpkgs>' -iA lexoverlay.nix ; throws error
newhoggy has joined #nixos
<LnL>
without .nix, it’s the attribute name
newhoggy has quit [Ping timeout: 276 seconds]
<lexwhat>
LnL, I do not understand absence of which .nix do you refer, But I guess you sayin that I can't use beautiful option like for example nixpkgs.config.firefox.enableGoogleTalkPlugin = true; in https://nixos.org/nixos/manual/index.html#sec-customising-packages and I have to use overrideAttrs. Correct?
<LnL>
nix-env -f '<nixpkgs>' -iA lexoverlay
<LnL>
oh and the inherit doesn't look correct
<lexwhat>
Oh.... I see.... yes... still and error. error: syntax error, unexpected '.', at ...
<LnL>
you can only do inherit foo; or inherit (foo.bar) baz;
<LnL>
I think you want this { config.ffmpeg-full.nonfreeLicensing = true; inherit (self) ffmpeg-full; };
simukis has joined #nixos
kgz has quit [Quit: WeeChat 1.9.1]
<lexwhat>
you mean file contents should be : self: super: { lexoverlay = { config.ffmpeg-full.nonfreeLicensing = true; inherit (self) ffmpeg-full; }; } ? because now I got error: value is a function while a set was expected
<NixOS_GitHub>
nixpkgs/master 2533720 Mitsuhiro Nakamura: rPackages.data_table: OpenMP support on Darwin
NixOS_GitHub has left #nixos [#nixos]
<NixOS_GitHub>
[nixpkgs] peti pushed 2 new commits to master: https://git.io/vNuT3
<NixOS_GitHub>
nixpkgs/master f88720e Peter Simons: Merge pull request #34041 from mnacamura/r-datatable-openmp...
asuryawanshi has joined #nixos
<lexwhat>
sphalerite ! my m8, halp! (or anybody available) . I want to specify "nonfreeLicensing = true " in my overlay for ffmpeg-full package. How should I write it? I tried self: super: { lexoverlay = { config.ffmpeg-full.nonfreeLicensing = true; inherit (self) ffmpeg-full; }; } but this doesn't work.
<sphalerite>
for that stuff you still need to use config.nix
<sphalerite>
overlays only replace packageOverrides, not all of config.nix
asuryawanshi has quit [Remote host closed the connection]
asuryawanshi has joined #nixos
ssmike has quit [Remote host closed the connection]
ssmike has joined #nixos
<rauno>
about the package creation/installation, now when i have built the desired libraries, how should the installPhase look alike to get the libraries available to the system
jensens has quit [Remote host closed the connection]
<rauno>
dont need the make install part probably which is default behaviour
hakujin has joined #nixos
<rauno>
something like this:
<rauno>
installPhase = ''
<rauno>
mkdir -p $out/bin
<rauno>
cp foo $out/bin
<rauno>
'';
<rauno>
?
<rauno>
just /bin replaced by /lib
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] jtojnar closed pull request #33872: yajl: small clean up (master...yajl-cleanup) https://git.io/vNcMk
NixOS_GitHub has left #nixos [#nixos]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] jtojnar pushed 2 new commits to master: https://git.io/vNukW
<NixOS_GitHub>
nixpkgs/master 4340ee7 Piotr Bogdan: yajl: small clean up...
NixOS_GitHub has left #nixos [#nixos]
<NixOS_GitHub>
nixpkgs/master 1848e17 Jan Tojnar: Merge pull request #33872 from pbogdan/yajl-cleanup...
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] peti pushed 3 new commits to master: https://git.io/vNuka
<NixOS_GitHub>
nixpkgs/master 3b54c5f Peter Simons: hackage-packages.nix: automatic Haskell package set update...
NixOS_GitHub has left #nixos [#nixos]
<NixOS_GitHub>
nixpkgs/master 899714a Michael Alan Dorman: hoogle: fix http-conduit dependency for new version...
<NixOS_GitHub>
nixpkgs/master a1366f4 Peter Simons: git-annex: update hash for new version
<thoughtpolice>
Hmmm, anyone have a trick for listing the set of attributes in a default.nix file, off chance?
<thoughtpolice>
ISTR having this somewhere, but it's left my brain
newhoggy has quit [Remote host closed the connection]
<rauno>
hum, defining the installPhase in package doesnt change anything, it still tries to do the 'make install' part
<thoughtpolice>
sphalerite: You're the MVP! Thanks
<lexwhat>
ok, now I able "nix-env -f '<nixpkgs>' -iA lexoverlay " without errors, I got rid of syntactic errors. Butt.... still.... ffmpeg-full installed without libfdk-aac support, seems like settings this option doesn't have desired affect and\or doesn't trigger recompilation
<symphorien>
yes on nixos the default channels are managed by root
* lexwhat
have a hope at this channel and nix people, at the end of a day :3
crucialrhyme has quit [Quit: WeeChat 2.0]
fyuuri has quit [Ping timeout: 256 seconds]
<lexwhat>
but may I just upgrade specific package , without affecting all other system? how it should be done in case a) to enforce upgrade of packageges that depend on specific package X ; b) to upgrade only package X ?
<lexwhat>
maybe nix-channel --upgrade and\or nixos-rebuild --upgrade , help, but i'm afraid they will upgrade ALL packages in current generation, right?
<rauno>
should i discard it and port this script to nix ?
Myrl-saki has joined #nixos
<rauno>
also why is it so that when testing package with nix-shell '<nixpkgs>' -A [packagename] acts quite differently than installing same package with nix-env or from configuration.nix
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
newhoggy has quit [Remote host closed the connection]
xcmw has joined #nixos
vidbina has quit [Ping timeout: 268 seconds]
raynold has joined #nixos
strobelight has joined #nixos
newhoggy has joined #nixos
xcmw has quit [Ping timeout: 264 seconds]
<infinisil>
hoverbear: you can invoke the shell you want in `shellHook`
<hoverbear>
infinisil: If I set `shellHook = 'zsh'` then I need to exit twice :(
<infinisil>
hoverbear: you can do `exec zsh`
<hoverbear>
Ooo
<hoverbear>
infinisil: Thanks. =D
<infinisil>
hoverbear: :)
<hoverbear>
Now I just need to figure out how to give this nix-shell a custom zsh config
<infinisil>
rauno: how do you mean it acts quiet differently?
<infinisil>
hoverbear: i think you can pass arguments with exec, so you can just give the zsh config there
<infinisil>
(which could be declared in nix as well)
<rauno>
with nix-shell i ran all phases (while testing): unpackPhase, configurePhase, buildPhase and everything was ok, and when installing with nix-env,boom some dependencies were missing and its still broken :)
newhoggy has quit [Ping timeout: 248 seconds]
<hoverbear>
infinisil: So I can't set things like `programs.zsh ...` like I can in NixOS?
<infinisil>
rauno: If you call `genericBuild` in a nix-shell, it should build it correctly, but the install step will fail (unless you set $out to something maybe)
patrl has joined #nixos
<lexwhat>
https://www.youtube.com/watch?v=qnWDB1vfFhA Ok, if you wondering, in the end of day I managed to achieve my simple goal, get ffmpeg with libfdkaac, with overlay : self: super: { lexoverlay = { # config.ffmpeg-full.nonfreeLicensing = true; config.ffmpeg-full.fdkaacExtlib = true; nix.buildCores = 8; nix.maxJobs = 8; ffmpeg-full = super.ffmpeg-full.override { nonfreeLicensing = true; fdkaacExtlib = true; }; inherit (self) ; }; }
<infinisil>
hoverbear: unfortunately not (unless you extract that from nixos and use it standalone)
<lexwhat>
thank you for your support and time
<hoverbear>
infinisil: Ok thank you. :) I wanted something like how I can override neovim but apparently not. :(
<rauno>
infinisil, just tried genericBuild and it passed in nix-shell
<infinisil>
hoverbear: hmm, neovim/vim might be possible
<hoverbear>
infinisil: Oh, I have it working for nvim
<hoverbear>
infinisil: I would like to do this for zsh/fzf etc
<rauno>
wait, or not
leat has joined #nixos
<infinisil>
hoverbear: ah right. Yeah the program specific nixos configuration (the program. options) like zsh and so shouldn't really be only in the nixos configuration, because they could be used for other things as well.
<infinisil>
i think vim and neovim are the only ones in pkgs instead
<hoverbear>
infinisil: So `programs.zsh ...` should actually be able to be done via `pkgs.zsh.override {}`?
<infinisil>
yeah something like that
<hoverbear>
Okay hm
<infinisil>
well it's not right now
<infinisil>
but it should be imo
<hoverbear>
So this is like legacy and a patch allowing that would be welcome?
<infinisil>
Well you seem to want that feature, so if you have time, go for it :)
<infinisil>
Hmm, although I'm not sure how the options sholud be declared then
<infinisil>
since there's no nixos module system in pkgs. So you can't give nice descriptions and examples to the options
chpatrick has joined #nixos
<infinisil>
Which is the reason I feel like the module system should be used for program configuration too
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] edolstra pushed 1 new commit to master: https://git.io/vNuBv
<NixOS_GitHub>
nixpkgs/master 3d5391c Eelco Dolstra: fetchFromGitHub: Revert to the original version...
NixOS_GitHub has left #nixos [#nixos]
<chpatrick>
hi, do you know why I wouldn't be able to connect to the outside world from a nixos container?
<nikivi>
I am curious what is the view of nix working with other packages like npm, cargo, pip and so on
<nikivi>
Does it just coexist alongside them or you have to try use nix for everything
<hoverbear>
nikivi: I've been also trying to determine that. I do a lot of Rust stuff and I haven't really understood how they're supposed to play together
<chpatrick>
nikivi: nix doesn't have a replacement for everything afaik
<chpatrick>
python is pretty good but js isn't
<chpatrick>
so sometimes you need to use another package manager
<nixy>
After using Nix why would you ever want to use lesser package managers ;)
<the-kenny>
For pragmatic reasons, mostly :)
<nixy>
Joking aside it depends on if you are using Nix on Linux or on NixOS
<goibhniu>
you do have the option of creating a development environment with nix, and then using the native package managers inside that
<nixy>
Nix on linux leaves you with quite a bit of flexibility to use other package managers, but on NixOS you have to do things in a nix-like way
<chpatrick>
nixy: even on nixos there's no alternative to NPM for example, I believe
* goibhniu
does python web development using the standard tools in nixos-containers
<chpatrick>
but there is for python and haskell
<nixy>
So you can create a nix expression with `pip` and `virtualenv` in it and then use the normal python flow inside a nix-shell
<the-kenny>
goibhniu: Me too, but I do it inside nix-shell environments (wit direnv) :)
johann__1 has quit [Quit: Leaving.]
<rauno>
can i force nix-env -iA to do it without cache ?
johann__ has joined #nixos
<adisbladis>
nikivi: Personally I like the approach of being a bit more ad-hoc in development and using pip/npm & friends and generating nix expressions from that for production
<lexwhat>
Now I able to start my 'real work' with ffmpeg. It took me 7 hours to figure this out! I've read all possible manuals on nix{os,packages,pills}, it is not only hard to understand wall of text, but I feel myself deeply frustrated with lack of basic knowledge on nix language.
<hoverbear>
infinisil: Yes, I have essentially `neovim.override { configure = { customRC = builtins.readFile ./init.vim } }` and I would like to do the same
<hoverbear>
lexwhat: Yes I feel you xD
<lexwhat>
When I write nix files, I don't understand many things like : where self, super come from, what do they mean? is particular lines are functions or not? what argumens are possible for specific functions? how inherit() works? and other stuff. The nix language doesn't look familiar to me as Java or Python (ex java\python dev). Is there book "nix for dummies in 24" with complete refference?
<infinisil>
!pills
<infinisil>
oh the bot doesn't work
<hoverbear>
infinisil: They said they have read the pills :)
<infinisil>
well we could help you understand specific htings
<rauno>
infinisil, yep, using in nix-shell genericBuild is successful but with nix-env even cmake fails :|
<lexwhat>
we have briefly reviewed them. (*honestly)
<hoverbear>
lexwhat: For me I mostly get confused by the lack of consistency. Eg why can I fine-grain configure neovim but not bash, etc
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] erosennin opened pull request #34048: libvirt: add qemu to PATH for libvirtd (master...libvirtd-qemu-path) https://git.io/vNu0G
NixOS_GitHub has left #nixos [#nixos]
<hoverbear>
I'm starting to feel like nix-shell won't give me what I want in terms of a reproducable dev environment :(
erasmas has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
nixpkgs/master 26734df Rob Vermaas: mapsplotlib: init at 1.0.6
NixOS_GitHub has left #nixos [#nixos]
<NixOS_GitHub>
[nixpkgs] rbvermaa pushed 1 new commit to master: https://git.io/vNu0i
<lexwhat>
hoverbear, infinisil , I will appreciate if anyone will point me (give me a link) on concrete book\text\articles, when I i could see all nix functions, libraries, with usage examples in order. Like Java\Python refference format.
<adisbladis>
lexwhat: There is no such thing afaik
coot_____ has quit [Ping timeout: 248 seconds]
<adisbladis>
Quite a lot of things you will use every day live in the nixpkgs git in library functions
<lexwhat>
hoverbear, oh my god, great, I love this site so much. didn't knew they had section on nix. thanks, very time saving! but still incomplete refference of functions\modules.
<hoverbear>
So I can't mock `/etc/` files or set `environment` related things in a nix-shell?
<hoverbear>
s/Mock/'replace'/
<adisbladis>
hoverbear: What do you want to achieve?
<lexwhat>
adisbladis, man, ok, if { stdenv, fetchurl , exampleSupport ? false }: - are arguments to the function, then where is the fucntion it self? you know, I get used to myclass.myfunction(argu, ments). but I was not prepared to understand esoteric code like that. If stdenv & fetcthurl are arguments, why don't we assign values to them like stenv=1, fetchurl = 2 ??
<hoverbear>
adisbladis: I would like to customize my ZSH configuration in this nix-shell
<hoverbear>
adisbladis: Or, more generally, I would like to configure packages in this nix-shell like I would with the nixos `programs.$FOO = {}`
<infinisil>
lexwhat: functions don't really have a name by themselves, you can give them names with let
<infinisil>
`x: x` is a function that takes something and returns it. `let id = x: x; in id 1` names it "id" and uses it on the argument 1
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rauno has quit [Remote host closed the connection]
<lexwhat>
gentlemen, are you all learned Nix, only by reading official manuals'n'pills ? Ofc, I beleive it's possible so, but I assume more easier approach would be to see some complete reference in format like https://docs.oracle.com/javase/7/docs/api/ , https://docs.python.org/2.7/library/index.html , you know standard lib when I see all possible packages, modules and their functionality
peacememories has joined #nixos
<hoverbear>
lexwhat: Ladies and gentlemen*
<lexwhat>
hoverbear, yes, m'lady
Drakonis has quit [Read error: Connection reset by peer]
<lexwhat>
when I reading nix expression file, and see some unrecognized word for first time, lets say MkDerrFHSUSrSmthn , how the F should I know it is a function? or keyword? Is it built in? or was imported? Does it return value or void? etc
<hoverbear>
lexwhat: I generally do `rg $WORD` on the nixpkgs directory
<hoverbear>
But yeah
<azazel>
lexwhat: I follow you in the format ( I like Sphinx) but not on the content, the pills, and various manuals are well written
<hoverbear>
lexwhat: It's all a bit arcane, I think this is largely due to lack of time/people instead of malintent
<hoverbear>
az
<hoverbear>
azazel: While the manual and the pills have useful content for learning and understanding, I wouldn't say they're well written.
Neo-- has quit [Ping timeout: 255 seconds]
<hoverbear>
They aren't even remotely on the same level as a resource like the arch wiki
<lexwhat>
what is rg? ; azazel, give me a link please to all built in functions refference, and modules? if they are documented. because I didn't found one
coot______ has quit [Quit: coot______]
<azazel>
hyper_ch: the kexec trick worked, thanks... I did had some issues with btrfs thought... and i switched to zfs
swayf has quit [Remote host closed the connection]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] corpix opened pull request #34049: apparmor: updating utilities to fresh python (staging...fix/apparmor-utils) https://git.io/vNu2W
NixOS_GitHub has left #nixos [#nixos]
FRidh has quit [Remote host closed the connection]
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] copumpkin pushed 1 new commit to release-17.09: https://git.io/vNu2D
<NixOS_GitHub>
nixpkgs/release-17.09 fd0abdc Ricardo M. Correia: pythonPackages.netaddr: fix patch hash...
NixOS_GitHub has left #nixos [#nixos]
johann__1 has quit [Quit: Leaving.]
johann__ has joined #nixos
dywedir has quit [Remote host closed the connection]
johann__ has quit [Client Quit]
jb55 has joined #nixos
<lexwhat>
thanks, you guys are supportive, but I often see refferences to source coude, but not documentation :) As far as I could see there is no short tutorial that will explain me how to read nix code, for example file https://github.com/NixOS/nixpkgs/blob/master/lib/types.nix , I don't see manual page explaining me: 1) syntax of inherit with and without parethesis 2) rec keyword 3) defaultTypeMerge = f: f': , wtf is > f: f': ? and etc etc
<lexwhat>
as you continue refer me do code, when I don't know how to read nix code, my frustration loop (with butthurt) continues recursively (as you, functional programmers, may enjoy it)
<copumpkin>
probably generally will get you better results to ask for such things rather than suggesting they don't exist and then making generalizations based on that assumption
<mattme>
Is there a version of pkgs.writeText that makes the output file executable?
trqx has joined #nixos
<mattme>
Or is there a way to operate on the result of pkgs.writeText to make its result executable?
<copumpkin>
writeScript
<mattme>
Thanks, is there also some kind of completion available in any editor or just a mere listing of all available functions?
ryanartecona has joined #nixos
<copumpkin>
nix-repl will autocomplete stuff
<copumpkin>
`nix-repl '<nixpkgs>'`
<copumpkin>
then write<tab>
<Baughn>
What'd be the best way to use nixops in a shared context? The state file needs to be synchronized, so probably there should just be one...
<Baughn>
Put it on one of the servers it's managing, and take backups?
<mattme>
What happens when this state file is ever lost?
<mattme>
Why doesn't it just encode the state in the cloud target too?
<mattme>
For example on Amazon, you can have user data which has plenty of storage space.
<gchristensen>
because it has secrets you probably don't want just hanging out in user data
<Baughn>
That's why I'm asking. Taking backups is one thing, but what happens if it gets inconsistent with reality?
<mattme>
It could be encrypted with a deployment key.
<gchristensen>
well inconsistencies with reality is exactly how it works, it changes the target to match what it should be
<mattme>
So, then user data will only see a bunch of encrypted data with comments blocks.
<lexwhat>
> `nix-repl '<nixpkgs>'` ; then write<tab> ; < that's helps a little bit, thnx
<gchristensen>
also the state is about your entire architecture, not a single instance
<mattme>
How big are these state files usually?
patrl has quit [Quit: WeeChat 1.9.1]
Isorkin has joined #nixos
<Baughn>
Also, is there a manpage/reference for just the options?
<mattme>
Let's say for 10, 100, 1000, 10000 nodes.
<gchristensen>
sorry, I don't know
<mattme>
If the state file is relatively small, then it would be possible to just replicate it over the entire infrastructure or to do it via some K out of N shares required structure.
<Baughn>
Or put it on etcd, etc.
<gchristensen>
there is some work to store it on etcd or in dynamodb
<Baughn>
Cool. I'll take a look at that.
<Baughn>
We'll be setting up kubernetes anyhow.
<gchristensen>
please do :)
<mattme>
I am also interested in that.
klntsky has quit [Ping timeout: 255 seconds]
<mattme>
Some work sounds like it doesn't work yet. Or does it?
<gchristensen>
you'll have to go find out, I don't know
Isorkin_ has quit [Ping timeout: 276 seconds]
klntsky has joined #nixos
Isorkin has quit [Ping timeout: 248 seconds]
ertes-w has quit [Ping timeout: 255 seconds]
* lexwhat
can't waste your precious time anymore, and walking away in shame to read manuals again and again, in case to understand more. godspeed you.
goibhniu has quit [Ping timeout: 240 seconds]
<stphrolland>
Reading from the Hydra about page on nixos.org, I don't really grasps what it brings. What do you guys use Hyrda for personnally ?
<stphrolland>
What it is adding to your nixos ?
<gchristensen>
stphrolland: generally, people don't run their own hydra but use the hydra.nixos.org to build the packages as normal
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] jammerful opened pull request #34050: mono{48,50,54}: Fix libgdiplus path in dll config map (master...mono) https://git.io/vNur8
NixOS_GitHub has left #nixos [#nixos]
<gchristensen>
some people use hydra if they have very large numbers of custom packages or make very significant changes to NixOS, but most users won't need it
<stphrolland>
so it eases integration of custom packages in my system, in a few words ?
<gchristensen>
it is just a build server
trqx has quit [Quit: WeeChat 2.0.1]
<lopsided98>
stphrolland: I self host Hydra to build the configuration for each of my devices. Hydra publishes a channel for each device
<lopsided98>
But I have a lot of ARM devices that I have to build many packages for, as well as a lot of custom kernels
<lexwhat>
I'm reading https://learnxinyminutes.com/docs/nix/ at this moment, probably one of the best time saving articles IMHO, and would like to comment few things here and there
<lexwhat>
passing an argument to a function : ((n: n + 1) 5) . Looks lispy. not so obvious from other languages perspective.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
nixpkgs/master 3d2948e Tim Steinbach: docker: Fix build after containerd update
<NixOS_GitHub>
[nixpkgs] NeQuissimus pushed 1 new commit to master: https://git.io/vNuoX
NixOS_GitHub has left #nixos [#nixos]
jb55 has quit [Ping timeout: 256 seconds]
<lexwhat>
passing an argument to a named function : (let succ = (n: n + 1); in succ 5) . I wouldn't guess in years, If I haven't read this explanation.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] volth opened pull request #34052: nixos/libvirtd: add qemu-img to $PATH of the daemon (master...patch-86) https://git.io/vNuKv
NixOS_GitHub has left #nixos [#nixos]
<mattme>
lexwhat: let succ = n: n + 1; in succ 5
<mattme>
lexwhat: that also works.
<mattme>
lexwhat: there is a manual documenting the Nix language and as such no guessing is required.
<infinisil>
lexwhat: A lot of functional languages use spaces for function application, and as mattme said, the brackets arern't needed
<mattme>
You can also use Guix, if you don't want to learn another syntax.
<mattme>
I don't know how Guix handles lazy evaluation.
<lexwhat>
let me write an function for you ((x: y: x + " F " + y) "this is not" "obvious from Java lang perspective") ;
* lexwhat
just kidding, no offence :`3
<lexwhat>
now I understand why python and ansible are so popular. maybe because they are obvoius and easy to read & undestand
<joepie91>
I'd argue that Nix is often fundamentally easier to understand than Python, it just doesn't fit the imperative frame of reference that many people have
<gchristensen>
do you know any other functional languages? I suspect a little bit of adjustment on syntax and you'll be ok
trevorriles has joined #nixos
asuryawanshi has joined #nixos
<joepie91>
(some sharp edges in Nix' design aside)
hakujin has joined #nixos
<joepie91>
ie. it's more a matter of familiarity than a matter of readability :P
<lexwhat>
gchristensen, I suspect that is probably my problem that I don't know any languages other than java & python. my fault.
<gchristensen>
not any sort of fault, it is definitely an experience to learn your first more functional language
<simpson>
lexwhat: I assure you that programming, regardless of language, is not natural and requires effort.
<simpson>
Also, in many ways, the Nix language is intentionally anemic, so don't feel bad if it's not obvious how to get things done at first.
ckauhaus has quit [Remote host closed the connection]
jensens has quit [Ping timeout: 265 seconds]
coot______ has quit [Quit: coot______]
klntsky has quit [Remote host closed the connection]
rogue_koder has joined #nixos
<mattme>
How does NixOps cooperate with AWS autolaunch configuration? How can you describe a machine with NixOps, create an AMI out of it, for example, and have that in an auto launch configuration?
<simpson>
I don't think that nixops can do that.
<simpson>
But I don't know much about nixops on AWS, so maybe it can.
<BlessJah>
gchristensen: nixos-17.09 was downgraded from 17.09.2808.ab769321af0 to 17.09.2799.d9a2891c32e, wasn't it?
<catern>
is there a way to perform a nix-store --export from within a derivation?
ertes has joined #nixos
<lexwhat>
I wish I would so optimistic, like you my friends ) Ok, I have a simple task for today - recursively go trough list of files in directories, and call cli\bash app on each file with specific arguments. I could easily write this as bash\shell script, but I want to practice my new language Nix. Question: does it make sense, is it feasible and realistic to write this script in file.nix?
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mattme>
autolaunch configurations can be described with other tools too, but if one cannot build an AMI it seem that nixops is not that useful?
<infinisil>
catern: maybe just ${pkgs.nix}/bin/nix-store ?
<simpson>
lexwhat: No. Nix is a language meant for writing derivations; it's not meant for writing sysadmin scripts.
asuryawanshi has quit [Remote host closed the connection]
asuryawanshi has joined #nixos
<infinisil>
lexwhat: it would make sense if the command would produce some output
<catern>
infinisil: no, within a derivation you don't have access to the Nix store, so you can't actually use the nix tools
<simpson>
You *could* write this in Nix, technically, sort of, but it wouldn't be worthwhile. If you want to practice writing Nix, write some configuration for your system, or experiment with a derivation in nixpkgs for one of your favorite apps.
dywedir has joined #nixos
<lexwhat>
k. so nix does or doesn't have built in functions to copy\create\rename\move files\directories&
<infinisil>
catern: hmm i see, dont' think it's possible then, what's your use case?
<lexwhat>
?
<infinisil>
lexwhat: it does not
<lexwhat>
k
<catern>
infinisil: the impossible is nothing! I reject the impossible!
peacememories has joined #nixos
<lexwhat>
catern this is usually my motto
<catern>
my use case is copying derivations to a remote host
<catern>
without having to go through the annoyance of nix-copy-closure
digitus has joined #nixos
<infinisil>
catern: but why would you want to do that inside a derivation?
<Baughn>
So it turns out that `nixops reboot` just unconditionally reboots everything.
<Baughn>
I'm not sure why I thought it wouldn't.
<infinisil>
Baughn: lol, well yeah
<catern>
infinisil: because derivations build artifacts, and a NAR export is an artifact!
coot______ has joined #nixos
<Baughn>
infinisil: On the bright side, running that *on the master* means it rebooted itself before any of the other SSH connections got established.
<simpson>
lexwhat: Nix can only perform file operations while building derivations, and only to restricted locations. It is a language meant for building packages, and nothing else.
evangeline has quit [Ping timeout: 255 seconds]
coot_____ has joined #nixos
chpatrick has quit [Quit: Connection closed for inactivity]
<Baughn>
lexwhat: It does not, and this is a feature. Most of the time you don't need it, though it may require some thought to realize how.
<mattme>
lexwhat: it might be a bit hard to get this concept, but at some point you like it when a language doesn't allow you to do everything.
<infinisil>
catern: hmmm..........
<lexwhat>
which nix build in function is resbonsible for "cd in to directory; list files there" ?
ckauhaus has joined #nixos
<simpson>
I'm not sure whether that's even possible without some very tricky IFD hacks.
<catern>
infinisil: I hope that hmm is a trying to think of a way to build a Nix store export inside a derivation, rather than thinking about how to vex me by trying to persuade me that I don't *really* need to do that :)
<simpson>
Like, you'd have to IFD in order to build the output of ls as an intermediate file in the Nix store, right?
coot______ has quit [Ping timeout: 240 seconds]
<mattme>
lexwhat: try to do a clone of the nixpkgs repository and just read some of the packages, starting with GNU hello as the manual says.
<Baughn>
catern: So, for remote hosts, I just got through replacing my own hacky system (based on nixos-rebuild rather than calling copy-closure directly, but still) with nixops.
<symphorien>
how can I get a library with debug infos ?
<Baughn>
It was far less painful than expected. Not at all, actually.
<infinisil>
catern: I'm afraid it's the latter. nix-store is like on a higher abstraction level than nix, it can never work (unless you change nix itself). Your usecase on the other hand still doesn't enlighten me
<catern>
just plain ole Nix
kim0 has joined #nixos
<Baughn>
Too bad, then.
<lexwhat>
simpson I don't know what IFD is, but, lets say I want to build and output (an copy of directory with different name\path\files, on specific location in my FS (not /nix/store)). I will be fine to call bash utilities from myfile.nix . Is that feasable, possible\makes sense?)
<lexwhat>
*an output
<Baughn>
catern: So what's problematic about copy-closure?
<catern>
Baughn: I want to build a Nix dump into an artifact which I can copy around with normal SCP
<catern>
for $reasons like caching and stuff
ckauhaus has quit [Ping timeout: 268 seconds]
<catern>
a binary cache is the pull equivalent, but I want to push
<Baughn>
Hmm. The problem is, a full closure could get really large. If you're accounting for that, then... I don't know how, also. :P
<infinisil>
catern: and what's the problem with nix-store/nix-copy-closure exactly?
<catern>
they aren't deterministic????
<infinisil>
They are not?
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ckauhaus has joined #nixos
<catern>
yes. meditate on this and perhaps you will be enlightened.
jmc has quit [Remote host closed the connection]
<infinisil>
Haha okay i might not know enough about those then
<infinisil>
lexwhat: nix can't output to anything other than /nix/store
<infinisil>
But it can put a script in /nix/store that outputs to something outside the store which you can then call
<lexwhat>
hakujin nix-env -iA nixos.awscli or nix-env -iA nixpkgs.awscli or nix-env -i awscli (sorry if it will break your laptop)
<infinisil>
lexwhat: that can't break anything
<simpson>
lexwhat: Yes, you can build stuff that goes in that direction. It's just not a very fun direction.
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] thpham opened pull request #34053: serviio: init at 1.9 (master...serviio) https://git.io/vNu1Y
NixOS_GitHub has left #nixos [#nixos]
<hakujin>
woffs: hmm. I can run `nix-env -qa vim` and I do see results. how is vim different than awscli here?
<infinisil>
hakujin: I suspect you have an outdated nixpkgs version, what does `nix-instantiate --eval '<nixpkgs/lib>' -A nixpkgsVersion` output?
Drakeson has quit [Ping timeout: 260 seconds]
peacememories has joined #nixos
<hakujin>
infinisil: "18.03pre122585.b212125b541"
<infinisil>
alright that's fairly recent, never mind then
<mattme>
I added an extra machine in Nixops, but why doesn't nixops deploy handle that case? It seems I first need to delete the entire deployment and then create a new one?
<infinisil>
hakujin: can you run `nix-shell -p nix-info --run nix-info`? (I think that should work)
* lexwhat
k, will leave you for a whale, for my own safety. plan to take dinner interrup from work, hope you too.
<mattme>
What is this supposed to mean? error: cannot delete this deployment because it still has resources
jb55 has joined #nixos
<mattme>
It could simply output these resources instead of just saying 'there is one'.
<NixOS_GitHub>
[nix] shlevy closed pull request #1784: Add setPathName primop to copy paths to the store with a given name. (master...setPathName) https://git.io/vNtvM
NixOS_GitHub has left #nixos [#nixos]
evangeline has joined #nixos
<infinisil>
mattme: nixops info will show you the resources
lexwhat has quit [Quit: Page closed]
<infinisil>
hakujin: I'm not sure, awscli should be available in your nixpkgs
<infinisil>
hakujin: can you try searching for it with `nix-env -qaP | nix-shell -p fzf --run fzf`? (Just type "aws" and see the completions)
<hakujin>
infinisil: 1) fzf is great, 2) I do see both `nixpkgs.vim` and `nixpkgs.awscli` in the list
<infinisil>
hakujin: and nix-shell -p awscli doesn't work?
<mattme>
infinisil: I don't like it for it to be possible that "Unknown" resources can exist (as in nixops list output).
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
nixpkgs/master 77225a5 Eelco Dolstra: Revert "fetchFromGitHub: Revert to the original version"...
NixOS_GitHub has left #nixos [#nixos]
<NixOS_GitHub>
[nixpkgs] edolstra pushed 1 new commit to master: https://git.io/vNuMM
<hakujin>
infinisil: aha, okay that _does_ work.
<hakujin>
what's the catch with `nix-env` then?
<infinisil>
hakujin: not sure, I'm not using nix-env a lot
<mattme>
infinisil: I had a webserver nixops machine, then I added let webserver=...; in {webserver1=webserver;webserver2=webserver;} and expected two webservers to be created, but that didn't happen. What am I doing wrong?
<mattme>
infinisil: only "webserver" is being created, but "webserver1" and "webserver2" are not.
FRidh2 has joined #nixos
<infinisil>
mattme: it should work i think, you used nixops deploy, right?
<samueldr>
I'm not entirely sure, but I believe nixos options aren't really usable outside of nixos
Itkovian has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexteves has quit [Ping timeout: 260 seconds]
<mattme>
samueldr: there isn't really a real reason for that, though; NixOS modules could be made such that they could work on Gentoo/Arch/...
<samueldr>
there are the dockertools ( https://nixos.wiki/wiki/Docker see the three links in the last section ) that allows building docker images using the services
<kreetx>
samueldr: thank you! so I would need to get a real nixos instead? hmm, but why is the alpine one on dockerhub, and not the "real" one?
<samueldr>
mattme: sure, but if it isn't working *now*, then it's not working :)
<infinisil>
mattme: only some of them can, the ones that just result in some configuration file options for some program. But not all the OS ones
<samueldr>
kreetx: it's "nixos/nix", organization nixos (as on github) image for "nix"
<kreetx>
(maybe that's a dumb question somehow, just trying to understand)
<samueldr>
you probably could use the nix image to build a docker image
<samueldr>
(well, you can use it to *build* nixos on other platforms, but for the purpose of the explanation, nixos is for nixos)
Thra11 has quit [Quit: IRC for Sailfish 0.9]
<magnetophon>
infinisil: no,just a normal cli
<kreetx>
samueldr: ahh, alright!
<mattme>
magnetophon: the reason it doesn't work is because the documentation doesn't promise that it does.
<magnetophon>
mattme: you're kidding, right? If not,please explain what you mean
<mattme>
magnetophon: the documentation only promises that if you build a nix expression that uses your faust expression that in that context boost will be available.
<infinisil>
magnetophon: usually nix-shell would set up the build environment, i suggest you to write a nix file that does what you want with faust and use that instead of imperative commands
<mattme>
magnetophon: I don't know the solution to your problem by heart, but I think you might have to use some wrap functionality.
<magnetophon>
mattme: faust2lv2 is already a wrapped program. and it used to work
<magnetophon>
infinisil: ^^
<infinisil>
magnetophon: can you give some nix expressions to work with? It's hard to debug something if you have nothing\
<mattme>
magnetophon: it seems you are only wrapping PATH, which has nothing to do with boost.
<mattme>
magnetophon: unless I am missing something else, which is entirely possible.
leat has joined #nixos
<infinisil>
magnetophon: i mean the thing that doesn't work for you
<magnetophon>
mattme: how can it be that it worked for about 2 years straight then?
<mattme>
magnetophon: there are two possibilities 1) you depended on a bug 2) someone else introduced a bug.
<__red__>
Well, the good news is that my tweet about my Laptop <-> Desktop + 2 major rev upgrade going flawlessly is getting a fair number of re-tweets
<__red__>
The bad news is that @nixos must be sick of me by now ;-)
<infinisil>
magnetophon: try writing a nix expression for that in the style of what you linked before and nix-build that
ryanartecona has joined #nixos
jensens has joined #nixos
fyuuri has quit [Ping timeout: 260 seconds]
<magnetophon>
infinisil: what I linked before IS the nix-expression to build that repo, and it works
<mattme>
magnetophon: you can do git bisect or you can debug your own code, for options 2) and 1).
<infinisil>
magnetophon: ah, well then try using that expression in a nix-shell
<infinisil>
you can't really expect stuff on nixos to build without using nix-shell or nix-build
coot_____ has joined #nixos
<magnetophon>
mattme: I tried reverting the commits to faust and building from that, and it didn't work either
<mattme>
infinisil: well-packaged stuff should, but not many people package well.
<mattme>
infinisil: I meant packages with well written build systems.
<nh2[m]>
mattme: Right, I commented and asked him to reopen
<magnetophon>
infinisil: faust is a compiler, and I use it to develop software, not just to buiod software that is already finished and released. are you really saying that I need to use nix-shell for that, and the fact that it worked before is an accident?
<infinisil>
it might be, nix-shell is made to develop stuff
<mattme>
magnetophon: it is not the case that you need nix-shell, but unless you package it better, you will.
<magnetophon>
mattme: you said it only wraps PATH, but when I look into the wrapper for faust2lv2 there is much more, including a couple of mentions of boost
<magnetophon>
mattme: you mean package faust2lv2 better? in what way?
<mattme>
magnetophon: to make things more concrete, be specific. On which line do you make sure that whenever someone runs your executable that the environment is set such that boost will be found?
<mattme>
magnetophon: if you cannot provide such a line, there is no reason that it should work.
<mattme>
magnetophon: if you can, you still need to put in effort to debug it.
<dtz>
shlevy: closing spree?
<mattme>
magnetophon: one good way to avoid this situation where you are saying that it worked before is to always use a specific version of nixpkgs.
<mattme>
magnetophon: then, with a new version of nixpkgs, you can test whether your own tests still work.
jtojnar has joined #nixos
<mattme>
magnetophon: if one of your private tests has broken, you can open a bug and there is no need to debug anything.
<magnetophon>
mattme: well, I always figured that as long as my pkgs using faust compile, I'm good. I never anticipated I needed to test manually compiling stuff with faust.
justan0theruser has quit [Read error: Connection reset by peer]
justanotheruser has joined #nixos
<mattme>
magnetophon: well, it seems reasonable to assume that at least some environment variables are set. The question is whether whatever command you run internally in faust also uses the same ones.
<magnetophon>
mattme: what do you mean by internally?
<mattme>
magnetophon: did faust generate an error or the generated program?
<magnetophon>
mattme: faust did
<magnetophon>
fwiw: it works in nix-shell
<mattme>
magnetophon: well, then faust at some point calls gcc, I suppose?
<magnetophon>
mattme: yes it does
<mattme>
magnetophon: well, in order for gcc to find boost, it needs some flags to be passed (preferably via pkg-config).
<mattme>
magnetophon: you just need to figure out exactly what it is calling.
<mattme>
magnetophon: and I am sure that you will find that it is doing the wrong thing.
<mattme>
magnetophon: so, one way to do that is to modify faust source code to print the gcc command it is going to do.
<mattme>
magnetophon: there are other options to do that too.
xcmw has joined #nixos
<mattme>
magnetophon: do you understand what I mean?
<magnetophon>
mattme: I think I found the line that calls gcc, but I don't understand how it is different wheter called from nix-shell of froma normal shell.
<magnetophon>
mattme: so no, I don't understand...
reinzelmann has joined #nixos
<mattme>
magnetophon: execute env in both and you will see that the response is different.
<mattme>
magnetophon: in general, if environments are not exactly the same, there is no reason to expect the program to return the same answer.
jensens has quit [Ping timeout: 240 seconds]
<kreetx>
LnL: is the nix-docker
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<kreetx>
LnL: .. a real nixos? :)
<mattme>
kreetx: there is no module system, I think.
<kreetx>
in the readme it only says "looks a lot more like nixos"
rauno has joined #nixos
<LnL>
no, but the paths are similar eg. no /bin/bash
<magnetophon>
mattme: well, sure if I run env in a normal shell, it doesn't know about the stuff in the faust2lv2 wrapper, but afaik it doesn't need to. Am I misunderstanding you?
<mattme>
Is nix-docker related to dockerTools?
<kreetx>
ok
<LnL>
the nixos/nix image has busybox utils in /bin which annoyed me, mine just uses coreutils
<mattme>
magnetophon: you should add the gcc command being executed to the faust program itself and execute that in nix-shell and outside of nix-shell to see the difference.
<kreetx>
I guess the easiest way to get a nixos now is to run a vm from one of the images on the website?
<LnL>
mattme: it's built using the dockerTools :)
trevorriles has joined #nixos
orivej has joined #nixos
<magnetophon>
mattme: what do you mean by "add to the faust program"?
<mattme>
magnetophon: the faust program has some source code, write in whatever language it is written in, before it executes gcc, printf %s the-gcc-command.
<magnetophon>
mattme: OK,thanks, I'll try that.
<magnetophon>
infinisil, mattme: many thanks so far!
<copumpkin>
there are two notions of concurrency in nix btw
<Guest82411>
I've used an identical expression to set up a user account on a different machine running nixos
<copumpkin>
rauno: -j X tells nix to run X builds concurrently, but each build will be on a single core
<copumpkin>
rauno: --cores is less deterministic and tells builds to actually try to run concurrently
<rauno>
hum okay
<rauno>
btw, a question
<rauno>
any idea what this might be: RPATH of binary /nix/store/c197w17czb5vq7p74mnhcc0acf66vpk1-librbd/lib/librados.so.2.0.0 contains a forbidden reference to /tmp/nix-build-librbd.drv-0
radvendii has joined #nixos
<radvendii>
I'm trying to mount an ISO, and I keep getting "mount: mounting /dev/loop0 on /mnt/iso failed: invalid argument"
<radvendii>
I get the exact same error even when I try with "-o loop=/dev/loop3"
<radvendii>
it still reports something about /dev/loop0
<tilpner>
"sudo mount -o loop some.iso /some/mountpoint" works here
<radvendii>
huh. that's exactly the command I'm running, but it's comming out with that error
<infinisil>
Guest82411: no idea what the problem might be, i really suggest #openssh instead, and only ask here if it's something nixos specific
<infinisil>
Ssh doesn't care where the shh_config comes from
<radvendii>
oh I guess I always assume it's something going wrong with nixos, since often it is something misplaced in the nixos system
<radvendii>
also does mount use ssh?
<tilpner>
radvendii - infinisil was talking to someone else
<radvendii>
oh
<radvendii>
oh i see that now
<radvendii>
sorry
<Guest82411>
infinisil: any way I can get the path to the sshd_config?
<Guest82411>
I can't type a pipe character in my VPS host's shell >_<
<infinisil>
Guest82411: look at sshd'a arguments in htop
coot_____ has quit [Quit: coot_____]
<rauno>
copumpkin, basically cores and maxjobs should be same number ?
<rauno>
basically nproc
<copumpkin>
not necessarily
<copumpkin>
I'd personally like some clever balancing logic between them
<copumpkin>
but if you have 8 cores and set both to 8
MichaelRaskin has joined #nixos
<copumpkin>
then you'll end up with potentially 64 concurrent things happening
<rauno>
aah! okay
<copumpkin>
which isn't necessarily awful, but might lead to more context switching than you'd otherwise like
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] orivej closed pull request #34057: pngquant: change platforms from linux to unix (master...master) https://git.io/vNuyv
NixOS_GitHub has left #nixos [#nixos]
Neo-- has joined #nixos
xcmw has quit [Ping timeout: 265 seconds]
Myrl-saki has quit [Ping timeout: 248 seconds]
<infinisil>
copumpkin: I'm not sure how 'clever balancing logic' might work tbh
<copumpkin>
infinisil: Nix knows that certain builds are concurrency bottlenecks
jtojnar has quit [Quit: jtojnar]
<infinisil>
You mean from previous invocations?
<copumpkin>
so it can (in theory) jack up their NIX_BUILD_CORES
jtojnar has joined #nixos
<copumpkin>
nope
<copumpkin>
my usual example is how long I have to wait during a darwin bootstrap for llvm and clang
<copumpkin>
since everything past a certain point depends on them
blym has quit [Read error: Connection reset by peer]
<copumpkin>
and they're slow as hell
newhoggy has joined #nixos
<copumpkin>
so say I launch a build with -j8 and it bootstraps a stdenv
<copumpkin>
at some point, I end up with only llvm building
<infinisil>
Ah I see
<copumpkin>
Nix knows that other builds can't run concurrently with it, so it could jack up its NIX_BUILD_CORES
<copumpkin>
the issue is that in some cases, some other build might still be finishing while llvm starts
<infinisil>
So you'll want it to automatically start the build with -j 8 when it's the only build happening currently
<copumpkin>
so you'd either need some nasty-ass hacks to modify env vars on the fly
<copumpkin>
or you'd have to occasionally stall a pipeline if you have fat builds like that
<Acou_Bass>
eey folks, ive been using this nixpkg: https://github.com/NixOS/nixpkgs/pull/31075 and im considering taking over maintaining it because that maintainer decided to drop it... but i want it to have a .desktop file - the .deb package that gets extracted has a .desktop file and in my old nixpkg it was seemingly easy to use it but i cant seem to make it work with this new nixpkg because hes added what seems to be
<Acou_Bass>
a wrapper AND a runtime for the binary...can anyone help?
radvendii has quit [Quit: WeeChat 2.0]
<magnetophon>
infinisil (asking you since mattme seems to have left): I did what mattme suggested and added an echo statement to the code that is being run: https://hastebin.com/higuhequlu.php line 190-193 I call it from https://hastebin.com/jirojujifa.bash by saving both files to /tmp/ and running "/tmp/faust2lv2 -time FFcompressor.dsp".
<magnetophon>
newhoggy has quit [Ping timeout: 248 seconds]
coot_____ has joined #nixos
<magnetophon>
infinisil: when I do that from a normal shell, I get the same line echoed as when I do it from nix-shell, but then nix-shell works, and prints the line at 193, and normal shell errors out there, complaining about boost.
<steckerhalter>
how do I make use of the flags in .nix files? are these specified when building or how?
<infinisil>
magnetophon: and you want it to work without nix-shell? If so, why?
<magnetophon>
infinisil: yes, since it's more convenient. For example, I have some commands set up in emacs that call various faust2something scripts, and I don't know how to get those working from within a nix-shell. TBH, the thought frightens me. Is it unreasonable to expect it to work without nix-shell? Especially since it used to work?
<steckerhalter>
infinisil: ah, thanks
<Acou_Bass>
steckerhalter: you just add that to your configuration.nix - services.emacs.enable = true;
<steckerhalter>
Acou_Bass: I'm only using nix, not nixos
<Acou_Bass>
ohh right sorry ;P
<infinisil>
Hmm i see, being able to customize the command would be the best
<steckerhalter>
Acou_Bass: but it's neat... might try the os once in a while
<Acou_Bass>
yeah nixos ain't for everyone but i like it hehe
trevorriles has quit [Ping timeout: 260 seconds]
<deltasquared>
I think I'm beginning to get the hang of nix expressions in abstract, the above file actually made sense to me
<infinisil>
magnetophon: if the command can't be specified, you could cheese it with a bit of a hack maybe
<deltasquared>
speaking of, if anyone is up for giving me some specific guidance I'm looking to try and nixify a personal package of mine
<Acou_Bass>
i started to get my head round them by writing *very* simple ones (not like, hello world... but simple programs that are basically just 'pull source, configure make && make install' types) and going from there
<magnetophon>
infinisil: sorry, I don't understand. what command can't be specified?
<Acou_Bass>
i still dont completely understand them to the point of some of these guys in here
<infinisil>
magnetophon: to specify what command emacs should run
<infinisil>
Because if you can customize it, you could just tell it to use nix-shell
<magnetophon>
infinisil: are you saying I should give up getting it working again outsideof nix-shell?
<magnetophon>
infinisil: I just added "env | grep boost" to the build-script, and I get identical output from both normal shell and nix-shell... :(
<infinisil>
magnetophon: imho: yes. I don't want to or can help with getting it to find missing boost libraries
<magnetophon>
infinisil: OK, fair enough. thanks so far.
<deltasquared>
so yeah (to anyone), the above is the repository in question. it's currently a bunch of shell scripts and triggering systemd units; the units currently call the scripts hardcoded to /usr/local/bin and I suspect the scripts themselves will need shell shebang patching; anyone got some pointers I can start off with?
<infinisil>
deltasquared: your goal is to make this a nixos option?
<deltasquared>
infinisil: no, just make a package out of it
<deltasquared>
(I accept no responsibility for any eyebleeds as a result of reading that code, it's not my most proud repository :P )
lonokhov has joined #nixos
<infinisil>
deltasquared: you're in luck, /bin/sh is the only thing that doesn't need patching :)
<deltasquared>
infinisil: meh, I'd prefer to do it "properly" for reasons of practice
<infinisil>
deltasquared: mkDerivation would patch shebangs automatically anyways
<deltasquared>
infinisil: oh? do I have to tell it about the files involved at least or does it just notice the #!/bin/sh in files output to the store path
<infinisil>
I'm not sure what you mean by that
<deltasquared>
infinisil: as in, how does it "automatically" patch the shebangs, I assume there would have to be some detection going on, what triggers it etc.
<infinisil>
Everthing in $out/bin I think
Itkovian has joined #nixos
<deltasquared>
hmm.
<deltasquared>
well, I guess I'll just have to try it later. the next one would be getting the unit files to point to the store path... I think that might require some more manual intervention
<deltasquared>
my first thoughts would have been to hack my own weird builder script with sed but I suspect there's a neater option.
<deltasquared>
(sed would have been to replace the prefix with the store path in the paths to the scripts in the unit file's ExecStart= lines)
<07EAASZBR>
nixpkgs/master 9798c74 Will Dietz: perf-tools: 20160418 -> 20171219
<07EAASZBR>
[nixpkgs] orivej pushed 2 new commits to master: https://git.io/vNuhc
<hyper_ch>
azazel: as said, I tested it only once in a vm because I was curious and it worked without problems... glad to hear it also worked fine for you :) btw, there's also a zfs wiki page for a few things
<hyper_ch>
clever: you got another happy kexec customer :)
<deltasquared>
meanwhile if I'd have tried kexec on my system I would almost certainly have ended up with explosions on my hands
ssmike has quit [Ping timeout: 276 seconds]
<deltasquared>
infinisil: right, ima just gonna steal the GNU hello example so I don't have to keep looking at the manual every 5 secs and tweak that.
<infinisil>
I'm actually kinda unsure how to create a package out of your repo in the best way, since it's really weird how it relies on its own files being installed in certain locations
<deltasquared>
joepie91: "explosions are fine... as long as they don't happen on my shift."
<joepie91>
heh
<deltasquared>
hyper_ch: ... oh right, I've been on the wine rc's for a bit in arch
<hyper_ch>
deltasquared: :)
<infinisil>
magnetophon: now that i see it in an issue, it does kinda seem weird for it to not work outside nix-shell
<deltasquared>
also android graphics driver wat
<hyper_ch>
no idea what that is good for
<deltasquared>
... "direct3d on android"
<hyper_ch>
can you run droid apps?
<deltasquared>
the crazy people, are they actually trying to get wine to be usable on android?!
<joepie91>
hahaha
<joepie91>
"well, windows phone is dead, sooo..."
<deltasquared>
... that would be awesome, but I suspect it'd have to be x86 naturally
<joepie91>
there's an android-x86 distribution :)
<deltasquared>
I'm aware.
<MichaelRaskin>
Also there is WinRT-ARM
<deltasquared>
MichaelRaskin: true, but I didn't know wine was trying to do RT
<magnetophon>
infinisil: why is that? Does that mean you might be willing/able to help me get it working again?
<infinisil>
deltasquared: all script have this 'p=...' and 'distdir=...' stuff. This could be done using the relative location of the currently executing script
steckerhalter has left #nixos ["ERC (IRC client for Emacs 25.3.1)"]
<infinisil>
Probably
ixxie has joined #nixos
<infinisil>
magnetophon: not really, i don't wanna get involved with boost libraries finding right now, no clue about that :)
<magnetophon>
infinisil: OK.
<deltasquared>
infinisil: oh, that. that was me trying to be somewhat flexible in how the files looked up their location. I generally found $0-relative to be somewhat of a hack
<deltasquared>
I mean I guess it could be done like that, kinda...
<deltasquared>
this is turning into more patchwork than I was hoping pretty quickly :P
[0x4A6F] has joined #nixos
<infinisil>
Haha, hardcoding p is flexible?
<deltasquared>
infinisil: I forget where that was actually
Curiontice has quit [Remote host closed the connection]
<deltasquared>
ooooooh that
Curiontice has joined #nixos
<deltasquared>
well something had to be anchored so the rest could go elsewhere... yeah I'm beginning to feel this is in need of cleaning up
<deltasquared>
some of those path things would generally have to stay as it controls runtime paths that go in /run etc., but the distdir lookup could be cleaned up I guess
<infinisil>
I've never done a shell project really, not sure how to organize it. It's kinda hard since these shells have so little means of abstracting and importing
<deltasquared>
infinisil: tell me about it. this is about as comfortably as shell will scale in my experience
<deltasquared>
I'm in half a mind to re-write it in lua. probably run a bit faster too...
<gchristensen>
I like to stop writing shell at 1 screen of text on my laptop. beyond that, it is too complicated for shell
<deltasquared>
(the delay on reload is noticeable on the RPi)
<infinisil>
Recently saw some good advice, that if your shell scripts would be more than 10 lines, use a proper language instead
<deltasquared>
quick question, does that automated shell patching magic work with "#!/usr/bin/env lua" or am I going to have to provide the bolts here
<gchristensen>
10 lines is a biiit conseravite
<infinisil>
deltasquared: should work
<deltasquared>
infinisil: yeah, this was back before I had invested in a saner language for scripting
<taohansen>
guys nixos.org is not responding to my pings
<samueldr>
taohansen: normal I believe
<taohansen>
can’t curl the script for Nix install on my local system
<nixy>
taohansen: Pretty sure it filters ICMP
<samueldr>
(I can't ping either, but https:// works)
<taohansen>
oh okay
<taohansen>
hmm well then not being able to curl the script which i just could two minutes ago is even more odd
ixxie has quit [Ping timeout: 240 seconds]
<spear2>
does anyone have an example of using fetchgit to add a package to system configuration.nix?
<spear2>
right now i import from a local directory (import /path/to/foo.nix), i want to replace that with a git repository
<deltasquared>
(I could do with some docs on fetchgit, I might be needing that too...)
<nixy>
taohansen: Can you curl anything else on nixos.org? You could still be having some sort of network problems
<deltasquared>
infinisil, gchristensen: welp once again I didn't expect what was going to happen this weekend (if I have to re-write this thing) but oh well... *shrug*
<taohansen>
Gentoo emerge commands pull fine so it’s not my network. i’ll try and curl something else, one moment
<nixy>
Specifically I meant can you curl other resources on nixos.org
<nixy>
It's possibly you still have networking, but there is some problem with the route between you and nixos.org
<spear2>
oh i think i figured it out (import (fetchgit { ... })) seems to work
mojjo has joined #nixos
<deltasquared>
gchristensen: re-writing that hacked up bunch of shell scripts I call a package. to be fair it's been ages since I last touched some of it :S
<spear2>
the sha256 doesn't match (i computed from the tar.gz, not sure what i'm supposed to be hashing there)
<taohansen>
nixy: i was able to pull down the download.html file off nixos.org
<taohansen>
and now i can pull the install.sh script again
<mojjo>
hi.. is it normal, that nixos compiles some packages from source? After updating the the 17.09 channel.. nixos-rebuild switch tries to build libre office from scratch, which takes ages...
<nixy>
¯\_(ツ)_/¯
<nixy>
mojjo: If you have overriden certain packages it may have to compile things from source
<nixy>
For example a long time ago I override readline to get a newer version, without realizing that python depended on readline too
<nixy>
So I then had to recompile python every time I rebuilt or it updated
<deltasquared>
nixy: I would have thought there's not that much to recompile, just the core interpreter surely?
<deltasquared>
the rest is just a bunch of python source that doesn't need a sep. compilation stage
<nixy>
My point isn't to pick on python specifically, but just to demonstrate that well intended overrides can lead to cascading source-builds
bfrog has quit [Quit: WeeChat 2.0.1]
<nixy>
python wasn't that bad, but then that also meant everything that depended on python
<deltasquared>
... yeah, that would get annoying real fast
<mojjo>
weird.. Actually I have not overwritten anything that is needed by libreoffice.. I just overwrote emacs... mhh..
<nixy>
mojjo: Rather than overwritting emacs in place you might want to make a myEmacs = # overriden emacs
<nixy>
That way the overriden version doesn't propogate through nixpkgs
* deltasquared
resists making "a decent OS" jokes
<gchristensen>
emacsWithPackages( epkgs: [ epkgs.vim ]) # finally with a good text editor
rauno has quit [Remote host closed the connection]
<chris|>
quick question: when using pkgs.writeScriptBin, how do I correctly escape ${} in shell scripts?
<symphorien>
with '': ''${
<spear2>
maybe i need to use nix-prefetch-git?
<symphorien>
you don't have to quote the closing }
<symphorien>
spear2: just put a bogus hash and the error message will give you the right one
<gchristensen>
!tofu
<infinisil>
spear2: or yeah, nix-prefetch-git can do that for you
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<spear2>
ty
dan_b has joined #nixos
<nixy>
"probably wrong"
<krey>
can you guys help me figure out how to separate the package upgrade process from changing configuration?
<krey>
nixos-rebuild switch does both for me at the moment
<chris|>
symphorien: thanks!
<gchristensen>
nixy: :D
<infinisil>
krey: can you be a bit more specific?
asuryawanshi has quit [Ping timeout: 260 seconds]
<MichaelRaskin>
nixy: well, if it happens to match, the advice still works, even with one less step!
<Ralith>
tilpner: were you the guy who recommended nix-diff? any idea how I can dig deeper into sources supposedly not matching?
<Ralith>
literally every time I run `nix-instantiate` I get a different derivation and it seems like the source is always to blame, but I'm not touching the source at all o_O
<krey>
infinisil: my nixpath is nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-17.09.tar.
fyuuri has joined #nixos
<krey>
infinisil: and it upgrades my packages every time I nixos-rebuild switch
<bind>
good evening
<krey>
infinisil: I was thinking of pinning it to a specific commit in that branch
<krey>
infinisil: but I don't know how to do it
<infinisil>
krey: use channels, or a custom git checkout of nixpkgs
<krey>
infinisil: yeah, so as you see, I'm in theory using the 17.09 channel
<infinisil>
then updating packagages is a matter of nix-channel --update or git rebase
<mojjo>
I'm trying to install a config to a mounted usb-stick... worked for a simple one.. a more complex one fails with the error 'package agda is marked as broken...'. However, I can build the same config with build-vm... allowBroken=true in the config did not help..
rardiol1 has quit [Remote host closed the connection]
<bind>
I just managed to install nixos (uefi system .. so the installation guide didn't quite fit the bill), but now I am wondering what is the best way to proceed. Just install packages with nix-env that I need? :)
<infinisil>
krey: since you're referring the always up-to-date version of the 17.09 channel, it will refetch it all the time and update packages automatically as a consequence
<etu>
bind: I prefer to always have all packages in my config
<infinisil>
channels provide a way to keep a specific version locally, until you nix-channel --update
<mojjo>
bind: yeah.. that's one option... you can later put the packages to your configuration.nix
<bind>
for example ... chromium ... should I add that to configuration.nix or using nix-env or
<bind>
ow
<krey>
ah, OK, that seems like exactly what I need
<bind>
I see :D
<etu>
bind: That way I can sync it between computers :)
<krey>
^infinisil
<infinisil>
krey: channels is actually what's being used by default, not sure why you turned it off
rardiol1 has joined #nixos
<krey>
infinisil: yep, I turned it off cos I read that they were going to be deprecated
<mojjo>
nix-env is the imperative and configuration.nix is declarative way... :)
<bind>
and when I amended configuration.nix with packages ... do I need to run nixos-rebuild switch?
<mojjo>
bind: yes
<etu>
yes
<hyper_ch>
bind: do you want to make chromium available to all users on the system or not?
<infinisil>
krey: hmm heard about this too, but not sure what's the replacement
<bind>
okay .. through the kde konsole? and do I have to reboot afterwards?
<etu>
A switch will make it available straight away
<krey>
infinisil: yeah, I thought I had figured it out, and yet, here I am, building waiting for libreoffice to build from source...
<bind>
hyper_ch: I am the only user right now .. but basically those packages I would like to make available to all users ... also a guest user for example
steshaw has joined #nixos
<infinisil>
krey: the 17.09 channel shouldn't do this..
<hyper_ch>
then add it to the configuration.nix
dbe_ has joined #nixos
<etu>
bind: You can also do "nixos-rebuild boot" that will make a new generation available on boot.
<hyper_ch>
nix-env is for that user only.... configuration.nix is for all users... I prefer putting everything into configuration.nix
<krey>
infinisil: hmm, perhaps it's an unrelated issue then
<bind>
great :)
<bind>
by the way .. how does nix manage access rights for user installs? does every user have a separate nix store?
<hyper_ch>
also, having it all in configuration.nix and tracking that by git allows me to redeploy easily
<bind>
as in file permissions
<hyper_ch>
(I'm attempted to say nixos uses some advanced automagic)
<infinisil>
bind: everybody shares the nix store, and it has permissions for everybody to access everything
Drakonis has joined #nixos
<hyper_ch>
s/attempted/tempted/)
<bind>
infinisil: so users can whipe the nix store?
<hyper_ch>
bind: no, nix-store is read-only
<bind>
so you can only add
<bind>
?
<bind>
thats the only permission one has?
<infinisil>
the nix-daemon controls the nix store
<hyper_ch>
a user need to remount it with rw rights first and then he could wipe it
<infinisil>
and only nix commands can add to the store via a derivation
<bind>
ah a daemon :)
<infinisil>
and garbage collection can remove stuff from the store
<bind>
so the daemon is managing the files?
<infinisil>
yeah
<bind>
etu: good to know, will have to get used to those commands..
<infinisil>
the nix commands are like the gateway to the store
<gchristensen>
bind: note also that /nix/store is mounted read-only :)
<bind>
wondering how to go about adding desktop environments .. would like to try out xfce and some tiling wm again
<Ralith>
there was a background process mucking about in a source dir I forgot about
Isorkin has joined #nixos
zarel has joined #nixos
<bind>
thank you all for the tips :)
<bind>
hope nothing will break..
<infinisil>
bind: well you can just rollback if something does :
jtojnar has quit [Read error: Connection reset by peer]
<infinisil>
)
<bind>
about sharing configurations (using git or something), how does that work with device uuids and things like that? excluding the hardware nix file?
MinceR has quit [Ping timeout: 260 seconds]
FRidh2 has quit [Quit: Konversation terminated!]
<Ralith>
tilpner: thanks for the nix-diff recommendation, seems very useful to have around
<gchristensen>
frequently yes, bind
jtojnar has joined #nixos
MinceR has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Ericson2314 closed pull request #33578: perl: use perl-cross to enable cross-compilation (native build unchanged) (master...fix/perl-cross) https://git.io/vNkpc
NixOS_GitHub has left #nixos [#nixos]
<bind>
so now I disabled kde and enabled xfce... rebuilding :D
<krey>
infinisil: so I've added two channels now. Is there any signifiance to how I name them? or should one of them be called nixpkgs?
<bind>
I guess I will have to garbage collect somehow after that ..
<infinisil>
krey: no idea tbh
deltasquared has quit [Quit: SEGMENTATION FAULT]
jtojnar_ has joined #nixos
`_ has joined #nixos
NixOS_GitHub has joined #nixos
<NixOS_GitHub>
[nixpkgs] Ericson2314 pushed 1 new commit to master: https://git.io/vNzL0
<NixOS_GitHub>
nixpkgs/master 98ede1e John Ericson: CODEOWNERS: Make @orivej a {cc,bintools}-wrapper codeowner
NixOS_GitHub has left #nixos [#nixos]
<`_>
New router, new BSSID, same ESSID. NixOS doesn't seem to like the idea of connecting wirelessly. Any ideas?
coot_____ has quit [Ping timeout: 268 seconds]
jtojnar has quit [Ping timeout: 260 seconds]
jtojnar_ is now known as jtojnar
<`_>
I've tried removing the offending network from configuration.nix, rebuilding, adding it again, then rebuilding. No dice.
<cransom>
did you look at what was happening in the wpa_supplicant gui?
<bind>
that is strange..
<bind>
it seems to work..
<bind>
:D
<gchristensen>
it is strange it works? :)
<bind>
it works well I guess.. just have to cobble together my usual package selection
<bind>
I guess
<bind>
:)
<bind>
and user groups and such things (for sound a.s.o) would have to be (could be..) configured through configuration.nix too I presume
<hyper_ch>
so, lets see if I can make zfs panic again on my homeserver
<hyper_ch>
bind: yes
<bind>
one more thing ... how about installing something "foreign" such as ... something with a .deb file
<bind>
hyper_ch: that indeeds looks a bit involved :D
<hyper_ch>
bind: but once it's packaged like that, you could ask for inclusion so that everyone else can also profit
newhoggy has joined #nixos
<bind>
hyper_ch: would it be a problem to have different versions of a library on the system? (one for a system package and one for running "self-packaged" binary x)?
<hyper_ch>
bind: no
<gchristensen>
nope, it is common and normal to have various versions at once
<hyper_ch>
because each version generates a path containing the hash it doesn't have conflicts
<bind>
hmmmm...
<bind>
doesn't sound too bad :D
<MichaelRaskin>
You cannot upgrade without having multiple versions installed at once
<hyper_ch>
that's why buildinputs and stuff in the packaging are important, so that you do include proper required libraries and stuff
`_ has joined #nixos
<`_>
cransom: It's saying it can't get the status from wpa_supplicant. I'm going to keep playing around to see what I can figure out.
<neonfuz>
is xnest or xephyr available on nixos anywhere?
<`_>
At the end, if changing the ESSID fixis it I'll run with that
<`_>
fixes*
<cransom>
`_ it may need to be repointed at the socket that wpa_supplicant is using (or wpa_supplicant needs to be supplied with one), or perms.
<cransom>
it's the least cumbersome way i've found to figure out wpa issues as wpa_cli is ... `powerful`
<`_>
Doesn't seem to be perms, I'll keep playing with it
newhoggy has quit [Ping timeout: 256 seconds]
<MichaelRaskin>
Xnest is probably just in xorg.xorgserver
<`_>
Appreciate the help
<MichaelRaskin>
There is also xdummy
<MichaelRaskin>
neonfuz:^^
<bind>
I am getting a warm and fuzzy feeling here :D
<neonfuz>
thanks
<neonfuz>
what's xdummy?
<neonfuz>
does that not display but fake x11?
<neonfuz>
or just a xnest alternative type of thing
<Ralith>
is there a way to get a musl stdenv?
jtojnar has quit [Read error: Connection reset by peer]
<MichaelRaskin>
Yes, no-display server with RandR and GLX.
<neonfuz>
nice
jtojnar has joined #nixos
<`_>
cransom: I'm an idiot, the ESSID _isn't_ the same.
<`_>
Oh apparently this router likes to change spaces to dashes
`_ has quit [Ping timeout: 256 seconds]
<bind>
and I guess nixos can run just about anything any other linux can? erlang/elixir for example (which I guess I would have to install from source)
<gchristensen>
bind: we have erlang / elixir already packaged, which means we already built it from source for you
<LnL>
multiple versions even
<bind>
was looking in the wrong place :D sorry :) looking at the configuration.nix options
<gchristensen>
master directly is a bit unsafe, check that link ^
<MichaelRaskin>
I just use master branch. But then, I write my own bootscripts, so I just assume that I can roll back a problem
bpa has joined #nixos
`_ has joined #nixos
<MichaelRaskin>
You can install a few packages from master without using it as the main base branch. But then there is a chance of installing multiple versions of GTK3 at once, for example.
Neo-- has quit [Ping timeout: 256 seconds]
<bind>
ah .. so either I would have to wait for a new version to bubble through or I would have to write a derivation (?)
<bind>
hmm
<bind>
MichaelRaskin: wouldn't want that :D
<LnL>
if you just want to install a package from master into your user profile you can do that
<MichaelRaskin>
Multiple GTK3 do not conflict, they just take space.
<MichaelRaskin>
«Nix: whenever you take sanity damage, you can replace it with using 1 GiB of HDD space per sanity point. The disk space can be freed during a garbage collection no sooner than a week later.»
<pkill9>
out of itnerest, has anyone switched from using Guix to using Nix because of the package recipes language?
newhoggy has quit [Ping timeout: 248 seconds]
gchristensen is now known as the
<the>
Ralith: is this short enough? :)
<the>
pkill9: I don't know of anyone who did that, but I suppose it is possiblee
bpa has quit [Read error: Connection reset by peer]
bpa has joined #nixos
<MichaelRaskin>
The direction would be surprising, though
<Ralith>
gchristensen: it is not "too long", it is merely "long" :p
<MichaelRaskin>
Nix is somewhat larger, and Guix references Nix
shabius has quit [Quit: Leaving]
<Ralith>
pkill9: that would be very surprising; personally I use nix *despite* the language, not because of it
<bind>
MichaelRaskin: would it be surprising to see someone going from guix to nixos?
<pkill9>
ah ok, i was curious if anyone did
<the>
bind: that would not surprise me
<MichaelRaskin>
Yes, because how do you learn about Guix without learning about Nix and NixOS
la_putin has joined #nixos
<Ralith>
working in scheme instead would be delightful
<Ralith>
but guix has all those political and religious overtones going on so meh
<MichaelRaskin>
Normally you find Nix first. Some minority then switches to Guix.
<stphrolland>
it's bit strange. Since yesterday I think, I can no longer rebuild my configuration.nix. It's based on stable 17.09. I retried several times.
<stphrolland>
It happens to need rustc, and failed during testing of rust
<nixy>
Guix's hardline about proprietary software is a big turnoff IMO
<pkill9>
Ralith: do you mean the GPL etc?
<the>
pkill9: right
<stphrolland>
do you think it is possible that the stable build of rust failed on my machine ?
<nixy>
I agree with the FSF and that fits me personally, but it definitely puts them in a smaller niche
<pkill9>
why not just have a bunch of people maintain an unofficial proprietary repositoty?
<pkill9>
for guix
<pkill9>
repository*
<the>
pkill9: nixos already does *shrug*
<nixy>
pkill9: Sounds like you're volunteering :)
<pkill9>
hehe
<nixy>
It could be done, but till it is that doesn't mean much
ssmike has joined #nixos
<MichaelRaskin>
Well, the store format is the same, so it is possible to install something from Nixpkgs
<pkill9>
i did find chromium an an unofficial repository
<pkill9>
for guix
klntsky has quit [Ping timeout: 255 seconds]
<MichaelRaskin>
Of course, two copies of glibc appear immediately.
<bind>
wouldn't that mean even more fragmentation? don't think that would be good
cement has quit [Ping timeout: 248 seconds]
<pkill9>
hmm maybe
aarvar has joined #nixos
<pkill9>
MichaelRaskin: i think they're incompatible now, i asked about that in the guix irc channel and turns out the documentation needed to be updated to reflect that they're not compatible anymore
<Guest82411>
How can I make sure the webroots of my nginx vhosts all exist with the right permissions? I can 'sudo mkdir /srv/www && chown :nginx /srv/www' myself, but that seems against the spirit of declarative config.
hiratara has joined #nixos
ckauhaus has quit []
<the>
I always forget how annoying it is to use the nickname `the`
<Guest82411>
haha
<Guest82411>
I seem to remember a hook to run commands post-activate
<bind>
:D
klntsky has joined #nixos
<MichaelRaskin>
the: you could filter to require start-of-line or some punctuation near the nick to highlight…
bpa has quit [Read error: Connection reset by peer]
<the>
Guest82411: this is something I've done in the past
the is now known as gchristensen
bpa has joined #nixos
<bind>
I find others talking about monads and networking annoying too ;p
<Ralith>
pkill9: unpackaged proprietary software is annoying, particularly since the complexities of dealing with binaries really call for collaborative effort to solve (I'm still amazed we have steam working), but the lack of systemd that's a fatal blow
<Ralith>
hee
fyuuri has quit [Ping timeout: 264 seconds]
<MichaelRaskin>
You say systemd as if it were a good thing.
<Ralith>
cstrahan: thanks for pushing on the gcc flags clobbering issue!
ndrei has joined #nixos
newhoggy has joined #nixos
<ixxie>
LnL: if I am packaging python module X and then need to package its dependency Y, I guess its okay to put those in the same PR right? What I am wondering is how the heck do I keep the commits neatly seperated
bpa has quit [Read error: Connection reset by peer]
bpa has joined #nixos
<LnL>
yeah, don't create separate prs for that
<ndrei>
Hi there! I've been having a very weird issue, whenever I run a nix-shell -p .. I get "/libstdc++.so.6: version `GLIBCXX_3.4.22' not found", packages install fine from system config though
Drakonis has quit [Ping timeout: 256 seconds]
<ixxie>
LnL: last time I ended up squashing several packages into one commit; I don't see how I could create them seperately to begin with
<LnL>
do you know about git add -p
<ixxie>
nope
<Guest82411>
cheers gchristensen
<LnL>
that lets you stage chunks so you can commit changes to a single file separatly
`_ has quit [Ping timeout: 240 seconds]
newhoggy has quit [Ping timeout: 248 seconds]
dan_b has joined #nixos
<ixxie>
cool
`_ has joined #nixos
<LnL>
it's also not a big deal if you just commit it together
alexteves has quit [Ping timeout: 268 seconds]
ndrei has quit [Quit: WeeChat 2.0]
<ixxie>
LnL: after struggling with this sort of thing with my first PR, I wanna learn to do it The Right Way
<ixxie>
so the workflow is something like: package X, Y, Z, then git add -p <X stuff>, git commit X, git add -p <Y stuff>, git commit Y, etc.
<LnL>
what I also sometimes do if I make changes for something I wanted a few commits back is create a WIP commit, run git rebase -i and put it after the commit I want it in with a f (fixup)
<ixxie>
I see
phdoerfler has joined #nixos
<phdoerfler>
Hi! Can I have nixos execute a command after the nightly automatic upgrade?
<phdoerfler>
I mean I could just add a cron job which executes like 30 minutes after it but I was hoping I could chain it like &&
dywedir has quit [Ping timeout: 248 seconds]
<phdoerfler>
AKA only have it executed if the nixos-rebuild switch --upgrade worked successfully
Drakonis has joined #nixos
michaelpj_ has quit [Ping timeout: 240 seconds]
ndrei has joined #nixos
<gchristensen>
phdoerfler: checkk out system.activationScripts
ryanartecona has joined #nixos
kreetx has quit [Ping timeout: 260 seconds]
civodul has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
Itkovian has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spear2 has quit [Remote host closed the connection]