summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock21
-rw-r--r--flake.nix1
-rw-r--r--hosts/antares/disk-config.nix56
3 files changed, 78 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
index 8c1a41a..420128e 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,25 @@
{
"nodes": {
+ "disko": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1739634831,
+ "narHash": "sha256-xFnU+uUl48Icas2wPQ+ZzlL2O3n8f6J2LrzNK9f2nng=",
+ "owner": "nix-community",
+ "repo": "disko",
+ "rev": "fa5746ecea1772cf59b3f34c5816ab3531478142",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "disko",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -39,6 +59,7 @@
},
"root": {
"inputs": {
+ "disko": "disko",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
diff --git a/flake.nix b/flake.nix
index b6feaf5..bb2e35c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,6 +18,7 @@
self,
nixpkgs,
home-manager,
+ disko,
...
} @ inputs: let
inherit (self) outputs;
diff --git a/hosts/antares/disk-config.nix b/hosts/antares/disk-config.nix
new file mode 100644
index 0000000..88e17e5
--- /dev/null
+++ b/hosts/antares/disk-config.nix
@@ -0,0 +1,56 @@
+# Example to create a bios compatible gpt partition
+{ lib, ... }:
+{
+ disko.devices = {
+ disk.disk1 = {
+ device = lib.mkDefault "/dev/vda";
+ type = "disk";
+ content = {
+ type = "gpt";
+ partitions = {
+ boot = {
+ name = "boot";
+ size = "1M";
+ type = "EF02";
+ };
+ esp = {
+ name = "ESP";
+ size = "500M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ };
+ root = {
+ name = "root";
+ size = "100%";
+ content = {
+ type = "lvm_pv";
+ vg = "pool";
+ };
+ };
+ };
+ };
+ };
+ lvm_vg = {
+ pool = {
+ type = "lvm_vg";
+ lvs = {
+ root = {
+ size = "100%FREE";
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
+ mountOptions = [
+ "defaults"
+ ];
+ };
+ };
+ };
+ };
+ };
+ };
+}