From 1a3486d77574c06b395ab6cda41084f5ed24a3f4 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 16 Jan 2025 02:11:26 -0800 Subject: modularized nix configuration; builds correctly --- nix/modules/sda-simple.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'nix/modules/sda-simple.nix') diff --git a/nix/modules/sda-simple.nix b/nix/modules/sda-simple.nix index f4d6e0e..1513d82 100644 --- a/nix/modules/sda-simple.nix +++ b/nix/modules/sda-simple.nix @@ -1,6 +1,13 @@ -{ config, ... }: +{ config, lib, ... }: { - disko.devices = { + options.monorepo.vars.disk = lib.mkOption { + type = lib.types.str; + default = "/dev/sda"; + example = "/dev/nvme0n1"; + description = "Disk to install NixOS to"; + }; + + config.disko.devices = { disk = { my-disk = { device = config.monorepo.vars.disk; -- cgit