Seafile minimal config working, now modularise and configure.
This commit is contained in:
parent
c3bc0cc509
commit
104a592b11
4 changed files with 48 additions and 1 deletions
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -537,6 +537,22 @@
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743161759,
|
||||||
|
"narHash": "sha256-AJJy0SKtqLld9JPYi/yvI2P6qCNpcjExHuniZbRSklk=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "873f4b2202bdac3845fa5ae294cfa2748ef0667e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.11-small",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737003892,
|
"lastModified": 1737003892,
|
||||||
|
|
@ -702,6 +718,7 @@
|
||||||
"hm": "hm",
|
"hm": "hm",
|
||||||
"nixcord": "nixcord",
|
"nixcord": "nixcord",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
"somcli": "somcli",
|
"somcli": "somcli",
|
||||||
"stylix": "stylix"
|
"stylix": "stylix"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs and other core shit
|
# Nixpkgs and other core shit
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; # build error unrelated to config.
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; # build error unrelated to config.
|
||||||
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11-small"; # build error unrelated to config.
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
hm = {
|
hm = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
imports = [./caddy.nix ./transfer-sh.nix];
|
imports = [./caddy.nix ./transfer-sh.nix ./seafile.nix];
|
||||||
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
|
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
system/server/seafile.nix
Normal file
29
system/server/seafile.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{inputs, pkgs, ...}: {
|
||||||
|
services.seafile = {
|
||||||
|
enable = true;
|
||||||
|
seahubPackage = inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.seahub;
|
||||||
|
|
||||||
|
adminEmail = "jurnwubben@gmail.com";
|
||||||
|
initialAdminPassword = "test";
|
||||||
|
|
||||||
|
ccnetSettings.General.SERVICE_URL = "https://files.jsw.tf";
|
||||||
|
|
||||||
|
seafileSettings = {
|
||||||
|
fileserver = {
|
||||||
|
host = "unix:/run/seafile/server.sock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."files.jsw.tf" = {
|
||||||
|
# serverAliases = ["www.share.jsw.tf"];
|
||||||
|
extraConfig = ''
|
||||||
|
handle_path /seafhttp/* {
|
||||||
|
reverse_proxy * unix//run/seafile/server.sock
|
||||||
|
}
|
||||||
|
handle_path /* {
|
||||||
|
reverse_proxy * unix//run/seahub/gunicorn.sock
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue