sir_guy_carleton has quit [Ping timeout: 268 seconds]
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
erictape1 has quit [Ping timeout: 246 seconds]
peacememories has joined #nixos
Soo_Slow has joined #nixos
peacememories has quit [Client Quit]
freeman42x has quit [Read error: Connection reset by peer]
peacememories has joined #nixos
freeman42x has joined #nixos
Makaveli7 has quit [Ping timeout: 245 seconds]
gagbo has joined #nixos
jmgai has joined #nixos
mizu_no_oto has joined #nixos
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ar1a>
i have a runtime dependency for this package im adding. im so confused as to which variable i put it under. for the record it's jq
__monty__ has quit [Quit: leaving]
<simpson>
ar1a: Maybe you want `propagatedBuildInputs`?
<ar1a>
hmm no, that just includes the source i think. i need the binary to be available
azdle has joined #nixos
doyougnu has joined #nixos
<ottidmes>
ar1a: you would need to give more information than just that you are adding a package that uses jq as a dependency, the way to go about it would depend on how the package is being run. Normally you would just add runtime dependencies to buildInputs, but if there is no hard dependency on it, it will not be included as an actual runtime dependency.
perique has joined #nixos
<ottidmes>
ar1a: My guess is that you have a script, since that is where jq is most often used?
<ottidmes>
ar1a: If so, you would need to wrap your script such that PATH is set to contain the bin path of jq
<ottidmes>
ar1a: so I use makeWrapper to wrap the script, that generates a wrapper script around my script with a PATH export containing the bin paths of the packages I list at makeBinPath
o1lo01ol1o has quit [Remote host closed the connection]
<ar1a>
makeBinPath wasn't imported. should it be?
<ar1a>
nope. its throwing an error
<ottidmes>
ar1a: if you have the with stdenv.lib; line
<ar1a>
ahhhhh
<ar1a>
hmm, wrappers with nix-build don't work. i think i have to nix-env install it huh
<ottidmes>
ar1a: why should it not work, I am using that very package with nix-build and call the wrapper
peacememories has joined #nixos
<ar1a>
oh nah still broken if i install. /nix/store/1zr8klg5qy3rf1rmkwkmsp6lpc40k5cy-pb_cli-1.0/bin/.pb-wrapped: line 64: .pb-wrapped: command not found
<samueldr>
their reliance on `eval` and the script name is terrible; imagine I had named the script "rm -rf *" (which is a valid name)
<mightybyte>
ottidmes: Awesome, thanks!
<samueldr>
ar1a: I won't, since I have no attachment to the program, but if it works fine, I would suggest you PR this explaining it as best as you understand
<samueldr>
(to their project)
slack1256 has joined #nixos
<ar1a>
i don't really understand why it's bad, so i might pass on that
<ar1a>
thanks for the help
<ar1a>
your patch worked
<samueldr>
basically, in bash, like in many languages, eval is generally a bad idea, especially if you don't control the inputs. Here it uses the "weird" `${0##*/}` as an input
hellrazo1 has joined #nixos
<samueldr>
`${0##*/}` in a bash script will take what (simplified) is "how you called the script", remove path elements (if any), and use that, so in most cases, the filename for the script (this is not an absolute truth, but works here)
<samueldr>
eval will run the code passed as arguments, si using `${0##*/}` is just like running `pb` when the script is named `pb`. though here as we could see, it wasn't even seeing `pb` as the script was named `.pb-wrapped`
init_6 has joined #nixos
<samueldr>
so first bug (1) cannot work if the script isn't named pb, for any good reason
o1lo01ol1o has joined #nixos
hellrazor has quit [Ping timeout: 246 seconds]
<samueldr>
the "second bug", is a security issue; since `eval` will run the code, if I name the script `echo hello world`, running "./echo hello world" will make the script print "hello world"... not so bad until you consider that could be any command
<samueldr>
(just like in your shell you can type `eval "echo hello world"`)
<ar1a>
ill save that for later thanks
oy is now known as dmc
Lisanna has joined #nixos
<Lisanna>
Have a laptop with Intel HD graphics connected over HDMI to a 4k monitor. KDE is only allowing me to set up to 1920 resolution for the display. Is there a driver I need to specify in my nixos configuration to enable the higher resolution support?
<clever>
Lisanna: do you know for sure that the GPU is capable of 4k?
<Lisanna>
Yeah, should be
<clever>
and is the hdmi cable also rated for 4k?
<Lisanna>
That I do not know.
<clever>
4k requires a higher bitrate, which older cables arent rated for
<Lisanna>
HD Graphics 520
<Lisanna>
okay, I'll try a different cable
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mightybyte>
ottidmes: Ahh yes.
<Lisanna>
I've tried with a cable that I know can support the resolution (works with my other laptop running fedora), and 1920 is still listed as the max
dsiypl4_ has quit [Ping timeout: 272 seconds]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhuCi
<{^_^}>
[nixpkgs] @ar1a opened pull request #54349 → Pb cli and capture initialization → https://git.io/fhuWJ
<ar1a>
wew, that took sooo much longer than i expected because of that weird eval error
<ar1a>
i had to patch the other program the same too, probably written by the same guy
jmgai has quit [Ping timeout: 250 seconds]
<clever>
Lisanna: not sure then
<Lisanna>
clever: so you don't think there could be a driver issue?
<clever>
Lisanna: the "intel(0)" in your msg says your using the right driver
<Lisanna>
ok
<clever>
Lisanna: all i can think of is to grab the EDID block, and paste it into an online EDID decoder
peacememories has joined #nixos
Lisanna has quit [Quit: Lisanna]
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lisanna has joined #nixos
hamishmack has joined #nixos
peacememories has quit [Client Quit]
q6AA4FD has joined #nixos
peacememories has joined #nixos
Lisanna has quit [Read error: Connection reset by peer]
Lisanna has joined #nixos
freeman42x has quit [Ping timeout: 252 seconds]
peacememories has quit [Client Quit]
appleclusters has joined #nixos
<appleclusters>
I just relaunched chrome/gnome and all of a sudden google-chrome-stable doesn't launch. gives an error `/nix/store/.../share/...: line 49: /home/max/chrome: No such file or directory. Was there a silent update that broke everything??
<{^_^}>
[nixpkgs] @vkleen opened pull request #54350 → Support PowerPC in llvm → https://git.io/fhuWV
<Lisanna>
clever: I manually added the modeline with xrandr and got it working
<Lisanna>
sucks that it didn't autodetect it :/
<clever>
Lisanna: definitely sounds like a bug in the drivers
<clever>
Lisanna: maybe report it upstream
doyougnu has quit [Quit: WeeChat 2.0]
<Lisanna>
not sure I know enough about the subject to file a competent report
<{^_^}>
[nixpkgs] @dotlambda pushed to master « python.pkgs.pyaxmlparser: some files are licensed asl20 »: https://git.io/fhuWh
<Lisanna>
I don't know a lot about how xrandr and modes work, but I noticed that display-manager reported two modelines for this resolution, and gave them the same identifier - one of them doesn't work though
<simpson>
Lisanna: Were there any warnings in dmesg? This is one of the drivers which does modesetting logic in the kernel, so the kernel log may have extra information.
<Lisanna>
If I try to apply the first one the driver reports this error:
<Lisanna>
Jan 19 18:00:26 arrow X[783]: (--) intel(0): HDMI max TMDS frequency 300000KHz
<Lisanna>
Jan 19 18:00:26 arrow X[783]: (EE) intel(0): failed to set mode: Invalid argument [22]
<simpson>
Ah, there you go. Not enough bandwidth; your HDMI connection isn't fast enough for the megapixel count you want.
<Lisanna>
so I removed that mode from xrandr and added the second one I listed and it worked
<Lisanna>
but I still had to manually add it
<simpson>
Hm. Wonder why it's not automatically added.
<Lisanna>
they're both identified as "3840x2160"x0.0
<Lisanna>
no idea if that makes a difference
silver has quit [Read error: Connection reset by peer]
<appleclusters>
Where can I begin to troubleshoot chrome not launching for the above error?
<simpson>
0.0 is a pretty weird FPS. Very strange.
dermetfan has quit [Ping timeout: 246 seconds]
<simpson>
appleclusters: Sounds like you don't have a ~/chrome. Not sure what that would be used for, though. What did you change recently?
<ar1a>
the only difference i can see is that vsync is off in one
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
<Lisanna>
ar1a: and one has a lower bandwidth
<simpson>
ar1a: That is for vsync polarity; all modes will be vsync'd in terms of scanout.
<ar1a>
oh
<simpson>
It's a common misconception. "disabling vsync" is something that an application does, by drawing without waiting for the vsync signal.
<simpson>
But the pixels themselves are highly sync'd when it comes to HDMI.
MichaelRaskin has quit [Read error: No route to host]
Supersonic has quit [Disconnected by services]
Supersonic112 has joined #nixos
Supersonic112 is now known as Supersonic
doyougnu has joined #nixos
rcshm has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<appleclusters>
@simpson: I switched to gnome from plasma and made some misc updates to my global nix config. However my installation of chrome is local to the environment. I have no clue how such a side effect could happen like that. Maybe if it got force closed somehow it forgot a nix specific override?
<simpson>
appleclusters: No idea, sorry.
<appleclusters>
My instinct is to reinstall, guess I have no choice
<appleclusters>
nix-env -e google-chrome and then reinstalling does nothing. Is there something I should do to do a "clean" uninstall? Are there side effects unaccounted for?
d4g_ has joined #nixos
<{^_^}>
[nix] @domenkozar merged pull request #2635 → manual: "sandbox" option default is "true" on Linux → https://git.io/fhlrR
<{^_^}>
[nixpkgs] @worldofpeace pushed to master « discount: enable various configureFlags »: https://git.io/fhu8W
o1lo01ol1o has quit [Ping timeout: 268 seconds]
pacmeister has quit [Quit: Lost terminal]
Denommus has quit [Remote host closed the connection]
<iqubic>
How many commits a day does Nixpkgs Master get?
<iqubic>
This branch is 1 commit ahead, 18692 commits behind NixOS:master. I only forked this earlier today. The hell?!?!
<iqubic>
Also... I think I should have created a separate branch for this nixpkgs pull request. Can I get some help here?
<iqubic>
I've not actually made the PR yet, because I fear I should have made a new branch before making the commit to my own fork.
<clever>
iqubic: `git checkout -b foo` will create a branch called foo, based on the current commit
o1lo01ol1o has joined #nixos
jmgai has joined #nixos
<iqubic>
clever: But I've already made a commit on the master branch and pushed it to iqubic/nixpkgs online, which I know nw probably isn't how the nixpkg maintainers want their PRs.
<iqubic>
clever: Can you help me out with this, before I make my PR to the official nixpkgs repo?
rcshm has joined #nixos
jmgai has quit [Ping timeout: 240 seconds]
goibhniu has quit [Ping timeout: 240 seconds]
<clever>
iqubic: you can basically just ignore the master branch on your fork
<iqubic>
Why is that?
<clever>
its not really of any use
<iqubic>
Is there a way to undo a commit that has been pushed online already?
vk3wtf has quit [Ping timeout: 252 seconds]
<clever>
force-push a different commit
<iqubic>
What does that mean?
rcshm has quit []
<clever>
`git push --force master`
<clever>
and it will force push whatever your current branch is, to the remote one
<iqubic>
but I just want to remove this commit from my master branch, and not just replace it with something else.
<clever>
`git reset --hard REV` to set a local branch to a given commit
doyougnu has quit [Ping timeout: 244 seconds]
<iqubic>
`git push --force master` isn't working for me.
<iqubic>
fatal: 'master' does not appear to be a git repository
<iqubic>
fatal: Could not read from remote repository.
<clever>
oh, `git push --force origin master`
rcshm has joined #nixos
rcshm has quit [Client Quit]
lassulus_ has joined #nixos
lassulus has quit [Ping timeout: 244 seconds]
lassulus_ is now known as lassulus
eadwu has quit [Ping timeout: 252 seconds]
o1lo01ol1o has quit [Remote host closed the connection]
<iqubic>
So should I make a new branch on my local clone before making a PR?
o1lo01ol1o has joined #nixos
jb55 has quit [Quit: WeeChat 2.3]
fusion809 has quit [Remote host closed the connection]
jb55 has joined #nixos
<iqubic>
clever: Should I make a new branch?
<clever>
iqubic: yeah
<iqubic>
What should call this branch?
<simpson>
`nachos`
* simpson
hungry
<simpson>
Seriously, it's your branch on your repo on your machine. Come up with a name.
erictapen has quit [Ping timeout: 244 seconds]
<iqubic>
but I'm going to be pushing this online and making a PR.
<iqubic>
Does that even mention making a new branch?
<simpson>
I mean, it has many opinions, but the names of branches for PRs isn't one of them.
lopsided98 has quit [Ping timeout: 252 seconds]
lopsided98 has joined #nixos
perique has quit [Ping timeout: 244 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
jmeredith has quit [Quit: Connection closed for inactivity]
o1lo01ol1o has quit [Remote host closed the connection]
pie__ has joined #nixos
Zer000 has joined #nixos
pie___ has quit [Ping timeout: 268 seconds]
<iqubic>
Alright.. Discord has finally hit unstable.
<iqubic>
Except not the latest version appearantly.
<iqubic>
How does one update a channel? `nix-channel --update "channel name"`?
countingsort has joined #nixos
<clever>
iqubic: nix-channel --update, without anything else, updates all channels on the current user
<iqubic>
Cool. So version 0.0.8 of Discord hasn't yet made it into nixos-unstable. I see.
strobelight has quit [Ping timeout: 245 seconds]
<Zer000>
iqubic, you can always copy the definition from github, import it into your config and add it to your packages list. Is discord free software?
counting1ort has quit [Ping timeout: 250 seconds]
<clever>
Zer000: unfree, and if an update is available, the old version refuses to work
<iqubic>
Yeah.
<iqubic>
So I just pulled the latest version from nixpkgs master, and installed that.
<iqubic>
I just verified to make sure I have the latest version of the Discord default.nix, and I do.
<iqubic>
How can I make sure that the version of discord I install actually is using that default.nix?
<iqubic>
And not something stored in my cache somewhere?
o1lo01ol1o has quit [Ping timeout: 250 seconds]
<wedens>
iqubic: "So I just pulled the latest version from nixpkgs master, and installed that" how exactly you did that?
<iqubic>
"git clone Nixos/nixpkgs"
<iqubic>
`cd nixpkgs`
<iqubic>
`nix-build -A discord`
<iqubic>
`nix-env -i ./result`
<iqubic>
That is how.
<iqubic>
and I'm still getting errors, which the latest commit to discord's default.nix claim to have fixed.
<Zer000>
I have no idea how nix-env -i works on a path like that, but you can try to listerally copy the default.nix file into your config directory and have your packages be something like this: environment.systemPackages = [ (import ./discord.nix) ];
<Zer000>
Or you need to be sure that the discord binary that you're running is living under the path that nix-build generates
<wedens>
iqubic: what if you run it from ./result directly?
<Zer000>
I think you can do this by following all symbolic links, starting at "which discord" or whatever
<iqubic>
wedens: I'm not sure.
<wedens>
iqubic: ?
<iqubic>
Let me try that.
<clever>
Zer000: the realpath binary does that for you, recursively
init_6 has quit [Ping timeout: 244 seconds]
<ottidmes>
I use: which() { command which --skip-alias --skip-functions -- "$@" > >(command xargs --no-run-if-empty readlink --canonicalize); } because I did not like doing: readlink -f $(which program), every time
init_6 has joined #nixos
<ottidmes>
hmm, apparantly I have being using the wrong command all this time "Note realpath(1) is the preferred command to use for canonicalization functionality." (from readlink's manpage)
<iqubic>
wedens: Looks like I'm still getting this error when running it from ./result/bin/
jmgai has joined #nixos
<iqubic>
I have no idea why that is. I assume that either 1. I am not installing that fix, or 2. The fix doesn't work for me.
Zer000 has quit [Remote host closed the connection]
jmgai has quit [Ping timeout: 272 seconds]
<iqubic>
How do I get nix-shell to build a derivation for me?
init_6 has quit [Ping timeout: 240 seconds]
<iqubic>
Like I'm just going to copy the discord default.nix to a different place, and then try installing it through there.
appleclusters has quit [Quit: Connection closed for inactivity]
Guest71835 has quit [Read error: Connection reset by peer]
sinner has joined #nixos
sinner is now known as Guest33457
Guest33457 has quit [Ping timeout: 246 seconds]
ottidmes has quit [Ping timeout: 272 seconds]
nikola__ has joined #nixos
nikola__ has quit [Client Quit]
nikola_ has joined #nixos
nikola_ has quit [Client Quit]
nikola_ has joined #nixos
nikola_ has quit [Client Quit]
nikola_ has joined #nixos
nikola_i has quit [Disconnected by services]
ilya-fedin has joined #nixos
<yl[m]>
export nixops deployments has hardcode paths named nixExprs, makes it harder to share
nikola_ has quit [Quit: Leaving]
<yl[m]>
how have you solved this problem? shell scripts around export/import?
nikola_i has joined #nixos
<clever>
yl[m]: `nixops modify -d foo path/to/bar.nix` can alter a deployment, after importing
<yl[m]>
clever: true, but that means that I have to wrap every deployment with a script to import/run/export the state
<yl[m]>
seems wasteful, are there any plans to improve this?
<nikola_i>
hello how do i change xkb keymap in nixos. i cannot find /usr/share/xkb/symbols directory
<yl[m]>
clever: I like the idea of putting the state in S3 when using Terraform
<yl[m]>
I might have some capacity to work on that
vonfry has joined #nixos
<clever>
yl[m]: i only use export/import as a way to migration a deployment to another box, something that shouldnt be done often
<clever>
yl[m]: and any time you try to do that, you ruin the lock file that is supposed to protect you from major merge conflict type problems
<yl[m]>
clever: I'm trying to use nixops at the company to manage infra, what would recommend I do in this case?
<clever>
yl[m]: have a dedicated machine that runs nixops, stores the state, and everybody ssh's into it
<clever>
yl[m]: another problem, is that if you dont pin nixpkgs correctly, every person that deploys is going to (up/down)grade the entire cluster to a random version of nixpkgs
endformationage has quit [Quit: WeeChat 2.3]
<clever>
and each user is going to have to re-download the entire closure of the cluster from a binary cache, before they can deploy anything
<yl[m]>
I see
<yl[m]>
clever: has anyone to your knowledge implemented a CI for this? It could make more sense if every developer tested with on virtualbox and the CI did the deployment on master
sinner has joined #nixos
<clever>
yl[m]: most people i know only do deployments at controlled times, rather then at every push
<{^_^}>
[nixpkgs] @dtzWill opened pull request #54354 → glib: more "trash mount points" fixes from upstream → https://git.io/fhu0q
<ldlework>
iqubic: the question smacks of a misunderstanding
<wedens>
why do I get "called without required argument 'gobject-introspection'" error when I do nix-build -E "(import <nixpkgs> {}).callPackage ./default.nix {}"? if I replace gobject-introspection with an alias gobjectIntrospection, it works fine, but it doesn't work if I nix-build the derivation as an attribute
<wedens>
ah, seems like the name was changed in master
<joko>
Hey, is anyone using ZFS native encryption? So far I have been using ZFS over LUKS to do so and I was wondering if native encryption would be better
mudrii has joined #nixos
jmgai has joined #nixos
JosW has quit [Ping timeout: 252 seconds]
<ivegotasthma>
I see a vim plugin in vim-plugin-names, however, there is no generated code for it. I added a plugin that I needed to it, but the generated code was not generated. What could be the cause for this?
<sphalerite>
Do ssh stores use compression at all for copying?
<sphalerite>
ivegotasthma: I think that's still correct.
<sphalerite>
ivegotasthma: it's horrible to do in practice though because it clones all the plugins
<ivegotasthma>
sphalerite: I'm doing that twice now, because it doesn't generate code for the two plugins I mentioned above
<sphalerite>
last time I wanted to do that I wrote only the name of the plugin I actually wanted into vim-plugin-names in a separate directory, then ran it, and patched the contents into the big one manually
<sphalerite>
huh
<sphalerite>
which plugins are they?
<ivegotasthma>
one is vim-dirvish, which is already in the list, but not in the generated code
<ivegotasthma>
second one is bufexplorer, which I added to the list, but it's not being generated
<sphalerite>
joko: hyper_ch uses native encryption and likes it
mudrii has quit [Ping timeout: 256 seconds]
<ivegotasthma>
hmm, maybe I have something wrong, because I checked on github and vim-dirvish is there
knupfer has quit [Remote host closed the connection]
knupfer has joined #nixos
<timokau[m]>
How can I get gcc and static linking to work? I'm trying to compile a simple toy c file with a `printf` with `gcc -static test.c` but it "cannot find -lc"
<timokau[m]>
I've put `glibc.static` in my environment
Makaveli7 has joined #nixos
<joko>
Is there something wrong with nixops? Any deploy I do seems not to change the target host
knupfer has quit [Ping timeout: 264 seconds]
nikola_ has quit [Read error: Connection reset by peer]
<joko>
hyper_ch: and have you experimented with sending encrypted datasets with unlocking them to remote host just before sending them and re-locking them once you're done?
<hyper_ch>
joko: there's the raw send option for encrypted snapshots... that will send snapshots as tehy are
<hyper_ch>
e.g. if you want to make backup onto a 3rd party server that you don't trust
<hyper_ch>
so all encryption etc. is taken from the snapshot source
<hyper_ch>
e.g. you could send it to to a file and then move that file to google drive or something
<joko>
hyper_ch: perfect!
<hyper_ch>
non-raw send will need to have the dataset unlocked on the sending server
<hyper_ch>
and it will required to be sent to a server that also has an encrypted dataset unlocked and it will use then the receiving encryption details
<hyper_ch>
or you could send it to a non-encrypted dataset and then it won't be encrypted
erhandsome has quit [Read error: Connection reset by peer]
<mightybyte>
I'm trying to use NIX_STORE_DIR and NIX_CONF_DIR to do a nix-build and put the dependencies somewhere other than /nix/store. But I'm having trouble getting it working. Is this doable?
pointfourone has quit [Remote host closed the connection]
<mightybyte>
symphorien: I'm having trouble getting caching to work.
<mightybyte>
When I try to add cache.nixos.org as a substituter I get:
<mightybyte>
warning: binary cache 'https://cache.nixos.org' is for Nix stores with prefix '/nix/store', not '/Users/doug/store'
<symphorien>
binary cache can't work with a different store path
<mightybyte>
Why?
<mightybyte>
That seems like a dumb restriction
inquisitiv3 has joined #nixos
<symphorien>
because all glibc based elf executables hardcode the path to the elf interpreter for example
<symphorien>
so a binary build in /nix/store hardcodes all sorts of paths to /nix/store
<mightybyte>
Wow
<symphorien>
and editing binaries to change paths is not possible in a reliable way
<symphorien>
==> you have to recompile everything
<mightybyte>
So sad
<inquisitiv3>
Is it Hydra I'll need to read up on to build NixOS ISOs? I'll probably receive my Power9 system in Q2 and would like to install NixOS on it.
<__monty__>
symphorien: I wonder whether there's a state of builds that could be cached, like right before the binaries are actually produced. To reduce the impact of things like hardcoded paths.
<symphorien>
__monty__: well, a lot of hardcoding happens at ./configure --prefix=hardcoded_path time, so it seems you cannot cache much
<inquisitiv3>
symphorien: Thanks!
<__monty__>
symphorien: The real hardcoding doesn't happen until those attributes are actually *used* though.
<__monty__>
symphorien: Maybe at minimum there should be a way to indicate relocatable cache entries? For example in a python project you *should* be able to replace all the paths, since it's just text files.
<symphorien>
right, but I guess you meant "what if we cache the object file" and object files can hardcode these paths
erhandsome has joined #nixos
jmgai has quit [Ping timeout: 250 seconds]
<symphorien>
@python: right. I guess you need to patch nix for this, though
<__monty__>
symphorien: Do they hardcode the paths in a similar way to binaries, so they're hard to change?
<symphorien>
yes. hard to change means: you can change them only if the new path is shorter and you are lucky
<__monty__>
Maybe things in the store should actually be run against something like a chroot? Would that help the relocatability?
<mightybyte>
Yeah, I was just wondering that
dermetfan has quit [Ping timeout: 245 seconds]
<symphorien>
no, the hardcoded path must be valid at runtime
<mightybyte>
I guess if you could do that, the program wouldn't be able to interact with the filesystem in the same way.
<ottidmes>
there is no, builtins.toNix right? i.e. a function to print a Nix value to a string containing a Nix expression representing that value, so toNix on a string would produce a string literal
simukis has quit [Quit: simukis]
orivej has quit [Ping timeout: 240 seconds]
<__monty__>
symphorien: You can't use cgroups to make a binary think it's running from /nix/store?
<symphorien>
you mean user namespaces ?
<symphorien>
that's what nix-user-chroot does
<ar1a>
does anyone have linked to their home.nix? seeing what i can add to my own
<__monty__>
I have no idea what I mean. I know the problem is you can't easily change the path in the binaries. So I'm thinking of things that might let you fake a path as being the unchangeable path.
<mightybyte>
__monty__: Would that help though? It seems like it's not about where the binary thinks it is running from. It's where it thinks root is since the paths are all /nix/store/...
<mightybyte>
symphorien: What's nix-user-chroot?
<__monty__>
mightybyte: Course it would, it's what containers and chroot do.
<symphorien>
__monty__: the problem is: this is an OS-level solution. the user namespace propagates to children process and most distributions do not enable it by defaults; it is also linux-only
<__monty__>
Ok, all good points.
<symphorien>
and a binary cannot do it itself because we are talking about loading the libc, which before even main()
<mightybyte>
Sigh...the rabbit hole goes really deep on this one.
orivej has joined #nixos
<__monty__>
Maybe the default path of the cached /nix/store should be /nix/store-make-this-as-long-a-name-as-possible-without-going-over-platform-path-length-limits?
<__monty__>
Then any place you might want to relocate the store to can probably be patched in : >
<mightybyte>
lol
<__monty__>
Let's call it a "pragmatic" solution?
<gchristensen>
fwiw even Debian has made an exception for Nix to break the FHS and store in /nix, than put /nix somewhere else
<__monty__>
gchristensen: They just lack the cojones.
<mightybyte>
symphorien: Would it be possible to store all the crucial non-relocatable things like the elf interpreter, etc in /nix/store and then get relocatable binary caches for everything outside this core of fixed stuff?
<__monty__>
symphorien: So the available space is 192 - hash length - longest package name - longest version string - a couple dashes?
<__monty__>
For my store that'd leave approximately 70 characters for the "/nix/store" part.
<__monty__>
Imo that's plenty.
<mightybyte>
Yeah. 32 seems like it might be enough.
Makaveli7 has quit [Quit: Leaving]
smolboye_ has joined #nixos
smolboye has quit [Ping timeout: 240 seconds]
<symphorien>
mightybyte: the thing is, the build system of a package could do anything. For example it could hash its install directory and refuse to run /proc/self/exe does not point to a directory with the right hash. The hash value would be hardcoded in the executable and not changed by sed s/old store/new store/
<mightybyte>
symphorien: Thanks for the in-depth explanation.
shibboleth has quit [Quit: shibboleth]
<inquisitiv3>
I'm doing a new installation of NixOS in a VM. T
<inquisitiv3>
The installation will be on a fully encrypted "disk". But I'm unsure about which partition code I should use for the encrypted partition.
<ar1a>
can someone link me something on nix-shell? i want to know how to do this sandboxing thing when i program. also love to see how i could play around with it for adding nixpkgs if thats possible too!
<{^_^}>
[nixpkgs] @fpletz pushed commit from @adisbladis to master « youtube-dl: Change to ffmpeg_4 »: https://git.io/fhuKu
<ar1a>
on a slight subject change, in nixos/home-manager is there a way to delay a service starting up for a few seconds? the wm integration breaks if it launches as soon as i log in, i need to delay it maybe one or two seconds
<wedens>
fontconfig is impossible to debug
<wedens>
ar1a: which service?
<ar1a>
polybar
<wedens>
just add `systemctl --user restart polybar` to commands executed by WM :)
<ar1a>
thats such a haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack
<ar1a>
but it fixed it :(
<ar1a>
i feel so dirty
<wedens>
yeah, I think you can also add i3.service to After of polybar service
<wedens>
or whatever wm you use
<wedens>
if it has a service
<ar1a>
it does not
<ar1a>
launched by login manager
<ar1a>
so what does penultimate do compared to ultimate? ive swapped to ultimate and oh my god my screen is eye ecstacy
<inquisitiv3>
Ke: I don't think so. But I also don't want to screw up something that's in the "foundation" of the system.
<wedens>
ar1a: beware that ultimate (upstream) is unmaintained for the last 2 or 3 years
<ar1a>
yeah but the infinality patches are just so good
<wedens>
most of it is already merged
freeman42x has joined #nixos
lawlesseel has joined #nixos
kenshinCH has joined #nixos
<kenshinCH>
Haskell question. If I understand correctly, there are two ways to work with Haskell in nix: either using stack integration or using the packages provided by nix. Is that right? Which one would you suggest?
<srhb>
kenshinCH: I have no good experiences with the stack integration. Also, it only deals with system dependencies and GHC, not haskell packages as such, iirc.
<srhb>
If you like stack, it might be worth giving it a spin.
<srhb>
When it works it's probably very similar to what you're used to.
<wedens>
srhb: there are stack2nix and stackage2nix
<srhb>
Yeah, I know.
tikznut has left #nixos [#nixos]
<kenshinCH>
That's the point: I'm used to nothing, basically. Starting fresh with Haskell :P
<srhb>
Heh, well, nix + haskell will be a bit of a mouthful whichever path you choose. :)
<kenshinCH>
but using stack to get packages and duplicate them between projects, on nix, seems unnatural :p
<srhb>
fwiw I know there's a lot of people in this channel (including me) that can help with the pure nix approach. I don't know if we have a lot of stack users, but maybe!
<kenshinCH>
I see, so the usual way seems to be to use nix packages. Makes sense, and sounds like my answer right there :) Thanks!
<mightybyte>
kenshinCH: If you're using Nix already and are starting with Haskell, definitely don't go with Stack.
_kwstas has quit [Remote host closed the connection]
dermetfan has quit [Quit: WeeChat 2.3]
<kenshinCH>
mightybyte: OK, that's all new to me. I investigated around 1/1.5 years ago and the feeling I got was "stack is the future of enterprise-grade Haskell". But good to know. Thanks
marsam has joined #nixos
<mightybyte>
kenshinCH: Yeah. Cabal has had a lot of progress since then.
<mightybyte>
If you're already familiar with stack and have a workflow set up, then it's different. But if you're a blank slate AND you're using Nix...pretty clear choice IMO.
<kenshinCH>
Reading throught that link seems like Nix (maybe not NixOS) is pretty prevalent among Haskellers. Is that fair?
<wedens>
cabal was fine before and it's even better now with all this new-* stuff
<ar1a>
so as someone new to haskell i should go with cabal?
<wedens>
ar1a: I don't see any reason not to
jmgai has joined #nixos
<mightybyte>
kenshinCH: I know a fair number of haskellers who use Nix. But I really don't know what the rate is across the whole Haskell community.
<wedens>
if you decide to use stack for whatever reason, you can always do that
<hodapp>
kenshinCH: sort of. for one thing, Stack can interface directly with Nix if it's present
sakalli_ has joined #nixos
<srhb>
kenshinCH: Yeah, it's hard to get numbers but I have the same feeling. I think that Haskellers are drawn to declarative package management, and by extension a declarative OS.
<srhb>
kenshinCH: Overlap of interests and priorities :)
<mightybyte>
They're both purely functional
<hodapp>
that and Haskell package management is its own sort of cesspool (or, at least, it was years ago), and Nix can be good at dealing with that
jmgai has quit [Ping timeout: 246 seconds]
<kenshinCH>
cool, thanks everyone. I'll give it a try
<mightybyte>
kenshinCH: One thing to keep in mind...if you're using cabal without nix, you definitely need to use the "new-" (aka "v2-") family of commands.
<mightybyte>
They are going to become the default fairly soon, but it's been a slow migraton due to all the backwards compatibility concerns.
<mightybyte>
Those commands use a purely functional nix-style approach and give a much better experience.
sakalli` has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<mightybyte>
If you're using nix to manage all your dependencies, then the old style "v1-" commands should work just as well but you might as well get used to the new behavior.
Ariakenom has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<{^_^}>
haskell/cabal#4646 (by ElvishJerricco, 1 year ago, open): Nix integration is not supported in new-build.
Ariakenom has joined #nixos
hedning has quit [Remote host closed the connection]
dsiypl4_ has joined #nixos
hedning has joined #nixos
Ariakenom has quit [Quit: Leaving]
Ariakenom has joined #nixos
knupfer has quit [Quit: knupfer]
<mightybyte>
Yeah, but I'm not talking about using cabal's nix integration. Just using `cabal new-build` inside a nix-shell.
<__monty__>
Yeah, no need for integration, that'd just be convenient.
dermetfan has joined #nixos
<disasm>
nixos never ceases to amaze me... after 10 mins trying to get a udev rule to allow users to run brightnessctl I found hardware.brightnessctl.enable = true; :)
<ar1a>
i like light programs.light.enable = true;
<disasm>
multiple ways to do the same thing ar1a :)
<ar1a>
no of course, im not saying to swap to light, just my 2 cents :D
<{^_^}>
0. Sorry. 1. If you complain about PR being in limbo, always provide a number («I have an unmerged PR (#23924)…»), bot will print PR title and it might bring you an impulse-merge. 2. Please look up who commits similar work and ping these people (or request-review), keeping up with all the PRs is not really possible.
mizu_no_oto has joined #nixos
<ar1a>
not complaining its only been like 12 hours :P
ddellacosta has quit [Ping timeout: 240 seconds]
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
o1lo01ol1o has joined #nixos
dsiypl4_ has quit [Remote host closed the connection]
<WhittlesJr>
When considering a backup / snapshot strategy, since your NixOS state is more or less fully reproducible, which parts of the filesystem are meaningless to back up? /nix/store seems to be the most obvious candidate to skip snapshotting, but is there anywhere else that would take up a lot of space but doesn't need backed up?
inquisitiv3 has quit [Ping timeout: 250 seconds]
<gchristensen>
I back up /etc, /var, /home
<infinisil>
I only backup /var/lib and /home
<simpson>
My backup strategy isn't expressible as a selection of local directories. I have a few cryptographic secrets backed up.
inquisitiv3 has joined #nixos
<WhittlesJr>
Thanks for the perspectives!
ixxie has joined #nixos
<cyris212>
gchristensen: Is there anything other than configuration.nix in /etc that is worth to backup?
<__monty__>
fstab, nginx setups, tons of configuration, really.
<schmittlauch[m]>
According to https://howoldis.herokuapp.com/, successful channel hydra builds are switched to be the active channel by a periodic cron job. How often does this happen?
<symphorien>
/etc/NetworkManager
<__monty__>
schmittlauch[m]: The cron job's pretty frequent, like on the order of minutes iirc.
<cyris212>
i see, thx
<gchristensen>
cyris212: up to you to find out :) review these files: sudo find /etc -type f
<schmittlauch[m]>
Asking because nixos-unstable has had a successful hydra build several hours ago, but still isn't fetched via `nix-channel --update` __monty__
<schmittlauch[m]>
maybe it takes time to federate through the CDN?
<gchristensen>
schmittlauch[m]: that build's evaluation needs to be completely done building before the channel updates: https://hydra.nixos.org/eval/1501242
<gchristensen>
they don't need to all pass, but they do need to all be attempted
jmgai has joined #nixos
<ottidmes>
is there a way to get the pkgs.path given only the package? i.e. if am given pkgs.hello, can I figure out from the hello package derivation what nixpkgs path defined it?
winem_ has quit [Ping timeout: 264 seconds]
<srhb>
schmittlauch[m]: And once that's true, the check happens within 10 minutes.
<__monty__>
schmittlauch[m]: Curious, where are you seeing the successful build?
<schmittlauch[m]>
gchristensen: Then the "finished at" values is misleading
<gchristensen>
no, the `tested` job has finished
<schmittlauch[m]>
… but is only one build job of the whole evaluation. OK, I got it.
<gchristensen>
right
nikola_i has quit [Ping timeout: 268 seconds]
<schmittlauch[m]>
still think that either the hydra interface or probably the howoldis interface should make the distinction clear. Like: testing job successful, so as sonn as this evaluation (still running) finishes it will be published
<gchristensen>
I totally agree
<schmittlauch[m]>
do you kno whether there's an issue tracker for the latter project?
<ivegotasthma>
I'm having trouble packaging a vim-plugin, can someone help me?
<ar1a>
now how do i install this, do i *really* have to make a nixpkgs entry for it?
<ivegotasthma>
the code for it is not being generated
Guanin has joined #nixos
<rain1>
ar1a: for personal scripts I have a ~/Programming/bin/ folder I put them in, and a nix config line to add that to PATH
kp__ has joined #nixos
<ar1a>
fair nuff, .local/bin i guess
<srhb>
ar1a: environment.systemPackages = [ (pkgs.callPackage /path/to/your/nix/expr {}) ] -- depending on how you defined it :)
<srhb>
ar1a: For a haskell project you cal probably get away with pkgs.haskellPackages.callCabal2nix
dsiypl4_ has joined #nixos
<srhb>
ar1a: As in pkgs.haskellPackages.callCabal2nix "yourPackageName" /path/to/dir/with/cabal/file {}
dermetfan has quit [Quit: WeeChat 2.3]
<ar1a>
with home-manager can i use ~ or do i have to write /home/aria
<srhb>
> ~/foo
<{^_^}>
/var/lib/nixbot/foo
<srhb>
ar1a: ^ should be fine :)
<ar1a>
so i tried like so: (pkgs.callPackage ~/projects/fullwidth/.styx/fullwidth.nix {}) and it gave me error "error: anonymous function at /home/aria/projects/fullwidth/.styx/fullwidth.nix:1:1 called without required argument 'mkDerivation', at /nix/store/mxbw0x6l5n8q250l029ba7k374jskj1j-nixos-19.03pre166887.db8e3654e2c/nixos/lib/customisation.nix:69:12" the fullwidth.nix file is here:
<srhb>
ar1a: And it only relies on the cabal file, so it'll always be in sync.
acarrico has joined #nixos
<ryantm>
" then it froze with the same unblinking underscore
<ar1a>
hmm, alright. haskell.callpackages is working great so ill go try cabal2nix
<srhb>
ar1a: callCabal2nix basically works like this: It automatically runs cabal2nix on the source you specified, then builds the resulting expression.
<srhb>
For local programs I find it's a very nice option. If you want to distribute, mangling a cabal2nix output manually makes more sense usually.
<nh2>
samueldr: I am confused, I did `nix-env -iA unstable.gst_all_1.gstreamer.dev`, it built /nix/store/xx1ikcrdla7gjkca6ifcgsb8iv7zhvyq-user-environment.drv, but if I `nix-store --realise` that and look inside, there's no gst* stuff in it
<leex>
Hey there, I was wondering where I can get libudev from? Trying to compile a rust game lib (ggez) and I get: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"` did not exit successfully.
<samueldr>
nh2: if you realise which path? the user-environment?
<nh2>
samueldr: yes
<samueldr>
hmm, can't say for sure, I would have thought it would be used in the context of a nix-shell or a derivation
<samueldr>
e.g. this `nix-shell -p gst_all_1.gstreamer.dev --run gst-launch-1.0` seems fine
<leex>
oh disregard me :D I was editing the wrong nix-shell config it seems...
<sphalerite>
nh2: yeah it's in the dev output
<sphalerite>
which nix-env doesn't install
<sphalerite>
and nix-env is very hard to persuade to install other outputs
<nh2>
hm. How do people use it then from the command line?
<nh2>
and when I run /nix/store/1iiriqcmzi82r483zrh0g35d8696q1sp-gstreamer-1.14.4-dev/bin/gst-inspect-1.0 it doesn't list any installed plugins beyond "staticelements"
<sphalerite>
nh2: with nix-shell I suppose.
<sphalerite>
nh2: or not at all :p
<sphalerite>
nh2: I use it with a custom nix-shell thing, hang on
<nh2>
next question, what's the easiest way to obtain build logs for the gstreamer package? Somehow on Hydra most likely, what's the fastest way to get to the right output?
<nh2>
I want to see what configure flags were passed and what the build output said
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
mizu_no_oto has joined #nixos
eadwu has quit [Ping timeout: 268 seconds]
dermetfan has joined #nixos
mizu_no_oto has quit [Quit: Computer has gone to sleep.]
<inquisitiv3>
I'm having trouble with the network connection from a NixOS live (running from ISO) guest running on Libvirt/QEMU on a Debian Unstable host. It says that I got a wired connection inside the guest, but I don't receive any answers when I try to ping Google (`google.com`) and Cloudflare's DNS (`1.1.1.1`). No problems from the host. Tested with the three available drivers in virt-manager; `virtio`, `rtl8139` (hypervisor default) and
<inquisitiv3>
`e1000e`. The network source is `Virtual network 'default': NAT`. Couldn't find any relevant info on the wiki. The network interface is detected according to `ip -a` in the VM. Tested to restart the `network-manager` service. Any idea what could be the problem?
<inquisitiv3>
I don't think that I run any tunnel on the host that block network traffic. Uninstalled Wireguard after tried to get it running.
<ivegotasthma>
how do I get a sha256 for nix about a github repository?
<ivegotasthma>
it was not a sha256 of the zip but of something else, but I forgot which
<infinisil>
,tofu ivegotasthma
<{^_^}>
ivegotasthma: 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.
<samueldr>
ivegotasthma: it's the sha256 sum of the *contents* of the zip, which is annoying to get; the easiest way is using TOFU to make nix handle it
lopsided98 has joined #nixos
rtjure has quit [Read error: Connection reset by peer]
mizu_no_oto has joined #nixos
<ivegotasthma>
infinisil: samueldr: I'm trying to package a vim plugin but the code is not being generated. It doesn't check the sha256, even if it's wrong it doesn't matter.
<samueldr>
(obviously) the first step would be finding out why it doesn't get to failing
<samueldr>
I do not have experience with the vim plugins infra in nixpkgs, but I can try lending a hand: how are you using/building the plugin you're trying to package?
<samueldr>
(I stopped looking once someone who knew about the subject looked into it, though thanks!)
IRCsum has joined #nixos
<ivegotasthma>
samueldr: you can leave it
<ivegotasthma>
samueldr: ah, nice! :)
<rain1>
systemctl status remove-mnt-directories.service says Loaded: bad-setting (Reason: Unit remove-mnt-directories.service has a bad unit file setting.)
reinhardt has joined #nixos
hoijui has joined #nixos
<LnL>
this will be in the manual for 19.03
<rain1>
ah its cause rmdir is not a full path
dsiypl4_ has quit [Ping timeout: 272 seconds]
Makaveli7 has joined #nixos
<iqubic>
So I have a default.nix I want to build. What is the best way to do this?
<samueldr>
what did you try? what are you concerns with what you tried?
knupfer has joined #nixos
<iqubic>
samueldr: Is that directed at me?
<samueldr>
yes
<iqubic>
Well, I don't know how to do it in first place.
drakonis_ has quit [Ping timeout: 245 seconds]
<iqubic>
Running `nix-shell` in the directory with the default.nix gives me an error.
<srhb>
iqubic: If it's a pkgs ? import <nixpkgs> ... type default.nix, you can just nix-build. If it's using arguments from callPackage, make a pkgs ? <nixpkgs> type wrapper.nix that uses pkgs.callPackage ./default.nix {}. The very abridged version.
<iqubic>
error: cannot auto-call a function that has an argument without a default value ('stdenv')
<srhb>
iqubic: So, "it depends" :-)
<iqubic>
I see.
<srhb>
iqubic: Right, that'll be the wrapper case.
<iqubic>
`nix-build` fails.
<iqubic>
error: cannot auto-call a function that has an argument without a default value ('stdenv')
<iqubic>
Today I copied discord's default.nix to a different directory, not in my nixpkgs clone, and built it from there. Now the GSettings issue has been resolved.
orivej has quit [Ping timeout: 240 seconds]
<iqubic>
I have no freaking clue what the difference is there.
<WhittlesJr>
No matter what channel I use or checkout of nixpkgs I use, it always wants to build nvidia-persistenced and it always fails with a permissions issue. What could that be?
<clever>
iqubic: the version of nixpkgs it uses to build discord
<iqubic>
really? Is that the issue?
<clever>
iqubic: its very likely to be the issue
<iqubic>
What specifically changes if I change the build dir to a place outside of nixpkgs?
<clever>
WhittlesJr: look at the order the derivations fail in at the end, it should say which depended on nvidia
dvim has quit [Ping timeout: 250 seconds]
<iqubic>
When $PWD=local nixpkgs `nix-build -A discord` was used to build it. When $PWD=not nixpkgs I copied the latest discord default.nix and used the wrapper thing that srhb gave me just now.
<iqubic>
I feel like I'm fundamentally misunderstanding how nix works.
<clever>
iqubic: the `import <nixpkgs>` in the wrapper, will load the nixpkgs from $NIX_PATH
<clever>
which then gives entirely different versions of all dependencies
<iqubic>
I see. So building things from a local clone of nixpkgs just doesn't work as well?
<clever>
it generally works fine
<iqubic>
But why is this case different?
<clever>
varies from case to case
<WhittlesJr>
clever: it's seemingly just nixos-system -> system-path -> nvidia-persistenced
<clever>
WhittlesJr: then nvidia is somehow in your environment.systemPackages, but it could also be the x11 drivers doing that
<mdash>
think i'm gonna deploy nextcloud today
<WhittlesJr>
clever: probably the x11 drivers. The specific error: `/build/nvidia-persistenced-415.27/_out/Linux_x86_64/gen-manpage-opts: Permission denied`
<mdash>
i'm nervous about php so i'm gonna put it in a nixos-container and pretend that helps with security
jmgai has quit [Ping timeout: 268 seconds]
<fresheyeball>
what does nix do with more than one source?
<fresheyeball>
lets say I have srcs = [../foo ../bar];
<fresheyeball>
what will be there in installPhase?
<fyuuri>
Hi. NixOS is installing libreoffice from sources atm. What tiggers this? To which directory does nix download the sources? Are the source completely deleted after installing? Or after collect-garbage?
<clever>
fyuuri: all things nix downloads always go to /nix/store/
<symphorien>
to the store. You can collect garbage to get rid of them once the build is complete
<__monty__>
fyuuri: That's probably because the build failed. So your build will likely fail too afaik.
<fyuuri>
clever: I thought it would be there, but I cant find it :(
<clever>
fyuuri: it will tell you the path, as it downloads it
<fyuuri>
__monty__ : that would be sad^^, i am waiting for a long time
markus1189 has quit [Ping timeout: 240 seconds]
markus1189 has joined #nixos
<__monty__>
fyuuri: Yeah, this has come up before. It's a massive build and if hydra fails you're likely to fail as well.
<fyuuri>
clever: it says the path is /build/....
<fyuuri>
__monty__ thank you. In this case I will interrupt it
<__monty__>
fyuuri: Wait until someone else confirms my blathering though.
<fyuuri>
It might be better to install libreoffice via nix-env anyway.. just on the machines I really need it.
<fyuuri>
__monty__ : But that is plausilbe. Only if hydra failes it sould try building from source
iqubic has left #nixos ["ERC (IRC client for Emacs 26.1)"]
<fyuuri>
and I dont really need libreoffice that much. Only when im forces to look at some .docx ^^
iqubic has joined #nixos
rpg has joined #nixos
<fyuuri>
__monty__ : but maybe you could just do nix-shell -p libreoffice to confirm?
<__monty__>
I'm not on nixos, so we're probably on different channels.
<fyuuri>
ok
iqubic has left #nixos ["ERC (IRC client for Emacs 26.1)"]
<clever>
fyuuri: /build/ is a temporary directory for builds, where it unpacks the src, after having already downloaded it
<fyuuri>
Still I want to find out where the sources are now, and whether they are cleaned up after a successfull install. Does anybody now?
<clever>
fyuuri: its always in /nix/store/ and a nix-collect-garbage will get rid of it
<fyuuri>
clever: where is /build? It is not really the absolute /build
<tilpner>
clever: What about ~/.cache/nix/tarballs? When does that get cleaned up?
<clever>
tilpner: those are only symlinks pointing into the nix store, its practically zero size
<clever>
fyuuri: /build/ is mapped to something in /nix/store/ and deleted when the build fails
<fyuuri>
clever: thx! so at least I am sure nothing will be left over even if I interrupt the build now
<fyuuri>
clever : thx!
<tilpner>
Ah, of course :)
<fyuuri>
but do you know where exactly it is mapped to? I could not find it.
<clever>
fyuuri: something like $out-chroot, based on what is currently being built
iqubic has joined #nixos
<fyuuri>
clever: ....drv.chroot! Thx!! This can only be opened by root
<symphorien>
fyuuri: what are you trying to do ?
<fyuuri>
symphorien: I just want to understand how it installling from source works.
<fyuuri>
symphorien: Because libreoffice suddenly started building from source.
<clever>
fyuuri: /build/ is only the temp dir it unpacks the source to
<clever>
fyuuri: the real source is already in /nix/store/
<fyuuri>
thx
<__monty__>
fyuuri: Hydra attempts to build it and on success adds it to the binary cache. If you fail to find it in the cache you start building it.
<fyuuri>
__monty__ thx
<fyuuri>
I need to read all the nix pills...^^
<__monty__>
fyuuri: Personally I learned more from the manual.
<fyuuri>
__monty__ Would you suggest reading the whole manual instead? Will it cover everything the pills cover as well?
<fyuuri>
I wish to get a deep understanding of how everything works in nixos... yet, I need to find time to read ...
freedan42x has joined #nixos
kenshinCH has quit [Quit: Page closed]
<ivegotasthma>
I newb question, after a PR with a new package has been merged, when could I expect it to be available on the 18.09 channel?
<ivegotasthma>
s/I/A
<makefu>
ivegotasthma: normally, no. it will arrive in nixos-unstable at some point. stable will only contain security updates and build fixes (citation needed)
<makefu>
if you want to use unstable for some packages:
<freedan42x>
Heelp, please: when I try to install ghc-mod: Installation path ~/.local/bin not found on the PATH environment variable.
<__monty__>
fyuuri: Reading the nix pills will be negligible compared to reading the nix and nixpkgs manuals so "Why not both? (\/);,,;(\/)" : )
<__monty__>
freedan42x: Fwiw, I don't bother with ghcmod. Just ghcid.
<freedan42x>
__monty__: ghc-mod is required by haskell-ide in Atom
dvim has joined #nixos
<__monty__>
freedan42x: My fwiw holds : ) It just breaks way too often. I'd rather spend time fixing my code than fixing my editor setup. Horses for courses though.
<freedan42x>
__monty__: ghc-mod is needed for Haskell REPL ._.
<clever>
fyuuri: ghci is the haskell repl
<clever>
freedan42x: ^^
<freedan42x>
clever: but I want to have Haskell REPL in Atom :p
<__monty__>
freedan42x: Yeah, ghci definitely doesn't need ghc-mod. And HIE might be an option for atom and also doesn't require ghc-mod afaik.
<__monty__>
freedan42x: I'll get out of the way now so someone can actually help you though.
<{^_^}>
#54003 (by tadeokondrak, 4 days ago, open): Discord has been updated, does not work anymore
<worldofpeace>
* see
<__monty__>
clever: Ah, but teach a man to fix his discord and he will have pointless internet discussions for a lifetime ; )
peacememories has joined #nixos
<clever>
__monty__: find the default.nix for discord in nixpkgs, and check its git history
<freedan42x>
clever: git history? Sorry, I'm a completely noob
peacememories has quit [Client Quit]
<clever>
freedan42x: click the history button on github, when looking at the discord/default.ni
<clever>
x
_kwstas has joined #nixos
<freedan42x>
clever: what's next?
<clever>
freedan42x: look at what changes other people have done, mostly in the version or src area, and then repeat them on your own clone of nixpkgs, with the new version#
<__monty__>
Yep.
<{^_^}>
[nixpkgs] @samueldr pushed to release-18.09 « Revert "Add ssh backdoor to VM tests infrastructure." »: https://git.io/fhuFZ
aswanson_ has quit [Quit: WeeChat 2.2]
<freedan42x>
clever: or can I just replace my discord config with github's config?
<clever>
freedan42x: that only works if the one on github has already been updated
<clever>
and there are many ways to do that
worldofpeace has quit [Quit: worldofpeace]
worldofpeace has joined #nixos
<laas>
so, when you're developing with nix, are you expected to use nix-shell somehow?
knupfer has quit [Remote host closed the connection]
<__monty__>
laas: Not necessarily but probably.
<freedan42x>
clever: can't even find where default.nix is located
<clever>
freedan42x: did you try the github search, for "discord" ?
<laas>
it's just because I couldn't find any way to install the latest unwrapped gcc that also ships `cc`
<__monty__>
laas: Keep in mind that nix-shell was actually designed to work on nix expressions so it's not always a great fit.
<laas>
ah yeah
<freedan42x>
clever: I mean in my system
<clever>
laas: if your installing gcc, then your doing it wrong
<freedan42x>
clever: in my files
Jetien has joined #nixos
<laas>
clever: what should I do then?
<laas>
if I want to compile a meson proejct
<__monty__>
Maybe the nixpkgs manual has a section on C development?
<clever>
laas: that gives a shell with gcc and meson
<freedan42x>
clever: thank you
<appleclusters>
I cannot for the life of me figure out how to declaratively install packages for a specific user
<laas>
__monty__: I can't find any
<laas>
clever: ooooh
<laas>
that's really helpful, thanks!
<appleclusters>
environment.systemPackages is for the whole system, how would I declare one for a single user? Do you add a custom config.nix to .config/nixpkgs/config.nix?
lawlesseel has quit [Remote host closed the connection]
lawlesseel has joined #nixos
<__monty__>
,home-manager
<{^_^}>
home-manager allows you to manage your per-user configuration similarly to NixOS' configuration.nix: https://nixos.wiki/wiki/Home_Manager
<__monty__>
I'm sure there's other ways but that's pretty popular.
<clever>
appleclusters: or users.users.<name?>.packages
<appleclusters>
@__monty__: I was spooked by the warning:
<appleclusters>
In some cases Home Manager cannot detect whether it will overwrite a previous manual configuration. For example, the Gnome Terminal module will write to your dconf store and cannot tell whether a configuration that it is about to be overwrite was from a previous Home Manager generation or from manual configuration.
<appleclusters>
Because I use gnome
<freedan42x>
clever: I can't modify default.nix cuz it's read-only
<clever>
freedan42x: everything in /nix/store/ is read-only
<clever>
freedan42x: you must either copy the whole nixpkgs, or just git clone it from github
hoijui has quit [Remote host closed the connection]
<__monty__>
clever: Couldn't he just copy the Discord part?
<freedan42x>
clever: and where will it clone?
<clever>
freedan42x: to the current directory
<clever>
__monty__: depends on if its fixed upstream or if he is trying to edit it locally, and if he will be making a pr after fixing it
orivej has joined #nixos
<__monty__>
appleclusters: Not that big a deal, just remember to configure it through home-manager. It *is* still experimental though. Just sharing what seems the most popular method.
<freedan42x>
clever: `fatal: destination path 'default.nix' already exists and is not an empty directory.`
<freedan42x>
clever: Come on, I only need to update Discord
<clever>
2019-01-20 16:44:22 < __monty__> clever: Ah, but teach a man to fix his discord and he will have pointless internet discussions for a lifetime ; )
<__monty__>
freedan42x: clever was trying to get you a clone of nixpkgs so you could contribute your version bumps back to nixpkgs upstream. Many hands, light work and all.
<freedan42x>
clever: command did nothing
<srhb>
It's unfree software, and config '{}' wiped allowUnfree
<ghostyy>
is there a way to include a specific package or program in the nixos initramfs
<clever>
nh2: its calling a function called dependency
<clever>
nh2: my first guess, try just adding pkgconfig to the nativeBuildInputs ?
<ivan>
why do I keep seeing `error: stack overflow (possible infinite recursion)` when rebuilding my system and why does it go away after a while without me changing me anything
<ivan>
(how do I increase the stack size?)
<clever>
ivan: ulimit
<nh2>
clever: is already in. I think the problem is that there exists this file in cudatoolkit-9.1 `cudatoolkit-9.1.85.1-lib/lib/libcudart.so` but it's nowhere to be found in `cudatoolkit-9.2.148.1`
<clever>
nh2: ah, then you probably need the 9.1 version
<ivan>
clever: thanks, I can build my system now
<ivan>
the default stack size limit is just 8KB?
sanscoeur has quit [Remote host closed the connection]
<nh2>
clever: clever but why should that fundamental file disappear from 9.1 to 9.2? Sounds suspicious
<clever>
ivan: thats 8192kb, not 8192byte
<ivan>
oh wow nix needs more than 8MB of stack
<clever>
nh2: either 9.2 deviced to remove it, or the 9.2 package is broken
<clever>
ivan: or you have a recursive import statement somewhere
tmaekawa has joined #nixos
<ryantm>
symphorien: Okay, I'll try it!
<ivan>
clever: well it works when I raise it to 20MB, does that still suggest I might have a recursive import statement?
<clever>
ivan: if it was recursive, it would consume all stack without limit
<ivan>
thanks
<clever>
but it might be something weird youve done, that sometimes isnt recursive
freedan42x has quit [Read error: Connection reset by peer]
<muvlon>
i've got a pretty general question (i believe)
<nh2>
clever: I think the problem is that our cudatoolkit packages somehow have no .pc files at all
isHavvy has quit [Ping timeout: 246 seconds]
<muvlon>
if i have a piece of software written by myself, what's the easiest way to use that in a .nix file?
<muvlon>
in this particular case, the software is a "service", so ideally i'd want systemd to handle it just like every other service on that nixos host
ddellacosta has joined #nixos
<muvlon>
do i write a nix "package" for that software somehow?
Havvy has joined #nixos
<clever>
muvlon: yes
<nh2>
muvlon: are you familiar with writing systemd units in general?
<muvlon>
i have written simple systemd units before (and this one would be simple as well)
<muvlon>
it's basically a monolithic executable that just runs (and needs another service to be running)
<muvlon>
the other service is mosquitto, which i've already added to the systemPackages and configured properly
<nh2>
muvlon: OK, good. Then you should probably first write a nix package for the software (like the ones in the pkgs/ subdir of nixpkgs). Afterwards, you can write a nixpkgs module that contains a systemd service which uses your packaged executable. Here is an example for a Go program running as a systemd service that's also a pretty static executable:
<muvlon>
it's very hardware specific, so yeah, this is not really generally useful
<clever>
muvlon: in this example i linked, setting one of the enable flags will automatically add an overlay to nixpkgs, which includes the custom package it needs
<nh2>
muvlon: then I woudl recommend get started directly with `systemd.services.yourservicename = { ... }` and get that working, with ExecStart pointing directly to the full absolute path to your exe. Afterwards you can decide whether to modularise more, or not
<nh2>
(get started with `systemd.services.yourservicename = { ... }` in your configuration.nix for that machine)
<ivan>
is anyone here running staging with an NVIDIA card? requesting help to test CUDA-accelerated mpv
<muvlon>
what exactly is a nix "overlay"?
<elvishjerricco>
etu: How do I configure my emacs to use the right indent function for nix-mode?
<muvlon>
the docs i can find are extremely terse
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #nixos
protocol has quit [Ping timeout: 245 seconds]
<muvlon>
am i understanding correctly that it relates to nixpkgs only and not nix in general?
<clever>
muvlon: yeah
<clever>
muvlon: an overlay is a way to add multiple sets of overrides to nixpkgs
ddellacosta has quit [Remote host closed the connection]
Ariakenom has quit [Quit: Leaving]
<muvlon>
i think i get it
<muvlon>
in the qemu example you linked, nixpkgs.overlays is just set to a single value. does that override any other nixpkgs.overlays settings or will they somehow get merged?
<adisbladis>
elvishjerricco: You are looking for (setq nix-indent-function 'nix-indent-line) ?
<muvlon>
is there a good place to learn about all this behavior of the nix language?
<clever>
yl[m]: is it fetchurl or fetchzip?
<elvishjerricco>
adisbladis: That looks right :)
leex has quit [Quit: Lost terminal]
iddt has joined #nixos
<yl[m]>
clever: it's fetchFromGitHub
<clever>
which calls fetchzip behind the scenes, should be good
<LnL>
yl[m]: fetchzip (and thus fetchFromGitHub) hashes the unpacked content, which can be affected by the filesystem normalization of hfs+ / apfs
<iddt>
i'm having trouble figuring out how to config nixos to recognize my touchpad. it should be using a plain old synaptics driver, but when i boot, i see this msg:
<clever>
LnL: oh, case sensitive!
<adisbladis>
Imho nix-indent-line should become the default very soon
<iddt>
psmouse serio1: synaptics: Unable to query device: -1
<clever>
yl[m]: are there potentially duplicate files, like foo and Foo in the repo?
<muvlon>
daaaamn hfs+ case insensitivity
<iddt>
any theories?
<muvlon>
they still do that?
<yl[m]>
damn
<LnL>
clever: not case, but unicode normalisation
<yl[m]>
so we should have linux/mac hashes?
<clever>
yl[m]: we should kick apple out of the club for being crap :P
<yl[m]>
lol
<yl[m]>
I'm with you on that
logand has joined #nixos
<yl[m]>
LnL: what's the suggested fix for the PR?
<clever>
yl[m]: the hash will at least pass if you switch to fetchurl