I wouldn’t have felt comfortable getting a Darter Pro 6 from System76 without the work @stites and @khumba put into driver/module support. Thank you both so much!!
I’ve started a few repos of my own to start converting my system to flakes
now that Nix Flakes, Part 3 is out and clarifies a few things.
I will warn: my understanding is a bit patchwork since I learn this on my off-time and I don’t really have a clear learning path.
So far I’ve gotten to the point of nixos-rebuild switch --flake ./my-system#hostname
, but I get the following error:
building the system configuration...
error: --- ThrownError -------------------
Failed assertions:
- The 'fileSystems' option does not specify your root filesystem.
- You must set the option 'boot.loader.grub.devices' or 'boot.loader.grub.mirroredBoots' to make the system bootable.
Here are the flakes mirroring the work from @stites and @khumba (I only built out acpi-dkms and io-dkms as those were the only 2 modules loaded in a darp6 config):
I have another private repo for my actual system configuration. Here are the relevant parts of what I believe should be my computer’s flake.nix
:
{
description = "NixOS config for my laptop";
inputs.nixpkgs.url = github:NixOS/nixpkgs/b3251e04ee470c20f81e75d5a6080ba92dc7ed3f;
inputs.darp6.url = github:mwilsoncoding/darp6/eef2c114e8c78adb574e8637b1db480c05724fac;
outputs = { self, nixpkgs, darp6 }: {
nixosConfigurations.nixtop =
darp6.nixosConfigurations.darp6 // {
modules =
darp6.nixosConfigurations.darp6.modules ++
({pkgs, lib, ...}: {
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
# I tried importing the section below from the original hardware-configuration.nix, but got the same result
#############################
## HARDWARE-CONFIGURATION.NIX
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/blablablablabla";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/blablabla";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/blablablablabla"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
## HARDWARE-CONFIGURATION.NIX
#############################
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# fonts, networking, xmonad, kbfs, printing, yubikey, user, etc
});
};
};
}
Any ideas on how to fix?