summaryrefslogtreecommitdiff
path: root/machines/apollo/disko.nix
diff options
context:
space:
mode:
authorDevin Finlinson <devin.finlinson@pm.me>2026-08-25 15:23:30 -0600
committerDevin Finlinson <devin.finlinson@pm.me>2026-08-25 15:23:30 -0600
commit3fb6b1f841bfae880375f6cf5bf7872c67913e8d (patch)
tree2879404bb9f7de3062601630d06069755c3c3694 /machines/apollo/disko.nix
parent704e34461dd3464ff5dd89718d7194154117c170 (diff)
parentc87672dc1d12deec86c91db7fc7fa85fd57e991b (diff)
Merge branch 'master' of ssh://myrmexia.xyz:/srv/git/.flake
Diffstat (limited to 'machines/apollo/disko.nix')
-rw-r--r--machines/apollo/disko.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/machines/apollo/disko.nix b/machines/apollo/disko.nix
new file mode 100644
index 0000000..3b5d899
--- /dev/null
+++ b/machines/apollo/disko.nix
@@ -0,0 +1,66 @@
+{
+ # required by impermanence
+ fileSystems."/persist".neededForBoot = true;
+
+ disko.devices = {
+ disk.sda = {
+ type = "disk";
+ device = "/dev/sda";
+ content = {
+ type = "gpt";
+ partitions = {
+ boot = {
+ label = "boot";
+ name = "ESP";
+ # start = "1M";
+ size = "1G";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ # mountOptions = [ "umask 0077" ];
+ mountOptions = [
+ "defaults"
+ ];
+ };
+ };
+ root = {
+ size = "100%";
+ label = "root";
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-L" "nixos" "-f"];
+ subvolumes = {
+ "@root" = {
+ mountpoint = "/";
+ mountOptions = [ "subvol=root" "compress-force=zstd:5" "nodatacow"];
+ };
+ "@home" = {
+ mountpoint = "/home";
+ mountOptions = [ "subvol=home" "compress-force=zstd:5" "nodatacow"];
+ };
+ "@nix" = {
+ mountpoint = "/nix";
+ mountOptions = [ "subvol=nix" "compress-force=zstd:5" "nodatacow"];
+ };
+ "@persist" = {
+ mountpoint = "/persist";
+ mountOptions = [ "subvol=persist" "compress-force=zstd:5"];
+ };
+ "@log" = {
+ mountpoint = "/var/log";
+ mountOptions = [ "subvol=log" "compress-force=zstd:5" "nodatacow"];
+ };
+ "@swap" = {
+ mountpoint = "/swap";
+ swap.swapfile.size = "4G";
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+}