diff --git a/README.md b/README.md new file mode 100644 index 0000000..e914dec --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ + +## Pickwick + +```bash +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./hosts/pickwick/disko.nix +sudo nixos-install --root /mnt --flake .#pickwick +``` + +## Lemur + +```bash +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./hosts/lemur/disko.nix +sudo nixos-install --root /mnt --flake .#lemur +``` diff --git a/hosts/lemur/disko.nix b/hosts/lemur/disko.nix index 2ffdb6e..ca700c3 100644 --- a/hosts/lemur/disko.nix +++ b/hosts/lemur/disko.nix @@ -1,12 +1,8 @@ -{ - device ? throw "select device" -, ... -}: { disko.devices = { disk = { - main = { - inherit device; + disk0 = { + device = "/dev/nvme0n1"; type = "disk"; content = { type = "gpt"; @@ -61,6 +57,39 @@ }; }; }; + disk1 = { + device = "/dev/nvme1n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + home = { + size = "50%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + extraArgs = [ + "-L" + "HOME" + ]; + }; + }; + data = { + size = "50%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/data"; + extraArgs = [ + "-L" + "DATA" + ]; + }; + }; + }; + }; + }; }; }; } diff --git a/hosts/lemur/hardware.nix b/hosts/lemur/hardware.nix index 3708705..ffd8b83 100644 --- a/hosts/lemur/hardware.nix +++ b/hosts/lemur/hardware.nix @@ -4,7 +4,7 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - (import ./disko.nix { device = "/dev/nvme0n1"; }) + ./disko.nix ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; diff --git a/hosts/pickwick/disko.nix b/hosts/pickwick/disko.nix index 2ffdb6e..6d71da5 100644 --- a/hosts/pickwick/disko.nix +++ b/hosts/pickwick/disko.nix @@ -1,12 +1,8 @@ -{ - device ? throw "select device" -, ... -}: { disko.devices = { disk = { main = { - inherit device; + device = "/dev/nvme0n1"; type = "disk"; content = { type = "gpt"; diff --git a/hosts/pickwick/hardware.nix b/hosts/pickwick/hardware.nix index c23cc32..f7c6f0b 100644 --- a/hosts/pickwick/hardware.nix +++ b/hosts/pickwick/hardware.nix @@ -4,7 +4,7 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - (import ./disko.nix { device = "/dev/nvme0n1"; }) + ./disko.nix inputs.nixos-hardware.nixosModules.framework-13-7040-amd ];