]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/ftp.nix
Add chatons infos
[perso/Immae/Config/Nix.git] / modules / private / ftp.nix
index 63eda99a52af11530565b4011331b8c58169b316..d6742e22c289fd5089c7ebd207911d810586e403 100644 (file)
@@ -30,6 +30,74 @@ in
   };
 
   config = lib.mkIf config.myServices.ftp.enable {
+    myServices.chatonsProperties.services.espace-de-stockage = {
+      file.datetime = "2022-08-22T01:00:00";
+      service = {
+        name = "Espace de stockage";
+        description = "Compte FTP/SFTP";
+        logo = if pure-ftpd-enabled
+          then "https://www.pureftpd.org/project/pure-ftpd/images/favicon.png"
+          else if proftpd-enabled
+          then "http://proftpd.org/proftpd.png"
+          else "";
+        website = "ftp.immae.eu";
+        status.level = "OK";
+        status.description = "OK";
+        registration."" = ["MEMBER" "CLIENT"];
+        registration.load = "OPEN";
+        install.type = "PACKAGE";
+      };
+      software = if pure-ftpd-enabled then {
+        name = "Pure-ftpd";
+        website = "https://www.pureftpd.org/project/pure-ftpd/";
+        license.url = "https://github.com/jedisct1/pure-ftpd/blob/master/COPYING";
+        license.name = "MIT Licence";
+        version = package.version;
+        source.url = "https://github.com/jedisct1/pure-ftpd/";
+        modules = "openssh";
+      } else if proftpd-enabled then {
+        name = "ProFTPD";
+        website = "http://proftpd.org/";
+        license.url = "https://github.com/proftpd/proftpd/blob/master/COPYING";
+        license.name = "GNU General Public License v2.0";
+        version = pkgs.proftpd.version;
+        source.url = "https://github.com/proftpd/proftpd/";
+        modules = "openssh";
+      } else {};
+    };
+    #myServices.chatonsProperties.services.ftp = {
+    #  file.datetime = "2022-08-22T01:00:00";
+    #  service = {
+    #    name = "Comptes FTP";
+    #    description = "Compte FTP/SFTP";
+    #    logo = if pure-ftpd-enabled
+    #      then "https://www.pureftpd.org/project/pure-ftpd/images/favicon.png"
+    #      else if proftpd-enabled
+    #      then "http://proftpd.org/proftpd.png"
+    #      else "";
+    #    website = "ftp.immae.eu";
+    #    status.level = "OK";
+    #    status.description = "OK";
+    #    registration."" = ["MEMBER" "CLIENT"];
+    #    registration.load = "OPEN";
+    #    install.type = "PACKAGE";
+    #  };
+    #  software = if pure-ftpd-enabled then {
+    #    name = "Pure-ftpd";
+    #    website = "https://www.pureftpd.org/project/pure-ftpd/";
+    #    license.url = "https://github.com/jedisct1/pure-ftpd/blob/master/COPYING";
+    #    license.name = "MIT Licence";
+    #    version = package.version;
+    #    source.url = "https://github.com/jedisct1/pure-ftpd/";
+    #  } else if proftpd-enabled then {
+    #    name = "ProFTPD";
+    #    website = "http://proftpd.org/";
+    #    license.url = "https://github.com/proftpd/proftpd/blob/master/COPYING";
+    #    license.name = "GNU General Public License v2.0";
+    #    version = pkgs.proftpd.version;
+    #    source.url = "https://github.com/proftpd/proftpd/";
+    #  } else {};
+    #};
     security.acme.certs."ftp" = config.myServices.certificates.certConfig // {
       domain = "eldiron.immae.eu";
       # FIXME: make it global