Skip to content

Commit

Permalink
lenovo-x1: don't create anymous NixOS module for disko configuration
Browse files Browse the repository at this point in the history
The NixOS module will already throw an error if an option is not set.
Anymous NixOS modules will contain no file name in the error message.

Signed-off-by: Jörg Thalheim <[email protected]>
  • Loading branch information
Mic92 authored and brianmcgillion committed Mar 12, 2024
1 parent e8120e8 commit 3e923f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/disko/lenovo-x1-disko-basic.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright 2022-2023 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
# Example to create a bios compatible gpt partition
{device ? throw "Set your device e.g. /dev/nvme0n1", ...}: {
# To use this example, you will need to specify a device i.e.
# { disko.devices.disk1.device = "/dev/sda"; }
{
disko.devices = {
disk.disk1 = {
inherit device;
type = "disk";
#TODO: hardcoding the size for now until 544 is merged
#https://github.com/nix-community/disko/pull/544
Expand Down
3 changes: 2 additions & 1 deletion targets/lenovo-x1/everything.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
self.nixosModules.microvm

# TODO: Refactor the disko module a bit
(import ../../modules/disko/lenovo-x1-disko-basic.nix {device = "/dev/nvme0n1";}) #TODO define device in hw def file
../../modules/disko/lenovo-x1-disko-basic.nix #TODO define device in hw def file
{ disko.disk.disk1.device = "/dev/nvme0n1"; }
../../modules/disko/disko-basic-postboot.nix

./sshkeys.nix
Expand Down

0 comments on commit 3e923f1

Please sign in to comment.