Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder for '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv' failed with exit code 2 #2

Closed
shadowrylander opened this issue Jul 17, 2020 · 89 comments

Comments

@shadowrylander
Copy link
Contributor

shadowrylander commented Jul 17, 2020

Hello! Me again! 😸

To circumvent the issues last time with using an encrypted ZFS root, I since realized that, technically, it's not the root that's the issue, but the filesystem of the nix store that's the problem, since that's where everything necessary for the system to operate is stored (I think). Therefore, I tried using a BTRFS zvolume block-device instead for just the nix store, but I getting the following error:

builder for '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv' failed with exit code 2; last 10 log lines:
    CC [M]  drivers/scsi/ses.o
    CC [M]  drivers/scsi/scsi_debug.o
    AR      drivers/scsi/built-in.a
    LD [M]  drivers/scsi/scsi_mod.o
    LD [M]  drivers/scsi/hv_storvsc.o
    LD [M]  drivers/scsi/sr_mod.o
    LD [M]  drivers/scsi/sd_mod.o
  make[2]: *** [/build/linux-4.19.132/Makefile:1054: drivers] Error 2
  make[1]: *** [Makefile:146: sub-make] Error 2
  make: *** [Makefile:24: __sub-make] Error 2
cannot build derivation '/nix/store/qlj28vpk567k362ng3yx5why8v5h8jg5-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[190 built (1 failed), 1663 copied (10135.4 MiB), 1479.5 MiB DL]
error: build of '/nix/store/qlj28vpk567k362ng3yx5why8v5h8jg5-nixos-system-chimchar-20.03post-git.drv' failed

What I'm wondering now is whether using BTRFS is the issue, or the issue is still the ZFS zvol, since the latter is still a regular block-device. I will try reinstalling with different underlying filesystems, such as XFS, F2FS, and EXT4; but in the meantime, two questions:

  1. If I may ask, what filesystem are you using for your install?
  2. Do you know of any issues with other filesystems I should be made aware of when using them for the nix store?

Thank you kindly for the help!

@shadowrylander
Copy link
Contributor Author

Or is this just a size issue? 🤔 The block-device is just 12 GB.

@shadowrylander
Copy link
Contributor Author

With xfs I got this:

building the configuration in /mnt/etc/nixos/configuration.nix...
[1/190/790 built, 1663 copied (10135.4 MiB), 1478.9 MiB DL] building linux-4.19.132 (buildPhase)/run/current-system/sw/bin/nixos-install: line 107:  8423 Killed                  nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs}

@shadowrylander
Copy link
Contributor Author

And the same with ext4:

building the configuration in /mnt/etc/nixos/configuration.nix...
[1/188/790 built, 1663 copied (10135.4 MiB), 1478.9 MiB DL] building linux-config-4.19.132 (unpa/run/current-system/sw/bin/nixos-install: line 107:  8697 Killed                  nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs}

@shadowrylander
Copy link
Contributor Author

Seems to be a size issue; I'll increase the size of the zvolume and get back to you.

@shadowrylander
Copy link
Contributor Author

Interestingly, after increasing the size of the zvolume to 20 GB and switching back to btrfs, I get this:

building the configuration in /mnt/etc/nixos/configuration.nix...
[0/5 built, 1/5/47 copied (23.9/67.3 MiB), 0.1/3.6 MiB DL] copying glibc-2.30 from local/run/current-system/sw/bin/nixos-install: line 107: 13143 Killed                  nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs}

@shadowrylander
Copy link
Contributor Author

It seems primarily to be a space issue; this is what I got on the 20 GB btrfs zvolume after trying to install NixOS a second time:

building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/yfmzd55ylpicvvhgca5hg5cicr8vgwmi-linux-config-4.19.132.drv' failed with exit code 1; last 10 log lines:
  tar: linux-4.19.132/virt/kvm/eventfd.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/irqchip.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/kvm_main.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/vfio.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/vfio.h: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/Kconfig: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/Makefile: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/irqbypass.c: Cannot write: No space left on device
  tar: Exiting with failure status due to previous errors
  do not know how to unpack source archive /nix/store/mvh0n9s2ky141q3l210dqz0iv119znm0-linux-4.19.132.tar.xz
note: build failure may have been caused by lack of free disk space
cannot build derivation '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[187 built (1 failed), 1616 copied (10068.1 MiB), 1475.2 MiB DL]
error: build of '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv' failed

Would you happen to know how much space the final install will take? Or should I just allocate something like 50 GB worth of free space to the zvolume?

@shadowrylander
Copy link
Contributor Author

Same space problem using a 50 GB zvolume:

