Hi there,
$ uname -a
Linux aermlich 6.2.8 #1-NixOS SMP Wed Mar 22 12:38:11 UTC 2023 aarch64 GNU/Linux
i try to build a installation image for my thinkpad x13s. But while building the image i get:
error: Package ‘zfs-kernel-2.1.9-6.2.8-x13s’ in /home/***/nixpkgs/pkgs/os-specific/linux/zfs/default.nix:196 is marked as broken, refusing to evaluate.
which is fine, i do not need zfs, but disabling zfs does not work? Or, i guess i am just doing it wrong? I tried:
boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
boot.initrd.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
# boot.zfs.enabled = false;
But it still gets pulled in, i am a beginner with nix, so i am still struggling with the nix language which at first glance is not very intuitive.
What is frustrating, the one very intuitive option:
boot.zfs.enabled = false;
does not work. I get the following error message:
error: The option `boot.zfs.enabled' is read-only, but it's set multiple times. Definition values:
- In `/home/***/nixpkgs/nixos/modules/tasks/filesystems/zfs.nix': true
- In `/home/***/custom-install.nix': false
I am still at the very beginning of understanding nix, so this is probably a very obvious mistake. I am thankful for every response, hint and tip.
Thanks
custom-image.nix
# This module defines a NixOS installation CD that contains X11 and
# Plasma 5.
{ pkgs, lib, ... }:
{
imports = [ ./nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix ];
nixpkgs.config.allowUnfree = true;
isoImage.edition = "plasma5";
services.xserver = {
desktopManager.plasma5 = {
enable = true;
};
# Automatically login as nixos.
displayManager = {
sddm.enable = true;
autoLogin = {
enable = true;
user = "nixos";
};
};
};
environment.systemPackages = with pkgs; [
# Graphical text editor
kate
];
boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
boot.initrd.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
system.activationScripts.installerDesktop = let
# Comes from documentation.nix when xserver and nixos.enable are true.
manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop";
homeDir = "/home/nixos/";
desktopDir = homeDir + "Desktop/";
in ''
mkdir -p ${desktopDir}
chown nixos ${homeDir} ${desktopDir}
ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"}
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"}
ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop ${desktopDir + "org.kde.konsole.desktop"}
ln -sfT ${pkgs.calamares-nixos}/share/applications/io.calamares.calamares.desktop ${desktopDir + "io.calamares.calamares.desktop"}
'';
boot.loader.systemd-boot.enable = false;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
boot.zfs.enabled = false;
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_2.override {
argsOverride = rec {
src = pkgs.fetchFromGitHub {
owner = "steev";
repo = "linux";
rev = "lenovo-x13s-linux-6.2.y";
sha256 = "sha256-//D7/9sDm7TYUG5bQV/WZ3DjT9cF7O8/e5R78h69MC0=";
};
version = "${pkgs.linux_6_2.version}-x13s";
defconfig = "laptop_defconfig";
extraConfig = ''
CONFIG_SECCOMP y
'';
};
});
# hardware.deviceTree.enable = true;
# hardware.deviceTree.name = "qcom/sc8280xp-lenovo-thinkpad-x13s.dtb";
boot.initrd.availableKernelModules = [
"nls_ascii" "snd_soc_hdmi_codec" "snd_soc_core" "snd_compress"
"snd_pcm_dmaengine" "snd_pcm" "snd_timer" "snd" "soundcore" "qrtr_smd"
"btqcomsmd"
"extcon-qcom-spmi-misc"
"qcom-spmi-adc5"
"qcom-spmi-iadc"
"qcom-spmi-vadc"
"qcom-vadc-common"
"qcom-emac"
"dwmac-qcom-ethqos"
"phy-qcom-apq8064-sata"
"phy-qcom-ipq806x-sata"
"qcom-pon"
"qcom_battmgr"
"qcom_smbb"
"qcom_common"
"qcom_pil_info"
"qcom_q6v5"
"qcom_q6v5_mss"
"qcom_q6v5_pas"
"qcom_sysmon"
"slim-qcom-ctrl"
"slim-qcom-ngd-ctrl"
"qcom_gsbi"
"soundwire-qcom"
"qcom-spmi-adc-tm5"
"qcom-spmi-temp-alarm"
"snd-soc-qcom-common"
"qcom_battmgr"
"algif_aead" "des_generic"
"joydev"
"msm"
"ath11k_pci"
"qcom_pon"
"ath11k"
"ocmem"
"sha1_ce" "gpu_sched" "mac80211"
"libarc4" "mhi" "qcom_q6v5_pas" "qcom_pil_info" "qcom_q6v5" "qcom_sysmon" "qcom_common" "mdt_loader"
"qrtr"
"cfg80211" "rfkill" "sch_fq_codel" "pkcs8_key_parser" "fuse"
"ip_tables" "x_tables"
"overlay" "erofs" "libcrc32c"
"isofs" "cdrom" "uas"
"hid_multitouch"
"dm_mod"
"dm_crypt"
];
boot.initrd.kernelModules = [
"nls_ascii" "snd_soc_hdmi_codec" "snd_soc_core" "snd_compress"
"snd_pcm_dmaengine" "snd_pcm" "snd_timer" "snd" "soundcore" "qrtr_smd"
"btqcomsmd"
"extcon-qcom-spmi-misc"
"qcom-spmi-adc5"
"qcom-spmi-iadc"
"qcom-spmi-vadc"
"qcom-vadc-common"
"qcom-emac"
"dwmac-qcom-ethqos"
"phy-qcom-apq8064-sata"
"phy-qcom-ipq806x-sata"
"qcom-pon"
"qcom_battmgr"
"qcom_smbb"
"qcom_common"
"qcom_pil_info"
"qcom_q6v5"
"qcom_q6v5_mss"
"qcom_q6v5_pas"
"qcom_sysmon"
"slim-qcom-ctrl"
"slim-qcom-ngd-ctrl"
"qcom_gsbi"
"soundwire-qcom"
"qcom-spmi-adc-tm5"
"qcom-spmi-temp-alarm"
"snd-soc-qcom-common"
"qcom_battmgr"
"algif_aead" "des_generic"
"joydev"
"msm"
"ath11k_pci"
"qcom_pon"
"ath11k"
"ocmem"
"sha1_ce" "gpu_sched" "mac80211"
"libarc4" "mhi" "qcom_q6v5_pas" "qcom_pil_info" "qcom_q6v5" "qcom_sysmon" "qcom_common" "mdt_loader"
"qrtr"
"cfg80211" "rfkill" "sch_fq_codel" "pkcs8_key_parser" "fuse"
"ip_tables" "x_tables"
"overlay" "erofs" "libcrc32c"
"isofs" "cdrom" "uas"
"hid_multitouch"
"dm_mod"
"dm_crypt"
];
boot.kernelParams = [
"efi=novamap,noruntime" "earlyprintk=efi" "loglevel=7" "console=tty0"
"clk_ignore_unused"
];
}