Browse Source

feat(odin): added mergerfs

Zander Hawke 9 months ago
parent
commit
440fabe7e3
4 changed files with 25 additions and 5 deletions
  1. 3 1
      hosts/odin/default.nix
  2. 20 0
      hosts/odin/mergerfs.nix
  3. 1 1
      modules/default.nix
  4. 1 3
      modules/nixos/default.nix

+ 3 - 1
hosts/odin/default.nix

@@ -10,9 +10,11 @@
     ./age.nix
     ./disko.nix
     ./impermanence.nix
+    ./mergerfs.nix
     ./system.nix
     ./services
-  ];
+  ]
+  ++ (builtins.attrValues outputs.modules.nixos);
 
   security.sudo.wheelNeedsPassword = false;
 

+ 20 - 0
hosts/odin/mergerfs.nix

@@ -0,0 +1,20 @@
+{ pkgs, ... }:
+{
+  environment.systemPackages = with pkgs; [
+    mergerfs
+    mergerfs-tools
+  ];
+
+  fileSystems."/mnt/storage" = {
+    device = "/mnt/disk2:/mnt/disk3";
+    options = [
+      "category.create=pfrd"
+      "defaults"
+      "allow_other"
+      "minfreespace=25G"
+      "func.getattr=newest"
+      "fsname=storage"
+    ];
+    fsType = "fuse.mergerfs";
+  };
+}

+ 1 - 1
modules/default.nix

@@ -2,5 +2,5 @@
   darwin = import ./darwin;
   global = import ./global;
   home-manager = import ./home-manager;
-  # nixos = import ./nixos;
+  nixos = import ./nixos;
 }

+ 1 - 3
modules/nixos/default.nix

@@ -1,3 +1 @@
-{
-  users = import ./users;
-}
+{ }