diff --git a/machines/sirius/README.md b/machines/sirius/README.md new file mode 100644 index 0000000..468b311 --- /dev/null +++ b/machines/sirius/README.md @@ -0,0 +1,21 @@ +## How to setup this machine. + +This machine cannot be setup the same way as other machines are setup. Meaning that `clan machine install` won't work. Because of `disko` issue. So, below is how the machine is setup. + +1. Build an image to flash to an sd-card using + +``` +nix build -L --show-trace .\#nixosConfigurations.sirius.config.system.build.images.sd-card +``` + +2. Import the `zdata` + +``` +zpool import zdata +``` + +3. Update configuration + +``` +clan machine update sirius +``` diff --git a/machines/sirius/configuration.nix b/machines/sirius/configuration.nix index a93bcca..0f84855 100644 --- a/machines/sirius/configuration.nix +++ b/machines/sirius/configuration.nix @@ -1,13 +1,20 @@ { - config, self, ... }: { imports = [ self.nixosModules.common + + ./hardware-configuration.nix ]; + image.modules.sd-card = { + disabledModules = [ + ./hardware-configuration.nix + ]; + }; + clan.core.sops.defaultGroups = [ "admins" ]; nixpkgs.hostPlatform = { @@ -32,4 +39,35 @@ options = "--delete-older-than 15d"; }; + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + + boot.zfs.extraPools = [ "zdata" ]; + boot.supportedFilesystems = [ "zfs" ]; + boot.initrd.availableKernelModules = [ + "usb_storage" + "sd_mod" + ]; + + fileSystems."/mnt/hdd" = { + device = "zdata/nas"; + fsType = "zfs"; + mountPoint = "/mnt/hdd"; + options = [ + "nofail" + "zfsutil" + ]; + }; + + fileSystems."/var/lib" = { + device = "zdata/service-data"; + fsType = "zfs"; + mountPoint = "/var/lib"; + options = [ + "x-initrd.mount" + "nofail" + "zfsutil" + ]; + }; + } diff --git a/machines/sirius/disko-ref.nix b/machines/sirius/disko-ref.nix new file mode 100644 index 0000000..403215b --- /dev/null +++ b/machines/sirius/disko-ref.nix @@ -0,0 +1,150 @@ +{ lib, pkgs, ... }: +let + hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; + # os = "/dev/disk/by-id/mmc-SD64G_0x8336354b"; + vdev = [ + "/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBVV7Z" + "/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBSJRE" + ]; + configTxt = pkgs.writeText "config.txt" '' + [pi4] + kernel=u-boot-rpi4.bin + enable_gic=1 + + # Otherwise the resolution will be weird in most cases, compared to + # what the pi3 firmware does by default. + disable_overscan=1 + + # Supported in newer board revisions + arm_boost=1 + + [all] + # Boot in 64-bit mode. + arm_64bit=1 + + # U-Boot needs this to work, regardless of whether UART is actually used or not. + # Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still + # a requirement in the future. + enable_uart=1 + + # Prevent the firmware from smashing the framebuffer setup done by the mainline kernel + # when attempting to show low-voltage or overtemperature warnings. + avoid_warnings=1 + ''; +in +{ + + boot.loader = { + systemd-boot = { + enable = true; + }; + efi = { + canTouchEfiVariables = true; + }; + }; + # boot.tmp.useTmpfs = true; + + disko.devices = { + disk = { + # "os-${hashDisk os}" = { + # type = "disk"; + # device = os; + # content = { + # type = "gpt"; + # partitions = { + # firmware = { + # size = "60M"; + # priority = 1; + # type = "0700"; + # content = { + # type = "filesystem"; + # format = "vfat"; + # mountpoint = "/firmware"; + # postMountHook = toString ( + # pkgs.writeScript "postMountHook.sh" '' + # (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf *.dtb /mnt/firmware/) + # cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin /mnt/firmware/u-boot-rpi4.bin + # cp ${configTxt} /mnt/firmware/config.txt + # '' + # ); + # }; + # }; + # ESP = { + # size = "2G"; + # type = "EF00"; + # content = { + # type = "filesystem"; + # format = "vfat"; + # mountpoint = "/boot"; + # mountOptions = [ "umask=0077" ]; + # }; + # }; + # root = { + # name = "root"; + # end = "-0"; + # content = { + # type = "filesystem"; + # format = "f2fs"; + # mountpoint = "/"; + # extraArgs = [ + # "-O" + # "extra_attr,inode_checksum,sb_checksum,compression" + # ]; + # mountOptions = [ "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" ]; + # }; + # }; + # }; + # }; + # }; + } + // (lib.listToAttrs ( + map (disk: { + name = "data-${hashDisk disk}"; + value = { + type = "disk"; + device = disk; + content = { + type = "zfs"; + pool = "zdata"; + }; + }; + }) vdev + )); + zpool = { + zdata = { + type = "zpool"; + options.ashift = "12"; + rootFsOptions = { + mountpoint = "none"; + compression = "lz4"; + acltype = "posixacl"; + xattr = "sa"; + "com.sun:auto-snapshot" = "true"; + }; + mode = { + topology = { + type = "topology"; + vdev = [ + { + mode = "mirror"; + members = vdev; + } + ]; + }; + }; + datasets = { + "nas" = { + type = "zfs_fs"; + mountpoint = "/mnt/hdd"; + mountOptions = [ "nofail" ]; + }; + "service-data" = { + type = "zfs_fs"; + mountpoint = "/var/lib"; + mountOptions = [ "nofail" ]; + }; + }; + }; + }; + }; +} diff --git a/machines/sirius/disko.nix b/machines/sirius/disko.nix deleted file mode 100644 index a5ee19f..0000000 --- a/machines/sirius/disko.nix +++ /dev/null @@ -1,108 +0,0 @@ -{ lib, ... }: -let - hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; - os = "/dev/disk/by-id/mmc-SD64G_0x8336354b"; - vdev = [ - "/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBVV7Z" - "/dev/disk/by-id/ata-ST20000NM002H-3KV133_ZYDBSJRE" - ]; -in -{ - - boot.loader = { - systemd-boot = { - enable = true; - }; - efi = { - canTouchEfiVariables = true; - }; - }; - boot.tmp.useTmpfs = true; - - disko.devices = { - disk = { - "os-${hashDisk os}" = { - type = "disk"; - device = os; - content = { - type = "gpt"; - partitions = { - ESP = { - end = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - name = "root"; - end = "-0"; - content = { - type = "filesystem"; - format = "f2fs"; - mountpoint = "/"; - extraArgs = [ - "-O" - "extra_attr,inode_checksum,sb_checksum,compression" - ]; - mountOptions = [ "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" ]; - }; - }; - }; - }; - }; - } - // (lib.listToAttrs ( - map (disk: { - name = "data-${hashDisk disk}"; - value = { - type = "disk"; - device = disk; - content = { - type = "zfs"; - pool = "zdata"; - }; - }; - }) vdev - )); - zpool = { - zdata = { - type = "zpool"; - options.ashift = "12"; - rootFsOptions = { - mountpoint = "none"; - compression = "lz4"; - acltype = "posixacl"; - xattr = "sa"; - "com.sun:auto-snapshot" = "true"; - }; - mode = { - topology = { - type = "topology"; - vdev = [ - { - mode = "mirror"; - members = vdev; - } - ]; - }; - }; - datasets = { - "nas" = { - type = "zfs_fs"; - mountpoint = "/mnt/hdd"; - mountOptions = [ "nofail" ]; - }; - "service-data" = { - type = "zfs_fs"; - mountpoint = "/var/lib"; - mountOptions = [ "nofail" ]; - }; - }; - }; - }; - }; -} diff --git a/machines/sirius/facter.json b/machines/sirius/facter.json deleted file mode 100644 index b5c9324..0000000 --- a/machines/sirius/facter.json +++ /dev/null @@ -1,1147 +0,0 @@ -{ - "version": 1, - "system": "aarch64-linux", - "virtualisation": "none", - "hardware": { - "bridge": [ - { - "index": 8, - "attached_to": 0, - "class_list": ["pci", "bridge"], - "bus_type": { - "hex": "0004", - "name": "PCI", - "value": 4 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0006", - "name": "Bridge", - "value": 6 - }, - "sub_class": { - "hex": "0004", - "name": "PCI bridge", - "value": 4 - }, - "pci_interface": { - "hex": "0000", - "name": "Normal decode", - "value": 0 - }, - "vendor": { - "hex": "14e4", - "name": "Broadcom", - "value": 5348 - }, - "device": { - "hex": "2711", - "value": 10001 - }, - "revision": { - "hex": "0020", - "value": 32 - }, - "model": "Broadcom PCI bridge", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0", - "sysfs_bus_id": "0000:00:00.0", - "detail": { - "function": 0, - "command": 6, - "header_type": 1, - "secondary_bus": 1, - "prog_if": 0 - }, - "driver": "pcieport", - "driver_module": "pcieportdrv", - "drivers": ["pcieport"], - "driver_modules": ["pcieportdrv"], - "module_alias": "pci:v000014E4d00002711sv00000000sd00000000bc06sc04i00" - } - ], - "cpu": [ - { - "architecture": "aarch64", - "vendor_name": "ARM Limited", - "family": 0, - "model": 3, - "stepping": 0, - "features": ["fp", "asimd", "evtstrm", "crc32", "cpuid"], - "bogo": 108, - "page_size": 4096, - "physical_id": 0, - "fpu": false, - "fpu_exception": false, - "write_protect": false, - "address_sizes": { - "physical": "0x0", - "virtual": "0x0" - } - } - ], - "disk": [ - { - "index": 16, - "attached_to": 14, - "class_list": ["disk", "block_device"], - "base_class": { - "hex": "0106", - "name": "Mass Storage Device", - "value": 262 - }, - "sub_class": { - "hex": "0000", - "name": "Disk", - "value": 0 - }, - "serial": "0xfb330ff6", - "model": "Disk", - "sysfs_id": "/class/block/mmcblk1", - "sysfs_bus_id": "mmc1:59b4", - "sysfs_device_link": "/devices/platform/emmc2bus/fe340000.mmc/mmc_host/mmc1/mmc1:59b4", - "unix_device_names": [ - "/dev/disk/by-id/mmc-SD64G_0xfb330ff6", - "/dev/disk/by-path/platform-fe340000.mmc", - "/dev/mmcblk1" - ], - "resources": [ - { - "type": "disk_geo", - "cylinders": 1947968, - "heads": 4, - "sectors": 16, - "size": "0x0", - "geo_type": "logical" - }, - { - "type": "size", - "unit": "sectors", - "value_1": 124669952, - "value_2": 512 - } - ], - "driver": "sdhci-iproc", - "drivers": ["mmcblk", "sdhci-iproc"] - }, - { - "index": 17, - "attached_to": 7, - "class_list": ["disk", "usb", "scsi", "block_device"], - "bus_type": { - "hex": "0084", - "name": "SCSI", - "value": 132 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0106", - "name": "Mass Storage Device", - "value": 262 - }, - "sub_class": { - "hex": "0000", - "name": "Disk", - "value": 0 - }, - "vendor": { - "hex": "05e3", - "name": "Generic", - "value": 1507 - }, - "device": { - "hex": "0749", - "name": "STORAGE DEVICE", - "value": 1865 - }, - "revision": { - "hex": "0000", - "name": "1532", - "value": 0 - }, - "serial": "000000001532", - "model": "Generic STORAGE DEVICE", - "sysfs_id": "/class/block/sda", - "sysfs_bus_id": "0:0:0:0", - "sysfs_device_link": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/host0/target0:0:0/0:0:0:0", - "unix_device_names": [ - "/dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000001532-0:0", - "/dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0-scsi-0:0:0:0", - "/dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usbv2-0:1.1:1.0-scsi-0:0:0:0", - "/dev/sda" - ], - "unix_device_name2": "/dev/sg0", - "resources": [ - { - "type": "baud", - "speed": 480000000, - "bits": 0, - "stop_bits": 0, - "parity": 0, - "handshake": 0 - }, - { - "type": "disk_geo", - "cylinders": 31166, - "heads": 255, - "sectors": 63, - "size": "0x0", - "geo_type": "logical" - }, - { - "type": "size", - "unit": "sectors", - "value_1": 500695040, - "value_2": 512 - } - ], - "driver": "usb-storage", - "driver_module": "usb_storage", - "drivers": ["sd", "usb-storage"], - "driver_modules": ["usb_storage"], - "module_alias": "usb:v05E3p0749d1532dc00dsc00dp00ic08isc06ip50in00" - } - ], - "hub": [ - { - "index": 20, - "attached_to": 7, - "class_list": ["usb", "hub"], - "bus_type": { - "hex": "0086", - "name": "USB", - "value": 134 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "010a", - "name": "Hub", - "value": 266 - }, - "vendor": { - "hex": "1d6b", - "name": "Linux 6.12.61 xhci-hcd", - "value": 7531 - }, - "device": { - "hex": "0002", - "name": "xHCI Host Controller", - "value": 2 - }, - "revision": { - "hex": "0000", - "name": "6.12", - "value": 0 - }, - "serial": "0000:01:00.0", - "model": "Linux 6.12.61 xhci-hcd xHCI Host Controller", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-0:1.0", - "sysfs_bus_id": "1-0:1.0", - "resources": [ - { - "type": "baud", - "speed": 480000000, - "bits": 0, - "stop_bits": 0, - "parity": 0, - "handshake": 0 - } - ], - "detail": { - "device_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "device_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_protocol": 1, - "interface_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "interface_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "interface_protocol": 0, - "interface_number": 0, - "interface_alternate_setting": 0 - }, - "hotplug": "usb", - "driver": "hub", - "driver_module": "usbcore", - "drivers": ["hub"], - "driver_modules": ["usbcore"], - "module_alias": "usb:v1D6Bp0002d0612dc09dsc00dp01ic09isc00ip00in00" - }, - { - "index": 22, - "attached_to": 20, - "class_list": ["usb", "hub"], - "bus_type": { - "hex": "0086", - "name": "USB", - "value": 134 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "010a", - "name": "Hub", - "value": 266 - }, - "vendor": { - "hex": "2109", - "value": 8457 - }, - "device": { - "hex": "3431", - "name": "USB2.0 Hub", - "value": 13361 - }, - "revision": { - "hex": "0000", - "name": "4.21", - "value": 0 - }, - "model": "USB2.0 Hub", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1:1.0", - "sysfs_bus_id": "1-1:1.0", - "resources": [ - { - "type": "baud", - "speed": 480000000, - "bits": 0, - "stop_bits": 0, - "parity": 0, - "handshake": 0 - } - ], - "detail": { - "device_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "device_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_protocol": 1, - "interface_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "interface_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "interface_protocol": 0, - "interface_number": 0, - "interface_alternate_setting": 0 - }, - "hotplug": "usb", - "driver": "hub", - "driver_module": "usbcore", - "drivers": ["hub"], - "driver_modules": ["usbcore"], - "module_alias": "usb:v2109p3431d0421dc09dsc00dp01ic09isc00ip00in00" - }, - { - "index": 23, - "attached_to": 7, - "class_list": ["usb", "hub"], - "bus_type": { - "hex": "0086", - "name": "USB", - "value": 134 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "010a", - "name": "Hub", - "value": 266 - }, - "vendor": { - "hex": "1d6b", - "name": "Linux 6.12.61 xhci-hcd", - "value": 7531 - }, - "device": { - "hex": "0003", - "name": "xHCI Host Controller", - "value": 3 - }, - "revision": { - "hex": "0000", - "name": "6.12", - "value": 0 - }, - "serial": "0000:01:00.0", - "model": "Linux 6.12.61 xhci-hcd xHCI Host Controller", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-0:1.0", - "sysfs_bus_id": "2-0:1.0", - "detail": { - "device_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "device_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_protocol": 3, - "interface_class": { - "hex": "0009", - "name": "hub", - "value": 9 - }, - "interface_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "interface_protocol": 0, - "interface_number": 0, - "interface_alternate_setting": 0 - }, - "hotplug": "usb", - "driver": "hub", - "driver_module": "usbcore", - "drivers": ["hub"], - "driver_modules": ["usbcore"], - "module_alias": "usb:v1D6Bp0003d0612dc09dsc00dp03ic09isc00ip00in00" - } - ], - "keyboard": [ - { - "index": 21, - "attached_to": 22, - "class_list": ["keyboard", "usb"], - "bus_type": { - "hex": "0086", - "name": "USB", - "value": 134 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0108", - "name": "Keyboard", - "value": 264 - }, - "sub_class": { - "hex": "0000", - "name": "Keyboard", - "value": 0 - }, - "vendor": { - "hex": "046d", - "name": "Logitech Inc.", - "value": 1133 - }, - "device": { - "hex": "c31c", - "name": "USB Keyboard", - "value": 49948 - }, - "revision": { - "hex": "0000", - "name": "49.00", - "value": 0 - }, - "model": "Logitech USB Keyboard", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0", - "sysfs_bus_id": "1-1.3:1.0", - "unix_device_names": [ - "/dev/input/by-id/usb-Logitech_USB_Keyboard-event-kbd", - "/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-event-kbd", - "/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usbv2-0:1.3:1.0-event-kbd", - "/dev/input/event2" - ], - "resources": [ - { - "type": "baud", - "speed": 1500000, - "bits": 0, - "stop_bits": 0, - "parity": 0, - "handshake": 0 - } - ], - "detail": { - "device_class": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_protocol": 0, - "interface_class": { - "hex": "0003", - "name": "hid", - "value": 3 - }, - "interface_subclass": { - "hex": "0001", - "name": "audio", - "value": 1 - }, - "interface_protocol": 1, - "interface_number": 0, - "interface_alternate_setting": 0 - }, - "hotplug": "usb", - "driver": "usbhid", - "driver_module": "usbhid", - "drivers": ["usbhid"], - "driver_modules": ["usbhid"], - "driver_info": { - "type": "keyboard", - "xkb_rules": "xfree86" - }, - "module_alias": "usb:v046DpC31Cd4900dc00dsc00dp00ic03isc01ip01in00" - } - ], - "memory": [ - { - "index": 6, - "attached_to": 0, - "class_list": ["memory"], - "base_class": { - "hex": "0101", - "name": "Internally Used Class", - "value": 257 - }, - "sub_class": { - "hex": "0002", - "name": "Main Memory", - "value": 2 - }, - "model": "Main Memory", - "resources": [ - { - "type": "phys_mem", - "range": 8053063680 - } - ] - } - ], - "mmc_controller": [ - { - "index": 14, - "attached_to": 0, - "class_list": ["mmc_controller"], - "bus_type": { - "hex": "0093", - "name": "MMC", - "value": 147 - }, - "slot": { - "bus": 0, - "number": 1 - }, - "base_class": { - "hex": "0117", - "name": "MMC Controller", - "value": 279 - }, - "vendor": "", - "device": "SD Controller 1", - "model": "SD Controller 1", - "sysfs_id": "/devices/platform/emmc2bus/fe340000.mmc/mmc_host/mmc1/mmc1:59b4", - "sysfs_bus_id": "mmc1:59b4", - "driver": "mmcblk", - "drivers": ["mmcblk"] - }, - { - "index": 15, - "attached_to": 0, - "class_list": ["mmc_controller"], - "bus_type": { - "hex": "0093", - "name": "MMC", - "value": 147 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0117", - "name": "MMC Controller", - "value": 279 - }, - "vendor": "", - "device": "SDIO Controller 0", - "model": "SDIO Controller 0", - "sysfs_id": "/devices/platform/soc/fe300000.mmc/mmc_host/mmc0/mmc0:0001", - "sysfs_bus_id": "mmc0:0001" - } - ], - "network_controller": [ - { - "index": 10, - "attached_to": 0, - "class_list": ["network_controller", "wlan_card"], - "bus_type": { - "hex": "0094", - "name": "SDIO", - "value": 148 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0002", - "name": "Network controller", - "value": 2 - }, - "sub_class": { - "hex": "0082", - "name": "WLAN controller", - "value": 130 - }, - "vendor": { - "hex": "02d0", - "name": "Broadcom Corp.", - "value": 720 - }, - "device": { - "hex": "a9a6", - "name": "BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "value": 43430 - }, - "model": "Broadcom BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "sysfs_id": "/devices/platform/soc/fe300000.mmc/mmc_host/mmc0/mmc0:0001/mmc0:0001:1", - "sysfs_bus_id": "mmc0:0001:1", - "unix_device_names": ["wlan0"], - "resources": [ - { - "type": "hwaddr", - "address": 54 - }, - { - "type": "phwaddr", - "address": 100 - }, - { - "type": "wlan", - "channels": [ - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "36", - "40", - "44", - "48", - "52", - "56", - "60", - "64", - "100", - "104", - "108", - "112", - "116", - "120", - "124", - "128", - "132", - "136", - "140", - "144", - "149" - ], - "frequencies": [ - "2.412", - "2.417", - "2.422", - "2.427", - "2.432", - "2.437", - "2.442", - "2.447", - "2.452", - "2.457", - "2.462", - "5.18", - "5.2", - "5.22", - "5.24", - "5.26", - "5.28", - "5.3", - "5.32", - "5.5", - "5.52", - "5.54", - "5.56", - "5.58", - "5.6", - "5.62", - "5.64", - "5.66", - "5.68", - "5.7", - "5.72", - "5.745" - ], - "auth_modes": ["open", "sharedkey", "wpa-psk", "wpa-eap"], - "enc_modes": ["WEP40", "WEP104", "TKIP", "CCMP"] - } - ], - "driver": "brcmfmac", - "driver_module": "brcmfmac", - "drivers": ["brcmfmac"], - "driver_modules": ["brcmfmac", "brcmfmac", "brcmfmac"], - "module_alias": "sdio:c00v02D0dA9A6" - }, - { - "index": 12, - "attached_to": 0, - "class_list": ["network_controller"], - "base_class": { - "hex": "0002", - "name": "Network controller", - "value": 2 - }, - "sub_class": { - "hex": "0000", - "name": "Ethernet controller", - "value": 0 - }, - "device": { - "hex": "0000", - "name": "ARM Ethernet controller", - "value": 0 - }, - "model": "ARM Ethernet controller", - "sysfs_id": "/devices/platform/scb/fd580000.ethernet", - "sysfs_bus_id": "fd580000.ethernet", - "unix_device_names": ["end0"], - "resources": [ - { - "type": "hwaddr", - "address": 100 - }, - { - "type": "phwaddr", - "address": 100 - } - ], - "driver": "bcmgenet", - "driver_module": "genet", - "drivers": ["bcmgenet"], - "driver_modules": ["genet"], - "module_alias": "of:NethernetT(null)Cbrcm,bcm2711-genet-v5" - } - ], - "network_interface": [ - { - "index": 24, - "attached_to": 12, - "class_list": ["network_interface"], - "base_class": { - "hex": "0107", - "name": "Network Interface", - "value": 263 - }, - "sub_class": { - "hex": "0001", - "name": "Ethernet", - "value": 1 - }, - "model": "Ethernet network interface", - "sysfs_id": "/class/net/end0", - "sysfs_device_link": "/devices/platform/scb/fd580000.ethernet", - "unix_device_names": ["end0"], - "resources": [ - { - "type": "hwaddr", - "address": 100 - }, - { - "type": "phwaddr", - "address": 100 - } - ], - "driver": "bcmgenet", - "driver_module": "genet", - "drivers": ["bcmgenet"], - "driver_modules": ["genet"] - }, - { - "index": 25, - "attached_to": 0, - "class_list": ["network_interface"], - "base_class": { - "hex": "0107", - "name": "Network Interface", - "value": 263 - }, - "sub_class": { - "hex": "0000", - "name": "Loopback", - "value": 0 - }, - "model": "Loopback network interface", - "sysfs_id": "/class/net/lo", - "unix_device_names": ["lo"] - }, - { - "index": 26, - "attached_to": 10, - "class_list": ["network_interface"], - "base_class": { - "hex": "0107", - "name": "Network Interface", - "value": 263 - }, - "sub_class": { - "hex": "000a", - "name": "WLAN", - "value": 10 - }, - "model": "WLAN network interface", - "sysfs_id": "/class/net/wlan0", - "sysfs_device_link": "/devices/platform/soc/fe300000.mmc/mmc_host/mmc0/mmc0:0001/mmc0:0001:1", - "unix_device_names": ["wlan0"], - "resources": [ - { - "type": "hwaddr", - "address": 54 - }, - { - "type": "phwaddr", - "address": 100 - } - ], - "driver": "brcmfmac", - "driver_module": "brcmfmac", - "drivers": ["brcmfmac"], - "driver_modules": ["brcmfmac", "brcmfmac", "brcmfmac"] - } - ], - "system": {}, - "unknown": [ - { - "index": 9, - "attached_to": 0, - "class_list": ["unknown"], - "bus_type": { - "hex": "0094", - "name": "SDIO", - "value": 148 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "sub_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "vendor": { - "hex": "02d0", - "name": "Broadcom Corp.", - "value": 720 - }, - "device": { - "hex": "a9a6", - "name": "BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "value": 43430 - }, - "model": "Broadcom BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "sysfs_id": "/devices/platform/soc/fe300000.mmc/mmc_host/mmc0/mmc0:0001/mmc0:0001:3", - "sysfs_bus_id": "mmc0:0001:3", - "module_alias": "sdio:c02v02D0dA9A6" - }, - { - "index": 11, - "attached_to": 0, - "class_list": ["unknown"], - "bus_type": { - "hex": "0094", - "name": "SDIO", - "value": 148 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "sub_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "vendor": { - "hex": "02d0", - "name": "Broadcom Corp.", - "value": 720 - }, - "device": { - "hex": "a9a6", - "name": "BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "value": 43430 - }, - "model": "Broadcom BCM43438 combo WLAN and Bluetooth Low Energy (BLE)", - "sysfs_id": "/devices/platform/soc/fe300000.mmc/mmc_host/mmc0/mmc0:0001/mmc0:0001:2", - "sysfs_bus_id": "mmc0:0001:2", - "driver": "brcmfmac", - "driver_module": "brcmfmac", - "drivers": ["brcmfmac"], - "driver_modules": ["brcmfmac", "brcmfmac", "brcmfmac"], - "module_alias": "sdio:c00v02D0dA9A6" - } - ], - "usb": [ - { - "index": 18, - "attached_to": 22, - "class_list": ["usb", "unknown"], - "bus_type": { - "hex": "0086", - "name": "USB", - "value": 134 - }, - "slot": { - "bus": 0, - "number": 0 - }, - "base_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "sub_class": { - "hex": "0000", - "name": "Unclassified device", - "value": 0 - }, - "vendor": { - "hex": "046d", - "name": "Logitech Inc.", - "value": 1133 - }, - "device": { - "hex": "c31c", - "name": "USB Keyboard", - "value": 49948 - }, - "revision": { - "hex": "0000", - "name": "49.00", - "value": 0 - }, - "model": "Logitech USB Keyboard", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1", - "sysfs_bus_id": "1-1.3:1.1", - "unix_device_names": [ - "/dev/input/by-id/usb-Logitech_USB_Keyboard-event-if01", - "/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.1-event", - "/dev/input/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usbv2-0:1.3:1.1-event", - "/dev/input/event3" - ], - "resources": [ - { - "type": "baud", - "speed": 1500000, - "bits": 0, - "stop_bits": 0, - "parity": 0, - "handshake": 0 - } - ], - "detail": { - "device_class": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "device_protocol": 0, - "interface_class": { - "hex": "0003", - "name": "hid", - "value": 3 - }, - "interface_subclass": { - "hex": "0000", - "name": "per_interface", - "value": 0 - }, - "interface_protocol": 0, - "interface_number": 1, - "interface_alternate_setting": 0 - }, - "hotplug": "usb", - "driver": "usbhid", - "driver_module": "usbhid", - "drivers": ["usbhid"], - "driver_modules": ["usbhid"], - "module_alias": "usb:v046DpC31Cd4900dc00dsc00dp00ic03isc00ip00in01" - } - ], - "usb_controller": [ - { - "index": 7, - "attached_to": 8, - "class_list": ["usb_controller", "pci"], - "bus_type": { - "hex": "0004", - "name": "PCI", - "value": 4 - }, - "slot": { - "bus": 1, - "number": 0 - }, - "base_class": { - "hex": "000c", - "name": "Serial bus controller", - "value": 12 - }, - "sub_class": { - "hex": "0003", - "name": "USB Controller", - "value": 3 - }, - "pci_interface": { - "hex": "0030", - "value": 48 - }, - "vendor": { - "hex": "1106", - "value": 4358 - }, - "sub_vendor": { - "hex": "1106", - "value": 4358 - }, - "device": { - "hex": "3483", - "value": 13443 - }, - "sub_device": { - "hex": "3483", - "value": 13443 - }, - "revision": { - "hex": "0001", - "value": 1 - }, - "model": "USB Controller", - "sysfs_id": "/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0", - "sysfs_bus_id": "0000:01:00.0", - "detail": { - "function": 0, - "command": 1350, - "header_type": 0, - "secondary_bus": 0, - "prog_if": 48 - }, - "driver": "xhci_hcd", - "driver_module": "xhci_pci", - "drivers": ["xhci_hcd"], - "driver_modules": ["xhci_pci"], - "module_alias": "pci:v00001106d00003483sv00001106sd00003483bc0Csc03i30" - }, - { - "index": 13, - "attached_to": 0, - "class_list": ["usb_controller"], - "base_class": { - "hex": "000c", - "name": "Serial bus controller", - "value": 12 - }, - "sub_class": { - "hex": "0003", - "name": "USB Controller", - "value": 3 - }, - "pci_interface": { - "hex": "0000", - "name": "UHCI", - "value": 0 - }, - "device": { - "hex": "0000", - "name": "ARM USB controller", - "value": 0 - }, - "model": "ARM USB controller", - "sysfs_id": "/devices/platform/soc/fe980000.usb", - "sysfs_bus_id": "fe980000.usb", - "driver": "dwc2", - "drivers": ["dwc2"], - "driver_info": { - "type": "module", - "db_entry_0": ["uhci-hcd"], - "active": false, - "modprobe": true, - "names": ["uhci-hcd"], - "module_args": [""], - "conf": "" - }, - "module_alias": "of:NusbT(null)Cbrcm,bcm2835-usb" - } - ] - }, - "smbios": {} -} diff --git a/machines/sirius/hardware-configuration.nix b/machines/sirius/hardware-configuration.nix new file mode 100644 index 0000000..7c4203c --- /dev/null +++ b/machines/sirius/hardware-configuration.nix @@ -0,0 +1,6 @@ +{ + fileSystems."/" = { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + fsType = "ext4"; + }; +}