<ldlework>
this is how the README 'references the channel"
<ldlework>
it doesn't "reference the channel" in any of the nix code
<ldlework>
I paste the lines I'm using to fetch the source from github and import the default.nix from the source directly
<ldlework>
it fails in the main executable shell script doing nix build with: -f "<home-manager/home-manager/home-manager.nix>" \
<ldlework>
does this mean that home-manager basically requires you to have it as a channel?
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<gchristensen>
I'm too loosey-goosey with my config I guess
<gchristensen>
can't test my config before committing, for example, is frustrating
<siraben>
ldlework: thanks for that link, where's the docs for writing a systemd service in nixos?
<ldlework>
gchristensen: lol oh because you need a sha
<ldlework>
lmao
<ldlework>
gchristensen: couldn't you have another build command that lets you test it
<gchristensen>
yeah :)
<ldlework>
then you commit and go back and build pure with the sha
<gchristensen>
a few troubles made it hard. for example I have a secrets.nix which I Don't want to commit, but I must fetch it from somewhere purely (or commit it)
<gchristensen>
all this could be fixed, but also I didn't care quite enough to do it :P
<ldlework>
interesting
<ldlework>
i have a secrets.nix too
<hyper_ch>
I have a mySecrets.nix :(
<ldlework>
gchristensen: i feel like we should organize a "Nix Reproducability Challenge" or something
<gchristensen>
ooh?
<ldlework>
where you show you dd'ing your workstation
<gchristensen>
omg
<ldlework>
and then reconstituting your environment
<ldlework>
gchristensen: I feel like a way that Nix can be sold from a marketting perspective is that in it's reproducability you can get creative with your environments. You can make non-trivial interesting integrations/automations/glue/etc and be assured that if your laptop broke, on your next one, you don't have to do any work to get it back
<ldlework>
NixOS allows workstation creativity
<gchristensen>
I completely agree
<gchristensen>
figuring out how to fix a weird hardware quirk on any other OS is a matter of finding some arbitrary series of forum posts with "Fixes" which somehow combine to fix the issue until you reinstall
<siraben>
ldlework: what do you use to manage your .config files?
<ldlework>
home-manager
<ldlework>
which has a nice xdg module
<ldlework>
which I actually depend on a lot for my global pywal integration
<siraben>
ldlework: do you have a link to your dotfiles using home-manager?
<ldlework>
gchristensen: you should get on the hm train that'd be a big endorsement :)
<gchristensen>
I hadn't considered that :)
<ldlework>
it's not very complicated
<ldlework>
and it seems like maybe your thing could've been an inspiration
<ldlework>
seems similar
<gchristensen>
probably not -- I kept it private forever I believe
<ldlework>
convergent design
<ldlework>
:)
<gchristensen>
yeah :) I'll check it out
<averell>
what is the advantage of hm over the system config.nix and a dotfile repo?
<ldlework>
i don't have a 'dotfile' repo anymore really
<ldlework>
i have dotfiles next to default.nix files inside of package specific folders
<ldlework>
like /nixcfg/modules/home/linux,darwin/workstation/emacs/default.nix,init.org
random_yanek has quit [Ping timeout: 244 seconds]
Radivarig has quit [Ping timeout: 240 seconds]
<averell>
is it what user-profiles should be? i don't really understand what the tool itself does compared to nix-env installing
<ldlework>
averell: it is a shell script that is run during activation after build, that can manipulate files outside of the nix store
<ldlework>
such as your home directory
<ldlework>
It simulates nixos module system so you can configure per-user packages and also home-directory files, using a familiar way of doing things
<ldlework>
a home-manager module looks just like a nixos one
<ldlework>
there's an XDG module for home-manager for example, which allows you to render .config files and .cache files and set your XDG paths and so on
sgillespie has joined #nixos
simukis has quit [Quit: simukis]
georges_ has quit [Ping timeout: 244 seconds]
<sgillespie>
Is there a nice way to create a handful of VMs with a simple nixos config?
mkoenig has joined #nixos
<sgillespie>
I was hoping I could use nixos-container, but that doesn't seem to work for my specific usecase
<ldlework>
Another thing I like about home manager is that it is not nixos-rebuild. I change configuration related to my dotfiles wayyyy more often than my system - so it is nice that home-manager goes much faster.
random_yanek has joined #nixos
detran has joined #nixos
georges has joined #nixos
ToxicFrog has joined #nixos
ng0 has quit [Quit: Alexa, when is the end of world?]
<gchristensen>
that'll change when people start adding a bunch of robust and interesting user services :P
Supersonic has quit [Ping timeout: 268 seconds]
Supersonic has joined #nixos
llunesu has joined #nixos
ym555 has quit [Quit: WeeChat 2.3]
<llunesu>
Hi all. What's the proper way to make multiple deriviations for the same package but different versions? Like node-8_x, node-10_x etc
<llunesu>
Can I just follow what's done in web/nodejs/?
llunesu is now known as lionello
<ToxicFrog>
I'm trying to figure out how the borgbackup configuration doesn't explode by trying to run multiple backups at once.
Mr_Keyser_Soze has joined #nixos
<ottidmes>
lionello: you would have to override some of the arguments passed to package, you can see many examples of this in pkgs/top-leval/all-packages.nix
<{^_^}>
[nixpkgs] @pbogdan opened pull request #51769 → cyrus_sasl: merge PR #51651 into master → https://git.io/fp9fd
<lionello>
ottidmes: yeah, cool, will follow those. What about hiPrio?
<lionello>
I'd declare a non-versioned identifier with hiPrio, that's it?
worldofpeace has quit [Ping timeout: 240 seconds]
Mr_Keyser_Soze has quit [Ping timeout: 268 seconds]
<ottidmes>
lionello: its got to do with collisions when building an environment for a set of packages, and systemPackages is such a environment. If you wrap it with hiPrio it will have priority over the others when colliding, a collide can be 2 packages both defining $out/bin/foo, for example, which foo should then be symlinked? hiPrio disambiguates that
<lionello>
got it. thanks!
<ottidmes>
lionello: answering that made me wonder if it was correct to also say that it modifies the metadata over the derivation, because you can set the priority also via the metadata, so I just now checked and indeed it does exactly what I expected: hiPrio = drv: addMetaAttrs { priority = -10; } drv;
<lionello>
-10 is high? :)
<ottidmes>
yeah, the lower the number, the higher the priority
<ottidmes>
probably something taken from nice values of Linux processes, which also have lower the number, higher the priority
<lionello>
that's right, thought about that too
cyounkins has quit [Remote host closed the connection]
cyounkins has joined #nixos
david has joined #nixos
david is now known as Guest12054
vidbina has quit [Ping timeout: 272 seconds]
ftxqxd has quit [Ping timeout: 246 seconds]
<ldlework>
If I change my main channel from 18.03 to nixos-unstable, am I gonna have a bad time?
<{^_^}>
[nixpkgs] @bendlas pushed to master « chromium: update conditionals and gcc patches for min version 71 »: https://git.io/fp9Ji
jackdk_ has joined #nixos
<ldlework>
aw yeah
<ldlework>
hello from nixos 19.03 unstable
<ldlework>
smoothest linux upgrade of my LIFE
<jackdk_>
I am trying to set up nixos on a rpi 3 and have run into https://github.com/NixOS/nix/issues/2393 . I'm currently trying to build a new version of nix to break out of this bind, but the toolchain in pilfs expects glibc2.28
<{^_^}>
nix#2393 (by lopsided98, 14 weeks ago, closed): Hash mismatch with builtins.fetchUrl and .xz file
<jackdk_>
(the glibc in the nixos image for arm is glibc2.27)
<jackdk_>
oh right, I can LD_LIBRARY_PATH to that toolchain, duh
hlolli_ has joined #nixos
<jackdk_>
hm, even with LD_LIBRARY_PATH=/root/tools/lib, and ldd reporting nothing dodgy-looking, I still get "no such file or directory" errors trying to run binaries from teh toolchain tarball at http://intestinate.com/pilfs/images.html
<jackdk_>
does anyone have a good source for a binary aarch64 build environment that I could use to build a copy of nix?
<jackdk_>
ah, right. I have to load it using the loader in the toolchain tarball, because we don't have a ld.so or whatever under /lib
<jackdk_>
oh god, this image doesn't even have patchelf
<ldlework>
when i try to install emacs while adding a customized python with pylint and flake8 and shit as python packages, Nix blows up and tells me there's conflicts between python stuff when I add this custom python to emacs' buildInputs
<ldlework>
what might I be doing wrong?
<nh2>
dtz: can you spot anything wrong in malloc.c here? ;)
drakonis has quit [Read error: Connection reset by peer]
<ldlework>
how do I resolve this?
<ldlework>
collision between `/nix/store/xsm9vg6w30kw0i9dh027migpf0jn4msq-python2.7-backports.functools_lru_cache-1.5/lib/python2.7/site-packages/backports/__init__.py' and `/nix/store/9v1mzrlaghj0bqc0sbwiwjx9wpccjqdz-python2.7-configparser-3.5.0/lib/python2.7/site-packages/backports/__init__.py'
<ldlework>
how can I figure out where these packages are coming from?
<ldlework>
if you ever want me to explain organizing your config as a series of modules let me know
<siraben>
So how I have it set up in my git repository is that I clone my dotfiles, copy it to /etc/nixos/ and run "stow config" to get my .config files installed
<siraben>
ldlework: there must be a better way
jD91mZM2 has joined #nixos
<ldlework>
that's what home-manager is for
<siraben>
Ok what would I need to set up home-manager?
<ldlework>
this nixos module will give you two commands `switch` and `hm-switch` for managing nixos and home-manager
Lears has quit [Remote host closed the connection]
<ldlework>
the hm-switch command expects that your home.nix is at /nixcfg/hosts/${hostname}/home.nix
Lears has joined #nixos
<ldlework>
where hostname = config.networking.hostName;
<siraben>
So what's the philosophy with regards to nix configuration?
<siraben>
Should everything be in /etc/configuration.nix ?
<siraben>
What's home.nix in that case?
jackdk_ has joined #nixos
grumble has quit [Read error: Connection reset by peer]
grumble has joined #nixos
ROKO__ has joined #nixos
<jD91mZM2>
siraben: /etc/configuration.nix is system wide configuration, ~/.config/nixpkgs/home.nix is per-user configuration
<jD91mZM2>
home.nix can be used for example to specify gtk settings instead of using lxappearance
hamishmack has quit [Excess Flood]
viric has quit [Read error: Connection reset by peer]
<jackdk_>
because of https://github.com/NixOS/nix/issues/2393 , I've just bootstrapped a version of nix on my rpi 3, but whenever it tries to download anything I get curl error 35, which is something ssl-related. how do I debug this?
<{^_^}>
nix#2393 (by lopsided98, 14 weeks ago, closed): Hash mismatch with builtins.fetchUrl and .xz file
<jackdk_>
(the version of nix on the arm images is still 2.1, which is why I'm affected by a closed bug)
<Izorkin>
How to add function override to nur package? php56-unit = php56.override { ... }; error - attribute 'override' missing
<eyjhb>
Regarding the substitute patch you proposed, I can see now (I was on mobile before), that it can be done (somewhat easily), but ... The sed on line 47, it somewhat conditional, if another init daemon is used (e.g. upstart).
<eyjhb>
And I do not know, if the patch does NOT apply to the displaylink.sh file (the upstart daemon is upstart, and not systemd -> there fore a different start and stop command), if the patch will fail
<eyjhb>
I have considered just removing installer part, and just copy out the content it actually puts into the files using writetextfile, and then just completely nuke lines 41 to 47...
<eyjhb>
But that is just me, looking at how AUR does it
ROKO__ has left #nixos ["WeeChat 2.4-dev"]
<Mic92>
eyjhb: whatever is easier to maintain. Custom install commands may also miss files, when the package is upgraded.
<Mic92>
the problem with sed is, that it does not catch errors, when the file changes.
<Mic92>
So it might break silently
<{^_^}>
[nixpkgs] @peti pushed 2 commits to haskell-updates: https://git.io/fp9qZ
<Mic92>
but I also just noticed I never use the vanilla diff:
<Mic92>
diff -Naur --strip-trailing-cr
<Mic92>
this was in my zshrc since forever
<eyjhb>
Well, it gives me somewhat the same output, but I enjoy the --strip-trailing-cr ! That is a really nice touch
<eyjhb>
Mic92: I am a little inbetween if I should create a patch for these lines - http://termbin.com/y5tc => replaces /opt/displaylink/udev.sh => with a different path. Because I can see all the stuff around them chaning over time, but the RUN path staying somewhat constant...
<eyjhb>
So would a sed be `OK` there?
<Mic92>
eyjhb: yes. there sed would be ok.
<eyjhb>
Great ;) Putting this together and testing! Does nix sandbox make sense to do in this setup?
<siraben>
Anyone here use NixOS on a Mac?
<Mic92>
eyjhb: if you have 18.09 or newer then you have the sandbox already enabled
Radivarig has joined #nixos
<eyjhb>
Mic92: Building using `sudo nixos-rebuild -I nixpkgs=$HOME/nixpkgs switch`, where nixpkgs is the latest master from github ;)
<eyjhb>
Does substitute all replace relative to $out ?
<siraben>
Well, I'm having issues setting up sleeping and locking
<siraben>
It doesn't lock before sleep or lid close
<Phillemann>
When using nix-shell as a shebang, is it possible to pass arguments to the interpreter (specified by -i)?
juhe has joined #nixos
<eyjhb>
Mic92: still doesn't seem like i patches the files, it should give me a error while trying to substituteall, but I get nothing... :/ Only changed the .patch, and inherit systemd;
<siraben>
I'm using xss-lock to try to handle this
<Laalf>
can someone export steam for me? i cannot download libacl1.deb anywhere
<symphorien>
siraben: use xfce4-power-manager-settings
jackdk_ has quit [Remote host closed the connection]
<eyjhb>
Mic92: I am sooo closing to crying in the corner. Now I just get that it can't find `udev-installer.sh` even though I can see it in the unpackPhase `lr -alR`...
<Mic92>
eyjhb: where I can get this displaylink zip?
<Mic92>
ah there is a link
<betaboon>
gchristensen: regarding nixops#981 is there a place where the discussion about the plugin-api takes place or would it be that PR but not a lot happened lately?
<eyjhb>
Can I change my .patch so that isn't required?
<Mic92>
eyjhb: prepend a/ and b/ before the path
<Mic92>
of the patched file path in the patch.
<eyjhb>
Works! :)
jtojnar has joined #nixos
<Mic92>
eyjhb: I also got yet another checksum then you did. I wonder if we could just mirror the source on archive.org
<Mic92>
instead of using the pesky requireFile
__monty__ has joined #nixos
<clever>
Mic92: did you try fetchpatch?
<eyjhb>
Mic92: yeah, that is because the file you downloaded was properly 4.1.9, while I am using 4.4.24 :) - So that is why, but the patch applies for both versions
<clever>
ah, differing context probably
<eyjhb>
So commit in just 2 secs will work with the downloaded .zip (sorry for not specifying that!)
<{^_^}>
#28279 (by ghost, 1 year ago, closed): displaylink driver has broken source URL
<Mic92>
eyjhb: yes, but this would go away if $someone drops a archive.org link that mirrors the driver.
hamishmack has joined #nixos
feep has quit [Disconnected by services]
<eyjhb>
But does that actually archive .zip files too? And feel free to find, `someone` haha :p
<eyjhb>
I guess it does. Didn't know that
<eyjhb>
I am way to tired Mic92 great catch
spacekookie has quit [Quit: No Ping reply in 90 seconds.]
fendor has quit [Ping timeout: 272 seconds]
<eyjhb>
Mic92: done and tested, works as expected now! :)
<eyjhb>
Is there any way, to install a library with pip, and just have it accessable for the local user? E.g. I need pyserial to work inside vim, for some arduino stuff
<{^_^}>
[nixpkgs] @Mic92 merged pull request #51777 → rtl-sdr: remove linker-fix.patch, unbreak on darwin → https://git.io/fp9qM
<{^_^}>
[nixpkgs] @Mic92 merged pull request #51760 → displaylink: changed systemd start to not block → https://git.io/fpShi
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @eyJhb to master « displaylink: changed systemd start to not block (#51760) »: https://git.io/fp9YR
<Mic92>
*downloadlink
<eyjhb>
Well... The download link for displaylink 4.4.24 works, you just need to accept the ToS :/ Else it works as expected :)
<Mic92>
eyjhb: yes, but release-18.09 still carries the old version
<LnL>
eyjhb: the nix way to do that would be by using python.withPackages, but you can also pip install to a custom location and set PYTHONPATH
orivej has joined #nixos
<eyjhb>
Ahh, yeah... Well, the download link for the old version also still works, and can be installed just fine (4.1.9). - But it would still be awesome to have it in 18.09 :)
dramforever has joined #nixos
<eyjhb>
LnL: Ended up using `pip install --user pyserial`
<ToxicFrog>
time to file another bug against the borgbackup configs
pointfourone has quit [Remote host closed the connection]
pointfourone has joined #nixos
demize has quit [Quit: Do Androids Dream of Electric Sheep?]
demize has joined #nixos
Phillemann has left #nixos ["WeeChat 2.3"]
<fusion809>
Hi, anyone know why I cannot seem to remove certain items from my "Favourites" under KDE. Is this some NixOS-specific setting wherein I have to edit a setting in /etc/nixos/configuration.nix? I can add additional items to the list of favourites, but some items cannot be removed (e.g. Kate).
<{^_^}>
[nixops] @amemni opened pull request #1061 → StrictHostKeyChecking option "accept-new" only works for newer OpenSSH versions thus brakes ssh-tunneling for NixOs 17.0… → https://git.io/fp93u
civodul has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<Laalf>
can someone export steam for me? i cannot download libacl1.deb and libattr1.deb anywhere
<{^_^}>
[nixpkgs] @vcunat pushed 2 commits to staging-18.09: https://git.io/fp9sp
<eyjhb>
Laalf: Was just a quick thought, if the user-agent that home-amanger/nix uses to DL the files is blocked, or something.... Happens sometimes, but ... yeah...
<eyjhb>
Might not be related
vidbina has joined #nixos
<Laalf>
trying with sudo -E results in the same issue
b has joined #nixos
nwspk has quit [Quit: Quit: *.banana *.split]
nwspk has joined #nixos
<{^_^}>
[nixpkgs] @vcunat pushed 13 commits to release-18.09: https://git.io/fp9Zv
<Laalf>
my steam still doesnt install. i also found that pcsx2 doesnt have the default plugins/libaries as far as i can see
<{^_^}>
[nixpkgs] @LnL7 opened pull request #51784 → glu: don't use valgrind on darwin → https://git.io/fp9cn
<meizikyn>
ls
<meizikyn>
oops
<eyjhb>
meizikyn: just seems like a huge waste, to do a overlay, that implements a fix that already exists in master branch....
<meizikyn>
is master not 18.09 ?
<eyjhb>
Isn't it 19.03 ?
<meizikyn>
haven't looked at master in a while, I thought that current stable would have been master
<eyjhb>
Nope, it is 19.03, that is at least what my grub is showing after I have build against master branch on git... :/
<meizikyn>
eh, I either just use "~$ nix-env -if <file>.nix", or if I need a large rebuild, use overlayfs to write over nixpkgs
<meizikyn>
that seems unintuitive :( I'm sorry for the rather unexpected/undesired upgrade
agander has quit [Ping timeout: 268 seconds]
<meizikyn>
does grub give you a roll-back option?
<eyjhb>
meizikyn: but this is somewhat required but stuff in modules/hardware, so that it is not just a package :\
<eyjhb>
Yeah yeah of course :D I just don't want to rollback, as if I do so, my computer will take 2 minutes to boot, because the fix isn't in the stable 18.09
<eyjhb>
Wouldn't be that big of a deal, if it werent becuase virtualbox won't compile on 19.03....
agander has joined #nixos
<tilpner>
Laalf - I started the export. It's probably going to be huge
<tilpner>
Unless you don't need it anymore?
<meizikyn>
ooohh, hmm. If the change is to a nixos module, try to overlayfs on /root/.nix-defexpr/channels/nixos/nixos/modules
detran has quit [Ping timeout: 250 seconds]
<Laalf>
tilpner: i still "need" it. (its a drm for games, so do i really?) but thank you. when importing do i need to have a key of yours?
<eyjhb>
meizikyn: well, I am somewhat new to NixOS, so the change is to a package, but a hardware module in nixos requires that package.. If that makes sense?
<tilpner>
Laalf - That's a better idea, let's do that instead
<meizikyn>
sorry, not really. the module relies on the nix expression itself, or the derivation that gets built?
<Laalf>
tilpner: what? i am kinda new to nix. i didnt think i was suggesting something
<meizikyn>
I would think an overlayfs on nixpkgs and "overwriting" the displaylink/default.nix with required changes would allow it to build. do you get a specific error report
<eyjhb>
meizikyn: haven't done the overlay yet, as there must be a smarter way, than overwriting installphase, patches, unpackphase, version, sha256, etc...
<eyjhb>
=> overlay
<eyjhb>
And I really never have done a overlay before, so I am not the best at writing them
JosW has joined #nixos
<meizikyn>
not like a real nix overlay, but using overlay2/overlayFS to mount over nixpkgs, and dropping in your modified .nix files
<meizikyn>
mount -t overlay overlay /root/.nix-defexpr/nixpkgs lowerdir=/root/.nix-defexpr/nixpkgs,upperdir=/path/to/mod/pkgs,workdir=/path/to/mod
<meizikyn>
its temporary, sure, but I've done this for flashplayer before the newest version hits upstream nixpkgs
<eyjhb>
Hmmm, could do.. Could do..
<{^_^}>
[nixpkgs] @worldofpeace pushed to master « plank: hide launcher in pantheon »: https://git.io/fp9Cn
<meizikyn>
it isn't very elegant, but works for immediate/smaller problems
<eyjhb>
How does NixOS check for new updates in 18.09? Is there equvilant of `apt update`?
<meizikyn>
as root: "~$ nix-channel --update"
<meizikyn>
nix uses "channels" (i.e. copies of /root/.nix-defexpr/nixpkgs), which is a file tree of .nix files that define how package sources are acquired and built
<meizikyn>
it downloads the new "channels" and builds it like a package, and gets placed in /nix/store, it's then linked into /root/.nix-defexpr
<eyjhb>
Hmm... I learn something new each day then :D - I really just ... feel like there must be a cleaner solution........ But I guess not.....
<meizikyn>
there is, real nix overlays xD
<meizikyn>
which are obnixously complicated and not good for "right now" solutions
<eyjhb>
I am close to giving up, and then doing that. I just need a good overlay example, that I can use
<eyjhb>
And I haven't seen that manu...
<eyjhb>
I have been working on that *insert bad word* solution for 3-4 days, I can handle another day :%
<meizikyn>
check out mozilla-nixpkgs
<meizikyn>
its a repo by mozilla on github for nixos, that provides an overlay to get the latest firefox nightly
<meizikyn>
its complicated, but shows the intended usecase (needing modified packages AND modules, when your current tree doesn't yet have them)
<avn>
eyjhb: other option track release-18.09 branch in git.
<meizikyn>
avn:
<eyjhb>
avn: and then overwrite the file? Or what?
<eyjhb>
That would be nice. But I would still need to do some config changes, and I cannot currently see, what that implies
<avn>
eyjhb: if you build system from git branch, then update working copy and rebuild would be enough
<eyjhb>
avn: is there something I can change in my config, so I don't need to speicfy -I nixpkgs=xxxx ?
<eyjhb>
configuration.nix **
<avn>
meizikyn: btw, just mofify work copy and commit would be easy. Then when you rebase it on fresh release branch or master, if you do right things, your commit will be just `consumed` by upstream update.
<avn>
eyjhb: modify your default NIX_PATH variable, or use wrapper script.
simendsjo has joined #nixos
<meizikyn>
In my case the flashplayer mods weren't "right things", as I couldn't be bother to get correct SHA for new source, so I got the source locally and directed "src=" to it on my fs
<nh2>
oldandwise: I suspect a working way would be to override `hardware.bluetooth.package = (overrideBuildToPatchUnitFile pkgs.bluez)`, where `overrideBuildToPatchUnitFile` would be a function you write that patches the bluez-provided systemd unit file so that it contains the flag you want. Does that help?
<oldandwise>
how?
<nh2>
oldandwise: you need to tell me a bit which parts of NixOS and its module system you're already familiar with. Do you mean where you have to put `hardware.bluetooth.package`, or how you can implement `overrideBuildToPatchUnitFile`, or both?
emv has quit [Quit: leaving]
m3lst4d has quit [Ping timeout: 250 seconds]
<oldandwise>
nh2: i know the basics of /etc/nixos/configuration.nix... but very basic only
<nh2>
oldandwise: OK, I'll try to guide you through it
<nh2>
that prints out a path, run `find` on it to see the built package's content. Do you see `etc/systemd/system/bluetooth.service` inside it?
emv has joined #nixos
graphene has quit [Remote host closed the connection]
<oldandwise>
nh2: yes..see it --> /nix/store/0dvqf6657hb60wf96qq1ah7hxkfdllzj-bluez-5.50/etc/systemd/system/bluetooth.service
steshaw has quit [Quit: Connection closed for inactivity]
graphene has joined #nixos
<nh2>
oldandwise: that one has the ExecStart line we want to patch. So what we want to do is to make an overridden `bluez` package, whose path, when built, has the patched file
agander has joined #nixos
<oldandwise>
nh2: yes.. i saw a c/c++ util before getting patch with sed,awk to *nixify* it.. as the term
<{^_^}>
c/c's karma got increased to 1
<{^_^}>
[nixpkgs] @hedning opened pull request #51792 → nixos/tests/i3wm: fix terminal title (test is broken on master) → https://git.io/fp944
<oldandwise>
nh2: need more guidance though.. not familiar
pie__ has quit [Remote host closed the connection]
mkoenig has quit [Ping timeout: 250 seconds]
<eliasp>
what's the correct way to write "foo = [ bar ] ++ mkIf blah.option [ something ];"? this just gives me "error: value is a set while a list was expected, …", while omitting "mkIf" makes it work perfectly fine
<eliasp>
does this mean "mkIf" doesn't simply return the 2nd arg in case the 1st evaluates to "true" but a set instead?
<ottidmes>
eliasp: use lib.optional instead of mkIf
mkoenig has joined #nixos
<eliasp>
ottidmes: will give it a try, thanks!
rawreraw has quit [Ping timeout: 252 seconds]
<eliasp>
…it worked! fantastic! ;)
<ottidmes>
eliasp: mkIf is a feature of the module system of NixOS implemented with Nix, its not part of Nix. If we look at the definition of mkIf we can see why you got the error: mkIf = condition: content: { _type = "if"; inherit condition content; };
<hjulle>
How do I figure out which modules are enabled by default in nixos?
vidbina has quit [Ping timeout: 240 seconds]
<eliasp>
ottidmes: hmm, trying to wrap my head around that… because `_type = "if";`?
<ottidmes>
hjulle: that would depend on what you mean exactly with enabled modules, if you mean modules with an enable option that are set to true by default, that might be answerable, but there are many different conditions being used across modules to determine whether they are enabled, or what parts of it, so that would be a very difficult to answer question
<hjulle>
ottidmes: The first option would be good enough for me.
<ottidmes>
eliasp: no, because it returns a set, { ... }, so if you say [ ... ] ++ { ... }, then Nix is right in complaining it cannot do so
<ottidmes>
eliasp: and what the set represents, you could check out nixpkgs/lib/modules.nix, but its complicated code, so its probably easier to just remember they are only to be used when assign values to options (i.e. when you define some config attribute)
<eliasp>
ah, right - that made it click for me - got it! :)
rawreraw has joined #nixos
<ottidmes>
config.some.attributes.name = mkIf/mkForce/mkDefault/etc. ...value...; that makes sense, but to use it anywhere inside of ...value..., it will not behave like you expect
alex`` has quit [Read error: Connection reset by peer]
acarrico has quit [Ping timeout: 245 seconds]
<jw358>
how should one write a executable nix shell script that exits upon completion
<jw358>
other than using `#! nix-shell --run 'exit'`
justanotheruser has quit [Ping timeout: 250 seconds]
<eliasp>
ottidmes: well, in this case I'm doing so… trying to extend the networkmanager module's `networking.networkmanager.packages` attr… current state of what I'm doing: https://paste.pound-python.org/show/YPHo3C24mhmu0BPEAD0m/
<ottidmes>
jw358: seems like you are using it for a wrong use case, could you eloborate the example? You probably want nix-build/nix-instantiate instead, but that would depend upon your use case
thc202 has quit [Ping timeout: 272 seconds]
<eliasp>
ottidmes: "mkIf" was already used there and then just worked as expected - returning a set to `networking,networkmanager.packages`, which is expected to be a set... so I should rather make my expression there return a set of both lists' results
<jw358>
ottidmes: i want to run a derivation for a shell that has preshell hooks
<jw358>
*shell hooks
palo2 has quit [Quit: WeeChat 2.2]
<jw358>
i use the shell derivation in addition to using the script
<jw358>
not just one or the other
palo has joined #nixos
<ottidmes>
eliasp: yeah what you are doing now is correct
<nh2>
do we have a bot that can tell people things when they come back into the channel?
<eliasp>
ottidmes: ok, great... so getting closer to making a PR out of this ;)
<ottidmes>
jw358: than I would not know any other way than doing exit, sorry
alex`` has quit [Read error: Connection reset by peer]
<nh2>
,tell
<{^_^}>
nh2: Use `,tell john Remember to do the laundry` to send this to john next time he's talking in this channel
<nh2>
ottidmes: thanks!
<nh2>
,tell oldandwise Sorry, I had to step out of a moment. This is how to patch the bluetoothd derivation: https://gist.github.com/nh2/94049ce3d3cc8ab82a814ded9f7b5277 You can bind it to a variable and use that in `hardware.bluetooth.package`
<{^_^}>
nh2: I'll pass that on to oldandwise
sysadmin_wannabe has left #nixos ["Cya soon"]
graphene has quit [Remote host closed the connection]
justanotheruser has joined #nixos
jD91mZM2 has quit [Quit: WeeChat 2.2]
graphene has joined #nixos
<ottidmes>
hjulle: had to think of a way to get the info, but I think I have some hacky way to get your answer, let me try it
alex`` has joined #nixos
<hjulle>
ottidmes: Thanks!
emv has quit [Quit: leaving]
alex`` has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @yegortimoshenko merged pull request #51792 → nixos/tests/i3wm: fix terminal title (test is broken on master) → https://git.io/fp944
<{^_^}>
[nixpkgs] @yegortimoshenko pushed 3 commits to master: https://git.io/fp90S
acarrico has joined #nixos
jomik has joined #nixos
<Baughn>
Well, disabling hardening definitely fixed it. Or is that 'fixed' it?
<Baughn>
Sigh.
<jomik>
Hey guys, minor issue here. I have just set up NixOS because my Arch install just died due to a half-done system update :D I have the bare-bones configuration.nix that is generated by nixos-generate-config. I have added firefox to the systemPackages, I can launch firefox, by running it from a shell, however KDE does not seem to find the .desktop file. Any ideas how I can fix this?
<__monty__>
I bet arch mishaps are our greatest source of new users : )
<samueldr>
jomik: am I right in assuming you did not logout/reboot since adding firefox to systemPackages?
<samueldr>
(if so, it is a known annoyance being worked on)
<samueldr>
(and there's possibly a workaround, looking for it)
<eliasp>
manually running `kbuildsycoca5 --noincremental` as your KDE user might help
<samueldr>
exactly (though not sure about the need for --noincremental)
<samueldr>
(don't know what it does, I am not a KDE user)
<jomik>
samueldr: I did actually log out and log in again. I am just rebooting now... And, that didn't resolve the issue either.
<samueldr>
ah, shouldn't need to
<jomik>
kbuildsycoca5 helped.
<samueldr>
since you're a new user, just checking: you did nixos-rebuild switch?
<samueldr>
oh, you probably did :)
<jomik>
I did. I am a returning user :)
agander_ has joined #nixos
<samueldr>
ah, then welcome back
hakujin has joined #nixos
<jomik>
University used a lot of weird packages that were not present for Nix, and configuring them to work with Nix was a bit of an annoyance. So, I switched to Arch. Now that the bachelor is done and I am just doing my master's. I wanted to try again :P
<jomik>
At least I could recover from the arch mishap... Just, would have to reinstall arch to get the packages to working again - some of them still gave off errors. Managed to recover my files :D
Mr_Keyser_Soze has joined #nixos
<jomik>
eliasp, samueldr thank you :)
agander has quit [Ping timeout: 246 seconds]
<eyjhb>
Why does all the NixOS FDE have to be with UEFI.....
cyounkins has quit [Read error: Connection reset by peer]
cyounkins has joined #nixos
<jomik>
Curious; this may be mentioned somewhere. When we install something, it happens from a channel, I assume it reflects this branch https://github.com/NixOS/nixpkgs/tree/release-18.09 . What if I want to add and use my own repository? Should that only be done by forking/cloning nixpkgs and then installing from a local folder?
<infinisil>
,libraries = Don't install libraries through nix-env or systemPackages, use nix-shell instead. See https://nixos.wiki/wiki/FAQ/Libraries for details.
<{^_^}>
libraries defined
jomik_ has joined #nixos
<jomik_>
:( KDE doesn't seem to accept `services.xserver.libinput.naturalScrolling = true;` :(
<{^_^}>
[nixpkgs] @andir pushed 2 commits to release-18.09: https://git.io/fp9gY
ensyde has joined #nixos
<infinisil>
jomik_: Define "accept"
<rhalff>
infinisil, thanks, works great.
<jomik_>
I don't get natural scrolling in KDE. It is the setting they call "Reverse Scrolling". Tho, enabling it in KDE does work..
<infinisil>
So it's a bug in nixos? If so you can open an issue to track it
<samueldr>
haven't checked the module's implementation, but it may be as simple as KDE always sets the setting
jomik__ has joined #nixos
jomik_ has quit [Ping timeout: 256 seconds]
<eyjhb>
Currently running `nixos-install`, and getting "You have a memory leak (not released memory pool) as a error....
<eyjhb>
Any clue why? Doing it on a encrypted volume
<samueldr>
AFAIK this is a warning from LVM or something close, which shouldn't be an issue in the end
sir_guy_carleton has joined #nixos
<eyjhb>
samueldr: Well... On my third install, and still no boot
<eyjhb>
Can't seem to find the right guide for this.. Had it working once before
<samueldr>
this is something many other distros face if you search this online, always close to something grub or something lvm (and I think the reason it's close to grub is since it supports lvm)
<samueldr>
eyjhb: I'd bet this is not the issue, let's look at your setup
<samueldr>
eyjhb: can you share a short overview of what you're trying, what you tried and what seems to be at issue?
<eyjhb>
Without the WPA, and only adding the efisupport and boot.initrd.luks.devices .. aaand I just get a PC that won't boot
<eyjhb>
No errors what so ever or prompts
<eyjhb>
Seems like the same issue I have seen previously, but that was solved by setting the boot flag on the disk.. But apparantly, that is not a option when using gdisk
<samueldr>
>> Without the WPA, and only adding the efisupport and boot.initrd.luks.devices
<samueldr>
what do you mean by "only adding the efisupport"?
goibhniu has joined #nixos
<eyjhb>
`boot.loader.*` added from the configuration file with `boot.initrd.*`
<eyjhb>
I might be creating the partitions wrong using gdisk.. That is my initial thought..
<samueldr>
recently it's been known that _f_disk has changed some commands breaking our previous installation instructions; no idea if gdisk also changed some commands
<{^_^}>
[nixpkgs] @bachp opened pull request #51796 → dsview: init at 0.99 → https://git.io/fp9g1
<samueldr>
but the fdisk commands changing caused errors during the commands
<eyjhb>
fdisk commands worked fine when I used them last time
<eyjhb>
But now that I want to have FDE, all guides only use gdisk...
<eyjhb>
And EFI
<samueldr>
I mean, the example commands our installation guide recommended wouldn't work anymore :/
<eyjhb>
*last time => one week ago*
<samueldr>
if mounting the partitions work in the installer, I'm confident the partitioning instructions you followed were right
<samueldr>
when you're using the installer image, are you booting it as UEFI or as Legacy?
<eyjhb>
IT works mounting, but that doesn't help me, when it doesn't even try to boot it
<eyjhb>
Legacy I would guess
<eyjhb>
It is set to do both
<eyjhb>
*try legacy first*
<samueldr>
it would be an issue; AFAIK if it's booting legacy, it won't be able to manipulate the EFI variables to setup boot
<eyjhb>
Why does EFI suck sooo bad.... -> enabled booting UEFI now
sir_guy_carleton has quit [Quit: WeeChat 2.2]
<eliasp>
EFI takes a bit to getting used to, but I wouldn't want to miss it anymore (handling wise)
<toppler>
I've been using nix for haskell packaging exclusively for a while now, and missed out on this "new-build" stuff. It looks really cool, assuming I understand it. Are there any proposals for getting the same flexibility entirely in nix?
sir_guy_carleton has joined #nixos
<eyjhb>
eliasp: does it actually add anything usefull for you? :)
jomik__ has quit [Quit: Page closed]
Mr_Keyser_Soze has quit [Quit: Leaving]
<eliasp>
eyjhb: yes: not having to fiddle with a bootloader anymore - it simply works ;)
<samueldr>
can't do Legacy MBR boot on AArch64
Mr_Keyser_Soze has joined #nixos
<samueldr>
:3
<{^_^}>
[nixpkgs] @ottidmes opened pull request #51797 → allow extending lib with an overlay → https://git.io/fp9gb
<eliasp>
also having a proper interface to the bootloader (e.g. through bootctl) is the cherry on the cake
<samueldr>
UEFI isn't comparable entirely to Legacy boot, Legacy boot is *really* sucklessish, with the same kind of drawbacks
detran has joined #nixos
<samueldr>
(or advantages)
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<samueldr>
on platforms which don't have a locked-down-and-signed UEFI, it's entirely plausible to have the firmware of the machine do more complex things, e.g. read an ext4-formatted ESP, by adding the drivers to the firmware
<eyjhb>
I still hate it with my whole heart.. Because it never works for me
<jomik>
infinisil, samueldr: Sorry, didn't see that you replied because I decided to reboot my computer :P I was looking at the kde module, but it is rather large and I am not into the swing of things - I suppose I can open an issue and some clever person will say if it is a bug or not... :D
aleph- has quit [Ping timeout: 250 seconds]
epicmetal has joined #nixos
<infinisil>
jomik: That's alright too :) I'm not experienced with kde at all myself
<{^_^}>
[nixpkgs] @flokli pushed 2 commits to release-18.09: https://git.io/fp9aV
hamishmack has joined #nixos
<__monty__>
How can I pass options to the interpreter I want to use with #! nix-shell?
tmplt has joined #nixos
Mr_Keyser_Soze has joined #nixos
<ottidmes>
__monty__: is that not just described on the man page, or do you mean something else?
<hyper_ch>
how can I package a single perl script into a nix package? writescriptbin seems not to be an option because (a) the script is located remotely (b) I need to change a few things
<ottidmes>
hyper_ch: like any derivation I suppose, the remote script as a src, and patches/patchPhase to fix it?
<hyper_ch>
ottidmes: the problem that they all want to unpack it and since it's just a script, it can't be unpacked
<__monty__>
I'm using nix-shell -i runghc currently. I want to pass options to runghc but nix-shell thinks they're meant for it.
<__monty__>
I actually want to go a step further now and use `env GHCRTS=... runghc` as the interpreter. Since +RTS ... -RTS won't work with runghc.
<ottidmes>
hyper_ch: overwrite the unpackPhase?
<ottidmes>
hyper_ch: or just specify the phases you are interested in
<__monty__>
ottidmes: Looks like it might work. I expected nix-shell -i had superceded that though : /
vk3wtf has joined #nixos
<ottidmes>
hyper_ch: interesting question, never ran into it before, I tried just setting unpackPhase = ""; and unpackCmd = ""; but neither worked
halfbit has quit [Ping timeout: 252 seconds]
<hyper_ch>
ottidmes: yeah, same here.... I need to replace parts of the script to make it agnostic - so writescriptbin is not what I can use....
<hyper_ch>
I also tried unpackPhase = false; didn't like that either
juhe has left #nixos ["Leaving."]
<hyper_ch>
it's a very special problem.... or does writescriptbin has ways to get the source from remote and alter it before it's actually written to file?
<ottidmes>
hyper_ch: phases = [ "installPhase" ]; this works
<hyper_ch>
ottidmes: awesome, thanks :)
<joepie91>
what's the easiest way to package a Python application in an overlay? the nixpkgs manual seems very specific to libraries
<ottidmes>
you get other errors, but those are unrelated to the question at hand
<hyper_ch>
ottidmes: I know :) I was just trying to write an expression and got stuck on that first
simukis has quit [Quit: simukis]
<hyper_ch>
now, when I get back from my vacation, I can work on it again :)
<symphorien>
hyper_ch: the right way is unpackPhase = ":";
<hyper_ch>
symphorien: why that and not phases = [ "unpackPhase" ]; ?
<symphorien>
also with phases = [ "installPhase" ]; you lose the phase with patchShebang
<symphorien>
add perl in buildInputs and the fixupPhase will fix the shebang for you automatically
<hyper_ch>
symphorien: can't you just add patchshebang also to the phases?
<symphorien>
there are many such niceties, you can't think of all of them
<ottidmes>
symphorien: cool, so it checks for being empty, kinda makes sense
<symphorien>
so in fact, make unpackPhase a noop and be done with it
<hyper_ch>
thx symphorien and ottidmes
jackdk has quit [Remote host closed the connection]
<hyper_ch>
symphorien: why use ":" and not ";" ?
<symphorien>
you can use "true" if you prefer
<symphorien>
: is a bash keyword specifically designed to be a noop
<hyper_ch>
thanks
<symphorien>
so it kinda makes sense, but you don't have to use it
<ottidmes>
joepie91: maybe ldlework can help you, he seems to do a lot of Python and is using Nix to package some
m0rphism has joined #nixos
marusich has quit [Quit: Leaving]
gfv has joined #nixos
silver has quit [Quit: rakede]
<gfv>
Cheers! Nixpkgs commit 162914742327002d49bd1dde424d399842ff7b5f has introduced a regression, and openjdk-11 would not build on amd64 platforms with the 'minimal' option, because optional configure flags would interpolate into "--with-jvm-features=zgc--enable-headless-only". What's the proper way to fix this on my local system (I know it's a matter of a \n, but what's the proper way to modify my local
<gfv>
nixpkgs?), and how do I fix the nixpkgs to make sure nobody else gets bitten by this?
<gfv>
I mean that's what I get for trying the unstable channel, right? :)
jackdk has joined #nixos
hedning has quit [Quit: hedning]
<flokli>
gfv: basically, you file a PR against the nixpkgs repo, adding a whitespace after zgc\" . To fix it locally, you could would need to use overrideAttrs to override preConfigure with the fixed variant
<makefu>
gfv: there are a couple of ways to handle it. first thing would be to open a PR and ask here to get a review to speed up the PR process. in the meantime until it arrived in the binary cache you can either clone nixpkgs on your own system and set the NIX_PATH=nixpkgs=/path/to/your/checkout where you fixed the code or you could use overrideDerivation
<makefu>
flokli was faster
<flokli>
:-)
<{^_^}>
[nixpkgs] @Mic92 opened pull request #51802 → perl: perl-cross archive to fix perl build → https://git.io/fp9w9
<{^_^}>
[nixpkgs] @eliasp opened pull request #51803 → networkmanager: allow `iwd` as Wi-Fi backend → https://git.io/fp9wd
* bgamari
is trying to set nixpkgs.localSystem to override kernelTarget
<bgamari>
but it seems to make no difference whatsoever
vk3wtf has joined #nixos
epicmetal has quit [Quit: epicmetal]
hakujin has quit [Ping timeout: 244 seconds]
epicmetal has joined #nixos
<samueldr>
I don't really know how those platform things work, but I probably need to for something; can you share notes when you solve this bgamari?
<bgamari>
sure
<samueldr>
(I remember having issues with kernel builds for mobile-nixos which I just avoided by doing dirty things in the derivation)
<bgamari>
I'll likely just throw the whole configuration in a repo
<samueldr>
(related to kernelTarget)
Mr_Keyser_Soze has quit [Ping timeout: 240 seconds]
betaboon has quit [Quit: WeeChat 2.2]
rprije has joined #nixos
<gfv>
is there a proper way to build packages on-demand on a remote server? I have a pocket calculator-grade cpu in my laptop, and I'd much prefer if packages not yet in binary caches were built on my desktop
epicmetal has quit [Quit: epicmetal]
epicmetal has joined #nixos
<ivan>
why would nix-shell oddly decide to build everything even though I have working substituters configured?