justanotheruser has quit [Ping timeout: 246 seconds]
klntsky has quit [Ping timeout: 256 seconds]
sc_ has quit [Ping timeout: 252 seconds]
lejonet has quit [Ping timeout: 252 seconds]
gspia has quit [Ping timeout: 252 seconds]
techtangents has joined #nixos
talyz has quit [Ping timeout: 252 seconds]
<techtangents>
Hi, I get an error like "invalid character '@' in name 'account-manager@2'" whenever I run nix-shell from a folder containing an "@" symbol.
<techtangents>
My shell.nix file has a "src = ./.;" in it. Do I need to escape this or something? Or will Nix just not handle the @ in the folder name?
FireFly has quit [Quit: Goodbye]
FireFly has joined #nixos
MarkRBM has joined #nixos
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
stepcut has quit [Remote host closed the connection]
bgamari has joined #nixos
lejonet has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andreabedini has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sbdchd has joined #nixos
<fzer0>
hello everyone. I am fairly new to NixOS and am wanting to install Julia, but the version in Stable is really old. I noticed that Julia 1.0 is making it's way through unstable. How can I tell if it is included in teh unstable channel?
ryanartecona has quit [Quit: ryanartecona]
sbdchd has quit [Ping timeout: 245 seconds]
justanotheruser has joined #nixos
silver has quit [Read error: Connection reset by peer]
<CMCDragonkai>
I find the concept of `fetchGitPrivate` to be overly complicated and dangerous. What would be ideal is that during a `nix-build`, the user can grant a "capability"/authorisation to the build for that s
<gchristensen>
yeah, don't use fetchGitPRivate use builtins.fetchgit, CMCDragonkai
<CMCDragonkai>
I find the concept of `fetchGitPrivate` to be overly complicated and dangerous. What would be ideal is that during a `nix-build`, the user can grant a "capability"/authorisation to the build for that specific build to access via SSH or some other credential to some secret stuff.
<gchristensen>
builtins.fetchgit runs at evalation time, not build time
<CMCDragonkai>
I see that here: > builtins.fetchGit allows Git repositories to be fetched at evaluation time. Thus it differs from the fetchgit function in Nixpkgs, which fetches at build time and cannot be used to fetch Nix expressions during evaluation. A typical use case is to import external NixOS modules from your configuration, e.g.
<CMCDragonkai>
But that documentation needs to flesh out how this is directly usable for fetching secret dependencies.
<ldlework>
huh
<gchristensen>
"Example 15.2. Fetching a private repository over SSH"
<gchristensen>
that isn't sufficient?
<CMCDragonkai>
That example doesn't explain how it actually works.
<gchristensen>
ah.
<CMCDragonkai>
As in, if one googles "private git/ dependencies in Nix"
<gchristensen>
ie, the part about it running git as your user, inside nix-build?
<CMCDragonkai>
there's tons of info about the old stuff
<gchristensen>
yes
<CMCDragonkai>
But the point is that by running at evaluation time, it is able to run git as your current user (thus inheriting the ambient authority of yourself), but also (and very importantly) it doesn't run in a mount namespace which means it is able to read ~/.ssh...
<gchristensen>
2.0 has only been stable for 7mo, the old way existed for many years
<CMCDragonkai>
My configuration.nix ensures that builds run in an isolated mount namespace, so it even it had the ability to read my ~/.ssh, it can't simply because that directory isn't even mounted into the namespace.
<gchristensen>
I mean
stepcut has joined #nixos
<gchristensen>
hm
stepcut has quit [Read error: Connection reset by peer]
<gchristensen>
yeah
<gchristensen>
maybe you could send a PR adding some docs about this? that would be really helpful
<CMCDragonkai>
I want to create an issue discussing this problem in more general terms first though.
stepcut has joined #nixos
<gchristensen>
sure
<gchristensen>
btw you can disable the feature using allowed-uris and --pure
Dedalo has joined #nixos
jrolfs has joined #nixos
<CMCDragonkai>
Is there some reasoning for many `pkgs.fetch*` vs a few `builtins.fetch*`?
lassulus_ has joined #nixos
<gchristensen>
builtins are expensive and are complicated to build and support
sigmundv has quit [Ping timeout: 252 seconds]
<gchristensen>
and sssslllooowwwww to change
jrolfs has quit [Ping timeout: 252 seconds]
lassulus has quit [Ping timeout: 272 seconds]
lassulus_ is now known as lassulus
<CMCDragonkai>
Yea, but now we're special casing Git.
<gchristensen>
sure
<gchristensen>
you can make your own eval-time fetchers with builtins.exec, but you have to explicitly turn on support for that
justanotheruser has quit [Ping timeout: 245 seconds]
worldofpeace has joined #nixos
kiloreux has joined #nixos
<rotaerk>
why is it that when I run `nixos-rebuild switch --upgrade`, I get: error: nix-repl has been removed because it's not maintained anymore, use `nix repl` instead.
<rotaerk>
and if I'm getting this, how the heck do I upgrade
<worldofpeace>
rotaerk: just remove `nix-repl` from your config. The nix 2 replacement is `nix repl`
justanotheruser has joined #nixos
<rotaerk>
oh, forgot it was there heh
oscarvarto has quit [Quit: Leaving]
<elvishjerricco>
gchristensen: Ping pong :P I was going to ask if you were aware that the `--daemon` installer doesn't work in a docker container.
<techtangents>
Is nixos 18.09 considered stable / production-ready?
delores has joined #nixos
<delores>
I'm trying to get NixOS to launch from libreboot, but from what I understand the kernel that would usually be /boot/vmlinuz is actually stored in /nix/store. Is there a standard way to get a grub config to boot into NixOS without locating the store location each upgrade?
<delores>
Very new to NixOS so I could have got that terminology completely wrong
PyroLagus has quit [Ping timeout: 252 seconds]
<delores>
I suppose the best solution would be to have GRUB on the NixOS install, then boot into that GRUB install from libreboot's GRUB.
<elvishjerricco>
delores: I thought NixOS copied the kernel to somewhere in `/boot`? Otherwise it couldn't boot with encrypted root drives
<elvishjerricco>
techtangents: 18.09's branch was just cut like this week. I think it'll be in beta for a little while
ivan has quit [Remote host closed the connection]
<MarkRBM>
when using the method described in 18.1.2 of the nixos manual to install emacs packages I cant seem to add dired, it says 'undefined variable dired at .....' I have tried to get it from melpaStable, melpa and elpa with the same results.. I also have the same problem with flycheck, evil mode and org mode'
<MarkRBM>
any ideas?
ivan has joined #nixos
Asmadeus has quit [Ping timeout: 244 seconds]
Asmadeus has joined #nixos
PyroLagus_ has joined #nixos
sbdchd has joined #nixos
<ldlework>
I have been thinking; is there anything stopping me from using conditions with my `src' paths for derivations?
<ldlework>
like does it make sense to do some if statement that checks if i have a source package locally in ~/src/ and using it if so, and if not, falling back to a git fetch?
tertl3 has quit [Quit: Connection closed for inactivity]
<delores>
elvishjerricco: It doesn't appear to be in the /boot of my LVM's root partition.
<delores>
Although the directory is blank, so I could just be not decrypting it fully
<elvishjerricco>
delores: Oh, actually I think mine is that way because I use systemd-boot and EFI. No idea how it works in other scenarios. I would have thought it needed a kernel to mount encrypted drives and whatnot though
<delores>
I'll try a reinstall giving NixOS its own grub this time, and then chainloading that.
Ridout has quit [Quit: Lost terminal]
trevthedev has quit [Ping timeout: 245 seconds]
trevthedev has joined #nixos
trevthedev has quit [Changing host]
trevthedev has joined #nixos
blankhart has joined #nixos
<{^_^}>
[nixpkgs] @ju1m opened pull request #46131 → shorewall: init at 5.2.0.5 → https://git.io/fAE88
worldofpeace has joined #nixos
jtojnar has quit [Remote host closed the connection]
jperras has quit [Quit: WeeChat 2.2]
nikivi has joined #nixos
Dedalo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<delores>
Huh, didn't work either. All the resources for GRUB on NixOS seem to assume you're booting into it first, not trying to boot into it from another install.
<adamantium>
Do you guys think it's a bad idea to dd zeros to multiple disks simultaneously?
klntsky has quit [Ping timeout: 256 seconds]
revtintin has joined #nixos
klntsky has joined #nixos
mayhewluke has quit [Ping timeout: 240 seconds]
mayhewluke has joined #nixos
<rotaerk>
trying to setup a shell.nix for haskell development: https://ptpb.pw/Shn- However, when I run this nix-shell, and then I do a 'cabal new-build' on my project (for which I have 'bindings-GLFW' setup as a dependency), I get an error saying it can't find libGL.so
<rotaerk>
did I do something wrong with that shell.nix?
jackdk has joined #nixos
<rotaerk>
it's failing when building bindings-GLFW
<rotaerk>
(note, I'm attempting to use cabal to resolve all my haskell dependencies, and using haskellPackages just for GHC, cabal, ghcid, etc)
andreabedini has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Fare>
Something makes my NUC unstable with 18.03
<Fare>
as in, crashes once in a while
ryanartecona has quit [Quit: ryanartecona]
sbdchd has quit [Remote host closed the connection]
fyber has joined #nixos
<fyber>
How is package support in NixOS? As in, are things usually all the way up to date (Arch-style) or safe (Debian-style)? Are things generally maintained well?
<fyber>
Just want to hear general thoughts on the ecosystem.
contrapumpkin has quit [Ping timeout: 272 seconds]
<etu>
fyber: On unstable packages are generally up to date. Not as quick as on Arch. Check this site out: https://repology.org/
<jackdk>
I'd say the versions in nixpkgs unstable keep up pretty well, and you might have to package some things off the beaten path (e.g., I had to package a CD-ripper I wanted). The stable channels move more slowly, but not as slow as debian.
<jackdk>
in terms of writing packages, I'd say it's easier than .deb, probably harder than PKGBUILD or ebuild. (mostly due to learning nix-the-langage and working out where all the helper functions are and what they do)
<rotaerk>
however, I've found if I manually add, say, <libGL path>/lib to the LD_LIBRARY_PATH, it resolves my build error ... so I need to get all those libraries that I specified in buildInputs ... added to LD_LIBRARY_PATH
drp has quit [Remote host closed the connection]
blankhart has quit [Quit: WeeChat 1.9.1]
orivej_ has quit [Ping timeout: 272 seconds]
Ariakenom has joined #nixos
hxrts_ has joined #nixos
owickstrom has joined #nixos
Ariakenom has quit [Client Quit]
wdanilo has joined #nixos
<wdanilo>
Hi guys! I'm trying to install nix on macos without root access. I started with installing nix globally (I'll switch to Proot after this will be successful) and then trying to create local store `nix run --store ~/my-nix nixpkgs.nix nixpkgs.bashInteractive`. The error I get is `error: reading symbolic link '/proc/self/exe': No such file or directory` . I
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wchresta has quit [Remote host closed the connection]
wchresta has joined #nixos
MarkRBM has quit [Remote host closed the connection]
<v0latil3_>
Is the best way to make and test new nixpkgs to clone the whole repo? and then I can add the local repo to my channels to use with nixos-rebuild or something?
<v0latil3_>
Last time I tried I got confused by the guides
civodul has joined #nixos
<rauno>
Any idea why i dont have permissions to create directory under var/lib in my module/package definition?
georges-duperon has joined #nixos
<v0latil3_>
are you building the package as root
<teto>
v0latil3_: this is definitely the best way IMO. I found the nix-channels thing clunky so I removed all those
<clever>
rauno: can you gist the nix file that is trying to create that dir?
<rauno>
clever, trying to do it in package installPhase, prolly wrong place ?
<clever>
rauno: yeah, that build will never have root and cant write to /var
<clever>
rauno: thats a job for the prestart on the module, not the package
<v0latil3_>
teto, did you mean to link me something?
<teto>
v0latil3_: just encouraging you in cloning nixpkgs
<v0latil3_>
Oh what did you mean you removed all your nix channels though?
<rauno>
celever, under prestart u mean module service preStart ?
<clever>
rauno: yep
knupfer has joined #nixos
<v0latil3_>
teto, meant to mention you on that ^
<rauno>
also, when defining a service, are the preStart and serviceConfig ExecStartPre aliases?
<teto>
v0latil3_: i generate my own NIX_PATH via nix.nixPath with nixos-unstable=https://github.com/nixos/nixpkgs-channels/archive/nixos-unstable.tar.gz and depending on if some folders exist, I add them too lib.optionals (builtins.pathExists userNixpkgs) [ "nixpkgs=${builtins.toString userNixpkgs}" ]
<clever>
rauno: preStart is a multi-line string, that gets added into a shell script for you
<clever>
rauno: ExecStartPre must be an absolute path to a single command
<clever>
behind the scenes, preStart will set ExecStartPre for you, pointing it to the auto-generated bash script
<v0latil3_>
teto, does that work with service definitions and stuff too? If you could share the relevant lines of your config it would help me a lot. I'm pretty noobish with nix.
<rauno>
woh, got something new shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rprije has quit [Ping timeout: 272 seconds]
<rauno>
seems like i have broken something in my nixos :|
rprije has joined #nixos
<rauno>
ah, nvm
tzemanovic has quit []
<teto>
v0latil3_: if you just want to add packages, you can use overlays, if you want deeper modifications, cloning nixpkgs is the way to go
knupfer has quit [Ping timeout: 240 seconds]
<adamantium>
Hi, my system as is doesn't work on a fresh bootstrap testing in vm, pukes on home.nix that uses home-manager https://pastebin.com/raw/YA8Y9e4g . What should I look for?
<adamantium>
Strangely, home.nix and nixos-switch work fine on this other system that is already installed.
<teto>
v0latil3_: my dotfiles might not be the easiest to start with as I share configs between several machines. To edit configuration.nix as a simple user, I put it into my HOME. Then as I added machines, I found boring to use symlinks and now I just set the good configuration.nix on the command line via sudo nixos-rebuild -I nixos-config=/home/teto/configuration-xps.nix switch for instance
<v0latil3_>
teto, yours is pretty specialized but it's actually the most helpful configs i've seen since you do so many weird things on it
<v0latil3_>
that is something i've had to do on so many machines on other OSs. I didn't know you could do it like that in nix
<teto>
yep that's a great line :)
<v0latil3_>
seems like there should be a way to just send the terminfo automatiically on an ssh connection. wonder why it doesn't work that way
<adamantium>
clever: here's what i know, my entire home.nix file is guarded by a "mine.home.enable = true;" which works fine as is on my current system, but when bootstrapping, even with the line commented, home.nix still causes it to bail out. Now when I completely "rm home.nix" from the equation, it isn't processed via recimport and it begins building.
sigmundv__ has quit [Remote host closed the connection]
<clever>
adamantium: i dont think the problem is to do with home-manger, but just fetchTarball
<adamantium>
interesting
<adamantium>
mind taking a peek at my home.nix make sure i don't have a noob mistake?
<clever>
adamantium: you may be able to solve it by switching to `(import <nixpkgs> { config={}; overlays=[]; }).fetchFromGitHub`
<teto>
v0latil3_: not sure why, might be possible to remove it. that part is a bit clunky
<adamantium>
clever: will try it now and let you know
Mr_Keyser_Soze99 has quit [Ping timeout: 244 seconds]
<v0latil3_>
I also don't get nix function precedence/associativity (i forget the term from classes i've taken) but why is that line not more like "(removeAttrs (import file) [ "config" ];"
<v0latil3_>
something like haskell syntax is a little more intuitive to me
graphene has quit [Remote host closed the connection]
<adamantium>
clever: uh, btw, not that you need this, but, the themelios script is 100x better, if interested.
<adamantium>
I want to have solid beadm integration next, I'm talking, on par with FreeBSD as much as possible. Combined with nix grub menu integration, we could have the best beadm / grub menu in all of linux.
<adamantium>
but we need solid beadm integration next.
<adamantium>
it could be perfect.
<clever>
adamantium: i also recently found another trick with nix copy
<clever>
adamantium: after mounting everything under /mnt as normal, you can build the nixos on another box (possibly even with nixops), and then copy it over ssh, directly into /mnt
<clever>
so you can populate an entirely blank /mnt dir with a nixos build
<adamantium>
mmm
<adamantium>
I think a fresh install via a bootstrap script should still be faster than ssh in general
<v0latil3_>
clever, adamantium u guys better not be making skynet
<adamantium>
but maybe i have not thought of all the benefits
<adamantium>
no no v0latil3_ they are doing that in #Emacs
<clever>
adamantium: main thing i'm thinking of, is that if you create a machine from a base image, 90% of the time, the nixpkgs will differ, and it will have to re-upload the entire closure on the first nixops deploy
logzet has joined #nixos
<adamantium>
I see
blahdodo has quit [Quit: Bye bye]
<clever>
and if your going to upload the entire closure anyways, you might as well have the option of shippimg that base image that wont be of much use
<clever>
if you already have an easy way to boot the target into an installer
<adamantium>
Well clever , I cannot pick your brain right now it's late here, but I need to soon, about the best way to integrate beadm with nix grub
<adamantium>
i have a stanza generator that could be hacked into the mix
<adamantium>
it detects boot environments and generates a stanza that can be >> appeneded to grub.cfg on traditional systems.
<clever>
adamantium: one thing ive done before, was just putting a source statement into the other grub config, to source the nixos grub config
<clever>
if you set boot.loader.grub.device = "nodev";, then nixos will create a grub config file, but not install into any MBR
<clever>
so you can then source it from another grub
<clever>
though, nixos's config will try to load modules built for the nixos grub, which fails
<clever>
so you need to pre-load the "ubuntu" version of those modules, before you source it
<adamantium>
clever: the other issue as usual is grub stage 1 (1.5??) cannot find grub stage2 in /boot/grub when you pivot, so you either need to store /boot/grub outside of the ROOT dataset ||or you need to re-run grub-install every time.
<{^_^}>
[nixpkgs] @vcunat pushed to release-18.09 « Merge #46075: texinfoInteractive: fix for new perl »: https://git.io/fAEaZ
<{^_^}>
[nixpkgs] @CMCDragonkai opened pull request #46136 → makefile2graph: init at 2018-01-03 → https://git.io/fAEa8
<clever>
adamantium: when grub is doing a normal install, it will concat the grub kernel, and the drivers for the /boot FS, to create a stage 1.5
<clever>
for an MBR fs, 1.5 goes between sector 1 and partition 1, in the "unused" space
<clever>
oops, MBR table
<clever>
for a GPT disk with legacy, it will use the dedicated bios boot partition to hold 1.5
<{^_^}>
[nixpkgs] @vcunat merged pull request #46075 → texinfo: fix for the new perl → https://git.io/fARqj
hxrts_ has quit [Ping timeout: 245 seconds]
<adamantium>
right
<clever>
EFI doesnt have a 1.5, since the UEFI firmware provides fs access drivers
<adamantium>
but then has the issue of requiring a fat fs
<adamantium>
and efi partition
<clever>
yeah
<adamantium>
uhg
<adamantium>
gpt and legacy is the best approach to zfs-on-root imo
<adamantium>
I think what i have in my head will work and be pure zfs-on-root, everything except the bios-boot partition, which will just need to get updated via chroot and grubinstall
mayhewluke has quit [Ping timeout: 240 seconds]
<clever>
now that i see how to get gpt to work both ways, i always do a gpt install on every machine, no excuse not to
<adamantium>
the side affect is beadm commands will slow down while grub does grub things.
mayhewluke has joined #nixos
<adamantium>
but hey what is 3-5 seconds ?
<clever>
ive heard of grub slowing down by minutes, because it cant understand the b-tree indexes in zfs
<adamantium>
lol
<clever>
so it has to iterate over every single folder in /nix/store/
<adamantium>
srk: yes in themelios that's what we're doing
<clever>
adamantium: and since its in a list, wrap it with another ()
<clever>
adamantium: oh, and that has to go inside the {} of "${....}/nixos"
<clever>
a let block would make it a bit cleaner and easier to read
<adamantium>
oh wow
<adamantium>
k
wdanilo has joined #nixos
<wdanilo>
Hi guys! I'm trying to install nix on macos without root access. I started with installing nix globally (I'll switch to Proot after this will be successful) and then trying to create local store `nix run --store ~/my-nix nixpkgs.nix nixpkgs.bashInteractive`. The error I get is `error: reading symbolic link '/proc/self/exe': No such file or directory` . I
<wdanilo>
I'd be very thankful for any help here :)
owickstrom has quit [Read error: Connection reset by peer]
grumble has quit [Read error: Connection reset by peer]
ixxie has joined #nixos
<clever>
wdanilo: i dont think proot supports macos, and that /proc path is linux-only
jackdk has quit [Ping timeout: 252 seconds]
grumble has joined #nixos
<adamantium>
clever: i still don't quite follow your instructions, can't even make it past the linter. but i hope i'm close? http://termbin.com/u2rz
<clever>
adamantium: let blocks are always in the form of key=value;, your missing the key
<wdanilo>
clever: oh, so there is no way to install nix on macos without root access?
<adamantium>
ah
<adamantium>
clever: do i name the key anything
<clever>
wdanilo: if you have ownership of an empty /nix directory, it can install without root
Mr_Keyser_Soze99 has quit [Ping timeout: 245 seconds]
* adamantium
takes note
<wdanilo>
clever: I was thinking to use nix as a shared library manager for our product. We allow people to install libraries in our programming language and these libraries can connect to some C shared libs. I wanted to ship nix with our tool in such way that when a particular lib is needed, nix will install it and all the deps. But it should work on any mac, so I cannot assume I've got access to /nix
<v0latil3_>
ah wtf I can't nix-shell "<nixpkgs>" -p python python2.7-pygtk
<clever>
wdanilo: if you build nix without using nix (just ./configure && make), you can ship that nix binary around, and then use --store with it, that may help
ersran9 has joined #nixos
Wizek has joined #nixos
<Wizek>
hello
<adamantium>
clever: error: hash 'hash' has wrong length for hash type 'sha256' (want trace?)
<clever>
,tofu
<{^_^}>
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.
<Wizek>
anyone knows why this fails? ```nix-repl> builtins.typeOf (haskell.packages.ghc822.ghcWithPackages (p: []))``` ```error: infinite recursion encountered, at undefined position```
<clever>
adamantium: the length of the hash must be correct
<adamantium>
clever: oh. heh. still learning. well, i didn't do this to install home-manager before with the other code. Why is that?
georges-duperon has quit [Ping timeout: 250 seconds]
<clever>
adamantium: fetchTarball doesnt need a hash
<adamantium>
oh!!
<adamantium>
Thanks, well how i get the hash for this. browse on github?
<clever>
nix-prefetch-url --unpack
<clever>
nix will also give the url and hash when the dl fails
<adamantium>
hmm dee drrm
<clever>
look at what {^_^} said above
<adamantium>
clever: i did, i see a trust on first use model suggested, but no recommended command. Is there a way to set by default trust on first use?
<adamantium>
clever: i cannot run nix-prefetch-url --unpack because remember this is in /mnt and i'm trying to start it off with nixos-install, chicken egg problem
<clever>
adamantium: you have to manualy look at the error when you first build it, then copy that hash into the nix code, and build it again
<adamantium>
k
winem_ has joined #nixos
rprije has quit [Ping timeout: 240 seconds]
<adamantium>
clever: there is no hash in the trace or the intial error
<clever>
adamantium: can you gist the error?
rprije has joined #nixos
<adamantium>
i dont have a gist, will have to be termbin right now
<adamantium>
yeah we really need that fetchTarball feature, this isn't very turnkey
<ixxie>
clever: 14.6G
<ixxie>
so I would say big enough
<ixxie>
I tried looking if the command accidently wrote a file in /dev but thats not what happened
<clever>
ixxie: what offset was it at when it failed?
<Dezgeg>
what sort of device is 'rsda'?
<ixxie>
Dezgeg: the r prefix is for raw writing as recommended in the nixos manual
goibhniu has joined #nixos
rprije has quit [Ping timeout: 272 seconds]
<clever>
ixxie: `ls -ltrh /dev/ ; df -h ` into a pastebin
<Dezgeg>
I don't see anything like that in my Linux devices
rprije has joined #nixos
<adamantium>
clever: so i used 64 zeros... now, it seems to be just going like i would expect! i was expecting it to fail. Do the zeros just mean to accept any hash?
<ixxie>
Dezgeg: I don't either.... but apparently if you prefix an r to the device name it accelerates the write
domenkozar has quit [Quit: WeeChat 2.0]
<Dezgeg>
no, if you didn't have /dev/rsda existing beforehand you just created a regular file named /dev/rsda
<clever>
adamantium: no, it probably hasnt tried to download homemanager yet
<adamantium>
oh ok
johanot has joined #nixos
<adamantium>
well that's odd because earlier it just failed straight off, i guess "hash" was just invalid nix lang.
<clever>
ixxie: i see no mention of that in the dd man page
<wdanilo>
clever: that's awesome! However, nix libs will have some hardcoded absolute paths to `/nix` right? so i will need some kind of chrooting to make them work?
<wdanilo>
clever: so without proper proot / chroot it is impossible to have nix without privilidged access right ?
Mateon2 has joined #nixos
<adamantium>
clever: build of '/nix/store/qw8mmvd4229vr42cvxixd1i2w7qmyy1c-source.drv' failed so is the hash "qw8mmvd4229vr42cvxixd1i2w7qmyy1c" ?
<wdanilo>
clever: I'm just trying to confirm my fears :(
<clever>
wdanilo: yeah
<clever>
adamantium: yeah, that would be the correct hash
<adamantium>
thanks
<clever>
ixxie: yeah, that looks like a mac only thing
<ixxie>
yeah that is a bit misleading when there is no non-macOS explanation
<clever>
You can use the dd utility to write the image: dd if=path-to-image of=/dev/sdb.
Mateon1 has quit [Ping timeout: 252 seconds]
Mateon2 is now known as Mateon1
<clever>
orivej: that example is for linux
<ixxie>
and if I had to guess, most people come to nixos from some other Linux distro
<ixxie>
cheers clever
<wdanilo>
clever: I'd love to ask you one more thing and would be thankful for any answer here. I want to allow people install libs in our language and they need to have access to c shared libs. We want to provide these libs and their deps so the end-user is not required to take any additional steps
<wdanilo>
clever: we are targettign non programmers, so its impossible to tell them to just mess with their system. So we need to provide all deps and their sub-deps etc. Do u see any way to do it on mac / linux ?
<clever>
wdanilo: for linux, you can use user namespaces to automatically chroot things, nix-user-chroot and nix-bundle do that
<clever>
wdanilo: i dont know of any way to do it on darwin
<clever>
adamantium: you must also supply a valid revision from the git repo
<wdanilo>
clever: Yep, on linux we were thinking about doing it this way, however it seems that `unshare` is not working on **many** recent kernels because of a bug and thus you cannot use nix without root access. But this is a separate problem. Hmm, so there are no ideas for Darwin ?
<clever>
wdanilo: you would need to run otool on the binaries to mutate the search path, and then just ship a lib dir and a binary that looks in the right path
<adamantium>
clever: revision = githu commit hash ? would it be the one from 7 days ago or who knows?
<clever>
wdanilo: thats some haskell code that will automatically copy libs from the nix store and run otool to make things run without nix
<clever>
adamantium: whatever revision you want, previously you used the latest master, so that would work
<wdanilo>
clever: oh thats interesting. I'll look into it. Btw haskell is my primary language, so it will be easy :)
<adamantium>
oh k
<wdanilo>
clever: thanks for pointing it out!
<adamantium>
clever: and that nix package hash, does that change often?
<clever>
wdanilo: that script is using used to ship a .app bundle, which contains haskell binaries that nix had compiled
<clever>
adamantium: the hash is over the source tree, and the tree is fixed for a given git rev
<clever>
so the sha256 only changes if the gitrev changes
Boomerang has joined #nixos
<adamantium>
clever: so that means if home-manager updates, and you want to switch the gitrev to that, then you also probably will have a hash mismatch again
<clever>
adamantium: yeah
<adamantium>
thanks
<clever>
adamantium: id also recomend zero'ing out a few digits of the hash
<clever>
if you supply a wrong hash, that matches an old version, nix wont notice, and will keep using the old version
<ixxie>
clever: its booting fortunately! thanks!
<adamantium>
clever you should have a paid position in here
<adamantium>
Anyway, rock on man. I'm off for the night
<clever>
adamantium: my intimate knowldge of nix in here is what got me a job at iohk.io :P
<adamantium>
solid
winem_ has quit [Ping timeout: 252 seconds]
<{^_^}>
[nixpkgs] @CMCDragonkai opened pull request #46139 → gnaf-loader: init at 2018-08-28 → https://git.io/fAErh
<adamantium>
clever: this is frankly quite crazy all for home-manager. How long do you suppose it may take before this issue would get serious treatment? I have no idea
<clever>
adamantium: not sure
<adamantium>
i think i will build a workaround into themelios for home-manager
<adamantium>
or something.
jb55 has joined #nixos
<joko>
Why do we normally remove the size of /nix/store on garbage collection's --max-freed option?
<clever>
joko: but the problem with this method, is that it will only run once (or twice in this case) per day, and if you consume more then 128gig in that 12 hour period, it can still fail poorly
<clever>
joko: and its going to delete garbage, no matter how little there is, so it may wind up deleting the same 5kb every time, if the machine is very idle
commander has quit [Remote host closed the connection]
<clever>
joko: min-free+max-free will trigger automatically when you hit min-free bytes, and will raise it to max-free, so it doesnt suffer from those 2 problems, though it currently has bugs that can break the eval
<joko>
clever: are these options documented somewhere?
<joko>
(I have searched them, but cannot find them in man nix.conf)
<clever>
ixxie: the above will automatically create a 16gig swap file and activate it
<clever>
ixxie: and if you decide you dont want swap, comment it out, rebuild-switch, then delete the file, and you get your space back
ThatDocsLady has joined #nixos
ilikeheaps has joined #nixos
* adamantium
has had good luck with swap zvols himself
<adamantium>
;)
<srhb>
adamantium: Try using all your ram :)
<adamantium>
of course
<adamantium>
that's what im saying
<srhb>
adamantium: If it happens to work, please tell the zfsonlinux folks which commit actually works, and to add a regression test from there :-P
<adamantium>
oh god
<clever>
my current machine has 32gig of ram, and 32gig of swap, over 4 swap partitions
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @teto to release-18.09 « khal: add zsh completion »: https://git.io/fAE6k
__Sander__ has joined #nixos
<srhb>
adamantium: and when it fails, it fails hard and the next scrub will hopefully be able to correct the errors. :)
<clever>
srhb: yikes
<adamantium>
huh, my big box also has 32gig of ram, but no swap.
<adamantium>
srhb: damn, i have never even found a scrub error before
hxrts_ has joined #nixos
<srhb>
adamantium: I'm not sure exactly how it works, but my setup is a two-way mirror, and every swap test I've done locks up the kernel hard after hitting loadavg 90 or something and the next boot will have errors on the disks.
<adamantium>
did nix get hit by the 0.7.7 regression?
<srhb>
And that's following the instructions for swap-on-zvol from the zfsonlinux wiki.
<adamantium>
srhb: i'd be curious what your swap zvol settings were from
<srhb>
adamantium: Which regression is that again?
<adamantium>
ive only tested zswap on 0.7.6 so maybe its worse here
<srhb>
I'll test your settings.
<adamantium>
o/
<adamantium>
let me know ! i think it will be bad
<adamantium>
so no warranty
<srhb>
I think so too, but heck, what's data integrity among friends.
<tobiasBora>
clever: Ok, so I clarified the issue of yesterday. So now I'm 99% sure that the problem comes from the BI
<joko>
If I add a new machine in nixops, should I perform nixops modify?
<tobiasBora>
*BIOS, that cannot deal properly with two EFI partitions. Indeed, if I use grub to chainload the new .efi, it works, and if I copy the efi to the first EFI partition, it also works. But as soon as I try to point to the second EFI partition, it fails.
<srk>
joko: no need to
<srk>
joko: modify is useful when you need to change initial expressions given at create time
<tobiasBora>
So now, I've 3 options I guess: either I manually install grub on the first partition, and chainload it to the second partition, or I manually copy the .efi everytime I've an update (really not a good idea), or (i think it's the better idea, but not sure if it's possible), I define 2 partitions, one for /boot, and one for /boot/EFI (that would use the first EFI partition, the one that my bios can handle), and
<tobiasBora>
if I'm lucky, the "heavy" part (kernels...) will sit into /boot/ and the not heavy part (.efi) will sit into the main EFI partition. clever: does the 3 option looks good for you?
<tobiasBora>
option 3*
<clever>
tobiasBora: yeah, that sounds right
<srhb>
adamantium: Immediate hard lockup when allocating 17 GiB on a 16 GiB RAM 16 GiB swap setup.
<tobiasBora>
clever: Ok thanks.
lawlesseel has joined #nixos
<adamantium>
drats
<tobiasBora>
Now, the last question I've is: what type should have the /boot: can it be encrypted ZFS (I suppose not, but who knows), ZFS, ext4, or FAT32?
<clever>
tobiasBora: i would go with just plain ext4
<tobiasBora>
clever: Ok thanks. 2Go looks good to you?
<clever>
yeah
<tobiasBora>
ok great thank you very much
<tobiasBora>
I'm just wondering (just for curiosity), if I wanted to be really secure, if my kernel/initramfs is visible to everyone, but not my system partition... is it really more secure than if I just don't encrypt the system partition?
<ixxie>
what filesystem is needed for the boot partition? I followed the instructions in the manual and did mkfs.fat -F 32 -n boot /dev/sda2 but the install complains the filesystem is wrong
<clever>
ixxie: that was the exact error it gave?
<ixxie>
Filesystem "/boot" has wrong type for an EFI System Partition (ESP).
<srhb>
adamantium: I'm curious, have you tried something like stress -m 1 --vm-bytes 1G And then stopping and increasing the vm-bytes until you see watch free dipping into your zvol swap?
<adamantium>
i dont have the zvol swap anymore
<srhb>
Alright.
<adamantium>
i never tried That
<clever>
ixxie: and did you mount it to /mnt/boot/ ?
orivej has quit [Ping timeout: 252 seconds]
<adamantium>
i actually just opened hella firefox tabs and libvirt machines
<adamantium>
and things went okay, usually
<srhb>
:-P
<wdanilo>
clever: btw, is it possible to use nix local store on macos? when trying to execute `nix run --store ~/my-nix nixpkgs.nix nixpkgs.bashInteractive` with a normal nix installation we've got here `error: reading symbolic link '/proc/self/exe': No such file or directory`
<clever>
adamantium: one thing ive noticed, is that qemu tries to allocate several gig at once, and can hard-fail because my laptop lacks enough swap
sb0 has quit [Quit: Leaving]
<clever>
adamantium: but, if you slowly increase the allocations, the zfs ARC shrinks in response, and it works fine
<srhb>
I can get like.. 20MiB into the swap before it dies horribly.
<adamantium>
cool
<wdanilo>
clever: the error is not connected with proot- its nix related, so nix tries to access /proc/self/exe
<ixxie>
clever: I did indeed
<clever>
wdanilo: /proc/self is a linux thing, so something must be broken with the --store based chrooting on darwin
<clever>
ixxie: can you pastebin the output of `mount ; df -h` ?
<wdanilo>
clever: Ok, I wanted to confirm exactly this. So I understand I could report a bug regarding it ?
<clever>
wdanilo: yeah
<wdanilo>
clever: thank you for help!
ielectric has joined #nixos
<tobiasBora>
Hum... I tried to install Firefox, it installed well, but I don't know why I can't see any link to firefox in the KDE Plasma menu, I need to manually open a terminal, and type "firefox"
<clever>
tobiasBora: you usually need to logout and back in for plasma to detect that, it may also need to be in systemPackages
<clever>
tobiasBora: the problem is that plasma doesnt expect things to be under a symlinked directory, and is watching for changes on the wrong thing
<adamantium>
debian probably use a version thats really old and a bit different
<clever>
ixxie: why is sda2 set as a bios boot partition? thats only for legacy
Izorkin has joined #nixos
<ixxie>
aaaah
<clever>
ixxie: sda2 must be set to the EFI system partition type
<ixxie>
oops
<clever>
and the error even mentions ESP
<adamantium>
clever: about that, do you use emacs by chance
<clever>
though the error isnt clear, and claims the fs is wrong
<clever>
adamantium: vim
<adamantium>
argh
<tobiasBora>
clever: Hum I see... Too bad. Is it possible that at some points this will be solved? i guess that the patch shouldn't be that amazing (either on nix side, or on plasma side directly)
sir_guy_carleton has quit [Ping timeout: 272 seconds]
<clever>
tobiasBora: yeah, it should be possible to patch plasma, its just that nobody has bothered yet
<tobiasBora>
clever: ok thank you ;)
<wdanilo>
Btw guys, could anyone explain to me what are these magical libraries that are hear sometimes about which have some paths hardcoded on linux so we need ot have these magical root /nix folders available? Why the libraries are not as moveable as on Windows ?
Dedalo has joined #nixos
<ixxie>
clever: do you happen to remember the fdisk code for efi?
<clever>
ixxie: did you check the list of type codes, near the start?
<clever>
wdanilo: due to the lack of a /usr/lib directory, nix needs the path to put the paths like /nix/store/hash-name/lib into the ELF headers
<ixxie>
I can scroll on that keyboard
<ixxie>
hold on I will do it on this machine
<clever>
ixxie: shift+pageup works in the bare text console
<wdanilo>
clever: and ELF headers are the only thing that's get hardcoded ?
<clever>
wdanilo: yeah, its mainly the rpath field, which has a list of dirs to search for the libs
<clever>
wdanilo: and the exact search path is specific to the versions your using as inputs
logzet has quit [Remote host closed the connection]
<adamantium>
i think its like 8300 or something isnt it
<clever>
1 EFI System C12A7328-F81F-11D2-BA4B-00A0C93EC93B
<clever>
its the very first type in the list :P
<ixxie>
clever: mac keyboard has no visible pgup as far as I can tell
<ixxie>
clever: anyway I found it on my other device
<ixxie>
1
<ixxie>
intuitively
<clever>
also, those numbers are just for the menu in fdisk
colonel_john_by has quit [Quit: WeeChat 2.0]
<clever>
the real type code is C12A7328-F81F-11D2-BA4B-00A0C93EC93B
<ixxie>
thats easy to remember
<ixxie>
I'm sure I will forget 1
<clever>
ixxie: the bios boot partition one is more fun :P
sir_guy_carleton has joined #nixos
<clever>
21686148-6449-6E6F-744E-656564454649 is just the hex for "Hah!IdontNeedEFI"
<wdanilo>
clever: One guy from our company claims, that it might be possible to take some compiled libs and just replace these hardcoded paths with new paths and everything will be wroking again. But I suspect it is impossible, otherwise nix would not re-compile things when necessery, right ?
<ixxie>
clever: lol
<clever>
wdanilo: you can use the patchelf program to do those changes
<clever>
wdanilo: or for darwin, otool
<ixxie>
clever: alright, NixOS installed! thanks for all the help
<clever>
wdanilo: the reason nix rebuilds things is for purity, there may be unknown changes in the .so, that impact things at compile or link time, and just changing the search path can break things
<wdanilo>
clever: oh, intersting
Dedalo has quit [Read error: No route to host]
<clever>
wdanilo: for example, if the size of a field in a .h file changes, then the ABI for calling functions in that library will be different, and things break in fun ways if you mix the versions up
<clever>
wdanilo: nix just cant have that problem (when using source everywhere), because a change of the .h file would trigger a rebuild of anything using it
mwu has joined #nixos
<tobiasBora>
Hum... I'm curious to understand something
<tobiasBora>
I use ZFS to deal with NixOs, and I wanted to understand how ZFS is used by grub. Si I looked into the grub.cfg file... and I was curious to see no reference at all to ZFS inside:
<tobiasBora>
linux ($drive1)//kernels/f8mj76i8xi3c2aaix7rnmx00d382dwvm-linux-4.14.67-bzImage systemConfig=/nix/store/1mx0sbd81fl3170rjq3jr9384w9gcnqa-nixos-system-colnixos-18.03.133188.8b92a4e6004 init=/nix/store/1mx0sbd81fl3170rjq3jr9384w9gcnqa-nixos-system-colnixos-18.03.133188.8b92a4e6004/init loglevel=4
<tobiasBora>
this is the line that loads the kernel
<clever>
tobiasBora: can you pastebin the entire grub.cfg file?
<{^_^}>
[nixpkgs] @teto opened pull request #46140 → python3Packages.genanki: init at 0.6.0 → https://git.io/fAEXo
<clever>
tobiasBora: line 3 sets $drive1 to whatever FS C863-2483 matches
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @costrouc to release-18.09 « pythonPackages.pymatgen: 2018.8.10 -> 2018.9.1 »: https://git.io/fAEX1
<clever>
tobiasBora: so it will expect a kernels directory on the EFI partition
<ixxie>
hmm, what do I need to configure besides enabling ssh to allow me to ssh-copy-id using the root user of the target machine?
<wdanilo>
clever: thank you for your time and the exmplanation! We're still investigating it and I think we'll have another connected small question in a minute
<clever>
ixxie: something that is very handy, `curl https://github.com/cleverca22.keys` will output every ssh key you authorized to your github
<tobiasBora>
clever: yes, but then usually I see a "root=LABEL=..." that specifies the label of the root partition (to load the actual system)
<clever>
ixxie: so you can just > ~/.ssh/authorized_keys to allow yourself on a new machine
<tobiasBora>
clever: so here because my system is on zfs, I'd expect at least a kind of "zfs=myzpool"
<clever>
tobiasBora: nixos doesnt use root=, but embeds that into the initrd
<tobiasBora>
clever: really interesting... So you may be able to answer the question I asked yesterday: can I specify here an iso file instead of disk label?
<clever>
tobiasBora: the path to fsinfo is then embeded into the script that ultimately lands at /init, and bash will then read it and mount each fs
<ixxie>
clever: it can find them in Nix files? I tried with the organization I have keys in and it didn't work
<clever>
tobiasBora: you may be better off using the netboot stuff
<ixxie>
but I guess I could push my keys and curl them
<tobiasBora>
clever: I saw that debian uses a tool called boot-live that added an option for findiso=..., and that the rescue_boot uses it
<clever>
tobiasBora: lines 3-13 will do a nixos eval that imports the netboot modules
<clever>
tobiasBora: and then line 22/23 will copy the kernel+initrd into /boot, and 17 will load it, obeying the kernel params
<tobiasBora>
clever: the problem of netboot is that I need a webserver on the same network right?
Wharncliffe has joined #nixos
<clever>
tobiasBora: this doesnt actually do any network booting
<clever>
its abusing the fact that netboot puts the entire rootfs into the initrd
<clever>
and then just loading that with grub
<tobiasBora>
ouuu
* tobiasBora
is a bit lost
<clever>
you could then modify this a bit, to just get a kernel-params file, kernel, and initrd
<clever>
tobiasBora: let me type up an example...
<tobiasBora>
so with this method everything would be included in the kernel?
<tobiasBora>
(including the squashfs?)
<clever>
everything would be included in the initrd, including the squashfs
<tobiasBora>
hum yes sorry
<tobiasBora>
really interesting
<tobiasBora>
clever: and why do I need rescue_boot, for example, instead of minimal install? Is it just because rescue_boot is more complete, or because it loads additional stuff?
<clever>
tobiasBora: testing an example locally
<clever>
rescue_boot.nix is a nixos module, that adds to the existing /boot of a nixos install
<clever>
so it wont really work for your idea of having an ISO that can do many things
<tobiasBora>
oh I see, it looked like magic also ^^
<tobiasBora>
but it mayb be possible to use this same idea with my iso idea?
<clever>
i'm testing a modification here
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @ashgillman to release-18.09 « python.pkgs.nipype: Futures is python 2 only. Also fix building. »: https://git.io/fAEMT
<clever>
tobiasBora: run `nix-build multi-boot-helper.nix` and you will get a result symlink containing a kernel, initrd, and grub config file
<clever>
oh, but the filenames are off a tad
<clever>
fix pushed
<clever>
wait, that made it worse, lol
simukis has joined #nixos
<clever>
pushed again
<clever>
tobiasBora: try running nix-build against that file now
Ariakenom has joined #nixos
<tobiasBora>
clever: that looks still magic, thank you very much! Right now I'm on a live usb trying to reinstall nixos with encrypted zfs, but the time to reinstall everything and I try your code!
<clever>
tobiasBora: you can even test the above from the live usb
spear2 has joined #nixos
<tobiasBora>
clever: but I still don't understand what system it will load under the hood... netboot is a whole installer?
<clever>
tobiasBora: the netboot stuff is a variant of the ISO, that puts the rootfs into the initrd
<clever>
tobiasBora: and it has many of the defaults an installer has, like auto-login for root
<{^_^}>
[nixpkgs] @Mic92 merged pull request #46072 → pythonPackages.pyopenssl: Disable some tests, for libressl support. → https://git.io/fARLG
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @qolii to staging « pyopenssl: Disable some tests, for libressl support. (#46072) »: https://git.io/fAEDI
<tobiasBora>
clever: ok thank you! So if I want, I could modify it to look like the full NixOs + KDE + Plasma live CD?
<clever>
tobiasBora: yeah, just add another thing to the imports field
<clever>
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix> i think
<tobiasBora>
clever: great! I'm exited to try!
<clever>
tobiasBora: the major difference between an ISO and netboot, is that the netboot copies the entire (compressed) rootfs into ram
<clever>
tobiasBora: so it will need more ram to boot, but once booted, you can just unplug the usb stick your booting from
<clever>
it may also take longer to boot, since it has to copy the entire thing to ram
<tobiasBora>
clever: I see, so it makes sense i guess to keep a small distro not to fillful the ram
<clever>
yeah
<tobiasBora>
The findiso method does not have this drawback right?
<clever>
probably not, but it would likely need to me heavily modified to work with the stage-1 in nixos
<ixxie>
hmm
<ixxie>
how does nixops handle the hardware configuration?
<ixxie>
do I need to copy it back and deploy it from the deployer?
<clever>
ixxie: for which backend?
<ixxie>
none
<clever>
you need to manually copy it to the nixops machine, and include it in the deployment files
<ixxie>
thats what I thought
<clever>
and if you get it wrong, the machine will either forget how to boot, or systemd will drop you into rescue mode immediately, and wait for local input
<tobiasBora>
clever: ok thank you, I guess I'll stay with the netboot trick, and when I'll look for some challenge, I'll try to study this ^^ Just to make sure, the rescue iso does that right?
Shell has joined #nixos
<Shell>
Err so my system is hanging when booting up on “setting up /etc...”, how can I fix this?
<clever>
tobiasBora: rescue_boot.nix is just putting the "netboot" files into /boot and adding a grub option, so you basically have a 2nd copy of nixos in /boot
sb0 has joined #nixos
<Taneb>
I'm trying to use haskell.lib.doCoverage, but that seems to break things if one library with coverage enabled depends on another library with coverage enabled. Has anyone seen this before and knows a way around it?
<clever>
tobiasBora: and its less likely that you will break that 2nd nixos, so you can use it as a rescue system
<clever>
Shell: are you able to boot an older generate by selecting one at grub?
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @teto to release-18.09 « pythonPackages.alot: install zsh completion »: https://git.io/fAESU
<tobiasBora>
clever: ok no problem ;) Finally I'll run your code before reinstalling, because I may need it to make sure zfs versions are compatible (because of a strange zfs bug, the kernel needs to match the zfs version, and my old ubuntu, obviously, does not have the same kernel as nixos 18.03...
<ixxie>
how do I nixops deploy with a local clone of nixpkgs
<Shell>
“Can not execute /run/current-system/sw/bin/bash” now that I’ve built a new system, though once I’ve booted into it it works. O.o
<Shell>
This is with latest unstable.
<Shell>
(It works and that file exists and is executable.)
jasongro` has left #nixos ["ERC (IRC client for Emacs 26.1)"]
stphrolland has joined #nixos
chaker has joined #nixos
<Shell>
... found the source of this particular error at least. Commit 8b3fb83 attempts to run a command as my user in a wonky way in the activation script, and to do so uses my shell, which is /run/current-system/sw/bin/bash, and /run/current-system isn’t symlinked in at that point.
<{^_^}>
[nixpkgs] @smaret opened pull request #46145 → gildas: add alternative url for the source code → https://git.io/fAE94
<clever>
Shell: thats why i avoid activate scripts at all costs, one small mistake and the machine ceases to boot entirely
<clever>
Shell: a systemd unit would have been a much better place for that change
chaker has left #nixos [#nixos]
<Shell>
Mhm.
<clever>
a bug or PR will need to be filed on nixpkgs, and you can `nix-channel --rollback` to switch to an older nixpkgs until its fixed
mayhewluke has quit [Ping timeout: 245 seconds]
revtintin has quit [Quit: WeeChat 1.9.1]
<ixxie>
nixops got locked; how do I manually remove the lock?
<clever>
ixxie: is there another nixops process still running?
<ixxie>
clever: I interrupted it
mayhewluke has joined #nixos
<clever>
ixxie: double check `ps aux | grep nixops` to confirm none are still running
<ixxie>
clever: found it! killed it! cheers... again xD
stphrolland has quit [Quit: leaving]
philippD has joined #nixos
<clever>
ixxie: the locks nixops uses are in the kernel, and the kernel will clean them up automatically upon the death of a process
<Shell>
Err... how come nix-shell -p krb5Full gives me all the Kerberos commands but nix-env-iA nixos.krb5Full doesn’t?
<clever>
Shell: what does `nix-instantiate --find-file nixpkgs` return?
<clever>
gchristensen: its also too late for the 18.09 branch, but we may want to cherry-pick it over, since the client refuses to connect to the older server
<domenkozar>
gonna keep 4.14
iyzsong has joined #nixos
<domenkozar>
gchristensen: 4.17 has any noticable improvements over 4.14?
<gchristensen>
clever: indeed we should
<gchristensen>
domenkozar: dunno :)
<domenkozar>
kk
<domenkozar>
tnx!
sbdchd has joined #nixos
<yorick>
gchristensen: what's wrong with 4.18 on the xps?
fzer00 has joined #nixos
<gchristensen>
with nouveau I get CPU stalls when X starts until I reboot
<domenkozar>
oh my nvidia rests since day one
<domenkozar>
:)
<yorick>
oh, I have the intel only version
<gchristensen>
if I plug in a thunderbolt device, I get similar wierdness
<gchristensen>
domenkozar: how do you do that, and can the intel drive an external display?
<layus>
Then I see calibri-alias in /etc/fonts.conf.d
<{^_^}>
[nix] @shlevy closed pull request #1956 → Store the schema version in the database. → https://git.io/vAFOE
<layus>
but it does not apply.
<layus>
`FC_DEBUG=1024 fc-match -s Calibri` shows that only /etc/fonts/2.11/conf.d is read, not skipping /etc/fonts/conf.d
<layus>
`FC_DEBUG=1024 fc-match -s Calibri` shows that only /etc/fonts/2.11/conf.d is read, skipping /etc/fonts/conf.d
<layus>
So i am pretty lost ;-)
johanot has quit [Remote host closed the connection]
<srhb>
Is there a specific reason why the sha256 hashes for nixStable and nix1 appear to be a different length than usual? And how are those generated?
<shlevy>
samueldr: There are some changes on haskell-updates that I want to backport to 18.09. How would you like me to handle that? They're mass haskell-rebuilds
<clever>
srhb: you may be comparing base16 and base32 hashes
<layus>
rycee[m], how should I apply pkgs/data/fonts/carlito/calibri-alias.conf ?
<srhb>
clever: Maybe this is for backwards compatibility?
<srhb>
das_j: There is no formal committee, as of yet.
<mightybyte>
gchristensen: Perfect, thanks!
<das_j>
srhb: So basically the same as arch but without a standardized method of applying?
<srhb>
das_j: Also no standardized method of determining whether to accept an application.
<das_j>
Oh, okay
<das_j>
Thanks for clearing that up
<gchristensen>
https://nixos.org/nixos/community.html If you want to contribute regularly, you may want to ask for commit access to our GitHub repositories (please ask Eelco, or on the #nixos IRC channel).
<das_j>
Ah, thanks. I'll keep that in mind once I feel confident enough
<gchristensen>
:)
phreedom has quit [Ping timeout: 256 seconds]
<das_j>
Yeah, the amount of comments on my PRs shows me that there is still much to learn
<sphalerit>
ehmry: in an Ubuntu virtual machine as well?
<sphalerit>
ehmry: and same specs like amount of RAM?
primeos has joined #nixos
<ehmry>
yep
acowley has joined #nixos
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #46148 → top-level, stdenv: Make `system` and `stdenv.system` describe the hostPlatform → https://git.io/fAEAy
the-kenny has quit [Quit: WeeChat 2.0]
the-kenny has joined #nixos
<tobiasBora>
Hum... Does anyone knows why on zfs I can't do "zfs create -o encryption=on -o keyformat=passphrase -o mountpoint=none zroot/encrypt"? It gives me the error "cannot create zroot/encrypt: invalid property 'encryption'
johanot has joined #nixos
<clever>
tobiasBora: your zfs version doesnt have encryption support
<{^_^}>
[nixpkgs] @Ericson2314 opened pull request #46149 → top-level, stdenv: Make `system` and `stdenv.system` describe the hos… → https://git.io/fAEAj
<clever>
tobiasBora: also check the topic in #zfsonlinux , "Native encryption is not production ready, keep backups (but it works great)"
<{^_^}>
[nixpkgs] @ysndr opened pull request #46150 → Fix: Build solaar with pythonPackages → https://git.io/fAExk
the-kenny has quit [Client Quit]
<tobiasBora>
clever: oh, too bad... On the wiki it was written "Native encryption ... will be part of 18.03"
<etu>
tobiasBora: available doesn't always mean production ready
<etu>
:)
<clever>
it means more ginea pigs for the testing :P
the-kenny has joined #nixos
<tobiasBora>
etu: sure, but I'm not in production so I don't mind if I'm one of these ginea pigs ;)
<etu>
tobiasBora: That's good then, get on unstable :)
<tobiasBora>
clever: so I don't get it, does nixos 18.03 has it or not ? ^^'
hxrts_ has quit [Ping timeout: 240 seconds]
<tobiasBora>
oh, so 18.03 does not have encryption, but unstable does?
<clever>
tobiasBora: you may need to tell nixos to use zfs unstable
<{^_^}>
[nixpkgs] @oxij opened pull request #46151 → revert last cryptsetup update → https://git.io/fAExW
<clever>
boot.zfs.enableUnstable
<tobiasBora>
clever: Ok I see. But I'm wondering if I won't go for luks. Is it more complicated to have both luks and zfs?
<srhb>
tobiasBora: It's more _complex_ but probably not much more complicated
<clever>
tobiasBora: i use zfs on luks without any trouble
<srhb>
Having one thing do the whole business is always easier..
<srhb>
tobiasBora: Be advised that if you go the LUKS+zfs route, nixos-generate-config does _not_ make a correct hardware-configuration for you.
<jasongro`>
I speak for myself, but I dropped luks when I started using ZFS for everything because I couldn't be bothered to get my head around the different command sets.
<das_j>
Is there a nix channel? I tried #nix, but I need invitation
<tobiasBora>
clever: it's amazing, you have a snippet for everything
<srhb>
das_j: This channel :)
<das_j>
Oh ;)
<jasongro`>
Oh, I see srhb just said the same thing more succinctly.
<srhb>
jasongro`: :)
<tobiasBora>
srhb: life isn't easy...
vaibhavsagar has joined #nixos
<srhb>
tobiasBora: fwiw I'm enjoying zfs encryption very much. :)
<das_j>
Little question about Nix's substituters option. The manual says "A list of URLs of substituters, separated by whitespace.". But what happens when setting multiple? IMO it should fall back when one is unavailable, but https://github.com/NixOS/nix/issues/1990 looks like this isn't done. So what happens when setting multiple substituters?
<clever>
das_j: if all of them are online, it will query them to see who has what, and then use the priority in the nix-cache-info file to pick one
<clever>
das_j: run `curl cache.nixos.org/nix-cache-info`
<das_j>
Ah, okay that makes sense
<das_j>
Oh, that's your issue :/ So you're suffering from the same problem as me
<clever>
das_j: yeah, there is a bug in nix, that it doesnt give up if a cache fails to respond
<clever>
das_j: you can use `--option substituters '....'` to override it temporarily
<das_j>
clever: Looking at the code it seems like it does give up at some point. But it just fails the entire process instead of switching to the next substituter
<clever>
das_j: yeah
<das_j>
My setup is a central machine which builds all my systems and that is a substituter for every system. So when the central machine is down, I want the system to build the derivation itself
<das_j>
I'd patch it in but C++ is more horrible than I remember
<das_j>
clever: Still haven't found a reason to set up a Hydra for that, but that's basically what I do as well
<das_j>
I'll try to understand more of the Nix code, maybe I can spot the bug
<teto>
I get "builder for '/nix/store/sxrkq6bcm4rb17vlwjl064scsbgz9a6h-user-environment.drv' failed with exit code 1" (certainly due to one of my changes), how can I build just user-environment without going through the whole "nixos rebuild"
fzer00 has quit [Client Quit]
<clever>
das_j: in my case, hydra is pre-building the whole thing against the latest nixos-unstable, so i can see if the new version breaks things before i try to update
sbdchd has joined #nixos
<tobiasBora>
clever: By the way your method worked greatly!
<tobiasBora>
(for the iso stuff)
<clever>
tobiasBora: nice
<tobiasBora>
thank you very much!
<srhb>
teto: nix-build that-path
chessai has joined #nixos
<tobiasBora>
clever: and thanks for the luks ref's, my linux.org memo is full of your code now...
<das_j>
clever: That's a great idea. Maybe I should try the same, but a multi-config Jenkins project still looks better to me. It's just what I'm used to
copumpkin has joined #nixos
<tobiasBora>
srhb: finally, I may want to try zfs encryption for fun, so on my live CD I tried to enable it using boot.zfs.enableUnstable = true; as well as installing zfsUnstable, but the error is still more explicit now: "Encryption feature not enabled"
<clever>
tobiasBora: you need to reload the kernel modules
<clever>
tobiasBora: rmmod all zfs and spl ones, then reload them with modprobe
<das_j>
clever: Honestly, I still don't fully understand the Hydra interface, maybe I'll set up my own to mess around
<clever>
normally, you would just reboot to apply that updat,e but the livecd resets to defaults then
<clever>
tobiasBora: though for the netboot image i gave you, you can also set boot.zfs.enableUnstable = true directly in the nix expression that builds the initrd files
<clever>
then it will natively have unstable on every boot
<tobiasBora>
clever: true, but I made this image in live mode, so I lost all temporary expressions, and if I could avoid to still burn 30mn to download everything it would be nice;)
<clever>
yeah
<tobiasBora>
clever: nixos is not supposed to reload all the modules?
<clever>
kernel modules arent reloaded when you rebuild-switch
<clever>
and if you updated the nixpkgs, they cant be reloaded, because the kernel versions would conflict
fzer0 has quit [Remote host closed the connection]
<teto>
srhb: what would that be in this peculiar case ? attribute name or store path both fail eg nix-build -A user-environment ~/nixpkgs fail
<srhb>
fendor: Oh, I think I know what happened. I didn't actually call the package in my snippet. Did you add {} to the end?
<srhb>
fendor: callPackage (fetchurl ...) is a function, you must also call it, so it becomes callPackage (fetchurl ...) {}
<rsa>
does anybody know how to install nixos on a machine without internet? nixos-install on latest (18.03) graphical live cd fails when using a minimal configuration.nix (tries to contact cache.nixos.org)
<clever>
rsa: you could try adding `--option substituters ''` to disable it contacting anything
nbardiuk has quit [Quit: Lost terminal]
fzer0 has quit [Quit: Leaving]
<rsa>
it tries to download '.../0001-Fix-missing-build-dependency-for-pods.patch'
<rsa>
i was thinking of building the system on an online computer, nix copy --to 'file:///...' /nix/store/...nixos-system..., move the files to the offline computer and then 'nix copy --store /mnt --from 'file:///...' /nix/store/...nixos-system...
<rsa>
that however gives errors about missing valid signature
fendor has quit [Ping timeout: 252 seconds]
<rsa>
the nix-prefetch-url idea worked for the first couple of packages, but then binutils-2.28.1.tar.bz2 was put under a different store path
<{^_^}>
[nixpkgs] @Mic92 merged pull request #46145 → gildas: add alternative url for the source code → https://git.io/fAE94
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @smaret to master « gildas: add alternative url for the source code (#46145) »: https://git.io/fAuTO
<redterd>
Hi everybody. With the help of the irc-channel, I made the drivers for both of my printers work with NixOS. I wanted to add them to the nixpkgs repo. Could someone please help me on which files I have to add where? Right now, the project looks like this: https://github.com/NWuensche/brotherppd
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @smaret to release-18.09 « gildas: add alternative url for the source code (#46145) »: https://git.io/fAuTu
<hodapp>
redterd: have you already forked nixpkgs locally?
<Mic92_>
Why do we get so many zsh completion fixes lately?
<redterd>
hodapp: I'm doing it right now. :D
<{^_^}>
[nixpkgs] @jtojnar pushed 89 commits to gnome-3.30: https://git.io/fAuTw
<xok>
Taneb: I run 1.6 nixops now, I have set DIGITAL_OCEAN_AUTH_TOKEN to a correct AUTH TOKEN but it still says: machine> creating droplet ...error: Unable to authenticate you.
graphene has quit [Remote host closed the connection]
jrolfs has quit [Read error: Connection reset by peer]
jrolfs_ has joined #nixos
aanderse has quit [Quit: No Ping reply in 180 seconds.]
aanderse has joined #nixos
aminechikhaoui has joined #nixos
ma27 has quit [Quit: WeeChat 2.1]
ma27 has joined #nixos
<tobiasBora>
clever: ok thanks for the explainations!
dbmikus__ has joined #nixos
hxrts_ has joined #nixos
Lears has joined #nixos
<d1rewolf>
is anyone here using nix with other distros? I assume package availabiltity is less that nixos?
knupfer has quit [Remote host closed the connection]
endformationage has joined #nixos
knupfer has joined #nixos
[Leary] has quit [Ping timeout: 245 seconds]
<gchristensen>
lots of people do, and the package availability is basically the same
<LnL>
not really
<gchristensen>
the big difference is nix can't manage services, so you don't get the service management which nixos provides
<LnL>
but you don't get the service management, etc.
<gchristensen>
LnL: <3
wpcarro has joined #nixos
<LnL>
:D
<symphorien>
you will have problems with opengl drivers, sane, and things depending on setuid executables
<LnL>
ah right, those are some special edgecases
<redterd>
Is it possible for someone to look at the two printer drivers I added before I PR them? I don't have NixOS installed right now, so I can't valiade everything. However, it worked the last time I used it locally. https://github.com/NWuensche/nixpkgs/tree/BrotherDriver
<LnL>
the sudo package won't be usable for example
<symphorien>
redterd: well it is difficult to test without the printer...
<symphorien>
are the ppd and binary file fetchable from the internet ? you probably should not commit them to nixpkgs
<redterd>
That's true. Do I really have to install NixOS all over again just to test it? Or should it work with a live CD too?
<symphorien>
do you have nix on your new distro ?
<symphorien>
if so, you can even build a live cd from your branch of nixpkgs, with the printer drivers included
<redterd>
symphorien: I remember there was a problem with the binary/ppd file which had to be solved before I could use them. But I don't remeber the steps.
nbardiuk has joined #nixos
<symphorien>
another remark: you have default.nix, but you don't callPackage them from pkgs/top-level/all-packages.nix
<redterd>
Yes, I have nix on my distro. Can you explain how to create the CD like this?
<symphorien>
redterd: that's likely (patching paths and patchelfig libraries)so you have to do this in a derivation.
<redterd>
symphorien: Thanks for pointing the callPackage thing out. I will add it.
<redterd>
symphorien: There is no /etc/nixos folder on my machine right now. Should I create it? Or am I understanding something wrong? I use Arch Linux if this is important
<srhb>
redterd: No, that's present on NixOS.
<symphorien>
no no
<symphorien>
I mean: the live cd is a real nixos system, whose /etc/nixos/configuration is the iso.nix the wiki page has you create
<{^_^}>
[nixpkgs] @shlevy pushed 3 commits to haskell-updates: https://git.io/fAucz
<manveru>
seems like it's not able to connect to the server via ssh after creating the instance
<aminechikhaoui>
manveru: what kind of configuration you have ? it should work, you need to double check your security groups + route tables if you're on vpc
Fare has joined #nixos
<{^_^}>
[nixpkgs] @shlevy pushed 0 commits to haskell-updates-18.09: https://git.io/fAuC3
Boomerang has quit [Quit: WeeChat 1.9.1]
<manveru>
aminechikhaoui: i just created an aws account and tried the first example from nixops
<symphorien>
redterd: seems good. if you look in your nixpkgs clone, there may ba an equivalent of nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix for the graphical iso
ma27 has joined #nixos
<ixxie>
so... what to do when your build runs out of memory?
andrewrk has joined #nixos
<andrewrk>
I'm running an application which is printing "Error: GLX: Failed to load GLX" on startup
ryanartecona has joined #nixos
<andrewrk>
according to strace it's looking for libGL.so in various places such as /run/opengl-driver/lib/libGL.so.1
<andrewrk>
as well as all the /nix/store/* rpaths
<redterd>
symphorien: Thanks, I will use this. However, how can I tell the script to use my nixpkgs clone instead of the package server?
<andrewrk>
where would be the correct place to find it? is my nix configuration missing something?
<andrewrk>
also this used to work, so maybe this is a regression in nixos?
<fresheyeball>
it would be really nice to have an easy way to see which commit, the current binary came from
<fresheyeball>
but I don't see a clean way of doing it
<srhb>
fresheyeball: Please don't. You're removing the benefit of only semantic changes in a tree of nix sources causing rebuilds, and injecting a spurious input that will cause a rebuild on every commit.
<fresheyeball>
by making the build depend on .git, I lose all cache benefits
<symphorien>
redterd: what -I option have you used ?
<fresheyeball>
srhb: right
<redterd>
symphorien: Should this point to the nixpkgs clone?
<fresheyeball>
but then, how to verify that a built binary came from a specific commit?
<symphorien>
yes
<fresheyeball>
how can I do this reasonably?
<srhb>
fresheyeball: You can't, really.
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
<fresheyeball>
srhb: I can't just accept that
<srhb>
fresheyeball: Either you depend on it and lose all caching or you do not, and get semantic nix hashes.
<{^_^}>
[nixpkgs] @xeji pushed commit from @nyanloutre to master « jackett: 0.9.41 -> 0.10.160 (#46114) »: https://git.io/fAu8Y
<fresheyeball>
this seems kinda important, there should be a way to know what commit a specific binary reflects
<redterd>
symphorien: When I replace the ~/nixpkgs with nixpkgs while I'm in my home dir, I still get the same problem. Could there be a problem with the'<nixpkgs/nixos>
<srhb>
fresheyeball: Why is the git hash better than the nix hash?
<symphorien>
I mean type explictely /home/blah/nixpkgs
<fresheyeball>
srhb: its not
<redterd>
Sorry, I copy-pasted and weechat just printed it
<srhb>
fresheyeball: Then just use the nix hash.
<fresheyeball>
srhb: right now I have --argstr version "$(git rev-parse HEAD)"
<fresheyeball>
srhb: I don't know how to tie the nix hash to the git hash
fzer0 has joined #nixos
<srhb>
You cannot do that purely.
fzer00 has joined #nixos
<srhb>
Not without forcing rebuilds on every commit.
fzer00 has quit [Remote host closed the connection]
<fresheyeball>
Look, I deploy to a server
<fresheyeball>
sometimes deploys are not successfull
<fresheyeball>
sometimes there are bugs in the code that show up on the server
<redterd>
symphorien: Did it with /home/username/nixpkgs, but I still have the same error
<fresheyeball>
right now I have NO WAY to determine which version of the code is there
<fresheyeball>
the nix hash does not tell me what version of the code is there
<srhb>
fresheyeball: Deploy a tiny artifact alongside it that you're willing to accept a rebuild for each commit of?
<symphorien>
is there a nixos directory in you /home/username/nixpkgs ?
<srhb>
fresheyeball: You _have_ to work around this constraint. You can't have both "entire project depends on git hash" and "project does not rebuild just because the git hash changed"
<symphorien>
ah maybe use -I twice: -I nixos-config=... -I nixpkgs=...
<fresheyeball>
srhb: right, but I assume I am not the first person with this problem
ryantrinkle has joined #nixos
<srhb>
fresheyeball: No, you're not.
<redterd>
symphorien: Thanks, that worked
<symphorien>
:)
<fresheyeball>
so I am hoping someone has a clean solution
<fresheyeball>
but maybe not
<srhb>
There is no clean solution. It is desired behaviour that a change in the inputs of a derivation causes it to rebuild.
Mark___ has quit [Read error: Connection reset by peer]
<fresheyeball>
srhb: how does that challenge necissarily demonstrate that a clean solution does not exist?
<fresheyeball>
hey ryantrinkle
<srhb>
fresheyeball: Either you consider it a pure input or suffer the consequences, or you make it a build impurity (somehow) and suffer the (worse) consequences.
<ryantrinkle>
in particular: i'm trying to patch chromedriver while building another package that depends on it, but 'chromedriver' isn't present in nodePackages, so it can't be overridden quite that way
<srhb>
fresheyeball: I don't see that there's a third option
<ryantrinkle>
fresheyeball: hey :)
<fresheyeball>
srhb: me neither, but I want to explore that one might exist
<fresheyeball>
ryantrinkle: actually I would love your feedback on this
<srhb>
fresheyeball: I suggest going the other route. Make a _small_ wrapper around your project that rebuilds very very fast.
<fresheyeball>
srhb: yeah, I can make a derivation, that depends on my project and just adds the git hash, that would work ok
<redterd>
Nevermind, I forgot the service bracket...
kenshinC1 has joined #nixos
<redterd>
Now I have problems with options I didn't change: error: The option `networking.wireless.enable' has conflicting definitions, in `/home/nwuensche/nixpkgs/nixos/modules/profiles/installation-device.nix' and `/home/nwuensche/nixpkgs/nixos/modules/services/networking/networkmanager.nix'.
<Henson>
in a nix-shell, how does the NIX_LDFLAGS variable (and other library-related variables) get auto-populated? I see that NIX_CFLAGS_COMPILE magically has the appropriate include files in them, but NIX_LDFLAGS doesn't contain everything. I'm specifically concerned about libraries being included from my own derivations, which are split-derivations. I'm not sure if I'm missing something that is...
<Henson>
preventing them from being included in the auto-generated library path variables.
<{^_^}>
[nixpkgs] @fare opened pull request #46168 → New Gambit and Gerbil releases → https://git.io/fAuEZ
<viric>
after power on it boots from the OTHER disk, not the default
<viric>
(UEFI)
<viric>
both disks have a UEFI boot
<redterd>
symphorien: I added it in the import.nix for the iso, but it tells me that mkForce is an undefinied variable.
<goibhniu>
viric: does the boot.resumeDevice option help?
<symphorien>
lib.mkFroce
<symphorien>
lib.mkForce *
<viric>
goibhniu: that's in stage1. My problem is in BIOS :)
<goibhniu>
ah
<viric>
why BIOS boots the secondary disk UEFI? I don't know
<viric>
Only if I hibernate
<viric>
poweroff works fine
sbdchd_ has quit [Remote host closed the connection]
booglewoogle has joined #nixos
sbdchd has joined #nixos
<redterd>
symphorien: And now I have the same problem with the display manager: error: The unique option `services.xserver.displayManager.job.execCmd' is defined multiple times, in `/home/nwuensche/nixpkgs/nixos/modules/services/x11/display-managers/slim.nix' and `/home/nwuensche/nixpkgs/nixos/modules/services/x11/display-managers/gdm.nix'. (use '--show-trace' to show detailed location information)
<symphorien>
I think you should just revert to the non graphical installer
<viric>
goibhniu: a crazy bios maybe
<symphorien>
creating a graphical one seems a bit trickier
<redterd>
symphorien: But I can't really try out the cups part of the driver then.
<{^_^}>
[nixpkgs] @FRidh pushed commit from @teto to release-18.09 « python3Packages.genanki: init at 0.6.0 »: https://git.io/fAuu6
rfold has joined #nixos
Shell has left #nixos ["Be back later..."]
takeda has quit [Ping timeout: 252 seconds]
booglewoogle has quit [Remote host closed the connection]
booglewoogle has joined #nixos
timon37 has joined #nixos
<elvishjerricco>
fresheyeball: I just builtins.readFile the .git/refs/heads file and put it in an nginx end point. Doesn't require rebuilding the main server that nginx proxies to.
hxrts_ has quit [Ping timeout: 252 seconds]
stepcut has quit []
<elvishjerricco>
So *almost* all of the build isn't affected by the git hash. But the nginx config is rebuilt to serve the git hash whenever it changes
<Henson>
how does pkgconfig work with Nix? I see some derivations have pkgconfig files in their directories, but the derivation files themselves don't make any mention of it. Are these auto-generated by Nix? Are they templates and the path information is substituted in? Are they generated by an inner config script?
<clever>
Henson: its usually generated by the makefiles of the project
<clever>
which is just obeying the --prefix passed to configure
<redterd>
symphorien: So I flashed the iso. However, the printer doesn't get recognized. I looked into the /etc/nixos/configuration.nix file while using the live distro, and it was empty. Should this be the case?
phreedom_ has quit [Ping timeout: 256 seconds]
<Henson>
clever: in a nix-shell environment, do you know how things make their way into the NIX_LDFLAGS variable?
<andrewrk>
I'm running an application which is printing "Error: GLX: Failed to load GLX" on startup. According to strace it's looking for libGL.so in various places such as /run/opengl-driver/lib/libGL.so.1, as well as all the /nix/store/* rpaths.
<andrewrk>
Where would be the correct place to find it? Is my nix configuration missing something? This used to work; maybe this is a regression in NixOS?
<tobiasBora>
but I just saw here that clever seems to use some strange build-based method I don't fully understand : environment.systemPackages = [ config.system.build.justdoit ];
ryanartecona has quit [Quit: ryanartecona]
chessai has joined #nixos
takeda has joined #nixos
ixxie has quit [Ping timeout: 252 seconds]
FRidh has quit [Remote host closed the connection]
<fresheyeball>
can a derivation have an empty source?
<fresheyeball>
elvishjerricco: yes, nix-instantiate is a linter
<elvishjerricco>
It's one of the default phases
<elvishjerricco>
"nix-instantiate is a linter" I don't understand
<fresheyeball>
elvishjerricco: you can use it as a linter in editor
<fresheyeball>
have it tell you about undefined variables in scope and such
graphene has quit [Remote host closed the connection]
<elvishjerricco>
Oh. Not quite what I imagine when I hear "linter" :P
<fresheyeball>
it effectively is linting
<selfsymmetric-pa>
To be honest I suppose I meant "static analysis".
<selfsymmetric-pa>
Something to put in my editor to help me out with the syntax.
<selfsymmetric-pa>
(in my case, Emacs)
<fresheyeball>
selfsymmetric-pa: yes, that is what my suggestion does
graphene has joined #nixos
<fresheyeball>
it points out syntax problems as I type
<infinisil>
There isn't any working linter as of now, you can only use nix-instantiate --parse to detect invalid syntax
<fresheyeball>
infinisil: that command has editor integration
<infinisil>
Yeah I know
<infinisil>
emacs flycheck actually has support for it
<elvishjerricco>
fresheyeball: "linting" to me implies checking for common bad practices and styles, not just syntax validation. But it sounds like your suggestion is good for selfsymmetric-pa
<fresheyeball>
elvishjerricco: I don't know of a thing that does that
ZaraChimera has joined #nixos
<infinisil>
fresheyeball: For you git thing, `(fetchGit /some/path).rev` should get you the string of the revision
<selfsymmetric-pa>
Yep, sorry elvishjerricco, I was imprecise.
<elvishjerricco>
not for nix. But compare to e.g. hlint or eslint
<selfsymmetric-pa>
Didn't mean to turn this into a dictionary game.
<elvishjerricco>
infinisil: Whoa
<elvishjerricco>
that's awesome
lawlesseel has joined #nixos
<infinisil>
It does import the whole thing into the store though..
<elvishjerricco>
infinisil: Was that in 2.0?
<infinisil>
Yea
<fresheyeball>
infinisil: does that work with detached head?
<infinisil>
try it and see
<selfsymmetric-pa>
omg
<infinisil>
should work
<fresheyeball>
ok
<selfsymmetric-pa>
`nix-instantiate --parse emacs.nix` is on by default in Emacs. I just forgot to enable flycheck-mode. XD
<infinisil>
Hehe
<selfsymmetric-pa>
This works perfectly. Thank you!
<infinisil>
Nix really doesn't have good editor integration at all, so even this slight help makes it look awesome :P
<elvishjerricco>
infinisil: It's too bad it copies it into the store, but that's probably fine. It only copies the actual HEAD tree, not any staged or unstaged changes, right?
<infinisil>
I think it copies unstaged stuff as well
<elvishjerricco>
infinisil: Yep, looks like it :(
<elvishjerricco>
And in that case, it just gives `rev = "00000...";`
<elvishjerricco>
infinisil: The HEAD trick unfortunately seems to fall prey to ~/.cache/nix/git
<infinisil>
What's that?
<{^_^}>
[nixpkgs] @bjornfor pushed commit from R. RyanTM to master « plantuml: 1.2018.9 -> 1.2018.10 »: https://git.io/fAuyW
<{^_^}>
[hydra] @edolstra merged pull request #575 → jobset view: jump back to the proper tab when displaying all failed jobsets → https://git.io/fNYcN
<elvishjerricco>
fresheyeball: From Nix's perspective, if the sha256 is wrong, then that's your expression's fault. Nix wants to see all derivations with the same sha256 as literally the same output, so it sees not reason to rebuild them. Plus, the has of derivations with sha256s is based on only that hash, not the inputs, so it doesn't have another path to put it in
<elvishjerricco>
I agree it's annoying. But it's kinda the whole point of fixed-output derivations. Nix doesn't have to worry about rebuilds when it knows the hash is unchanged.
<fresheyeball>
elvishjerricco: I moved everything to fetchGit to prevent the human error
<fresheyeball>
its for sure a transparency issue
<elvishjerricco>
Open an issue on NixOS/nix then
<infinisil>
elvishjerricco: Oh actually, couldn't the caching expire for it?
<infinisil>
Same with builtins.fetchTarball
<infinisil>
It caches it for an hour
<infinisil>
(by default)
<elvishjerricco>
infinisil: Yea, the cache will expire eventually. But not immediately
<infinisil>
Ah yeah, but then it's not *too* bad
<infinisil>
And you can always reduce the caching time
<fresheyeball>
in my experience it does not expire
<fresheyeball>
but I could be wrong
<infinisil>
It only applies if you didn't provide a sha
<shlevy>
--tarball-ttl 0
<shlevy>
Yes, only if there's no hash
<bigvalen>
So, you know you can boot from a nixos-installer image as a 'rescue' image.... when I do that, mount my original root, and then try chroot into that root...it fails. Can't find bash.
<bigvalen>
Is there some ... more nixos-way of doing this ?
<srhb>
bigvalen: like nixos-enter?
tzemanovic has joined #nixos
peel_ has joined #nixos
<elvishjerricco>
fresheyeball: I don't think there's a way to fix that fetchFromGitHub problem though. The output path is dependent only on the sha256, not the build inputs. Fixing that would force all fixed-output-derivations that anyone's using to rebuild and change path.
<fresheyeball>
nixosTM making the impossible possible
<bigvalen>
srhb, Sweeet. That looks like it.
<fresheyeball>
is there a way to get ctags for nix?
<elvishjerricco>
fresheyeball: https://nixos.org/nix/manual/#fixed-output-drvs Ok, this page makes a decent point: If you change mirrors, the current behavior allows Nix to not rebuild all the dependencies. I can see that mattering for stuff like GCC.
<elvishjerricco>
bigvalen: I think this is exactly what nixos-enter / nixos-install are supposed to be for though
<bigvalen>
srhb, If I can get it to boot from the rescue image, I'll totally do that :)
<srhb>
bigvalen: Because that's essentially the same.
<infinisil>
elvishjerricco: (i hope you didn't miss the viewSource :P)
<infinisil>
I'm in #nix-lang if anybody wants to discuss such stuff without distracting this channel
<bigvalen>
Not quite sure when to use nixos-install and nixos-rebuild. I'd edited hardware.nix and configuration.nix to change the root to be a different zfs volume. Didn't work out. Thought I could just boot from rescue, mount the new ZFS volume, and boot that.
goibhniu has quit [Ping timeout: 252 seconds]
<elvishjerricco>
infinisil: Oh cool. It shows the source of the attr's definition?
<infinisil>
Yup
<infinisil>
Implemented in Nix!
<elvishjerricco>
Very cool
WizBright has joined #nixos
<fresheyeball>
infinisil: the fetchGit approach returns a rev when there are uncommited changes
<fresheyeball>
when used in default.nix
<fresheyeball>
but NOT when using in nix repl
<elvishjerricco>
Oh
<elvishjerricco>
I was doing it in the repl
<fresheyeball>
me too, the behavior in the repl is desireable
<fresheyeball>
the behavior in the default.nix is not
<{^_^}>
[nixpkgs] @grahamc pushed 3 commits to release-18.09: https://git.io/fAu9H
<infinisil>
Huh, those shouldn't behave differently
<fresheyeball>
also my binary is no longer in my path
<elvishjerricco>
Oh no. The HEAD thing still caches with default.nix
<fresheyeball>
I am very confused
<srhb>
bigvalen: I can't think of any situations where it's REALLY unsafe to run nixos-install on an existing install. That is, with all the mounts in place and the configuration correct.
<fresheyeball>
yeah, fetchGit ./. caches
<fresheyeball>
it don't work
<elvishjerricco>
fresheyeball: FYI, it doesn't see untracked things as changes; only tracked things, staged or unstaged
<elvishjerricco>
That might be the difference you were observing
<{^_^}>
[nixpkgs] @grahamc opened pull request #46192 → Nix 2.1 on 18.09 → https://git.io/fAuHe
<fresheyeball>
well, that and making commits doesn't change the output
<ldlework>
Where would I stick an override if I wanted the override to show up inside "ps" relevant to something like: python = pkgs.python3.withPackages (ps: with ps; [
<fresheyeball>
so it is just not a workable approach
<srhb>
ldlework: See section 9.11.2.2.1.2 in the nixpkgs manual
vaibhavsagar has joined #nixos
<srhb>
ldlework: Looks good.
<sphalerite>
srhb: that is a _beautiful_ reference. xD
<srhb>
sphalerite: Inorite >_>
<elvishjerricco>
fresheyeball: Testing... I was only doing eval, not an actual build
<ldlework>
srhb: it says
<ldlework>
attempt to call something which is not a function but a set, at /nix/store/g26fs0jbfbvbcghr3vawi7ynpl5h3gaw-nixos-18.03.132405.ee80654b526/nixos/lib/fixed-points.nix:44:67
<ldlework>
anyway I'll follow the manual closely
<srhb>
ldlework: Ah, pkgs is pythonPackages in the inner scope
<elvishjerricco>
fresheyeball: Nope. `haskellPackages.callCabal2nix "foo" (fetchGit ./.) {}` rebuilds whenever I checkout a different commit.
<srhb>
so you want pkgs.buildPythonPackage and self.fetchFrom...
<fresheyeball>
I think the source is the effect there
<fresheyeball>
don't do callCabal2nix
<elvishjerricco>
fresheyeball: What do you mean?
ryanartecona has joined #nixos
<fresheyeball>
a more limited example would show the problem
<fresheyeball>
don't do haskell stuff
<elvishjerricco>
What's bad about my example?
<fresheyeball>
I think callCabal2nix is effecting it
<fresheyeball>
anyone using callCaball2nix in an hpack project?
<infinisil>
I don't, but what's the problem/
<fresheyeball>
infinisil: I have to have a .cabal file to use callCabal2nix
work_ has quit [Quit: Connection closed for inactivity]
<infinisil>
fresheyeball: You should be able to use haskellSrc2nix instead, it has an option for extra cabal2nix flags, one of which can be --hpack (or so)
<infinisil>
Look at how callCabal2nix is defined for that
<{^_^}>
[nixpkgs] @tadfisher opened pull request #46201 → nixos/networkmanager: fix VPN plugin service definition targets → https://git.io/fAuFy
<floop>
hi all, I've managed to hose my local nix installation when the latest nixpkgs forced me to update to 2.0, and now everything is borked. After innumerable attempts to run the normal installer, I ended up deleting my entire /nix directory and starting from scratch. This eventually resulted in a successful installation, but now it's saying "error: opening lock file '/nix/var/nix/db/big-lock': Permission denied" when I actually try to run
jperras has quit [Ping timeout: 244 seconds]
<floop>
has anyone encountered this before?
<floop>
the same error occurs when I attempt to run `nix-shell` etc
sir_guy_carleton has quit [Quit: WeeChat 2.0]
<qyliss>
What do I need to do to get things set up so I can `nixos-rebuild switch --build-host`? I gather I have to do something with keys but it doesn't seem to be documented very well...
jperras has joined #nixos
<floop>
When I run `export NIX_REMOTE=daemon` and try another nix command, I get 'error: cannot connect to daemon at '/nix/var/nix/daemon-socket/socket': No such file or directory'
erickomoto has quit [Read error: Connection reset by peer]
<floop>
I ran the installation script with `--daemon` by the way
<infinisil>
floop: What's the arch?
<floop>
osx
seanparsons has quit [Read error: Connection reset by peer]
<bigvalen>
When using 'nixos-enter', it's really a good idea to run 'mount /boot' before trying to boot your system :)
<floop>
high sierra 10.13.4
<bigvalen>
Turns out, there was a skeleton grub config under /boot ;)
<srhb>
bigvalen: Ew..
georges-duperon has joined #nixos
<bigvalen>
srhb, At least I know what I did wrong.
<infinisil>
floop: I see "The Nix installer will no longer default to the Multi-User installation for macOS. You can still instruct the installer to run in multi-user mode."
<srhb>
bigvalen: is that skeleton grub config a remnant from your system or from our installer? In the latter case we should probably make sure that doesn't exist
<infinisil>
in the release notes
mounty has quit [Ping timeout: 245 seconds]
<floop>
ok, I could delete everything again and rerun the installer....
<bigvalen>
srhb, I think it was left over from the installer, maybe.
seanparsons has joined #nixos
<floop>
my previous installation was with multi-user though
<bigvalen>
Anyway. Byegones. I wonder would it be worth having nixos-enter run mount -a or something.
<floop>
This is pretty frustrating, I've been using nix for years and rely on it pretty heavily these days. Being forced to update is ok, not great, but when said update breaks your system it kind of blows
<bigvalen>
I suppose, you've no idea what filesystems someone may need mounting.
<gchristensen>
floop: please delete /nix, re-run the installer with --daemon like you did the first time. but this time, open it in a new terminal to make sure there are no NIX_* variables set.
<LnL>
and multi-user is still supported, and preferred for nontrivial usage
<floop>
why doesn't the single-user installation script unset NIX_REMOTE, or fail if it's set?
<gchristensen>
I'm sorry you didn't come for help sooner, I'd have really liked to figure out what went wrong so we can make the instructions better
<gchristensen>
floop: a great question, I've got a task on my task-tracker to fix that.
<LnL>
floop: just an oversight
<floop>
ok I'm rerunning the installer with --daemon in a fresh terminal
<floop>
blargh now I'm getting errors about installation relics
<LnL>
gchristensen: btw, if we drop support for 1.12 we can remove that, with >=2.0 it isn't necessary anymore
jrolfs_ has joined #nixos
<LnL>
it's not set on nixos either
<qyliss>
alternatively to remote builds, can I do something to reduce Nix's memory consumption? I'm using a Chromebook and literally do not have enough RAM + disk to be able to fit a GUI into my system configuration currently
<gchristensen>
floop: ok, so delete the relics, open another fresh tab and tryithe install again.
<floop>
gchristensen: no problem, I appreciate the help either way :) I know that installations are hard :P
<floop>
ok, multi user installation just finished and I opened a new terminal
<floop>
cannot connect to daemon error :((((((((((((((((
<gchristensen>
that is okay, check /var/log/nix-daemon.log -- is there anything interesting in there?
<floop>
just a bunch of `accepted connection` lines
<gchristensen>
and then re-do the launchctl print command from LnL
winem_ has quit [Ping timeout: 252 seconds]
floop2 has joined #nixos
<floop2>
for some reason the web client I was using stopped accepting input lol
Maxdamantus has quit [Ping timeout: 245 seconds]
<gchristensen>
oops :)
<floop2>
anyway when I try to run the launchctl unload command it says "/nix/store/lc3ymlix73kaad5srjdgaxp9ngr1sg6g-nix-2.1.1/Library/LaunchDaemons/org.nixos.nix-daemon.plist: Could not find specified service"
Maxdamantus has joined #nixos
<gchristensen>
does the file /nix/store/lc3ymlix73kaad5srjdgaxp9ngr1sg6g-nix-2.1.1/Library/LaunchDaemons/org.nixos.nix-daemon.plist exist?
<floop2>
yeah
monotux has quit [Read error: Connection reset by peer]
<gchristensen>
what was the exact command you ran?
monotux has joined #nixos
<cyraxjoe>
hello! quick question.. is there a nix function to obtain the name of the package from a nix store path? i.e func "/nix/store/c27wfq76sm29zav5a0kg0wzrxbjfiwqv-virtualenv-16.0.0.tar.gz" -> virtualenv-16.0.0.tar.gz? I kinda remember there was something like that already in the lib
<gchristensen>
LnL: might be running out of knowledge here :P
<ldlework>
i have a list of functions, i'm using map to call each of them, they each return an attrset - i want to combine all the attrsets - is there a function that takes a list of attrsets and combines them with // ?
<LnL>
can't remember the command to remove a service without the plist path
<ldlework>
is this what fold functions are for?
<LnL>
floop2: give me a sec
<floop2>
gchristensen: `launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist` is the command I ran
<sphalerite>
ldlework: yes, a fold sounds like what you want.
<LnL>
gchristensen: didn't uninstall, but I have 2.1.1 in the root profile and no running daemon until I run a command (socket activation)
<gchristensen>
:D
<ldlework>
infinisil: so it is similar but i have more control, I have a folder overlays/unstable/ all of those overlays get integrated into the single unstable overlay
<gchristensen>
Dezgeg: can you confirm something about a kernel option?
<infinisil>
Ah yeah
ilikeheaps has quit [Ping timeout: 240 seconds]
hxrts_ has quit [Ping timeout: 252 seconds]
<infinisil>
ldlework: There is a slight problem with your current code
<ldlework>
now I'm trying to do the same for python3 packages, so i have a overlays/python3 and anything i stick in there, gets aggregated into a the single python3 overlay
<ldlework>
infinisil: no doubt ^_^'
<infinisil>
ldlework: You're combining all overlays into a single one and applying that in a single step
<ldlework>
yeah?
<infinisil>
This means your overlays won't work properly if 2 of them redefine something
<infinisil>
Probably only one of them will work then
<infinisil>
You should instead keep all of them in a list and pass that list to nixpkgs instead
knupfer has joined #nixos
<LnL>
gchristensen: launchctl is so weird, unlike most commands which use a target (eg. system/org.nixos.nix-daemon) remove only takes the name
<Myrl-saki>
Seems like disabling my GPU's drivers is helping with power usage lol
<ldlework>
infinisil: hmm, I am passing a list to it
<ldlework>
it is just like, in the form of first being typed out so yeah you're right I haven't actually called the modules yet
<{^_^}>
value is a function while a list was expected, at (string):191:1
<infinisil>
How is the code in motion when you haven't tested it lol
<ldlework>
what i mean is, i'm in that state where you just type out your first thoughts
<infinisil>
Ahhh
<ldlework>
ignore the python stuff because it is minutes old
<ldlework>
hehe
<ldlework>
thanks for looking though :)
<infinisil>
So yeah what I'm trying to say, don't map a single self super pair over the overlays and then use that, because the super argument of those overlays won't be the "true" super. You should instead pass the whole list of them directly
ersran9 has quit [Ping timeout: 240 seconds]
<ldlework>
oof I'm gonna have to reread that a few times
ersran9 has joined #nixos
ersran9 has quit [Changing host]
ersran9 has joined #nixos
<ldlework>
as an aside do you think I'm actually on my way to reimplementing ~/.config/nixpkgs/overlays ?
<ldlework>
i don't want to do something stupid :)
<ldlework>
(in general the stable and unstable overlays have been working how i expected...)
mayhewluke has quit [Ping timeout: 252 seconds]
<{^_^}>
[nixpkgs] @vaibhavsagar opened pull request #46212 → all-cabal-hashes: update snapshot to Hackage at 2018-09-04T11:59:40Z → https://git.io/fAzvV
<gchristensen>
domenkozar: my laptop reports 9hrs remaining. this is amazing!
mounty has joined #nixos
mayhewluke has joined #nixos
<emily>
gchristensen: :o from what change?
Notkea has quit [Ping timeout: 252 seconds]
<gchristensen>
disabling the NVidia video card
Notkea has joined #nixos
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
<ldlework>
infinisil: i realize that what i typed so far for the python stuff doesn't make much sense eh hehe
<ldlework>
HMMM
<infinisil>
ldlework: I mean, it's not gonna be a problem unless you're overriding something multiple times, which overlays would normally handle perfectly fine (and they're intend to), but just concating multiple overlays into one won't do that
<infinisil>
Ah actually, the problem will then stem from your // operator overriding previously set stuff
<ldlework>
infinisil: yeah I agree, the python stuff is trying to create a single overlay
booglewoogle has quit [Quit: Leaving]
<ldlework>
the other stuff i think is ok though
<ldlework>
the stable overlays, that is a list of overlays
mguex has joined #nixos
<ldlework>
and while there is a single "unstable" overlay, it is composed as a list of overlays itself
<ldlework>
i think
<ldlework>
shit's confusing
Ariakenom has quit [Read error: Connection reset by peer]
<infinisil>
Sure, I don't see a problem with it, as long as it works anything goes :)
<ldlework>
infinisil: what worries me about ~/.config/nixpkgs/overlays is that it depends on having the home directory setup
mguex has quit [Client Quit]
knupfer has quit [Ping timeout: 240 seconds]
<ldlework>
this is like an overlay system right in my own config
<infinisil>
Ah yeah
<ldlework>
i worry a lot about bootstrapping
<infinisil>
I mean you could even put such an importer implementation in nixpkgs lib, then it could maybe replace how ~/.config/nixpkgs/overlays works
logzet has quit [Remote host closed the connection]
<infinisil>
And then you wouldn't have any problems with infinite recursion when you use it :P
<ldlework>
putting stuff that messes with imports into an overlay doesn't work
<ldlework>
beause of the infinite recursion
<ldlework>
what do you mean there wouldn't be any problems lol
<infinisil>
But if it's in lib there won't be a problem
<ldlework>
don't you use overlays to slap stuff on pkgs/lib ?
<infinisil>
you previously tried something like pkgs.recursiveImport
<infinisil>
I dont
<ldlework>
not "you" I mean, the royal you
<ldlework>
isn't the mechanism to patch pkgs and lib, overlays?
<infinisil>
Only pkgs
<ldlework>
how does one patch lib?
<infinisil>
lib does have an .extend attribute one can use to extend it with an overlay
<infinisil>
But that's not usable for nix..
<infinisil>
Unless you use this simple trick I just discovered!
<infinisil>
Well it's not simple
* ldlework
starts to tread water
<ldlework>
lol
<infinisil>
And I didn't just discover it just no
<infinisil>
w
<ldlework>
haha
<infinisil>
So the gist of it is: Override <nixpkgs/nixos> to point to your own thing
<infinisil>
This will make nixos-rebuild use /some/path instead of /some/other/path/nixos
<infinisil>
It's the only way to change the behaviour outside of the module system
<infinisil>
You already need NIX_PATH if you want to bootstrap
<ldlework>
how so?
<qyliss>
You can use -I also
<ldlework>
adamantium: have you been reading any of this
<infinisil>
Ah I guess you don't necessarily, but everything using `import <nixpkgs> {}` or `import <nixpkgs/lib>` depends on NIX_PATH
<{^_^}>
[nixpkgs] @sterfield opened pull request #46214 → sickrage: init at v2018.07.21-1 → https://git.io/fAzJq
<ldlework>
sure but things that depend on whatever it is by default is fine
<infinisil>
ldlework: So, if you want this pkgs.recimport thing to work (via lib.recimport), use NIX_PATH to set nixpkgs/nixos, and set it to a file that looks just like <nixpkgs/nixos/default.nix>, but with lib extended
<infinisil>
you have access to the lib in there, so you can pass it a different one
<infinisil>
Well actually you don't directly
<ldlework>
there is going to come a point where i have no working system and I'm trying to get my NixOS system working on a new machine and it just isn't working and I have no hope to understand why and it is because I need some change to NIX_PATH or an -i flag or whatever
<infinisil>
But you can pass it as an argument
<ldlework>
that's the thing i worry about anyway, maybe it is undue
tzemanovic has joined #nixos
tzemanovic has quit [Client Quit]
<infinisil>
Just put it into your bootstrap script or so?
<infinisil>
You can also put some protective barrier in it for you to remember
<infinisil>
E.g. a check in nix whether <nixpkgs>/nixos == <nixpkgs/nixos> and fail with a good error message if that's the case
<ldlework>
nothing in lib can use pkgs though right?
<ldlework>
so if a lib function wanted to call fetchFromGitHub or something
<infinisil>
Optimally no
<ldlework>
each function would have to take pkgs as an argument
<infinisil>
(it can be done through another nixpkgs import though)
<ldlework>
like pkgs = import <nixpkgs> {};
<ldlework>
?
<infinisil>
And if you really only need fetchFromGitHub, you can use builtins.fetchTarball insetad
<infinisil>
yea
<ldlework>
that would just be like standard for any lib expressions
<ldlework>
hmm
<ldlework>
would this let me do the "enableWithPrefix" function?
<ldlework>
where it enables some module that uses nixos settings?
<infinisil>
Yeah, lib can be used freely without causing infinite recursion
<ldlework>
basically it is a function that generates part of the "config" attrset, like "${prefix}.${name}.enable = true"
<ldlework>
and that might enable a module that sets nixos options
<ldlework>
had problems with that when i tried to define enableWithPrefix on an overlay
<infinisil>
I think I explained the problem multiple times before
<ldlework>
you have dude
<ldlework>
you have
* ldlework
weeps.
<infinisil>
Well I told you a way through NIX_PATH to have it working, if you really want that :P
<infinisil>
Not pretty though
<ldlework>
it would be nice to have a fully-functional lib trap-door, where anything I want to do is possible and there are no suprise gotchas
<ldlework>
i tend to try to write a lot of abstractions
bgamari has joined #nixos
Wharncliffe has joined #nixos
<ldlework>
thanks
<infinisil>
It wouldn't be too hard to add support for this by changing nixpkgs, and PR that so everybody can use it in the future
<dhess>
I have an AMD Ryzen box from Hetzner that keeps hanging, running nixos-unstable. Same behavior across multiple updates. Has anyone else experienced this with Ryzen hardware
<gchristensen>
I don't have that problem, nor does hydra.nixos.org's ryzen
<dhess>
huh
<dhess>
gchristensen: is it a Hetzner box by any chance?
<gchristensen>
packet.net c2.medium for both
__monty__ has quit [Quit: leaving]
<ldlework>
infinisil: did you mean, adding a generalized lib extension mechanism, or me adding enableWithPrefix?
<infinisil>
Both would work
<{^_^}>
[nixpkgs] @eadwu opened pull request #46216 → ghostscript: include icc profile validation patch → https://git.io/fAzUk
<ldlework>
i'm not sure what the former looks like, but the latter sounds exciting :)
<dhess>
gchristensen: what's the output of /proc/cpuinfo look like on that thing (just one core will suffice)
<infinisil>
ldlework: Ah well actually, I thought of a function to do the recursive importing, not enableWithPrefix
<infinisil>
I don't think enableWithPrefix would get merged
<ldlework>
sure, it is pretty specialized function with no use in nixpkgs
<ldlework>
just saves me a bit of reptition in my config
<ldlework>
well, would
georges-duperon has quit [Ping timeout: 252 seconds]
Henson has joined #nixos
<ldlework>
it is nice for implementing "profile" modules
<ldlework>
if you have a bunch of options like workstation.foo.enable and workation.bar.enable and so on, you can just be like config.mine = enableWithPrefix "workstation" [ "foo" "bar" ... ]
<gchristensen>
sorry dhess I can't look now
<gchristensen>
dhess: you could one for pretty cheap to find out.
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
<infinisil>
Sounds just like what that function does
<ldlework>
sure but don't wanna type that each time
<ldlework>
so you try to stick that as a function using and overlay
<ldlework>
and try to enable a module that enables xserver
<ldlework>
and blam!
<infinisil>
I mean.. that's like 15 chars longer, not *that* big of a deal
<ldlework>
:)
<ldlework>
sure but repeated each place it is used
<ldlework>
at some point you're not saving against just typing workstation.foo.enable = true;
<infinisil>
But certainly the withPrefix thing can be disregarded, it does nothing other than just assigning that attribute
<ldlework>
also, the practical value demand for this function is not that high afterall, it is just my brush up against those limitations
<infinisil>
more like `enableMultiple = list: lib.genAttrs list (x: { enable = true; });` should be the function
<Henson>
hello everyone. In mkDerivation, the meta attribute has a platforms attribute. How does that work. If I look at stdenv.lib.platforms I see thing like "linux" and "x86_64", but say I want to combine those to specify that only x86_64 linux systems are supported. buildins.currentSystem tells me "x86_64-linux", but I don't know how to specify that as that platform, other than just...
<ldlework>
yeah!
<Henson>
specifying the text, which doesn't seem like the right thing to do.
<ldlework>
but you wouldn't be able to add that to pkgs via overlay right?
<infinisil>
Yeah
<ldlework>
it'd blow up oncce you try to use it on an option that ends up setting a nixos option
<v0latil3_>
do u guys set your git identity in nix config?
<infinisil>
heh
<domenkozar>
gchristensen: I admit I cargo culted the snippet from bumblebee issue
<domenkozar>
it worked, never doubted it :P
<ldlework>
infinisil: would the right way to do the python overlays, would be to generate a complete whole python overlay for every python package I want to provide an overlay for? Something of the form:
<fyber>
I've been using i3 on my laptop for a while and I get pretty insane battery life (13+h of web browsing). Do you think KDE would use much more than that?
sbdchd has quit [Remote host closed the connection]
<ldlework>
is there some other "overlay friendly" way to override the python3 packages?
<ldlework>
heh
<ldlework>
infinisil: will this work with the separate standalone full overlays? or do I have to compose the xdg and pyrofi overrides into this single python3 overlay?
<ldlework>
in other words, do I do this in each standalone overlay (as in the gist), or do I do this once, and collect the sub expresions and compose them in a single overlay (passing them to composeExtensions) ?
<infinisil>
Yeah that will work, the super takes care of that
<infinisil>
And you're obviously not evaluating that part of the code when you're getting that error, when really you should be getting "function not expected" error or so
<ldlework>
oh you're right
hamishmack has joined #nixos
<ldlework>
I added python.* to the filter because I started working on a separate python import mechanism that you saw earlier
<ldlework>
ok
<ldlework>
infinisil: ok where have we gone wrong in the gist
<ldlework>
It complains that attribute "packageOverrides" is missing
<ldlework>
I'm guessing when being access on "old"
tomberek has joined #nixos
jperras has quit [Ping timeout: 252 seconds]
<kyren>
hey, I'd like to try compiling a bleeding edge kernel to see if it fixes a hardware issue I'm having, but I'm having trouble finding out the best way to do that
<tomberek>
While trying a cross-compilation ( nix build nixpkgs.pkgsCross.armv7l-hf-multiplatform.uhd ) I get an error: error: a 'armv7a-linux' is required to build '/nix/store/qpkw3c9fl059axsqbhwgl0qlr3548x6d-python-setup-hook.sh-armv7a-unknown-linux-gnueabihf.drv', but I am a 'x86_64-linux' This seems to stem from the runCommand function not understanding cross-compilation. Or is there something i am not understanding? Any suggestions?
<tomberek>
Another approach i am trying is to build an env using the vendor provided toolchain, but that isn't ideal and requires heavy modification to the nixpkgs derivations
<kyren>
a newer one than pkgs.linuxPackages_latest
<{^_^}>
[nixpkgs] @jtojnar pushed 63 commits to gnome-3.30: https://git.io/fAzmg
<tomberek>
elvishjerricco: that dependency on python is pretty deep and is fundamentally used all over nixpkgs. Should that be changed in `pkgs/development/interpreters/python/setup-hook.nix` ?
<tomberek>
or just change runCommand itself?
<elvishjerricco>
tomberek: Sorry, I'm not really the person to ask about that :P
peel_ has quit [Quit: Connection closed for inactivity]