building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/yfmzd55ylpicvvhgca5hg5cicr8vgwmi-linux-config-4.19.132.drv' failed with exit code 1; last 10 log lines:
  tar: linux-4.19.132/virt/kvm/eventfd.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/irqchip.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/kvm_main.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/vfio.c: Cannot write: No space left on device
  tar: linux-4.19.132/virt/kvm/vfio.h: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/Kconfig: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/Makefile: Cannot write: No space left on device
  tar: linux-4.19.132/virt/lib/irqbypass.c: Cannot write: No space left on device
  tar: Exiting with failure status due to previous errors
  do not know how to unpack source archive /nix/store/mvh0n9s2ky141q3l210dqz0iv119znm0-linux-4.19.132.tar.xz
note: build failure may have been caused by lack of free disk space
cannot build derivation '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[188 built (1 failed), 1663 copied (10135.5 MiB), 1478.9 MiB DL]
error: build of '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv' failed

Could this be a problem with the installation device itself? I'm using an 8 GB live install. Or could it still be the ZFS root?

@shadowrylander
Copy link
Contributor Author

I think this was the issue last time as well, that some device in the system had insufficient memory.

@anthe
Copy link
Owner

anthe commented Jul 18, 2020

Hello again! I use ext4 for my installation, and I haven't experimented with any other filesystems so I don't know about their quirks.
nixos builds packages in /tmp, so maybe you're running out of room on the live install drive. Doing a minimal installation from the live boot, and then adding nixos-surface and everything else once you're booted from your main drive I think would solve this problem.

@shadowrylander
Copy link
Contributor Author

Ah hah! Perfect! I'll try that out and get back to you!

@shadowrylander
Copy link
Contributor Author

In addition, do you know how much space the module itself takes? I allocated 12 GB for the store, but I think I might need more.

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Jul 19, 2020

Do I have to keep the update channel as 20.03? I currently have it as unstable, and I think I'm getting this as a result:

building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/ln0lqccg1396l96nb13jm9aqsk1yllp7-qtwebengine-5.12.7.drv' failed with exit code 2; last 10 log lines:
  compilation terminated.
  [14616/16299] CXX obj/content/browser/browser/display_cutout_host_impl.o_host.o
  ninja: build stopped: subcommand failed.
  make[3]: *** [Makefile.gn_run:348: run_ninja] Error 1
  make[3]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src/core'
  make[2]: *** [Makefile:82: sub-gn_run-pro-make_first] Error 2
  make[2]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src/core'
  make[1]: *** [Makefile:81: sub-core-make_first] Error 2
  make[1]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src'
  make: *** [Makefile:49: sub-src-make_first] Error 2
cannot build derivation '/nix/store/h0fyfxwg7f81pdm75i9vg7r3b4lz1vqh-libksysguard-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/yg60n3qgw5118nwrbpvzy1d2625rhsgr-ksysguard-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/72g5a8lqcjlllida42w9fcjh40bswigq-libksysguard-5.17.5_fish-completions.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/dqc9q7yw4r4zv0vwqnkwh3jvycr1cbgq-plasma-workspace-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7qw9hn2c63wclikvimbiqla0f6xxrjm0-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wnc93ykkrin8x6n93kbz058zra4yzx0r-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/wnc93ykkrin8x6n93kbz058zra4yzx0r-nixos-system-chimchar-20.03post-git.drv' failed

@shadowrylander
Copy link
Contributor Author

Actually, I think this is due to my use of KDE Plasma as my Desktop Environment; would switching to Gnome3, for example, help?

@anthe
Copy link
Owner

anthe commented Jul 19, 2020

I'm not sure how much space is necessary to build the module, the biggest package is the kernel which I think takes a few gigabytes to unpack and build. Once you add a desktop environment the space requirements would go up quite a lot. Try building without a desktop environment first, just to be sure you have the module working.
I don't know if unstable will work. Maybe you could build your system on 20.03 to see if you have everything else working, then switch to unstable and see if it breaks anything.

@shadowrylander
Copy link
Contributor Author

Makes sense; I'll get back to you on that! I've already forced the 20.03 update channel on the systems which use the module.

@shadowrylander
Copy link
Contributor Author

It works! The problems seem to have been first the limited space of the live install, then the KDE Plasma qtwebengine derivation. I'll just check if it boots on my Surface Book 2, as I installed this to an external SSD, then I'll get back to you!

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Jul 20, 2020

... And I forgot: it won't boot due to the kernel lacking the ZFS module; you wouldn't be able to help me with compiling the ZFS module against this kernel for NixOS, would you?

@anthe
Copy link
Owner

anthe commented Jul 21, 2020

