From b8e5166a0ff15b78091d8adeef087c9f8875bdaf Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 6 Mar 2024 22:14:44 +0100 Subject: [PATCH] working filebrowser for jelly files --- configuration.nix | 1 + filebrowser.nix | 17 +++++++++-------- flake.nix | 9 ++++++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/configuration.nix b/configuration.nix index e97d2be..0a9b988 100644 --- a/configuration.nix +++ b/configuration.nix @@ -118,6 +118,7 @@ environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget + filebrowser git helix nil diff --git a/filebrowser.nix b/filebrowser.nix index d725bd5..5cf3325 100644 --- a/filebrowser.nix +++ b/filebrowser.nix @@ -2,19 +2,20 @@ let domain = "files.sondell.org"; - # derp = "hi"; in { - # - # services.audiobookshelf = { - # enable = true; - # port = 8000; - # }; - systemd.services.fileBrowser = with pkgs; { + systemd.services.filebrowser = with pkgs; { enable = true; description = "web app file explorer"; wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = "${filebrowser}/bin/filebrowser -r /mnt/media_drive"; + unitConfig = { + After="network-online.target"; + }; + serviceConfig = { + ExecStart = "${filebrowser}/bin/filebrowser -r /mnt/movie_drive -d /var/lib/filebrowser/filebrowser.db"; + User= "jellyfin"; + Type= "simple"; + }; }; diff --git a/flake.nix b/flake.nix index 19cd770..62d71f8 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,14 @@ nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; - modules = [ ./configuration.nix ./forgejo.nix ./nextcloud.nix ./audiobooks.nix ./jellyfin.nix ]; + modules = [ + ./configuration.nix + ./forgejo.nix + ./nextcloud.nix + ./audiobooks.nix + ./jellyfin.nix + ./filebrowser.nix + ]; }; };