Move nextcloud-client to module

Change-Id: I4c5dbff288017357aea9d8f613c7a5d67423663f
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/574
Reviewed-by: Skyler Grey <minion@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/homes/x86_64-linux/coded@shorthair/default.nix b/homes/x86_64-linux/coded@shorthair/default.nix
index 2670101..6510360 100644
--- a/homes/x86_64-linux/coded@shorthair/default.nix
+++ b/homes/x86_64-linux/coded@shorthair/default.nix
@@ -23,6 +23,8 @@
     waybar.modules.temperature.hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input";
     waybar.modules.backlight.enable = true;
 
+    nextcloud.enable = true;
+
     shell = {
       zsh.enable = true;
 
@@ -120,9 +122,4 @@
       user.email = "coded@clicks.codes";
     };
   }];
-
-  services.nextcloud-client = {
-    enable = true;
-    startInBackground = true;
-  };
 }
diff --git a/homes/x86_64-linux/minion@greylag/default.nix b/homes/x86_64-linux/minion@greylag/default.nix
index e5d31f6..0756d3b 100644
--- a/homes/x86_64-linux/minion@greylag/default.nix
+++ b/homes/x86_64-linux/minion@greylag/default.nix
@@ -63,6 +63,8 @@
       modules.laptop.enable = true;
     };
 
+    nextcloud.enable = true;
+
     hyprland.enable = true;
     hyprland.hyprpaper.splash.enable = true;
 
@@ -168,9 +170,4 @@
 
     yubikey.enable = true;
   };
-
-  services.nextcloud-client = {
-    enable = true;
-    startInBackground = true;
-  };
 }
diff --git a/modules/home/nextcloud/default.nix b/modules/home/nextcloud/default.nix
new file mode 100644
index 0000000..b0dd6f0
--- /dev/null
+++ b/modules/home/nextcloud/default.nix
@@ -0,0 +1,10 @@
+{ config, lib, pkgs, ... }: {
+  options.chimera.nextcloud.enable = lib.mkEnableOption "Enable Nextcloud Client";
+  config = {
+    services.nextcloud-client = lib.mkIf config.chimera.nextcloud.enable {
+      enable = true;
+      startInBackground = true;
+    };
+    home.packages = [ pkgs.nextcloud-client ];
+  };
+}