What I remember from our last conversation is that zfs is broken on version 4.19 of the kernel which nixos-surface is using because the touch screen is broken on more recent version of the kernel. Upstream at linux-surface they're maintaining version 5.7 now, and maybe at that version both zfs and nixos-surface work. Unfortunately, on nixos 20.03 the latest kernel is 5.6 so we probably still have some waiting to do.

@shadowrylander
Copy link
Contributor Author

If I remember correctly, the linux-surface kernel itself doesn't have a ZFS module itself due to not being in the tree; you have to use the dkms version. So I'm not so sure it's ZFS that's broken as it is that it didn't exist to begin with. When I was using Arch, 4.19 was the most stable version to use with ZFS due to being long-term.

As it were, I've opened a new issue in the nixpkgs repo, so they might be able to help me with building a version of ZFS compatible with your module, or just building a dkms package in general.

@shadowrylander
Copy link
Contributor Author

I'm assuming using the following in the configuration file won't work, due to both the kernelPackages not including the nixos-surface value and the zfs value not having the correct build implementation in pkgs, correct?

{ config, ... }:
{
  imports = [ ./hardware-configuration ./nixos-surface/surface.nix ];
  boot.kernelPackages = [ surface ];
  boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
}

@anthe
Copy link
Owner

anthe commented Jul 22, 2020

You shouldn't need to specify boot.kernelPackages = [ surface ]; since it's specified in surface.nix. The way you specified extraModulePackages looks right to me and it should build the zfs module against the surface kernel since the kernel was specified in kernelPackages.

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Jul 22, 2020

Well it started building, then ran into this:

building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/0sfq76m0d0c11y24llvy7hx7dv9j56yw-stage-1-init.sh.drv' failed with exit code 2; last 2 log lines:
  checking syntax
  /nix/store/a2mj25zdygxyccsrs9gcnac3f2lissz7-stage-1-init.sh: line 669: syntax error: unexpected end of file
cannot build derivation '/nix/store/ckj6ghm19vryg754gk47b14flhv3y343-initrd-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vsfyixbg6sib717z46wyhzy72prx8flw-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[25 built (1 failed)]
error: build of '/nix/store/vsfyixbg6sib717z46wyhzy72prx8flw-nixos-system-chimchar-20.03post-git.drv' failed

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Jul 24, 2020

Solved the previous error; now I'm getting the following error:

modprobe: FATAL: Module surface_acpi not found in directory /lib/modules/4.19.132

@shadowrylander
Copy link
Contributor Author

'Ello?

@anthe
Copy link
Owner

anthe commented Jul 26, 2020

I don't have the surface_acpi module, here's my lsmod | grep surface
ipts_surface 16384 0 intel_ipts 36864 1 ipts_surface surface_sam_sid_perfmode 16384 0 surface_sam_sid_gpelid 20480 0 surface_sam_hps 24576 0 surface_sam_dtx 16384 1 surface_sam_san 16384 1 surface_sam_hps surface_sam_ssh 24576 4 surface_sam_sid_perfmode,surface_sam_hps,surface_sam_dtx,surface_sam_san surface_sam_sid 20480 0 crc_ccitt 16384 3 surface_sam_ssh,ipv6,rt2800lib

@shadowrylander
Copy link
Contributor Author

Ah; should I remove that from the kernelModules list and rebuild?

@anthe
Copy link
Owner

anthe commented Jul 26, 2020

Give that a try. It's curious that I also have surface_acpi in kernelModules, but I do not have that same error. Did you add surface_acpi to your configuration.nix or do you have surface_acpi only in surface.nix?

@shadowrylander
Copy link
Contributor Author

Only in your module; I'm also getting the following error, which might be due to the surface_acpi error:

modprobe: ERROR: could not insert 'zfs': Unknown symbol in module, or unknown parameter (see dmesg)

@anthe
Copy link
Owner

anthe commented Jul 26, 2020

I think that error is independent of the suface_acpi module. If you check dmesg I think you'll see an error related to the spl library. And I think that spl library is what doesn't work on 4.19.

@shadowrylander
Copy link
Contributor Author

Fair enough; is there any way for me to update the kernel, given I don't care much for the touchscreen?

@anthe
Copy link
Owner

anthe commented Aug 9, 2020

No need to try the surface kernel on non-surface devices.
My use of 'soon' was confusing, I used it in an order sense rather than a time sense. So I think maybe root isn't decrypted before stage 2 tries to run.
Do you have nixos running on non-surface devices with an encrypted root? I just want to rule out that the surface kernel is causing any problems.

@shadowrylander
Copy link
Contributor Author

