summaryrefslogtreecommitdiff
path: root/modules/nixos/disko/remote.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/disko/remote.nix')
-rw-r--r--modules/nixos/disko/remote.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/modules/nixos/disko/remote.nix b/modules/nixos/disko/remote.nix
new file mode 100644
index 0000000..0b2e726
--- /dev/null
+++ b/modules/nixos/disko/remote.nix
@@ -0,0 +1,64 @@
+{
+ disko.devices = {
+ disk = {
+ disk1 = {
+ device = "/dev/sda";
+ type = "disk";
+ content = {
+ type = "gpt";
+ partitions = {
+ # legacy boot
+ boot = {
+ name = "boot";
+ size = "1M";
+ type = "EF02";
+ };
+
+ # efi boot
+ esp = {
+ name = "ESP";
+ size = "512M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ };
+
+ # btrfs
+ # root is on nodev
+ root = {
+ size = "100%";
+ content = {
+ extraArgs = ["-f"]; # internet told me to, works
+ type = "btrfs";
+ subvolumes = {
+ # nix store
+ "/nix" = {
+ mountpoint = "/nix";
+ };
+
+ # persistant directory
+ "/persist" = {
+ mountpoint = "/persist";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ nodev = {
+ # root
+ "/" = {
+ fsType = "tmpfs";
+ mountOptions = [
+ "defaults"
+ "mode=755" # stops security complaints
+ ];
+ };
+ };
+ };
+}