diff --git a/hosts/franz/disko.nix b/disko/btrfs-swap.nix similarity index 94% rename from hosts/franz/disko.nix rename to disko/btrfs-swap.nix index 29ec4ca..c709bca 100644 --- a/hosts/franz/disko.nix +++ b/disko/btrfs-swap.nix @@ -1,7 +1,7 @@ -{ +{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: { disko.devices = { disk.main = { - device = "/dev/nvme0n1"; + inherit device; type = "disk"; content = { type = "gpt"; diff --git a/hosts/franz/README.md b/hosts/franz/README.md index 38356ad..cdbf42f 100644 --- a/hosts/franz/README.md +++ b/hosts/franz/README.md @@ -3,5 +3,5 @@ ## Drive Formatting ```sh -sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./disko.nix +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ../../disko/btrfs-swap.nix --arg device '"/dev/nvme0n1"' ``` diff --git a/hosts/franz/default.nix b/hosts/franz/default.nix index 9d5478c..32956d4 100644 --- a/hosts/franz/default.nix +++ b/hosts/franz/default.nix @@ -13,7 +13,7 @@ in { inputs.disko.nixosModules.default ./hardware-configuration.nix - ./disko.nix + (import ../../disko/btrfs-swap.nix {device = "/dev/nvme0n1";}) ../common/global