Makes sense! 😹 Yes, I used to before I switched them over to a server-state; now they're non-encrypted, but while encrypted they worked fine.

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Aug 9, 2020

I doubt it would help if I added a wait / sleep command to postDeviceCommands, correct?

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Aug 10, 2020

Okay, so I reread the error, and while it stops at the aforementioned stage 2 error, the last command run was mounting [hostname]/root on /...; the last error states An error occurred in stage 1 of the boot process, which must mount the root filesystem on '/mnt_root' and then start stage 2. Note that the stage 2 sh script does in fact exist in the nix store, but cannot be accessed due to the root not having been mounted at the time.

@shadowrylander
Copy link
Contributor Author

Oh, and the wait / sleep idea didn't work. 😭

@anthe
Copy link
Owner

anthe commented Aug 10, 2020

This problem doesn't sound like a surface kernel problem. It could be a ZFS problem if for some reason the kernel can't mount the ZFS file system. Maybe the ZFS module needs to be added manually to the initrd. You could also try getting encrypted root working without ZFS just to reduce the number of possible problems you can run into.

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Aug 10, 2020

This problem doesn't sound like a surface kernel problem.

Possibly, but it wouldn't explain why the problem occurs only when using this kernel. My current initrd is here:

{ config, pkgs, lib, ... }:

