aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix1
-rw-r--r--nixos/laptop/configuration.nix1
-rw-r--r--nixos/laptop/disk-config.nix37
3 files changed, 39 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 293af35..c6228f5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -114,6 +114,7 @@
modules = [
./nixos/laptop/configuration.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
+ disko.nixosModules.disko
];
};
diff --git a/nixos/laptop/configuration.nix b/nixos/laptop/configuration.nix
index 305c997..39d6ad1 100644
--- a/nixos/laptop/configuration.nix
+++ b/nixos/laptop/configuration.nix
@@ -13,6 +13,7 @@
../nixosModules/powerbutton.nix
../nixosModules/docker.nix
../nixosModules/greetd.nix
+ ./disk-config.nix
];
# from nixosModules
diff --git a/nixos/laptop/disk-config.nix b/nixos/laptop/disk-config.nix
new file mode 100644
index 0000000..825a147
--- /dev/null
+++ b/nixos/laptop/disk-config.nix
@@ -0,0 +1,37 @@
+{
+ disko.devices = {
+ disk = {
+ main = {
+ device = "/dev/nvme0n1";
+ type = "disk";
+ content = {
+ type = "gpt";
+ partitions = {
+ boot = {
+ size = "1M";
+ type = "EF02";
+ };
+ ESP = {
+ size = "1G";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
+ root = {
+ size = "100%";
+ content = {
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}