diff --git a/flake.lock b/flake.lock index 8d24ec3..856e6c8 100644 --- a/flake.lock +++ b/flake.lock @@ -1736,6 +1736,22 @@ } }, "nixpkgs_14": { + "locked": { + "lastModified": 1709237383, + "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { "locked": { "lastModified": 1704842529, "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", @@ -2070,7 +2086,7 @@ "flake-compat": "flake-compat_8", "flake-utils": "flake-utils_6", "gitignore": "gitignore_5", - "nixpkgs": "nixpkgs_14", + "nixpkgs": "nixpkgs_15", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { @@ -2502,9 +2518,7 @@ "inputs": { "flake-utils": "flake-utils_5", "gomod2nix": "gomod2nix_2", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_14", "pre-commit-hooks": "pre-commit-hooks_4" }, "locked": { diff --git a/flake.nix b/flake.nix index 268289a..4154e93 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,7 @@ # My selfhosted service, inspired by 0x0.st upfast = { url = "git+https://git.cronyakatsuki.xyz/crony/UpFast"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; # My note management app diff --git a/modules/servers/odin/default.nix b/modules/servers/odin/default.nix index d7c5aa4..1422479 100644 --- a/modules/servers/odin/default.nix +++ b/modules/servers/odin/default.nix @@ -7,5 +7,6 @@ ./upfast.nix ./miniflux.nix ./website.nix + ./filebrowser.nix ]; } diff --git a/modules/servers/odin/filebrowser.nix b/modules/servers/odin/filebrowser.nix new file mode 100644 index 0000000..5dbb31a --- /dev/null +++ b/modules/servers/odin/filebrowser.nix @@ -0,0 +1,27 @@ +{ + services.filebrowser = { + enable = true; + }; + + services.traefik.dynamicConfigOptions.http = { + services.filebrowser.loadBalancer.servers = [ + { + url = "http://localhost:8080"; + } + ]; + + routers.filebrowser = { + rule = "Host(`filebrowser.cronyakatsuki.xyz`)"; + tls = { + certResolver = "porkbun"; + }; + service = "filebrowser"; + entrypoints = "websecure"; + }; + }; + + services.restic.backups = { + local.paths = ["/var/lib/filebrowser"]; + server.paths = ["/var/lib/filebrowser"]; + }; +}