{
    config.boot = lib.mkMerge [{
            loader = {
                # Use the systemd-boot EFI boot loader.
                systemd-boot.enable = true;
                efi.canTouchEfiVariables = true;
                
                grub = {
                    copyKernels = true;
                    extraEntriesBeforeNixOS = true;
                    extraEntries = ''
                        menuentry "Reboot" { reboot }
                        menuentry "Poweroff" { halt }
                    '';
                    useOSProber = true;
		    zfsSupport = true;
                };
            };
            initrd = {
                postDeviceCommands = lib.mkAfter ''
                    zfs rollback -r ${config.networking.hostName}/root@blank
                '';
                postMountCommands = lib.mkAfter ''
                    sudo -iu shadowrylander yadm -Y /cluster/cosmog -C / reset --hard ${config.networking.hostName}.nixos 2> /dev/null
                    mkdir -p /mnt

                    { ${pkgs.xonsh}/bin/xonsh; } <<'```'
                    from time import sleep
                    for i in range(5):
                        zpool import -fa 2> /dev/null
                        zfs mount -a 2> /dev/null
                        sleep(1)
                    ```
                '';
            };
            supportedFilesystems = [ "zfs" "xfs" "btrfs" "ext4" ];
            zfs = {
                requestEncryptionCredentials = true;
		enableUnstable = true;
            };
            extraModulePackages = with config.boot.kernelPackages; [ wireguard ];
        }
        (lib.mkIf config.variables.surface {
            extraModulePackages = with config.boot.kernelPackages; [ zfs ];
            initrd = {
                availableKernelModules = [ "zfs" ];
                kernelModules = [ "zfs" ];
                supportedFilesystems = [ "zfs" "xfs" "btrfs" "ext4" ];
            };
        })
    ];
}

The postDeviceCommands works as expected, so I don't know why it wouldn't mount.

Regarding the encryption, I honestly just wanted the ZFS to work; encryption is secondary for me, mostly to prevent other people from modifying or deleting my stuff rather than snooping through them.

@shadowrylander
Copy link
Contributor Author

Wait a minute... Is it possible systemd-boot and boot.loader.grub.device may be conflicting? Should I enable only one or the other?

@shadowrylander
Copy link
Contributor Author

I have filed yet another bug report on the NixOS repo: NixOS/nixpkgs#95105

@anthe
Copy link
Owner

anthe commented Aug 10, 2020

I don't see a grub device specified in your configuration, but I think it's supposed to be nodev. https://nixos.wiki/wiki/Full_Disk_Encryption (Option 3)

@shadowrylander
Copy link
Contributor Author

Ah, yes; forgot to mention that. In NixOS on ZFS, it states that for UEFI, with ZFS, I have to use an external grub device, so boot.loader.grub.device = "/dev/disk/by-partuuid/2765b6b3-e390-41a8-839b-6b4e638fec18"; is in my configuration, after I import your module.

@shadowrylander
Copy link
Contributor Author

... Always remember: if anything is not found, check your damn hardware-configuration.nix.

Turns out the init script couldn't be found because the /nix directory itself wasn't being mounted; it was completely missing from the hardware configuration!

@shadowrylander
Copy link
Contributor Author

I'll report back with the full list of changes you might want to implement zfs with the surface kernel!

@shadowrylander
Copy link
Contributor Author

Also, how do I implement the export_kernel_fpu_functions_4_14.patch directly from the official nix repositories?

@anthe
Copy link
Owner

anthe commented Aug 11, 2020

I'm not sure I know how to do that, but I think it's okay to just download it and add the patch to the list of patches in surface.nix.

@shadowrylander
Copy link
Contributor Author

Thought so. I'm testing out the 4.14 patch as mentioned above; once I've confirmed that to work, I'll send you the [complete] list of changes!

@shadowrylander
Copy link
Contributor Author

shadowrylander commented Aug 12, 2020

It works! Here's a list of changes:

        (lib.mkIf config.variables.surface {
            extraModulePackages = with config.boot.kernelPackages; [ zfs ];
            initrd = {
                availableKernelModules = [ "zfs" ];
                kernelModules = [ "zfs" ];
                supportedFilesystems = [ "zfs" ];
            };
        })
        (lib.mkIf config.variables.surface {
          plasma5.enable = lib.mkForce false;
          gnome3.enable = lib.mkForce true;
        })
        kernelPatches = [
          { patch = linux-surface/patches/4.19/0001-surface3-power.patch; name = "1"; }
          { patch = linux-surface/patches/4.19/0002-surface3-spi.patch; name = "2"; }
          { patch = linux-surface/patches/4.19/0003-surface3-oemb.patch; name = "3"; }
          { patch = linux-surface/patches/4.19/0004-surface-buttons.patch; name = "4"; }
          { patch = linux-surface/patches/4.19/0005-surface-sam.patch; name = "5"; }
          { patch = linux-surface/patches/4.19/0006-suspend.patch; name = "6"; }
          { patch = linux-surface/patches/4.19/0007-ipts.patch; name = "7"; }
          { patch = linux-surface/patches/4.19/0008-surface-lte.patch; name = "8"; }
          { patch = linux-surface/patches/4.19/0009-ioremap_uc.patch; name = "9"; }
          { patch = linux-surface/patches/4.19/0010-wifi.patch; name = "10"; }
          { patch = ./export_kernel_fpu_functions_4_14.patch; name = "11"; }
        ];

Is there anything I missed?

@shadowrylander
Copy link
Contributor Author

Oh, and could you show me how to update the module for 20.09? Or should I open another issue for that?

@shadowrylander
Copy link
Contributor Author

Sigh... I'm also getting this error when installing to my internal Surface Book 2 SSD (installing the kernel) from the external SSD (alredy has the kernel), due to the nixos channel not being set by default:

building the configuration in /mnt/etc/nixos/configuration.nix...
copying channel...
error: path '/nix/store/nv2wxppvnjpd8f9w4q4s5zja6nwckl6c-nixos-20.03-20.03
' does not exist and cannot be created

Sorry for asking you so many unrelated questions; you seem to be the only one consistently helping me.

@anthe
Copy link
Owner

anthe commented Aug 12, 2020

There's nothing in surface.nix that specifies the channel, so you can try building the module for 20.09 by setting the channel like so: sudo nix-channel add https://nixos.org/channels/20.09 nixos then nixos-rebuild switch --upgrade.
I'm not sure what to make of the error you get on attempting to install. Maybe a permissions issue?
You're the only one here asking for help, so it's not hard to do a little extra to get you going. I bet most of those other people have a lot more going on.

@shadowrylander
Copy link
Contributor Author

I'll report back after attempting to upgrade; thanks for the tip!

I can also try a sudo chmod -R o+rx /mnt/nix before attempting to install again and see what happens, if it is indeed a permissions issue.

And I thought they'd come back after a few days... Sigh...

@shadowrylander
Copy link
Contributor Author

Ah, yes, rookie mistake: forgot the nixos after the channel; so I just had to run sudo nix-channel --add https://nixos.org/channels/nixos-20.03 nixos. Those errors are horrible; no information on them whatsoever.

@anthe
Copy link
Owner

anthe commented Aug 12, 2020

When you do get everything sorted out can you submit your changes as a pull request?

@shadowrylander
Copy link
Contributor Author

Still new to git, but I'll try my best! For the changes aside from the patch itself, should I just tack them on to end of the surface.nix file whenever appropriate?

@anthe
Copy link
Owner

anthe commented Aug 12, 2020

Yup

@shadowrylander
Copy link
Contributor Author

Alright; I'll submit a request later tonight!

@anthe
Copy link
Owner

anthe commented Aug 12, 2020

When you make your patch can you exclude your desktop environment settings?

@shadowrylander
Copy link
Contributor Author

Will do! But I still don't know why KDE Plasma won't build with the surface kernel.

@shadowrylander
Copy link
Contributor Author

And requested!

@anthe anthe closed this as completed Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants