<devalot>
In a nixops configuration, I want to set targetEnv to container if the host is NixOS, otherwise set it to libvirt or virtualbox. Is there a way to figure that out? From config.boot?
freeman42x[nix] has quit [Ping timeout: 268 seconds]
Guanin has quit [Remote host closed the connection]
Dagger has joined #nixos
<ZaraChimera>
Can I follow the steps in 2.2.3 in the NixOS Manual before creating the ZFS partition?
rtjure has quit [Ping timeout: 272 seconds]
hedning has quit [Quit: hedning]
Mr_Keyser_Soze has quit [Remote host closed the connection]
Mr_Keyser_Soze has joined #nixos
pie__ has joined #nixos
jluttine has quit [Ping timeout: 244 seconds]
ntd has quit [Remote host closed the connection]
pie___ has quit [Remote host closed the connection]
rtjure has joined #nixos
shpx has joined #nixos
jperras has quit [Ping timeout: 250 seconds]
ddellacosta has joined #nixos
jluttine has joined #nixos
marsam has joined #nixos
ddellacosta has quit [Remote host closed the connection]
jperras has joined #nixos
<ottidmes>
devalot: what would be in config.boot to determine that? I have not used nixops from any non-NixOS system, but is it not simply a matter of checking for the presense of e.g. NIXOS_CONFIG with builtins.getEnv in your nixops config file to determine if the host is NixOS?
<devalot>
ottidmes:
<devalot>
ottidmes: I suppose I could use an environment variable.
<devalot>
And, there's config.boot.isContainer. So I was hoping maybe something similar for the host being NixOS.
<ottidmes>
devalot: or you could just pass nixops an argument or parameter, I suppose, that would be less impure
jluttine has quit [Ping timeout: 240 seconds]
<devalot>
ottidmes: I actually like that a little better so whoever is running nixops can decide. But I don't see a way to do that in nixops. With nix-shell I would just do --arg
<ottidmes>
devalot: is it not generally the case that the container is supposed to be otherwise ignorant to the host, so I am not suprised its not there
<ZaraChimera>
If I am doing a ZFS install, do I need to have a separate boot partition for NixOS. It will be the only distro living on the machine.
jluttine has joined #nixos
<ottidmes>
ZaraChimera: that depends on your setup, if you are on an UEFI system, you will have to (you do not want your OS on FAT), but other than that, you can do whatever
thc202 has quit [Ping timeout: 245 seconds]
<ottidmes>
ZaraChimera: I do have a seperate boot partition (on a MBR/BIOS system), because I have an unencrypted boot and encrypted rest setup, but grub (the bootloader) does support encrypted boot as well, it just takes a little more effort to setup
Rusty1 has joined #nixos
<devalot>
ottidmes: It's not that I want the container to be aware of the host. It' that I want NixOps to create a container if it can, but if it's not running on NixOS it should create a VM instead.
Mr_Keyser_Soze has quit [Remote host closed the connection]
<ZaraChimera>
I'm thinking about setting up an encrypted boot.
Mr_Keyser_Soze has joined #nixos
m0rphism has quit [Quit: WeeChat 2.2]
m0rphism has joined #nixos
<ottidmes>
devalot: right, I would just embed that logic in the Nix file describing your deployment, the builtins.getEnv would work, I checking to see if you can also pass a parameter, I am quite sure you can
<devalot>
ottidmes: Okay. I can make that work by writing a wrapper script around nixops so other developers don't have to know which environment variables need to be set. Thanks for the help.
<ZaraChimera>
The post by elvishjerricco on github for encrypted boot on ZFS seems to be for GPT rather than MBR, not sure how I would go about setting that up for an MBR system.
<ottidmes>
devalot: instead of passing an argument, you could probably also work around it by just adding a Nix expr that set the config value, I am not sure how the Nix exprs of `nixops create` are merged, but I assume just like the rest of NixOS, so then you would be able to set it that way if you do not want to use the environment variable route
marsam has quit [Ping timeout: 252 seconds]
<ZaraChimera>
To this point I have created 2 partitions: an ext4 and an 8GiB swap at the end of the disk.
oida has quit [Remote host closed the connection]
oida has joined #nixos
<jasongrossman>
ZaraChimera: Since it's so easy to back up your NixOS configuration, having it on an ext4 partition semes fine to me.
<jasongrossman>
ZaraChimera: So, have all your data on ZFS but you may as well leave root on ext4.
<jasongrossman>
ZaraChimera: I recently moved my root from ext4 to ZFS, but I haven't noticed any benefit! As opposed to may data, which benefits enormously from snapshots.
Mr_Keyser_Soze has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 250 seconds]
<ottidmes>
ZaraChimera: and encrypting boot gives you not that much more safety, you would need to take additional steps for it to be worthwhile
jtojnar has quit [Ping timeout: 245 seconds]
<ZaraChimera>
So I need 3 partitions: /boot /zfs and /swap?
jackdk has quit [Ping timeout: 250 seconds]
<ottidmes>
ZaraChimera: it depends, but if you want unencrypted boot, encrypted rest, I so far have always gone with: /boot /luks and then the LUKS encrypted partition contains LVM which seperates it into /swap and /nixos (zfs)
<ottidmes>
(in my case though it has been btrfs rather than zfs, but the rest still applies, and I will be moving away from btrfs to zfs myself too)
<ZaraChimera>
I was thinking about the encryption, I'm unsure at the moment.
<ottidmes>
ZaraChimera: I am going to try to encrypt boot on my next machines as well, but more "because I can", not because I have the illusion it will win me much, the article says as much as well "A physical attacker doesn’t need to attack your kernel, so the encryption isn’t a very important advantage in this case, but with Secure Boot, TPM, and memory encryption like AMD’s TSME, you can at least make it
<ottidmes>
harder, though obviously not impossible, to attack the hardware.", I do not have, or do not have access, to said features, so in my case it would fall under "isn’t a very important advantage"
jperras has quit [Ping timeout: 240 seconds]
jperras has joined #nixos
<ottidmes>
ZaraChimera: the most important question you should ask yourself, what is your threat model, what protection do you want to achieve by using encryption? In my case, if my hardware were to ever get stolen, I want to limit it to just my hardware and not potentially my data as well
<jasongrossman>
ottidmes: Right! 1. What is my threat model? 2. What am I encrypting just for fun?
<c_wraith>
what do I do if my threat model is invisible telepathic unicorns sneaking in hardware key loggers when I blink?
<ottidmes>
c_wraith: than you have bigger problems than encryption ;)
<c_wraith>
first step: secure brain with tinfoil hat
<ottidmes>
at least
<ottidmes>
you should also sit inside a Faraday cage
<simpson>
c_wraith: Are they completely invisible? Even to infrared?
<simpson>
Usually the first step is operationalizing the threat and figuring out how it interacts with not just you but your environment.
<c_wraith>
dunno. haven't worked out the threat model that completely.
<simpson>
Or a step. I don't know what the first step is. Maybe caring is the first step.
<ZaraChimera>
I mean for my use case, I don't really need encryption beyond folders and strong passphrases.
<ottidmes>
jasongrossman: considering my threat model, if they can tweak my kernel I am screwed either way, than they would have been able to implant some device that I do not know about just as easily that injects code, or if they managed without physical access, then encryption would not have meant anything, because they would have had access anyway
<{^_^}>
[nixpkgs] @Ma27 pushed commit from @pmiddend to release-18.09 « liquibase: fix missing dependencies »: https://git.io/fhvXW
tm has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @thoughtpolice opened pull request #52603 → nixpkgs/firecracker: init at 0.12.0 → https://git.io/fhvX8
erictapen has quit [Ping timeout: 245 seconds]
<Shoop>
I just installed NixOS using lustrate and I'm getting a weird file permission error. Could anyone say what the correct ownership for /nix/var/nix/profiles/per-user should be? More details: https://pastebin.com/0CJ4R7Z0
<ZaraChimera>
Also anything I can do as a newbie is not going to stop a determined person. I would need to set up my own system and learn penetration testing to figure out how what is done.
<ottidmes>
Shoop: it is as you expect and the message implies, it should match the user/group of the user named in the directory name
hiroshi has joined #nixos
<samueldr>
Shoop: you're in luck, chown to your username sudo chown henry /nix/var/nix/{gcroots,profiles}/per-user/henry
* samueldr
somehow didn't realise it was already answered :/
<ZaraChimera>
Since I am a newbie here, I think going unencrypted first and then learn my way around encryption and penetration testing and tweak and upgrade from there.
<ottidmes>
samueldr: well, you gave an explicit solution, e.g. gcroots might not have been changed otherwise ;)
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhvXi
<Shoop>
samueldr and ottidmes: Thanks so much!
<samueldr>
ZaraChimera: as long as you know your attack surface, e.g. who and how they can get to your data, and what you're protecting, it's already a step beyond most anyone using a computer :)
<ottidmes>
ZaraChimera: unencrypted boot, encrypted rest is actually pretty simple, it only includes a few manual commands and a few extra lines of NixOS config, I could walk you through it if you go with the unencrypted boot and LVM on LUKS (for swap and zfs) route
jasongrossman has quit [Ping timeout: 252 seconds]
<ZaraChimera>
Okay. I'll have a look at that. I had been going with Kali Linux's instructions for setting up LUKS encryption, but still not familiar enough with NixOS to easily translate it or know what error messages mean.
<ottidmes>
ZaraChimera: that Arch Linux link is just a few commands and has worked on all my systems
<ottidmes>
its also agnostic to the OS
<ottidmes>
or rather distribution
<ZaraChimera>
Noted, will check it out.
<ZaraChimera>
I have run into Arch Wiki sometimes being badly out of date and I've not had much luck following their OS agnostic instructions in the past.
<ottidmes>
ok, I have had different experiences, but I can vouch for the instructions on that particular page
<ottidmes>
for boot, remember that NixOS tends to use more space in /boot than other distros
<ZaraChimera>
Unencrypted /boot means I have to create a separate /boot partition.
<ottidmes>
yep
<samueldr>
it can be in the ESP
<ZaraChimera>
so I need to do a re partition.
<samueldr>
it will be by default
<ZaraChimera>
ESP is for GPT, right?
<ottidmes>
samueldr: ^ ?
<samueldr>
ESP is for UEFI
<ZaraChimera>
My BIOS will not boot from GPT disks
<samueldr>
ah, sorry, carry on then, it will be a separate partition :)
<samueldr>
(assuming UEFI since BIOS-only machines are getting less and less used)
<ZaraChimera>
I have been trying to get UEFI working. I liked rEFInd when I had it on my MacBook.
<ZaraChimera>
I have an anemic Lenovo B575 with an AMD E2 APU on it. And the model I got doesn't get the UEFI update to the BIOS that other B575 models did.
<ottidmes>
ZaraChimera: one reason to make /boot bigger, like 2.5G for example, is that you could also include things like a ramdisk rescue NixOS which you then can boot into from your bootloader without the need of other drives (like USB sticks), I only assigned 1G which is not enough for that
<ottidmes>
ZaraChimera: also, you can have /swap on its own, but I have no experience with doing a seperate encrypted swap, it possible for use, but I will not be able to help
<ZaraChimera>
I can make a larger /boot. I have a 500GiB drive
<samueldr>
AFAIK, my informations may be outdated, but swapfiles won't allow hibernation on encrypted disk, while swap partitions will allow it
<ZaraChimera>
I suppose that depends if ZFS pools not being reccommended for swap on NixOS still applies.
<ZaraChimera>
That warning was from 2014
<ottidmes>
I have been hibernating since forever on my encrypted setup
<samueldr>
oh right, forgot about ZFS, I don't know
<ZaraChimera>
I had planned on making swap a ZFS pool that can be dynamically resized as needed by the system.
<samueldr>
ottidmes: with a swap file?
<samueldr>
in the encrypted partition?
<ottidmes>
samueldr: nope LVM on LUKS
<samueldr>
ah right, yeah, where I said partition, I also say an LVM partition is a partition :)
<ottidmes>
ZaraChimera: so I have a boot partition and a luksroot partition, thats it
<ZaraChimera>
I have read that it's possible to have rpool/swap and make it possible for the system to increase or decrease the space allocation of the pool as needed.
<ottidmes>
samueldr: sure
<ZaraChimera>
Okay so /boot say 4GiB and /zfs the rest?
<ottidmes>
seems good to me
<ottidmes>
except dont name it zfs
<samueldr>
4GiB may be big, but it's space for experiments!
<ottidmes>
since it will be the luks root
<ZaraChimera>
Then I can make a swap pool in ZFS which can be as large as the system needs (might lock the system up but that's what the experiment is for.)
<srhb>
s/might/will in my experience :P
<ottidmes>
yeah, 4G is most likely too much, but better to big with room for experimentation that regretting having a too small a partition, like I am doing
kvda has joined #nixos
<samueldr>
here I have 5 generation's initrd, + 4 kernels, totalling 74.6MiB
<ZaraChimera>
I won't. Probably get named lagoon.
<ZaraChimera>
Or something.
<srhb>
swap on zfs is terribly broken.
<ottidmes>
samueldr: I have run out of space multiple times with my 1G
<ZaraChimera>
So that warning from 2014 still applies?
<srhb>
More like "again"
<srhb>
It was apparently stable for a while.
<ottidmes>
srhb: you are referring to using a swapfile on ZFS, right?
<ZaraChimera>
If I had a UEFI system I could ahve installed rEFInd and had distros next to each other in their own pools on a single ZFS partition.
<samueldr>
with this, you can have a full nixos installer available in the grub menu
<srhb>
ottidmes: block device on zfs actually.
<ottidmes>
samueldr: I just mentioned that, the "ramdisk rescue NixOS", but I was indeed referring to the trick employed by clever
<ZaraChimera>
Ooh, creating NixOS installs with a rescue partition. Schweet.
<samueldr>
not even a partition here, it's "only" a big initrd
<ottidmes>
srhb: ok, but its not a problem when using a separate swap partition as we are suggestion ZaraChimera?
<ZaraChimera>
I'll make notes on what I did. Maybe they can be turned into documentation to help improve the available howto's and documentation.
<samueldr>
a 529.0 MiB initrd
georges has joined #nixos
<ZaraChimera>
Not a problem. I can use a separate swap partition.
<ZaraChimera>
I was more curious to see if it was possible to have a swap space that could grow and shrink as needed.
<ottidmes>
ZaraChimera: so again, I would recommend: /boot and /luksroot as partitions
<ZaraChimera>
And swap lives inside /luksroot along with the ZFS partition?
jtojnar has joined #nixos
<ottidmes>
ZaraChimera: and then encrypt luksroot, followed by installing LVM on it with a swap and zfs LVM partition
<ottidmes>
ZaraChimera: exactly
<ZaraChimera>
Okay.
<ZaraChimera>
Okay, make a nice large /boot and /luksroot
<ZaraChimera>
This will work on MBR system?
<ottidmes>
ZaraChimera: basically what is being discussed on the Arch wiki link I gave, but instead of having a seperate home volume group (LVM partition) besides the swap and root, just only create the swap and root
<ottidmes>
ZaraChimera: it will
<samueldr>
lvm only needs a block device type thing
<ottidmes>
ZaraChimera: I have been using it on my MBR/BIOS desktop since my first NixOS install
Dagger has quit [Excess Flood]
Dagger has joined #nixos
Shoop has quit [Ping timeout: 256 seconds]
<ZaraChimera>
Does boot need to be at the beginning of the disk or would the parted /dev/sda -- mkpart primary 1MiB -4GiB work as well?
<ottidmes>
ZaraChimera: no, /boot does not have to be at the beginning
<ottidmes>
ZaraChimera: I always partition it to be the first, but on my current NixOS its a dual boot with Windows that sits on the first 2 partitions, so my linux boot is on the third partition
<samueldr>
grub should be able to find /boot anywhere on the disk AFAIK
<ZaraChimera>
Okay, so I have two partitions one takes all but the last 4GB and the last 4GB is ext2 for the boot partition.
<ottidmes>
samueldr: yeah, I believe it was only historally done on spinning disks because it would be a little bit faster
<samueldr>
nah, it's because at the time the bios' ability to read disks was used
<samueldr>
and some bios would have limitations
<samueldr>
disks grew larger than expected
<ottidmes>
ZaraChimera: right, that is how I have it too, except first the /boot, but like we said, that should not matter, I am using ext2 as well
<ottidmes>
samueldr: that makes more sense
<samueldr>
[citation needed], but that's the gist
<samueldr>
AFAIK, grub has its own driver for it, but I may be wrong
<samueldr>
I'll surely be waking up to failing aarch64-linux jobs in tested :')
<samueldr>
though I did test a random subset of what eval'd and those passed
<ZaraChimera>
Hm, I think I needed to issue a different command when creating the non-boot partition with parted.
<samueldr>
ZaraChimera: yeah, don't look at the UEFI section
<ottidmes>
ZaraChimera: or just go with fdisk for MBR/BIOS
<ZaraChimera>
I was looking at 2.2.2. Legacy Boot (MBR) in the manual
<samueldr>
right, and since it's not using encrypted boot it won't use a separate boot partition
<samueldr>
if you don't pass `linux-swap`, just like the command in (2) it will make it of type `linux` (IIRC) by default
<samueldr>
which is fine for /boot (ext{2,3,4})
<ZaraChimera>
I used cfdisk to create an extended partition and the second partition is ext2 for boot
<ottidmes>
I am not sure if you need the LVM Linux type for LVM to behave properly, but I do always set it for my LVM partitions
<samueldr>
you can use cfdisk if you prefer, in fact, I tell you: use the tool you're used to :)
<ZaraChimera>
Now I have >>/dev/sda1 with Id 5, Type Extended and under that Free Space in green
<samueldr>
the manual uses parted only because it's got an imperative interface (commands)
Mr_Keyser_Soze has joined #nixos
<ZaraChimera>
cfdisk is the one I know my way around the best.
<samueldr>
I generally use cfdisk/cgdisk too
<ZaraChimera>
I can figure out fdisk, I have in the past, but more errors happen.
Xal has joined #nixos
<samueldr>
eh, I dislike that kind of terse interface, especially now that I know they apparently don't keep their "interface" stable
nDuff has joined #nixos
<ZaraChimera>
I have used gdisk to change my disk's fpt back to Legacy from GPT when a distro update (not NixOS) made my system unbootable changed it to GPT.
<ZaraChimera>
Though oddly, if a USB stick has a GPT filetable my system will boot from it.
<ottidmes>
Every time I need to fix Windows 10 I have to unplug my other drives to make sure it does not break them...
<ZaraChimera>
What do I need to do with the cfdisk listed Freespace under the LVM entry?
<ZaraChimera>
Do I need to format the stuff in there or no?
<nDuff>
Howdy -- I have an expression that looks like: builtins.foldl' stdenv.lib.recursiveUpdate {} (map build-an-attrset-with-expensive-values input-data); -- and I'm seeing the values in that attrset be requested even when nothing ever looks up the keys. Is that expected?
<ottidmes>
ZaraChimera: I have no idea, I have not used cfdisk myself, but would you not rather just create partition table from scratch, boot at top and the rest for luks?
lawlesseel has joined #nixos
<ZaraChimera>
Cryptsetup: unknown action>
kvda has quit [Read error: Connection reset by peer]
<ottidmes>
ZaraChimera: if you are following the guide, you need cryptsetup 2.x you might still be on 1.x could you verify?
acarrico has quit [Ping timeout: 268 seconds]
<ZaraChimera>
cryptsetup --help shows cryptsetup 2.0.4 at the top.
<ZaraChimera>
I created an LVM partition, but no partitions inside the extended partition.
<ZaraChimera>
Entry for /dev/sda1 in fdisk is Id 5 Type: Extended and below it the ext2 partition for boot.
<ottidmes>
one step at a time, you are talking about LVM when you are running into cryptsetup problems, you should first setup cryptsetup properly before LVM
<ZaraChimera>
Okay blank partition and do cryptsetup then LVM?
<ottidmes>
yep
<ZaraChimera>
Do I need the partition to be in a particular format?
<ZaraChimera>
Or just listed as Free Space?
<ottidmes>
no, LUKS will be the format, but the Id seems wrong to me
<ottidmes>
I have Id+Type: 8e Linux LVM, for my luks partition
<ottidmes>
the free space listing is correct, because its still unformated, after cryptsetup it will be listed as "crypto_LUKS"
<ZaraChimera>
Well, not mistyping things like a muppet would help
<ZaraChimera>
Okay cryptsetup luksFormat --type luks2 /dev/sda1 now gives me "Failed to initialize device signature probes"
<ottidmes>
nDuff: it should not evaluate the values, but it will break up the attrset and in so doing it will evaluate the whole attrset, it will evaluate it so far until it can get determine all its values
<neonfuz>
Are there any bsd platforms for nix?
<neonfuz>
oh, hm, mac technically I suppose
<neonfuz>
no freebsd, openbsd, netbsd?
<neonfuz>
I'm writing a package which is a driver which utilizes uinput
<ottidmes>
nDuff: to clarify, with "the whole attrset", I do not mean strictly, but it needs to know the attrset structure as a whole to determine its attrNames/attrValues even though the values and names will be potentially still unevaluated
<neonfuz>
I only know linux works for sure, but I googled and found at least freebsd has uinput
kvda has joined #nixos
pie__ has quit [Remote host closed the connection]
pie___ has joined #nixos
<ottidmes>
neonfuz: I tend to just stick with what you are sure to work with your package, and if at a later date e.g. a MacOS user wants to use the package and it should be able to get working on that platform, then you have at least an active user and feedback
<neonfuz>
k sounds good
<ottidmes>
neonfuz: if taken to the extreme and any potentially working under MacOS package would be marked as such, you would also introduce a lot more work on the builders for MacOS while at best be in luck and have some extra packages that work, but most likely end up with a lot of failing to build or broken packages
<neonfuz>
true
<ZaraChimera>
Okay, so my screw up was that i did not create a partition with type 8e first and then run the cryptsetup command.
<ZaraChimera>
Now it is asking me to enter a pass phrase for /dev/sda1.
<ottidmes>
yep, that will be the master password for your luks encrypted partition
Zer000 has joined #nixos
jasongrossman has joined #nixos
Zer000 has quit [Remote host closed the connection]
<ottidmes>
you can always change it at a later date though (if you still have your old password that is, but that is kind of the point of encryption)
sir_guy_carleton has quit [Quit: WeeChat 2.2]
<{^_^}>
[nixpkgs] @volth opened pull request #52604 → CODEOWNERS: add @volth to Perl → https://git.io/fhvMX
<ZaraChimera>
Okay, now I got to the prepearing logical volumes step
<ZaraChimera>
The step for creating the volume group is what the ZFS pools will be named?
<ottidmes>
its unrelated to ZFS at this point
<ZaraChimera>
Okay.
<ottidmes>
its just about creating logical partitions on an encrypted space at this point
<ZaraChimera>
Okay. Now at the step for creating the logical volumes in the group (next step is formatting)
Anton-Latukha has quit [Quit: Leaving.]
<ottidmes>
ok, so you will only be needing one for swap and nixos/zfs
<ZaraChimera>
That's straight forward enough.
<ZaraChimera>
If I remember, I need to give the partition that will get formatted as zfs a name other than what the zfs pools are named (rpool/root etc)
Supersonic has quit [Disconnected by services]
Supersonic112 has joined #nixos
Supersonic112 is now known as Supersonic
<ottidmes>
you mean the names of the LVM logical volumes, I do not believe that relevant, but I have yet to use this setup with ZFS, so it might very well be
Lisanna has quit [Ping timeout: 245 seconds]
Mateon3 has joined #nixos
Mateon1 has quit [Ping timeout: 250 seconds]
Mateon3 is now known as Mateon1
<ZaraChimera>
On to formatting lvm filesystems.
<ottidmes>
so swap is straight forward, ZFS is the complicated one
rardiol has quit [Remote host closed the connection]
<ZaraChimera>
Back to reading manuals :)
aleph- has quit [Ping timeout: 244 seconds]
<nDuff>
Is there an equivalent to builtins.toString / builtins.toJson that serializes functions the same way the repl does? I'm trying to use builtins.trace to figure out how/where I'm getting a function in my data, but it just bails out.
<neonfuz>
so what's up with packages containing udev rules
<neonfuz>
do they need to be installed with nixos not nix-env?
<{^_^}>
[nixpkgs] @Scriptkiddi opened pull request #52605 → amazon-ecs-cli: init at 1.12.1 → https://git.io/fhvDC
<ottidmes>
neonfuz: yes, they have to be installed through NixOS, because they are defined via services.udev
<neonfuz>
okay
<nDuff>
Huh. Think I actually figured out one of my problems. Tried to put the result of a function call in a single-item list by surrounding it with square brackets, but just made a two-item list with the function first and its attrset second.
<neonfuz>
so... this driver IS usermode, and technically could be installed alone
<neonfuz>
but it probably won't work without a udev rule
<neonfuz>
hmm
<ottidmes>
its probably done this way because nix-env is distro agnostic, and you do not want to get conflicts with the host OS
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/fhvDF
<dmj`>
ottidmes: if I call the same command with nix build, it builds the image very quickly
<dmj`>
ottidmes: why would it be different?
<dmj`>
ottidmes: can I keep it from fetching dev devependencies
<dmj`>
dependencies*
<dmj`>
ottidmes: another strange thing, when I nix-build from inside the nix-shell, it also tries to rebuild the kernel
<dmj`>
ottidmes: outside of the nix-shell, nix-build doesn't rebuild the kernel
<ottidmes>
shellHook is only run from nix-shell not nix-build, that explains why it builds fast then
<ottidmes>
dmj`: did you try running nix-shell with --pure?
<dmj`>
ottidmes: yes, same result
<ottidmes>
ok, then it has to be something to do with the shellHook
<dmj`>
ottidmes: no, I'm saying I have the command such that you can do nix-build -A docker-script, and nix-shell --command docker-command
<dmj`>
ottidmes: when I nix-build -A docker-script builds w/o needing to rebuild the kernel, nix-build -A docker script when in a nix-shell tries to rebuild the kernel, which is *very* odd
<dmj`>
shellHook is referencing the docker derivation, which causes the kernel to be rebuilt for some reason
<dmj`>
but only when shellHook references it
<dmj`>
I think drv.env.overrideAttrs (drv: { inherit shellHook; })
<dmj`>
s/think/then
kisonecat has joined #nixos
<dmj`>
ottidmes: oh, that was my problem, overriding .env
<dmj`>
nice
<dmj`>
but weird
<ottidmes>
dmj`: maybe nix-diff the two derivations?
jackdk has joined #nixos
<dmj`>
ottidmes: I'm done dealing with this issue
<siraben>
I got bluetooth to connect with my speaker, but it's cutting out randomly when audio is playing
Mr_Keyser_Soze has quit [Ping timeout: 246 seconds]
<siraben>
What could be causing it?
kisoneca1 has joined #nixos
<ottidmes>
dmj`: I know you solved it, but since you still find it weird, using nix-diff could give you insights and give a clear answer to why it behaved differently than you expected
<dmj`>
ottidmes: I'm familiar with nix why-depends
<dmj`>
ottidmes: just done wasting my time on the issue
vk3wtf has quit [Ping timeout: 268 seconds]
<ottidmes>
dmj`: nix-diff is similar to, but not the same as `nix why-depends` though, but its your call
<dmj`>
no thanks
kisonecat has quit [Ping timeout: 246 seconds]
kisoneca1 has quit [Ping timeout: 240 seconds]
Mr_Keyser_Soze has joined #nixos
ensyde has quit [Ping timeout: 250 seconds]
lassulus_ has joined #nixos
sir_guy_carleton has quit [Quit: WeeChat 2.2]
lassulus has quit [Ping timeout: 272 seconds]
lassulus_ is now known as lassulus
Mr_Keyser_Soze has quit [Ping timeout: 268 seconds]
sbdchd has quit [Remote host closed the connection]
<ZaraChimera>
I think I'm going to give the install a break until after I have some sleep.
<ZaraChimera>
I think I know what I need to do... though that would have been for normal unencrypted without the LVM
<ottidmes>
what is it you get stuck on?
orivej has joined #nixos
<ZaraChimera>
I'm more or less lost at the Single Disk instructions in the NixOS on ZFS wiki page.
<ZaraChimera>
I created the LVM groups for nixos and swap.
lokado has quit [Quit: Connection closed for inactivity]
<ZaraChimera>
I'm at the mount/create the zfs stage, but since I don't usually work with LVM I don't really know what to do.
<ZaraChimera>
Okay, so mke2fs -L boot /dev/sda2 and then mkdir /mnt/boot
lokado has joined #nixos
<ZaraChimera>
What am I missing...
* ZaraChimera
sighs
<ottidmes>
ZaraChimera: LVM should not really complicate matters as much, you just use e.g. /dev/mapper/vg-swap to refer to your disk
<ottidmes>
or /dev/vg/swap (just symlinks to the same thing)
<ottidmes>
that is, if you named your volume group "vg"
<ottidmes>
and then creating swap would be: mkswap -L swap /dev/vg/swap, for example
<ottidmes>
and then creating ZFS is harder, because there are some options that you have to set at creation time, but the ones you most likely want were mentioned in the links I gave about setting up ZFS
<ZaraChimera>
Ah, I see.
<ZaraChimera>
This does take some getting used to understanding what the system is telling me in terminal.
<jasongrossman>
ZaraChimera: I can help with ZFS if you like (but not with LVM).
<jasongrossman>
It's ironic (and has been noted before) that the hardest part of installing NixOS is the disk partitioning.
<ZaraChimera>
I know what I need to type to tell my system to look at the right part.
<jasongrossman>
(Ironic because the hardest part is not the NixOS-specific part.)
<ZaraChimera>
I got my swap and boot created.
<jasongrossman>
ZaraChimera: Great.
<ZaraChimera>
Part of it is that the documentation for this is still very very barebones.
<ottidmes>
jasongrossman: well the LVM part should be setup from what I understand, so its basically like normal except for /dev/vg/zfs (or how ZaraChimera named it) instead of some /dev/sdaN
<jasongrossman>
ottidmes: Great.
<ZaraChimera>
Yeah. /dev/mapper/MyVG-swap for example.
<ZaraChimera>
Okay. swap is created and swapon worked. Made my boot and created /mnt/boot for when I get to mounting.
<jasongrossman>
I haven't been following the discussion (I just woke up), but I can help you create your zpool(s) when you're ready for that.
<ottidmes>
jasongrossman: maybe it is because most people going to NixOS have big ideas on how they could improve upon their previous system, I know I did, I did not just switch to NixOS but immediately also tried BTRFS and tiling window managers :P
<jasongrossman>
ottidmes: Partly, yes, for sure. Also partitioning is a bit weird IMO.
<ZaraChimera>
Do I need to add something to the liveUSB's configuration.nix and rebuild before creating ZFS formatted partition and the pools?
<jasongrossman>
ottidmes: But mostly I think it shows how easy the NixOS-specific things are.
<ZaraChimera>
I want to grab the YAST2 code and see if it can be stripped down and adapted to be a configurator for NixOS.
<jasongrossman>
ZaraChimera: Yes, you need to make sure the live USB loads the ZFS kernel modules.
<jasongrossman>
ZaraChimera: Been discussed before, and the consensus is that something like that would be great, but it's not a trivial task.
<angerman>
has anyone tried cross compiling to macOS from nixOS?
<ZaraChimera>
So I need to add the boot.... = [ " zfs " ]; thing?
<jasongrossman>
angerman: Definitely, but I don't think the relevant people are online right now. Time zones.
<jasongrossman>
ZaraChimera: Yes.
<ZaraChimera>
I figured it wouldn't be a trivial task.
<angerman>
jasongrossman: whom are you thinking of?
<jasongrossman>
ZaraChimera: Just BTW, that's going to be unnecessary in the next version of NixOS.
<ZaraChimera>
Oh, cool.
<jasongrossman>
angerman: I've just woken up and can't remember for sure. But several people I think. Maybe gchristensen and elvishjerricco?
<ZaraChimera>
I'd moved back over to openSUSE and got spoiled by the nice UX with YaST :D
<angerman>
jasongrossman: thanks. I'll ping Will.
<jasongrossman>
ZaraChimera: Yes, understandble.
<jasongrossman>
angerman: :-)
<jasongrossman>
angerman: They will forgive me if I've remembered wrong.
<angerman>
jasongrossman: I wonder how far we can get without needing the stupid SDK, as that seems too restrictive license wise.
<jasongrossman>
angerman: Good question. No idea myself - sorry.
<ZaraChimera>
Also, I had been thinking of starting up a Freegeek type thing in my town, but use NixOS instead of Ubuntu. But I would want to be able to present a NixOS with a more polished UX and UI.
<jasongrossman>
ZaraChimera: If you mean a more polished installation UX/UI ... you could be waiting a long time, I'm afraid. I don't think it's anyone's top priority, even though everyone seems to agree it would be a good improvement.
<ZaraChimera>
I was thinking of making that a learning project for myself.
<jasongrossman>
ZaraChimera: That would be wonderful IMO.
<ZaraChimera>
But I'm nowhere near the skill needed for that yet. Considering the difficulties I'm having with a pretty basic encrypted ZFS install. :D
<jasongrossman>
ZaraChimera: You probably know there are other things you could base your work on if they happen to be more hackable. E.g. the installer for Manjaro is great.
<jasongrossman>
ZaraChimera: Right, not trivial!
<ZaraChimera>
That might be possible. I wanted the nix package manager. I'm back trying to get NixOS working because the usual way that distros did things got on my nerves.
<jasongrossman>
ZaraChimera: That's the very best reason to want NixOS IMO.
<ZaraChimera>
I got a bit tired of having my DE bork and be able to do nothing other than switch to a different one or do a complete wipe and reinstall to get it back. GNOME was the worst offender for this.
<ZaraChimera>
Also, the fact that users can install stuff without needing sudo level priveleges and that at worst unborking something is reboot and select the previous generation.
<jasongrossman>
ZaraChimera: Right. A lot of people here have come from Arch, I think (in my case, Manjaro), where everything is possible but rollbacks are hellish.
<ZaraChimera>
Like having the best parts of OSX Time Machine integrated into the package manager along with the app bundles from OSX
<ZaraChimera>
I couldn't get GoboLinux to even boot after installing :(
<ZaraChimera>
The liveUSB configuration.nix has { config, pkgs, ... } { imports = [ ... ] }
<jasongrossman>
ZaraChimera: I know what you mean, but actually it's much better than Time Machine. :-) In its own problem domain, at least. And then when you have ZFS that's also much better than Time Machine!
<ZaraChimera>
Does the boot.supportedFilesystems entry go in its own curly braces or inside existing ones?
<jasongrossman>
ZaraChimera: Its own.
<jasongrossman>
ZaraChimera: No, wait.
<jasongrossman>
ZaraChimera: Told you I'd just woken up.
<jasongrossman>
ZaraChimera: It shares the outer curly braces with imports.
<ZaraChimera>
I'm getting that idea. Also if I create my own Freegeek thing, I want to give NixOS more exposure. And it's easier to fix from techsupport since combined with ZFS/Btrfs the snapshotting and rollbacks will give me more ability to recover things for users. Or let users recover it themselves. but a good GUI admintool set would definitely help sell it.
<jasongrossman>
ZaraChimera: Absolutely, if you have control over the installation. Bear in mind though that there are a LOT of rough edges still.
<jasongrossman>
(After all, it is a more radically different distro than almost any other, and most of the work is done by a small number of hobbyists.)
Makaveli7 has joined #nixos
<jasongrossman>
This is why there's no graphical installer. As I said, people seem to think it would be a good idea to have one, but the most skilled people are busy working on other rough edges.
<jasongrossman>
(And also on new features.)
<ZaraChimera>
Yeah. I'll probably start by seeing if I can contribute in terms of technical writing and documentation for things. Help make it more comprehensive. Seems like a good starting place and has transferrable knowledge to administering and working on my own system.
<ZaraChimera>
I've been using nix package manager on my OSX machine as a supplement to homebrew.
<jasongrossman>
I really like your ideas - both the FreeGeek idea and the installer idea. And as for documentation, YES. That is the thing people need most help with, IMO.
<ZaraChimera>
There have been improvements in 18.09. My WiFi now works out of the box with the liveUSB where it didn't before and I had to have my machine either plugged in to ethernet or spend lots of time arguing with it over getting a wifi connection.
<jasongrossman>
The documentation is organised in a complicated way (compared to something like the Arch Wiki), so be prepared for that.
<jasongrossman>
Great!
<ZaraChimera>
I have a bit of a love-hate relationship with Arch. Though I used it last years ago (pre-2010)
<ZaraChimera>
Added the boot line and nixos-rebuild switch is now doing its thing.
<ottidmes>
unfortunately a lot of the negative reviews of NixOS are people expecting a distro like any other, and when those expectations are not matched, they complain about it not being the same as the rest. Most of the actual valid negative feedback are the high learning curve and some of the rough edges of the documentation/tooling (but that is mainly because of lack of manpower and has much improved already)
<jasongrossman>
Fingers crossed.
<ZaraChimera>
One error: Failed to start local-fs.target: Unit -.mount is masked.
<jasongrossman>
ottidmes: Exactly.
<jasongrossman>
ZaraChimera: OK, I knew what that meant when I was properly awake. -thinks-
<ZaraChimera>
The reason I keep coming back to NixOS is the package manager because the usual way distros handle things have given me nothing but grief from breaking my DE to out-and-out bricking my system by futzing with the partition table.
<ottidmes>
jasongrossman: the ones of the first group are completely missing the point and tend to strawman...
<jasongrossman>
Your boot partition is not ZFS, right? So NixOS has started up?
<jasongrossman>
Oh, ignore that.
<jasongrossman>
I might have to wake up FIRST.
irdr has quit [Remote host closed the connection]
<ZaraChimera>
I'm running it off the 18.09 graphical install at the moment.
<jasongrossman>
Right.
<jasongrossman>
ZaraChimera: Sorry about my sleepy state. Could you pastebin your configuration.nix please?
<ZaraChimera>
I haven't formated zfs or created pools yet. I created my unencrypted /boot and the swap on the encrypted LVM
<ZaraChimera>
It's near midnight for me :)
<jasongrossman>
ZaraChimera: Right. And your error comes on doing nixos-rebuild switch.
<ZaraChimera>
jasongrossman: Correct, though from the rest of it it looks like the rebuild switch worked successfully.
<jasongrossman>
ZaraChimera: Oh, what makes you think it worked?
<ZaraChimera>
Last line reads: "warning: error(s) occurred while switching to the new configuration" but it doesn't say that it failed anywhere with the usual red text when something breaks in the rebuild.
<jasongrossman>
OK, good.
irdr has joined #nixos
<jasongrossman>
I guess it's time to make your zvol(s) then. Exciting.
<ZaraChimera>
Whee.
<ZaraChimera>
mkfs.zfs first?
<jasongrossman>
ZaraChimera: No, you do it all with ZFS tools. Which means you need ZFS running.
<jasongrossman>
Specifically, you need the zpool command.
<jasongrossman>
You've installed ZFS into the USB live image, right?
<ZaraChimera>
Okay, zpool --help brings up a list of options and parameters.
<jasongrossman>
Great!
<ZaraChimera>
Yes, it was the liveUSB's configuration.nix that I added the boot.supportedFilesystems line to.
<jasongrossman>
Can you show me what you've seen about ZFS, so that I can double-check anything I'm about to contradict?
<jasongrossman>
Awesome.
<jasongrossman>
We just need to decide on the right options for zpool create.
<ZaraChimera>
I'm working off the NixOS on ZFS wiki page.
<jasongrossman>
`mountpoint=legacy` means use fstab to mount it, which is less sophisticated than what ZFS does by default (it manages its own mounts) but plays better with NixOS.
<ZaraChimera>
This an MBR partitiontable if that makes a difference.
<jasongrossman>
Makes no difference.
<jasongrossman>
At this point.
Dagger has quit [Excess Flood]
<jasongrossman>
`ashift=12` tells ZFS to use a large sector size ...
<jasongrossman>
... if you have an SSD then you might be better off with ashift=13, but reports about that disagree. Anyway, 12 will definitely work (unless you have an extremely old disk).
Dagger has joined #nixos
<jasongrossman>
These things can't be changed later without wiping the partition, so if you care very much about them then you'll need to do more research now.
<jasongrossman>
`compression` enables compression! There's a choice of compression algorithms but lz4 is the best available at the moment, I'm pretty sure.
<ZaraChimera>
Okay, it's grousing that mountpoint is not a valid pool property.
<jasongrossman>
OK, I may have fucked that one up.
<jasongrossman>
Maybe it's a dataset property.
<jasongrossman>
Yes it is. My bad. Leave it out.
<jasongrossman>
At some point, UNLIKE ME APPARENTLY, you'll need to internalise the difference between pools and datasets in ZFS.
<jasongrossman>
`atime=off` tells ZFS not to make a record of the access times for files. Leave it on if you think you'll actually use that information, but there's a performance hit if you do.
<jasongrossman>
`normalization` is a Unicode property that I don't understand, but I'm told formD is much better than the default.
<ZaraChimera>
Okay, taking out the mountpoint=legacy line had the command complete with no message. Just have a new Terminal prompt.
<jasongrossman>
normalization is important for some character sets, e.g., IIRC, Macintosh character sets, which you might encounter later even if you're not running MacOS.
<jasongrossman>
Yay!
<ZaraChimera>
No news means good news in Unix :)
<jasongrossman>
You have a zpool!
<jasongrossman>
Right!
<jasongrossman>
Check with zpool list.
<ZaraChimera>
Part of the learning is internalizing the new language and terminology.
hyper_ch2 has joined #nixos
<jasongrossman>
Absolutely, and zfs terminology was of course invented by Sun long before most of these concepts were mainstream.
<ZaraChimera>
Okay, I get a table with the name, size alloc free expandz frag cap and so on.
<jasongrossman>
And a zpool in it?
<jasongrossman>
Of the right size?
dermetfan has joined #nixos
<jasongrossman>
zpool status is another nice command, BTW.
<ZaraChimera>
And the zpool's name I assigned in the last step is there. The size looks right as well.
<jasongrossman>
Fantastic.
Lisanna has joined #nixos
<jasongrossman>
Now you can create as many datasets as you like ...
<ZaraChimera>
452GB, I have 4GB boot and 8GB swap on a 465GB disk. so that looks right as far as I can tell.
<jasongrossman>
You'll operate on the pool using the command zpool, and on each dataset using the command zfs.
<jasongrossman>
Great.
<ZaraChimera>
Okay. Pools seem to be sort of like partitions, but more flexible from what I can tell.
<jasongrossman>
Right.
<jasongrossman>
And datasets are file systems.
<ZaraChimera>
That makes sense.
<jasongrossman>
:-)
<jasongrossman>
And you can add as many datasets as you like later.
<jasongrossman>
And also safely delete them (when you don't need their data of course!)
<ZaraChimera>
The Wiki suggests 3: rpool/root rpool/root/nixos and rpool/root/home
<jasongrossman>
Hm.
Ariakenom has joined #nixos
<jasongrossman>
The thing to think about is which parts of your system you want to be able to snapshot separately.
<ZaraChimera>
I had read that with a UEFI and rEFInd I could have a single ZFS partition on my disk with each distro I want installed assigned its own pool.
<jasongrossman>
Personally, I find it useful to be able to snapshot (and restore) home separately.
<ZaraChimera>
That does make sense.
<jasongrossman>
That's true, provided all those distros support ZFS.
<ZaraChimera>
I don't think it would work on my crappy laptop I'm using right now.
<ZaraChimera>
I remember that I want to exclude nix and store from the snapshotting or it will futz with the packagemanager rollback functions.
<jasongrossman>
So I have separate datasets for home and for data and for large files that I don't want to back up at all. That's possibly more complicated than you need, though. The important point I'm trying to illustrate is that it all depends on your backup needs, so you don't want to blindly copy someone else's scheme at this point.
<ZaraChimera>
NixOS, NetBSD and FreeBSD :)
<jasongrossman>
The store will go on your boot partition anyway, which isn't ZFS, right?
<ZaraChimera>
store will go on the ZFS partition as well. Bootloader goes on it's own partition.
<jasongrossman>
So you're going to be booting from a ZFS partition?
<jasongrossman>
This one?
<ZaraChimera>
I have an Luks-LVM and a second partiion /boot
<jasongrossman>
Sorry - can't parse that. You have one partition or two?
<jasongrossman>
As for futzing with Nix rollback, nothing you do with ZFS will break Nix unless you delete data ... but I agree that you don't want to snapshot store, just because store will get enormous and is easy to recover from the Nix online cache.
<drager>
Can you drop into a rescue shell somehow?
<ZaraChimera>
HD has two partitions: one is LUKS encrypted LVM with rpool and swap on it as volume groups and a second partition with /boot
<jasongrossman>
drager: From what, from a window manager?
<ottidmes>
jasongrossman: /boot /dev/mapper/MyVG-swap /dev/mapper/MyVG-zfs (I presume ZaraChimera?)
<drager>
jasongrossman: From a display manager
<ZaraChimera>
ottidmes: Yes.
orivej has quit [Ping timeout: 246 seconds]
<jasongrossman>
drager: It should be something like control-F1, from memory. Might depend on your keyboard layout.
<ottidmes>
drager: ctrl+alt+F2
<jasongrossman>
ottidmes: Oh, right, yes.
<ZaraChimera>
I had not mounted /boot to /mnt/boot yet.
<ZaraChimera>
That would be the step 2.3 in the Manual and I needed to get ZFS set up first.
<jasongrossman>
So, your plan is a separate boot zfs dataset, which will include store, and a second zfs dataset for everything else, I imagine? Or you could have a third for /home. Or whatever you like, bearing in mind that it's all about your preferred snapshotting scheme.
<ZaraChimera>
And I'm being slow and carefully reading through before doing things.
<jasongrossman>
And remembering that you can add datasets later.
<drager>
That didnt work, will read the manual section. Thanks
<ZaraChimera>
As I understood it I needed to have a separate /boot partition for GRUB becasuse I have an MBR system which doesn't like booting from ZFS.
<jasongrossman>
drager: Good lick.
<srl295>
jasongrossman if you want the spec for normalization it's http://unicode.org/reports/tr15/ - D is common for file systems.
<jasongrossman>
That sounds right. Not my area of expertise but I believe other people have confirmed that that's right.
<jasongrossman>
srl295: Thanks!
<ZaraChimera>
ottidmes also said that with a 4GB /boot partition separate one could create a recovery system without needing to boot from a liveUSB
<srl295>
Or ask on #unicode
<jasongrossman>
srl295: Great.
<ZaraChimera>
So my /boot partition is separate from the LVM with the ZFS pool and swap
<jasongrossman>
srl295: Confirms what I thought, although I don't pretend to understand it fully: "When implementations keep strings in a normalized form, they can be assured that equivalent strings have a unique binary representation." And this matters because you copy files between systems.
<jasongrossman>
ZaraChimera: Yes, great.
<srl295>
Yes. Welcome
<ZaraChimera>
Command mount /dev/disk/by-label/boot /mnt/boot worked.
<jasongrossman>
ZaraChimera: So, your plan is a separate boot zfs dataset, which will include store, and a second zfs dataset for everything else, Iimagine? Or you could have a third for /home. Orwhatever you like, bearing in mind that it's all aboutyour preferred snapshotting scheme.
<ZaraChimera>
And I have run swapon /dev/mapper/MyVG-swap
<ZaraChimera>
jasongrossman: Deciding on the datasets I need is where I really don't know enough to decide.
<jasongrossman>
ZaraChimera: Well remember that you can add datasets later. Since you like doing things carefully (and good for you) ...
<jasongrossman>
... you might consider having just ONE dataset for the moment.
<ZaraChimera>
This is a simple system, being able to snapshot home separately makes sense, but I'm not sure if I need a separate boot dataset since I have a /boot partition separate from the LVM with the zfs pool on it.
<jasongrossman>
Then you'll be snapshotting everything at once, which is probably fine anyway, and if it isn't then you can fix it later.
<jasongrossman>
Ah. This is where I don't even know what "boot" means in a GRUB system.
<jasongrossman>
ottidmes: Help please?
<ZaraChimera>
Seems adding datasets is fairly trivial. So starting with just one dataset could work just fine.
<jasongrossman>
(I've only ever used systemd-boot.)
<ottidmes>
jasongrossman: what is the problem?
<jasongrossman>
ZaraChimera: Yes, very trivial. No technical complication at all. Just a data-management complication sometimes.
<jasongrossman>
ottidmes: Will ZaraChimera's boot partition hold the OS? Sorry for my ignorance.
<jasongrossman>
ottidmes: I only know about systemd-boot, in which there's a separate boot partition for UEFI stuff.
<ottidmes>
jasongrossman: the boot partition will hold some grub files and kernels and initrd's
<jasongrossman>
ottidmes: Ah, so it's just like systemd-boot in that respect. Thanks very much.
<ZaraChimera>
I wish I could afford UEFI computer...
<jasongrossman>
ZaraChimera: In that case, you probably want two ZFS datasets, since you don't want to snapshot store, for reasons of space.
tzemanovic has joined #nixos
<jasongrossman>
ZaraChimera: It's no big deal! (But I wish you had lots of money too.)
asymmetric has joined #nixos
<jasongrossman>
Also, my UEFI computer is more than 6 years old and not worth much.
<ottidmes>
ZaraChimera: you say that now, but UEFI is not per se better than the old BIOSes
<ZaraChimera>
I created two: zfs create -o mountpoint=none mypool/root and zfs crate -o mountpoint=legacy mypool/root/nixos
<jasongrossman>
Great.
<ZaraChimera>
I can create another for /home at this point.
<jasongrossman>
Yes ... on secound thoughts, maybe you should ...
<ZaraChimera>
The next steps in the NixOS ZFS wiki page is mounting pool/root/nixos to /mnt
<jasongrossman>
Yes.
<ZaraChimera>
and pool/root/home to /mnt/home if I made one.
<jasongrossman>
Yes.
asymmetric has quit [Remote host closed the connection]
mr_noobs has joined #nixos
<jasongrossman>
And that step is really just to enable NixOS's hardware detection to correctly write you a hardware.nix file
asymmetric has joined #nixos
<jasongrossman>
which will be imported by your configuration.nix.
<jasongrossman>
So you mount everything now, test that it's how you like it, and then run nixos-generate-config --root /mnt ...
<jasongrossman>
... to generate hardware.nix.
<jasongrossman>
Then check that by eye, then install your final system!
<jasongrossman>
After that, NixOS will do all the mounting for you.
<ZaraChimera>
filesystem mypool/home cannot be mounted at /mnt/home due to canonicalization error 2.
<jasongrossman>
Because after that everything will be declarative.
tzemanovic has quit [Ping timeout: 252 seconds]
<jasongrossman>
I believe that error means that you're not root
<jasongrossman>
or else something else is already mounted there.
<jasongrossman>
(Terrible error message, I know.)
agander has joined #nixos
<ZaraChimera>
The issue was the directories /boot and /home hadn't been created in /mnt for some reasone.
<ZaraChimera>
Everything seems to be properly mounted now. rpool/root/nixos is mounted at /mnt. /boot is mounted at /mnt/boot and rpool/home is mounted at /mnt/home
<ZaraChimera>
Let's see if generating the config works.
<jasongrossman>
LOL. This is the bit that's all manual (that you're going to automate for us one day). That's why they "hadn't been created".
<ZaraChimera>
Well, nerts. ERROR: not a subvolume /mnt/boot
<jasongrossman>
Damn.
<ZaraChimera>
ERROR: Failed to get subvol info /mnt/boot: 1
<jasongrossman>
mount | grep boot
<ZaraChimera>
Well, that's strange because mount | grep boot returns /dev/sda2 on /mnt/boot type ext2. The line appears twice. Wonder if that's the problem.
<jasongrossman>
Damn - I don't know. Hm.
<jasongrossman>
May as well run lsblk
<jasongrossman>
while we think!
<ZaraChimera>
Okay, I have loop0, sda with sda1 with the cryptlvm and the swap and nixos lvm and then sda2 as a partion mounted to /mnt/boot
<ZaraChimera>
sda1 doesn't appear to be mounted anywhere in the lsblk display.
<jasongrossman>
I'm afraid my head just isn't working efficiently at the moment - STILL waking up!
<ZaraChimera>
Like a diesel engine in winter. Needs to warm up first :)
<ZaraChimera>
/me offers virtual coffee.
<jasongrossman>
Might need to yell for ottidmes again. Yes.
<jasongrossman>
Thank you.
<jasongrossman>
I'll be here for a while for ZFS help.
<ZaraChimera>
And not helped by me being a nearly complete newbie.
<jasongrossman>
You're doing great IMO.
<jasongrossman>
Hang on. What happens if you cd into /mnt/boot and ls?
<ZaraChimera>
I think last time I used NixOS was pre 18.03. Might have been a 17.09 or 03
<ZaraChimera>
It lists lost+found directory.
<jasongrossman>
I'm stuck. :-/
<ottidmes>
ZaraChimera: on the server where I use ZFS it does not show any mount points too, thats normal
<ottidmes>
I find `lsblk --fs` more useful
<jasongrossman>
ottidmes: I believe the problem is with /mnt/boot, not with the ZFS partition.
<ZaraChimera>
That shows me my cryptlvm with UUIDs and sda2 as ext2 with label boot a UUID and mounted at /mnt/boot which is the command I gave.
<ZaraChimera>
The errors come after nixos-generate-config --root /mnt
<jasongrossman>
( ottidmes: but thanks for lsblk --fs for later. )
<ZaraChimera>
ERROR: not a subvolme /mnt/boot and then Failed to get subvol info /mnt/boot 1
<ottidmes>
ZaraChimera: I hope you dont meant this too literate: /boot is mounted at /mnt/boot, I hope you meant, /dev/disk/by-label/boot is mounted at /mnt/boot?
<ottidmes>
ZaraChimera: you get that error when exactly? what command did you run to get that?
<ZaraChimera>
Checking the /mnt/etc/nixos/configuration.nix it looks like I would expect it to.
<ottidmes>
ZaraChimera: its hardware-configuration.nix that is the most interesting at this point
<ZaraChimera>
ottidmes: /dev/sda2 is my /boot partition. It is listed as mounted at /mnt/boot
<ZaraChimera>
I got there by using the command: mount /dev/disk/by-label/boot /mnt/boot
<ottidmes>
ok, that sounds correct
<ZaraChimera>
I gave it the label boot when I created the partition.
<ottidmes>
exactly
<ottidmes>
but when do you get "ERROR: not a subvolme /mnt/boot and then Failed to get subvol info /mnt/boot 1"?
<ZaraChimera>
I get that error after running: nixos-generate-config --root /mnt
<ZaraChimera>
I ran the above command after mounting my zfs datasets $pool/root/nixos to /mnt and $pool/home to /mnt/home
<ottidmes>
ZaraChimera: its probably the generation script for ZFS that is to blame, what about umount /mnt/boot first, try to generate it again, and if it succeeds, that you can just add the mount yourself in the hardware-configuration.nix
<ZaraChimera>
Should i unmount everything and clear the directories and go back a few steps?
<ZaraChimera>
^disregard. I derped and didn't read your message directly above
<jasongrossman>
ottidmes: Good idea.
asymmetric_ has joined #nixos
nDuff has quit [Ping timeout: 250 seconds]
asymmetric has quit [Ping timeout: 240 seconds]
<ZaraChimera>
Okay, unmounted /mnt/boot and re-ran the generate-config. No error message this time but it did warn me that it's not overwiting existing /mnt/etc/nixos/configuration.nix
tzemanovic has joined #nixos
<ottidmes>
ok, great, thats normal
<ottidmes>
there is not much in configuration.nix that you want to regenerate, while hardware-configuration.nix you do want to regenerate
<ottidmes>
so now we have to fix the missing config in hardware-configuration.nix, or you could just put in configuration.nix for now, if you have to regenerate hardware-configuration.nix again later
<jasongrossman>
You'll also need a line for your swap. (I don't use swap.)
<ottidmes>
ZaraChimera: so you probably want to add this in your configuration.nix (after succesfully installing you might want to move it back to hardware-configuration.nix): fileSystems."/boot" = { label = "boot"; fsType = "ext2"; };
<ZaraChimera>
I uncommented the boot.loader.grub.device = "/dev/sda"; in configuration.nix as well.
<ottidmes>
yep, you will want to do that indeed, since you are using BIOS/MBR
<ZaraChimera>
Where do I want to put the fileSystems line?
<ottidmes>
ZaraChimera: if you dont think you are going to regenerate your hardware-configuration.nix, you want it with the rest of them, otherwise to be safe I would put if in configuration.nix for now
<ottidmes>
you can always change it later
<ZaraChimera>
The fileSystems... line in hardware-configuration.nix exists and has matching UUID to the one I see in lsblk --fs
<ZaraChimera>
It seems to be there already. It's not commented out either.
<ottidmes>
for example I don't have a configuration.nix or hardware-configuration.nix, you can organize it however you like, but for the first install, just stick with the basics
<ZaraChimera>
Yeah. First learn the defaults well, then start breaking conventions :)
<ottidmes>
ZaraChimera: ok, if its there, just keep it
<ZaraChimera>
Anything else is just begging for computer-tossing rages :D
<jasongrossman>
I edit my NixOS configuration with a magnetised needle, of course.
<{^_^}>
[nixpkgs] @FRidh pushed commit from @lopsided98 to master « pythonPackages.behave: fix build on Python 2.7 »: https://git.io/fhvAe
<ZaraChimera>
device=UUID but there's no label = "boot" part to it.
<ottidmes>
ZaraChimera: that should be fine, you can refer to file systems in many ways, UUIDs are one of the safest
<ZaraChimera>
Swap-devices is blank.
<ottidmes>
jasongrossman: that is taking "stick with the basics" too far :P
<{^_^}>
[nixpkgs] @bjornfor pushed 2 commits to release-18.09: https://git.io/fhvAT
<ottidmes>
ZaraChimera: I have this: swapDevices = singleton { label = "swap"; };
<ZaraChimera>
Okay. UUIDs match exactly. So the system is looking at what it supposed to be.
<jasongrossman>
ZaraChimera: If you're here much longer you'll probably want to show people your whole config file, using a pastebin service, e.g. https://paste.dismail.de/
<ZaraChimera>
I'll do that.
<ottidmes>
I prefer gists, allows you to edit your stuff and people can see a clear diff
<ZaraChimera>
I have IRC on one computer and my install on a separate computer.
<jasongrossman>
PASTEBIN WAR!
<ottidmes>
engage!
<ZaraChimera>
Almost as epic as the editor wars :)
<jasongrossman>
Exactly.
<ottidmes>
emacs! vim! vscode!
<ZaraChimera>
Okay, I need to change some things in configuration.nix so I get the right stuff installed
<ottidmes>
ZaraChimera: I would recommend keeping it as bare as possible, just make sure your hardware is alright, like having an internet connection
<ottidmes>
ZaraChimera: if you have a simple root prompt, you can always rollback to that starting point
mr_noobs has quit [Ping timeout: 245 seconds]
<ottidmes>
that should be your goal now, otherwise you might run into software issues making you unable to boot, while the hardware configuration could be fine
mr_noobs has joined #nixos
<ZaraChimera>
Doing the simple install *crosses fingers*
<ottidmes>
the description gives you an example on how to generate one
<jasongrossman>
networking.hostID = "a9191936"; # for example
<ottidmes>
networking.hostId, but yeah
<jasongrossman>
Oh whoops yes. Must remember that Nix is case sensitive.
<jasongrossman>
Thank you.
<ZaraChimera>
Thanks. I found the instructions through the wiki and the options page :)
<jasongrossman>
:-)
<ZaraChimera>
Okay, looks like the base install for terminal only is working.
<ZaraChimera>
Hopefully this boots.
<jasongrossman>
Oh yay!
<ZaraChimera>
I vaguely remember how I went about setting up wifi with connman.
<jasongrossman>
I can't get connman to work with NixOS. YMMV.
<jasongrossman>
I love how I made a helpfully instructive mistake above (forgetting that Nix is case sensitive).
<ZaraChimera>
I had it working before and for my machine it actually was better at not dropping connection than network manager was.
<jasongrossman>
ZaraChimera: Could you please send me your config for that? (Not urgent.)
thc202 has joined #nixos
<ZaraChimera>
Will definitely do when I get it functional.
lokado has quit [Quit: Connection closed for inactivity]
<ZaraChimera>
I like using Enlightenment as my primary DE followed by KDE5 Plasma or something like i3wm.
<jasongrossman>
ZaraChimera: Thank you.
<ottidmes>
ZaraChimera: so have you been able to boot into a terminal? because your messages were a bit confusing "terminal only is working" "hopefully this boots" :P
<jasongrossman>
BRB - ten minutes probably.
<ZaraChimera>
I was referring to a previous time when I had NixOS running.
<ZaraChimera>
The install is still running.
<ottidmes>
ok
<ZaraChimera>
And brain is starting to wander in random directions.
<ottidmes>
ZaraChimera: what did you do for networking in your configuration? or do you have an ethernet controller?
Streetwalrus has quit [Ping timeout: 250 seconds]
<ottidmes>
luckily my laptop has both WLAN and LAN so when I do installs I just use a LAN cable
<{^_^}>
[nixpkgs] @Mic92 pushed to master « nss-pam-ldapd: fix build by disabling kerberos »: https://git.io/fhvxq
<ZaraChimera>
Yeah, I can plug a LAN cable into mine as well. Just too lazy to crawl under my desk.
jacereda has joined #nixos
Boomerang has joined #nixos
kisonecat has joined #nixos
kisoneca1 has joined #nixos
<ottidmes>
ZaraChimera: well, setting up WLAN from a terminal is a pain (for me at least), so the lazy route would actually be to use the cable, but maybe its no problem for you, lets just hope it boots
* ZaraChimera
grabs LAN cable just in case
<ZaraChimera>
Well, won't boot.
<jacereda>
I have tried bumping the development/libraries/sfml version without updating the corresponding sha265 and it's attempting to build it! how could that possibly happen?
<ottidmes>
in what way is it failing?
<ZaraChimera>
Stuck going to PXE boot so I misconfigured something, my BIOS isn't seeing GRUB at all.
<ZaraChimera>
Same issue I have if my HD is set to a GPT partition table instead of MBR
<ottidmes>
jacereda: thats normal, it will take your word for it and use the thing with that sha256 from the store, but that does mean it does not actually work, because it will be using the old source (since old sha)
<jacereda>
ottidmes: oh, I see... but then, if I change a single character in the checksum that shouldn't happen anymore and it should fail, right?
<jasongrossman>
ZaraChimera: I'm going to be intermittent for the next few hours (sorry) but anyway it sounds like your problem is not a ZFS problem.
<ZaraChimera>
When this happens with other distros I can boot from the HD by first booting into a liveUSB.
<ottidmes>
jacereda: right, and then it will tell you what sha it found instead and you can copy it over and use the correct one
<ZaraChimera>
I can try that before I mess around with settings more.
<jacereda>
ottidmes: in my case it will still try to build it
<jacereda>
ottidmes: and in the past I remember doing exactly that, waiting for the failure and copying the checksum
<jacereda>
ottidmes: but for some reason it isn't working anymore
<ottidmes>
jacereda: could you perhaps share the derivation through some paste service (like GitHub gists)
kisonecat has quit [Ping timeout: 250 seconds]
<ottidmes>
s/derivation/package/
kisoneca1 has quit [Ping timeout: 250 seconds]
<ottidmes>
ZaraChimera: yeah, sounds like a good idea to first troubleshoot it
vmandela has joined #nixos
<ottidmes>
ZaraChimera: you can also kexec into it from the LiveCD, but you probably have to look more closely at your BIOS settings
<jacereda>
ottidmes: nothing special, just a version bump and wrong checksum
<jacereda>
ottidmes: I tried bumping because sfml is failing to link on Darwin and looks like that's fixed on 2.5.1
<ZaraChimera>
ottidmes: No idea what I would be looking for kexec option. I think I might take a break from this for a while and get some sleep.
<ottidmes>
jacereda: I cannot build it myself, I am missing IOKit it says, but if you set sha256 to 0000000000000000000000000000000000000000000000000000 it surely has to complain
<ottidmes>
ZaraChimera: with kexec you can point to the kernel and initrd on /boot and boot into it as if you booted into it
<ottidmes>
ZaraChimera: but sleep is important, so its probably for the best to first have some rest
<ZaraChimera>
I think going with the encrypted LVM might have complicated a few things for me.
<ottidmes>
jacereda: if it does not complain, you are not editing the correct file or misconfigured your overlay (if you use them)
<ZaraChimera>
I'll see about getting a copy of my configuration files into a pastebin.
<ZaraChimera>
Basically my system is acting as though I had tried to boot from a GPT disk.
<ZaraChimera>
Default partitioning scheme in openSUSE does the same thing.
<ottidmes>
jacereda: its probably you editing the wrong file or not overriding the package properly, I have 0 experience with darwin/MacOS, so no idea about that
<LnL>
o/
<jacereda>
ottidmes: I doubt it's the wrong file, I can see the bumped version in the log
<LnL>
what's up?
<ottidmes>
ZaraChimera: yeah, but it should be completely unrelated to your choice to use LUKS+LVM, since your boot is unencrypted
<jacereda>
LnL: hi, are you LnL7 on github?
<ottidmes>
ZaraChimera: maybe you still used GPT?
<LnL>
yep, that's me
<ZaraChimera>
Pretty sure I didn't but I'll double check.
<ZaraChimera>
Other option is that grub didn't get installed to /boot partition.
<ZaraChimera>
And unless the cryptlvm gets unlocked wouldn't be able to read nything from it anyway.
<jacereda>
LnL: I bumped sfml version without putting a correct checksum and it's trying to build it (looks like it's building the old version still...). Do you have any idea why would that happen?
<ottidmes>
ZaraChimera: but it would get into Stage 1 of NixOS without issue, hence my remark that its unrelated to your encryption choice
<LnL>
if you use a wrong (existing) hash nix will use it if available
<LnL>
jacereda: try nix-build -A sfml.src --check
<jacereda>
LnL: but I changed a single character in the checksum to avoid that
<ZaraChimera>
Yeah, so I think something didn't take with my /boot partition and GRUB
<ZaraChimera>
I could try remounting it and rerunning the generate-config and the nixos-install commands.
<jacereda>
LnL: that's trying to download the right version, yes
<ottidmes>
ZaraChimera: skip the generate-config though!
<ZaraChimera>
So mount /dev/disk/by-label/boot /mnt/boot and then nixos-install again?
<ottidmes>
ZaraChimera: and there is nixos-enter, allowing you to enter your installation and run nixos-rebuild
<LnL>
jacereda: and did it fail with a hash mismatch?
<jacereda>
LnL: no
<LnL>
hrm, why do you think it's not using the new version then?
<jacereda>
LnL: after that, I tried to `nix-env -f '<nixpkgs>' -i sfml` and it's attempting to build, even if the checksum I have in the sfml/default.nix file is wrong
<jacereda>
LnL: in the past, I remember nix-env complained of a wrong hash and failed without even trying to build... now, it's attempting the build
<ottidmes>
ZaraChimera: I have to go now, good luck and sleep well!
<ZaraChimera>
I can't mount my datasets to /mnt to run the nixos-install command again.
<ZaraChimera>
I'm going to call it a night, I'm getting the suspicion I might have to redo the process from scratch again.
<LnL>
jacereda: both use 4mvjdp4x8parmc5fjpnx1rmh1fc3f2gr, no?
<ZaraChimera>
Or troubleshoot, either way it will work better if I'm rested.
<jacereda>
LnL: yes, so it might mean my original problem is still present in smfl-2.5.1, but then why is it even attempting the build, given that I have a line in default.nix that reads `sha256 = "0000000000000000000000000000000000000000000000000000";`?
<LnL>
that's not failing either?
<jacereda>
LnL: no
<jacereda>
LnL: I can put any arbitrary sha256 there and it attempts the build
<LnL>
uhoh, nix-build or that nix-env command you posed?
<jacereda>
nix-env -f '<nixpkgs>' -i sfml
<LnL>
only the former will use your local checkout
<jacereda>
LnL: I have nixpkgs=my-nixpkgs-checkout in NIX_PATH, shouldn't nix-env use my checkout?
<jacereda>
LnL: also, the upstream version is 2.5.0, the logs say it's attempting to build 2.5.1
<LnL>
ah yeah that's not it then
goibhniu has joined #nixos
ThatDocsLady_ has joined #nixos
<jacereda>
LnL: I'm on release-18.09 branch for nixpkgs if it matters...
<LnL>
nah, unless you're not building what you changed it should fail with the wrong hash
<{^_^}>
[nixpkgs] @primeos pushed to master « gns3-server: Switch to overrideAttrs »: https://git.io/fhvjU
philippD has joined #nixos
tzemanovic has quit [Read error: Connection reset by peer]
tzemanovic has joined #nixos
Streetwalrus has joined #nixos
<jacereda>
LnL: you're right, master is on 2.5.1 and it's using that. It was a mess between /etc/static/bashrc + ~/.bash_profile + emacs shell
<jacereda>
LnL: I need a coffee now, thanks and sorry for wasting your time
<LnL>
no problem :)
mariel__ has joined #nixos
ThatDocsLady_ has quit [Remote host closed the connection]
<wucke13>
Moin! What is the best way to define the packages in the user environment (for nix-env) through a configuration file? `.config/nixpkgs/config.nix` does not work for me, as file collisions hapen a lot
<jboy>
If I want to add the package todo.txt-cli to my systemPackages, I get an error that "todo" is an undefined variable. Can I somehow escape the period?
erictapen has joined #nixos
ma27 has joined #nixos
<jboy>
Ah, todo-txt-cli did the trick. Which is funny, because `nix-env -i todo-txt-cli` resulted in a derivation not found error.
alex`` has joined #nixos
dermetfan has quit [Ping timeout: 250 seconds]
<timokau[m]>
jboy: The difference is between the attribute name (used in systemPackages) and the package name (used by default by nix-env)
<timokau[m]>
Those are usually the same, but not always (in this case)
<timokau[m]>
Also using the package name is much slower
<timokau[m]>
Which is why its generally recommanded to use `nix-env -iA` to tell nix-env to use attribute names
<timokau[m]>
And why the nix 2.0 commands (`nix build`) etc. use attribute names by default
kim0 has quit [Quit: Connection closed for inactivity]
<tazjin>
emily: crostini question - how did you deal with `run_container.sh` expecting `/bin/bash` to exist in the container? I'm currently doing that configuration by hand which is a bit annoying
ma27 has quit [Quit: WeeChat 2.2]
alex`` has quit [Quit: WeeChat 2.3]
ma27 has joined #nixos
fendor has joined #nixos
<{^_^}>
[nixpkgs] @timokau pushed to revert-52614-collectd « Revert "collectd: fix build with lm_sensors" »: https://git.io/fhftI
<{^_^}>
[nixpkgs] @timokau opened pull request #52619 → Revert "collectd: fix build with lm_sensors" → https://git.io/fhftL
<fendor>
hello, when using haskell stack in nix mode, I can not find programs in the path such as `stack` itself. How can I execute the installed `stack` program? I think it uses nix-shell --pure under the hood
<asymmetric>
ah sorry, i didn't understand that daemon == multi-user
<hexa->
Hi, I'm trying to install nixos with fde (ef00 + luks) and GRUB comes up, selects the default entry but does not boot. It just shows the grub wallpaper. This is on 18.09.
<azazel>
hexa-: to further debug it I would try to configure grub so that it doesn't show any graphical interface...If I remember correctly pressing ESC before the menu entry selection should drop you into an old grub "boot:" prompt
<hexa->
Mic92: hey
<azazel>
and then with TAB you can list the entries and select them
pie___ has joined #nixos
<hexa->
No, doesnt do anything (ESC)
pie__ has quit [Remote host closed the connection]
<Boomerang>
Hey! I have a small fix for nixpkgs that currently involves editing hackage-packages.nix. Since it's a generated file, what is the proper way to apply my fix? :)
<{^_^}>
[nixpkgs] @timokau pushed to revert-50521-qt-cf-private « Revert "qt59.qtwebkit: fix build on Darwin" »: https://git.io/fhfGP
<Mic92>
Boomerang: some fixes go to pkgs/development/haskell-modules/configuration-common.nix
<Boomerang>
Mic92: Perfect! I'll edit that then :)
<leo60228>
What is the recommended way to package a program that needs write access to it's installation directory?
<leo60228>
It stores configuration directly where it is installed.
<leo60228>
There is no way to override this
Dagger has joined #nixos
<simpson>
It depends on what's being written. If the writes are only done once, say when first started, then you can do a first run during the install phase.
<simpson>
Hm, unfortunate. Do you have the source code? It can probably be patched out that way.
<leo60228>
The writes are done by both the program at runtime and the user manually.
<leo60228>
I do have the source code, I'm a developer, but the owner is getting increasingly frustrated with NixOS-specific changes :P
<leo60228>
My current method is to build a script that will copy the program to the directory it is run from
<simpson>
You could remind them that being capability-secure means being more modular, and that these changes are ultimately healthy for the codebase~
<simpson>
That'd work.
<simpson>
I mean that nixpkgs can carry a patch. You don't have to send every patch upstream if it's irritating to them; it is a time-honored tradition for distros to carry patches that are rejected by upstream.
marsam has quit [Ping timeout: 252 seconds]
<leo60228>
It's a mod for a paid game, not sure that'd it really fit in nixpkgs
<leo60228>
Will try to make a patch
<Baughn>
leo60228: You can copy the Dwarf Fortress approach.
<Baughn>
Which is to copy the whole thing into $HOME/.dotfiles on startup, using symlinks for the parts that *don't* change.
<Baughn>
And run it from there.
hotfuzz has joined #nixos
<simpson>
Yeah, but like, the DF expression is dangerous. It bristles with fixpoints.
<simpson>
It does work quite well.
<Baughn>
I know. Trust me, I know.
Ariakenom has quit [Ping timeout: 250 seconds]
<Baughn>
That's why I said the DF *approach*.
<leo60228>
I'm trying to write a patch for upstream that enables selecting XDG paths for configs.
erictapen has quit [Ping timeout: 246 seconds]
<Baughn>
To get back to why I opened the channel... (-_-)
iyzsong has quit [Ping timeout: 252 seconds]
slack1256 has quit [Remote host closed the connection]
<Baughn>
Is there a way to generate a canonical configuration expression from a (complicated) configuration.nix w/imports?
<Baughn>
It doesn't have to be something that can work with nixos-rebuild. I just want to diff it against previous versions.
rawreraw has joined #nixos
marsam has joined #nixos
johnnyfive has quit [Quit: I go now.]
<clever>
Baughn: i nix-instantiate both, then nix-diff the drv's
__monty__ has joined #nixos
<Baughn>
Will try, thanks!
freeman42x[nix] has joined #nixos
rawreraw has quit [Ping timeout: 244 seconds]
<{^_^}>
[nixpkgs] @marsam opened pull request #52629 → licenses.nasa13: mark as free → https://git.io/fhf8g
marsam has quit [Remote host closed the connection]
<typetetris>
Should I use `override` or `overrideAttrs` to rebuild a package with a different set of `configureFlags` ?
<qyliss>
overrideAttrs
<typetetris>
thanks
<{^_^}>
[nixpkgs] @Mic92 pushed commit from @marsam to master « pyre: fix watchman references »: https://git.io/fhf4z
<typetetris>
I wonder a little bit, why postgresql isn't build with systemd support by default in nixpkgs.
<Mic92>
tyang: mostly you can just set the GOPATH as usuall and do something like nix-shell -p go. If you use vim, you can use vimPlugins.vim-go and if you want to package your applications later you can use go2nix to get a list of dependencies
<benmachine>
hey folks, I am trying to run nixos-rebuild switch --upgrade and tend to get a few HTTP error 503s that make the upgrade fail, is there a chance that I'm using a bad mirror?
Jackneill has quit [Remote host closed the connection]
hotfuzz_ has joined #nixos
hotfuzz has quit [Ping timeout: 272 seconds]
sbdchd has joined #nixos
<hexa->
Mic92: I added an override with fetchGit to ~/.nixpkgs/config.nix, but nixos-install does not seem to want to care
ubert has quit [Ping timeout: 245 seconds]
<benmachine>
(I discovered -j 1 and am hoping that being less aggressive about my downloading will help)
<Mic92>
hexa-: the one in ~/.nixpkgs is independent from overrides specified in configuration.nix, because you can install packages as a user.
<hexa->
Mic92: either way it didn't like packageOverrides in configuration.nix afaict
<Mic92>
hexa-: you can also use an overlay. Overlays can be also loaded via environment variables.
aleph- has joined #nixos
<Mic92>
hexa-: did you add the prefix I wrote afterwards?
<Mic92>
I forgot to mention it first.
<hexa->
Mic92: nope! thx :)
<hexa->
> packageOverrides = pkgs: rec {
<{^_^}>
error: syntax error, unexpected ';', at (string):123:32
<{^_^}>
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.
<jomik>
:D
pie___ has quit [Remote host closed the connection]
freeman42x[nix] has quit [Ping timeout: 250 seconds]
jomik has quit [Client Quit]
betaboon has joined #nixos
agander has joined #nixos
<benmachine>
I'm getting "error 7 while decompressing xz file" while trying to download stuff, after my 503 errors
<Mic92>
you want to use pkgs.fetchgit because builtins.fetchgit checks for updates every 15 minutes or so, which is rather unpleasent when you try to build offline
m0rphism has quit [Quit: WeeChat 2.2]
m0rphism has joined #nixos
<{^_^}>
[nixpkgs] @flokli merged pull request #52488 → security.pam: make pam_unix.so required, not sufficient → https://git.io/fppiP
<spacetato>
Hi all, I'm new to NixOS and I have a quick home-manager question - I found an option for vscode extensions but cannot figure out what values are valid in the setting or how I would go about finding out what the valid values are
<clever>
lokado: if possible, try just running the electron binary from pkgs.electron on that packages dir
<nDuff>
The only documented mechanism I'm seeing for viewing a derivation's metadata involves nix-env, which AFAICT only works for items actually installed into the user's environment. Is there a way I can view metadata associated with a store path, similar to how show-derivation can be used?
<clever>
nDuff: .meta is not stored in along with storepaths
<nDuff>
Ahh.
<nDuff>
well, that... means I need to rethink a mechanism I was considering using to store information for diagnostic purposes.
<clever>
the nix-instantiate pass turns nix expressions into .drv files (visible with nix show-derivation)
<clever>
then realization turns drv files into compiled products
<clever>
and once its turned into a .drv file, all metadata is lost
DeaDSouL has joined #nixos
<clever>
the most you can do, is to brute-force eval "${pkgs.hello}" from every revision of nixpkgs, until you find one that matches your current hello binary (and pray it lacks overrides)
<clever>
then query the metadata on that rev
kisonecat has quit [Quit: leaving]
arjen-jonathan has quit [Ping timeout: 250 seconds]
<nDuff>
Hmm. This means there actually wasn't any linkage from my derivations to some of the operations performed in generating them -- since I have what's effectively a "resolve-dependencies" derivation generating output used to determine a list of further derivations as results. Those further derivations were making it into inputDrvs, but the actual resolve operation wasn't.
<nDuff>
...sounds like it needs to be data, not metadata. (Didn't want to treat two resolutions with the same result as different operations, thus rebuilding everything further down the tree, but it sounds like it isn't avoidable).
alex``` has quit [Read error: Connection reset by peer]
alex``` has joined #nixos
Mr_Keyser_Soze has joined #nixos
obadz has quit [Ping timeout: 246 seconds]
ilya-fedin has joined #nixos
sigmundv_ has quit [Ping timeout: 250 seconds]
Mr_Keyser_Soze has quit [Ping timeout: 250 seconds]
jperras has joined #nixos
<ilya-fedin>
Helllo. I trying to enable modem support, but I can't find services.modemmanager.enable parameter, how is it named?
orivej has quit [Ping timeout: 250 seconds]
Boomerang has quit [Quit: WeeChat 2.3]
alex``` has quit [Quit: WeeChat 2.3]
dbmikus has quit [Ping timeout: 252 seconds]
kisonecat has joined #nixos
<Myrl-saki>
is there an "empty hash" library/ lol
Synthetica has quit [Quit: Connection closed for inactivity]
steshaw has quit [Quit: Connection closed for inactivity]
klntsky has quit [Ping timeout: 256 seconds]
<gchristensen>
eh?
<nDuff>
ilya-fedin, ...grepping around nixpkgs, looks like it's systemd.services.modem-manager, with a dash. YMMV, &c.
<Myrl-saki>
Like, sha256sum which is just 0s which fits the length.
klntsky has joined #nixos
<Myrl-saki>
Like, a string of 0s which fits the length of sha256/sha512/md5.
<gchristensen>
oh, hehe, yeah, that'd be cool
<Myrl-saki>
Also, I'm getting this error. what(): /build/source/modules/ocl/src/cl_context.cpp:678: error: (-221) OpenCL not available in function getContext
<Myrl-saki>
(When have I gotten to the point that I can install random packages using Nix in the command line lol)
<kisonecat>
To modularise my configuration.nix, I'd like to split udev.extraRules into multiple imported .nix files.
<ottidmes>
kisonecat: you can also use config = mkMerge [ { ... config ... } { ... config ... } ]; to define the same config option multiple times in the same file
<Myrl-saki>
ottidmes: Correct me if I'm wrong, but can't you just import them?
<Myrl-saki>
{ imports = [ ... ] }
<ilya-fedin>
nDuff: thank you, I'll try!
<clever>
imports is often far simpler
<ottidmes>
clever: why far simpler? I mean we are talking about one call to mkMerge and a list here
<ottidmes>
Does anyone know of a good Nix pretty printer?
<clever>
ottidmes: the backtraces give better locations, and its easier to manage when you want to share it between several files
<ottidmes>
clever: you mean using actual files? not imports = [ { ... config ... } ]?
<kisonecat>
So imports just works... But how? Duplicate attributes are concatenated?
<ottidmes>
clever: I dont believe thats a problem, it has not been for me at least, I have been using config = mkMerge in most of my config files for some time
<ottidmes>
kisonecat: they are merged like any config options are merged, depending on the option's type a strategy for merging is defined (which can be just to fail if there is a duplicate definition)
<ilya-fedin>
Another question ... I activated resolved, it has resolvconf executable, but openresolv (which I don’t need at all, but installed for some reason) also has resolvconf and /run/current-system/sw/bin/resolvconf links to executable from openresolv. How to make it refer to resolvconf from systemd?
<ilya-fedin>
Without this, resolved cannot get the DNS of my local network.
<{^_^}>
[nixpkgs] @nornagon opened pull request #52638 → miniflux: add service → https://git.io/fhf6M
<ottidmes>
clever: and putting all those blocks into seperate files would defeat the whole purpose in my use case (I do not want hundred of files with just a few lines of config, or having to merge all things together in one config, not knowing anymore what belongs to what)
<ottidmes>
ilya-fedin: you can specify: environment.systemPackages = with pkgs; [ (hiPrio systemd) ]; which should give systemd's resolvconf priority when resolving collisions of supplying the same binaries
<ottidmes>
ilya-fedin: hiPrio is in lib, I assumed a `with lib;` at the top of your config here
drakonis has joined #nixos
<ilya-fedin>
ottidmes: I tried
<ilya-fedin>
environment.systemPackages = with pkgs; [
<ilya-fedin>
(lib.lowPrio openresolv)
<ilya-fedin>
But it doesn't work
<ilya-fedin>
];
drakonis_ has quit [Ping timeout: 252 seconds]
<clever>
ilya-fedin: that will add a 2nd openresolv that is at low prio, but not affect the 1st openresolv
<ilya-fedin>
Hmmm
spacetato has quit [Ping timeout: 246 seconds]
<clever>
you want to either highprio resolvconf, or use an overlay to affect pkgs.openresolv
hamishmack has joined #nixos
drakonis1 has joined #nixos
monotux has quit [Remote host closed the connection]
freeman42x[nix] has joined #nixos
<ilya-fedin>
Thank you, I'll try. Can I somehow tell Nix not to install nano? I'm trying to get used to micro, but by the inertia I type nano and the presence of nano bothers me.
<clever>
ilya-fedin: make an overlay that just sets nano = null; ?
<ottidmes>
ilya-fedin: this works too: options.environment.systemPackages = mkOption { apply = filter (pkg: pkg != pkgs.nano); };
jtojnar has joined #nixos
<ilya-fedin>
ottidmes: thank you!
<clever>
ottidmes: wut! :D
<ilya-fedin>
What are overlays in the context of Nix?
<clever>
,overlays
<{^_^}>
clever: Did you mean overlay?
<{^_^}>
Overlays look like `self: super: { foo = ...; }`. Use the self argument to get dependencies, super for overriding things and library functions (including callPackage). More info: https://nixos.org/nixpkgs/manual/#sec-overlays-install
kp__ has joined #nixos
kisonecat has quit [Remote host closed the connection]
<Myrl-saki>
Hm, how do I have a temporary nix-shell for g++?
<Myrl-saki>
nix-shell -p ocl-icd opencl-headers
<Myrl-saki>
doesn't seem to work.
<clever>
-p will have g++ by default
<Myrl-saki>
Whoops.
<Myrl-saki>
main.cpp:(.text.startup+0x42): undefined reference to `clGetPlatformIDs'
<Myrl-saki>
What I meant.
monotux has joined #nixos
sir_guy_carleton has quit [Quit: WeeChat 2.2]
<clever>
you need to pass the right -l flags, -lcl or -lopencl i'm guessing
<Myrl-saki>
Oh fuck, right.
<clever>
the stdenv deals with -L flags, which affect where -lfoo searches
<Myrl-saki>
Lol, thanks.
<clever>
but you still need -lfoo to make it link to libfoo.so
<Myrl-saki>
Hm, seems like there's a problem with OpenCV.
<ilya-fedin>
And two last questions:
<ilya-fedin>
1. Why is there no bfq multiqueue schelduler (at least in linuxPackages_latest) and how can I add it, preferably without compiling the kernel (I have weak hardware)?
<ilya-fedin>
2. Where can I see patches that can be specified in boot.kernelPatches and is there a way to put a pf patchset (for UKSM and alternative cpu scheduler)?
jomik has joined #nixos
<jomik>
Hey guys. I am having an issue with VSCode.. I am trying to enable the vim plugin. But it is just stuck at the "Reload to activate" option. I am doing it through vscode-with-extensions
<clever>
ilya-fedin: boot.kernelPatches requires the kernel rebuilding in full, but if you can build it out-of-tree, you can use boot.kerenelPackages
<jomik>
I have succesfully enabled the Nix plugin though
acarrico has quit [Ping timeout: 240 seconds]
kisonecat has quit [Ping timeout: 244 seconds]
<ilya-fedin>
clever: Well, I would like to at least just see what patches there are for the sake of interest. And, bfq is much more important :)
<slabity>
ilya-fedin: Kernel patches can range very widely
<clever>
# nix repl '<nixpkgs/nixos>'
<slabity>
I don't think there's a list of all kernel packages
<clever>
nix-repl> config.boot.kernelPatches
<clever>
[ ]
<clever>
ilya-fedin: at least on my machine, its empty by default
<samueldr>
with is annoying half of the time :/ I prefer adding a let inherit (...) ...; in block
orivej has joined #nixos
<samueldr>
or limit the `with` to one "statement" (a limited expression) like systemPackages = with pkgs; [...];
<clever>
i also try to avoid with, it defers "variable not in scope" type errors until much later, and i suspct it harms performance slightly
cyounkins has joined #nixos
<ottidmes>
with the exception of a local: with pkgs; [ ... ], I tend to only use `with` for lib. It would be painful if I have to import every lib function explicitly
<ilya-fedin>
error: Module `/etc/nixos/configuration.nix' has an unsupported attribute `boot'. This is caused by assignments to the top-level attributes `config' or `options'.
<ottidmes>
ilya-fedin: you have to put your normal config in the config attribute now
<clever>
all config must be in the config attribute
orivej has quit [Ping timeout: 246 seconds]
<clever>
if a module lacks both config and options, nixos will automatically wrap it in a config = { ... }; for you
dslegends has quit [Quit: dslegends]
<jomik>
Any vscode users here?
<simpson>
jomik: I have seen them before, yes.
<ottidmes>
jomik: yes, using it this very moment, but I have no idea how to solve your problem
<jomik>
simpson: XD Lol, good point. Just wondered if there was anyone able to help me get these extensions working properly.. I've added the Nix syntax one just fine, but adding the VSCodeVim extension gives an issue - it wont activate, just says I can reload.
<jomik>
ottidmes: Do you know what the structure of the extension should be for it to be loaded?
<simpson>
jomik: No idea, sorry. Best of luck.
<jomik>
The vim extension in store has a out/extension.js folder, whereas the Nix one does not.
<jomik>
D:
<jomik>
:P
<ottidmes>
jomik: I know that I only seen this issue myself very recently and not before, but when it happened to me last week I just had to uninstall the extension and reinstall it for it to reload and accept it properly, but not sure how to apply that trick when installed via NixOS
<jomik>
ottidmes: Yeah, that's what I woulda tried too :P Was pondering that maybe we have an issue because VSCode in nixpkgs-unstable is outadated.
<ottidmes>
jomik: to be clear, you installed you extension to vscode-with-extensions? can't you work around it by just using installing the extension from vscode itself, or does it need certain special packaging?
<jomik>
Yeah, it's using vscode-with-extensions. I don't believe I can, my code executable is wrapped to point at a different extensions-dir.
<ilya-fedin>
ottidmes: Thank you, it worked out, a new generation of my system is building :)
SoftDed has joined #nixos
SoftDed has quit [Excess Flood]
fendor has quit [Ping timeout: 250 seconds]
<jomik>
Oh.. Odd. But this could be the case. My vscode is looking for the directory /nix/store/.../share/vscode/extensions/vscodevim.vim-0.17.0/package.json
<jomik>
But it is called vscodevim.vim, without the version number.
<{^_^}>
To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected.
<samueldr>
jomik: it's 52 zeroes :)
<ilya-fedin>
By the way, nix-collect-garbage -d keeps penultimate generation of the system (at least, kernel and boot entry in systemd-boot), is it possible to somehow keep only the last generation?
<samueldr>
so in vim, 52i0 does the trick
<jomik>
It is a real pain to count to 52! I want vim so that I can just write 52i0 :P
<jomik>
That's why I am trying to get the vim extension to work XD
<samueldr>
heh
<jomik>
Guess I could use nvim..
tm has left #nixos ["WeeChat 2.2"]
<jomik>
.. I now have release-18.09, unstable and master nixpkgs :D
sigmundv_ has joined #nixos
<jomik>
And Vim mode works on master (vscode v.1.30.1)
<slabity>
ilya-fedin: You need to delete those generations before the garbage collector will remove their dependencies
<jomik>
So, guess I should just hope for that to be merged to 18.09, which probably wont happen :P
<ilya-fedin>
slabity: how?
<ottidmes>
ilya-fedin: if you want to remove all generations except for the last, you will have to reboot, otherwise it keeps a reference to the system profile it booted into
<slabity>
ilya-fedin: You can use the `--delete-older-than` flag
<slabity>
`nix-collect-garbage --delete-older-than 30d` for 30 days
<slabity>
or `nix-collect-garbage -d` for all old generations
<ilya-fedin>
ottidmes: i run command after reboot to new generation
<ottidmes>
ilya-fedin: then it is like slabity says `nix-collect-garbage -d`
<ilya-fedin>
ottidmes: But I do just that.
<ilya-fedin>
I wrote this command in the previous post.
<jomik>
As sudo, I think :)
<slabity>
Did you run it as root?
<ilya-fedin>
Yes
jomik has quit [Quit: WeeChat 2.2]
<slabity>
So you're saying it's keeping the current generation and the previous one, but deleting all others?
<ilya-fedin>
Yes
<ottidmes>
ilya-fedin: for me, a fresh reboot and running `nix-collect-garbage -d` works, so I guess there is something else keeping it around, there are ways to figure this with nix-store, but I do not remember the details
<slabity>
Does nix-collect-garbage remove the grub entries for past generations?
<slabity>
Or do you need a nixos-rebuild before they're removed?
<ottidmes>
slabity: ah that could be it
<clever>
slabity: you must nixos-rebuild after a GC, to regenerate the grub config
<ottidmes>
ilya-fedin: ^ that explains it
lokado has quit [Quit: Connection closed for inactivity]
<slabity>
Should the gc command regenerate the grub config? That might make it less confusing
<slabity>
And less likely to try booting into an invalid generation
<ilya-fedin>
slabity: I am using systemd-boot. And, as I wrote above, the problem is that the boot record remains. I did not try to load the boot record of the previous generation, perhaps all the other files (except for the kernel, it is there) have been deleted.
<clever>
GC wont delete anything in /boot/
<clever>
so the old kernels will remain, but the top-level nixos will be missing in /nix/store/ and they will fail to boot
<clever>
nixos-rebuild is the only way to update that
<ilya-fedin>
clever: That is, I have to delete boot entries and kernels manually? But why then does gc remove the boot entries and kernels of older generations?
<samueldr>
joachifm: assuming what to be merged in 18.09?
<samueldr>
oops
<samueldr>
jomik, which is gone?
<ottidmes>
yep, jomik is gone
<clever>
ilya-fedin: if you told it to delete profiles (with either -d or --delete-older-than), then it will delete the generations from /nix/var/nix/profiles/system
<clever>
ilya-fedin: but you then need to run the install-bootloader script in the current nixos, to re-sync /boot with that
<ilya-fedin>
I will reboot into a new generation, launch gc and try to load the old generation
<clever>
that script should delete old kernels too
<{^_^}>
[nixpkgs] @jabranham opened pull request #52643 → ledger: Include info files → https://git.io/fhfSi
obadz has joined #nixos
jomik has quit [Ping timeout: 250 seconds]
<ilya-fedin>
I wonder if it is possible to reset the generation counter? And how could a problem with resolvconf be solved if both packages were needed? : hmm:
copumpkin has quit [Ping timeout: 240 seconds]
<ottidmes>
ilya-fedin: counter reset, probably, but I dont know how, not sure why you want that though. About resolvconf, you could just extend the nano filter with resolvconf filter, that would still allow others to use resolvconf
<ilya-fedin>
I wonder, in theory, how to solve such package conflicts without removing packages. And about the generation counter - also just for the sake of curiosity
<{^_^}>
[nixpkgs] @vcunat pushed 3 commits to release-18.09: https://git.io/fhf9U
<samueldr>
jomik: earlier you were saying "So, guess I should just hope for that to be merged to 18.09, which probably wont happen"
<samueldr>
what was it about?
<jomik>
Lol, vscode update to 1.30.1, or whatever version it was at. I just realized that I had just failed to update my channel.
<jomik>
I was just able to remove both my unstable and master tracking, because release-18.09 is up to date :D
<jomik>
samueldr ^
<samueldr>
:)
balsoft has joined #nixos
sigmundv_ has quit [Ping timeout: 250 seconds]
<jomik>
I was surprised - last I used NixOS was 4 years ago tho, and it was pretty slow at updating then IIRC :D
<jomik>
clever: Was that setup.sh for me?
<clever>
jomik: yeah
<clever>
jomik: setting dontInstall=1 will cause genericBuild to just not install
<jomik>
Oooh, yeah, in my nix expression or?
<jomik>
I wanted to run the install command tho :
<jomik>
:p
<clever>
either in the nix (set it to true) or in bash (set it to 1)
sbdchd has quit [Remote host closed the connection]
jperras has quit [Quit: WeeChat 2.2]
<jomik>
Ah okay. Nice to know.
erictapen has quit [Ping timeout: 250 seconds]
<ottidmes>
ilya-fedin: you could also do what clever mentioned before, overlay the package with the prio overridden, that does not require filtering, nor would it result in double packages and thus lowPrio not working like you expect
vk3wtf has joined #nixos
erictapen has joined #nixos
Xiro` has quit [Quit: ERC (IRC client for Emacs 26.1)]
<Ankhers>
If I need to run `git submodule update --init' for a build. What step would be the best to do it in?
<ottidmes>
ilya-fedin: I still had some collisions due to what clever mentioned, that if you change the prio of package its no longer the same, so it works if you are the first one adding it to systemPackages, but otherwise you will have to overlay to make all references to the package use the prioritized version. I am now using this instead of wrapping packages with e.g. hiPrio in systemPackages: nixpkgs.overlays = [
<tdeo>
hi, i'm trying to turn "#1d1f21" into "1d/1f/21" in my nixos config file, any ideas on how to do this? i already figured out how to remove the # with nixpkgs.lib.removePrefix, but i'm not sure how to do the rest.
<ottidmes>
tdeo: substring?
<tdeo>
how would i use it to split it every 2 characters?
<shapr>
jevonearth: ah, I've decided to stick with UEFI
nDuff has joined #nixos
<nDuff>
...so, if I have an attrset foo that has a __functor defined, and a separate attribute bar, it looks like I can refer to that attribute with "foo.bar" in nix repl, but in nix build -A, the functor is invoked, and "bar" is looked up on the result. Is that true/expected behavior?
<ottidmes>
nDuff: seems like the normal behavior, functions are auto called with nix-build
sbdchd has joined #nixos
dermetfan has quit [Ping timeout: 272 seconds]
<infinisil>
How the hell does --allowed-uris work again??
<infinisil>
Doing a simple test I can't get it to work with files
<infinisil>
Trying --option allowed-uris 'file:///home/infinisil/Test/restricted/a' to get access to file a
<infinisil>
Apparently allowed-uris only works with builtins.fetchurl and such
<infinisil>
Not with builtins.readFile or readDir :/
neeasade has joined #nixos
<neeasade>
hi sll
<neeasade>
all
<neeasade>
hi all
<neeasade>
I have just now upgraded to 18.09
mr_noobs has joined #nixos
rummik is now known as Kim
<neeasade>
and I had a hack to fetch latest github source that is no longer working because it can't resolve the remote repo anymore
user123 has joined #nixos
<user123>
Hi. After updating from nixos 17.xx to 18.09 I am unable to boot an encrypted root partition anymore (grub partition is not encrypted). It still asks me for a password, then says success. It asked for the password a second time and says failure (Cannot use device /dev/disk/by-uuid/.... which is in use already mapped or mounted)
<user123>
I also tried 18.03
<user123>
I just did a complete nixos-install from a live-cd and it just does not work . . .
<ottidmes>
neeasade: could you maybe share this hack? that would help determining alternatives
<neeasade>
sure, sorry for not initially linking --
<neeasade>
(it is in the let of this file, resulting in a 'fetchLatestGit' function)
<{^_^}>
[nixpkgs] @blargg opened pull request #52650 → yadm: install bash and zsh completions → https://git.io/fhfNE
goibhniu has quit [Ping timeout: 250 seconds]
goibhniu has joined #nixos
<ottidmes>
neeasade: I think you should be able to implement this on top of builtins.fetchGit, I have not used it yet myself, but from what I read you can do otherwise impure things like you are doing with it: https://nixos.org/nix/manual/
<neeasade>
ottidmes: I see, I will investigate that a bit further then. thank you
<ottidmes>
neeasade: so I believe your fetchGitHashless is what builtins.fetchGit allows as well, the rev is optional
jasongrossman has quit [Ping timeout: 250 seconds]
<elvishjerricco>
neeasade: Yea it broke because sandboxing is on by default, which means builds can't use networking unless they provide the sha256 of their output. The idea being that your hack was impure, and Nix wants to disallow such things.
<elvishjerricco>
neeasade: But builtins.fetchGit is allowed to fetch the latest revision, because different revisions will always go in different store paths.
kisonecat has quit [Ping timeout: 244 seconds]
kisoneca1 has quit [Ping timeout: 268 seconds]
Mr_Keyser_Soze has joined #nixos
<neeasade>
elvishjerricco: I see, thank you for chiming in
<neeasade>
I don't believe fetchGit could always do that, that's cool
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
jperras has joined #nixos
<jomik>
Can anyone enlighten me on what zlib is?
oida has quit [Remote host closed the connection]
phreedom_ has joined #nixos
<jomik>
I am seeing zlib and cc.cc.lib being patched in, even though rpath only refers to a relative library directory.
<jomik>
Are these like standard libs that don't need to be in rpath ?
<jomik>
(which we put in rpath so that they can be found)
ensyde has quit [Ping timeout: 250 seconds]
mr_noobs has quit [Quit: WeeChat 2.2]
phreedom has quit [Ping timeout: 256 seconds]
jperras has quit [Ping timeout: 250 seconds]
nDuff has quit [Quit: zzz]
<user123>
ottidmes: I saw that the LUKS device was in configuration.nix as well as hardware-configuration.nix when I uploaded it. Removing it from configuration.nix fixed the problem.
<user123>
Thanks ;-)
balsoft has quit [Quit: Konversation terminated!]
<ottidmes>
user123: gratz on solving it!
<clever>
user123: ah, sounds like you had it defined twice
<clever>
so it tried to open it twice
<ottidmes>
clever: do you know of any nix pretty printers? I do not like having to first transform it to JSON and the using jq to prettyprint Nix
<ottidmes>
maybe I should just try the Haskell Nix parser and pretty print it myself
<clever>
hnix i think
<clever>
it should also have a pretty printer
<clever>
ive used it to generate nix attrsets, from pure haskell data records