From dabf6c0f60dcb7435ce5ffb9f3b55de5c78c6df4 Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 7 Mar 2026 09:36:50 -0500 Subject: [PATCH] adding flake option --- flake.nix | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..62dec57 --- /dev/null +++ b/flake.nix @@ -0,0 +1,66 @@ +{ + description = "Pinepods desktop client - self-hosted podcast manager"; + + inputs = { + nixpkgs.url = "github:NixOs/nixpkgs/nixos-25.11"; + }; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; config = {}; overlays = []; }; + + makePinepods = { severUrl ? "" }: + pkgs.callPackage ./pinepods.nix { + wasm-bindgen-cli = pkgs.wasm-bindgen-cli_0_2_105; + inherit (pkgs) binaryen tailwindcss_3 libayatana-appindicator gst_all_1 python3; + inherit serverUrl; + }; + in + { + packages.${system} = { + pinepods = makePinepods { }; + default = makePinepods { }; + }; + + nixosModules.pinepods = { config, lib, pkgs, ... }: + let + cfg = config.services.pinepods; + in + { + options.services.pinepods = { + enable = lib.mkEnableOption "PinePods podcast manager"; + + server = lib.mkOption { + type = lib.types.str; + default = ""; + example = "https://pinepods.example.com"; + description = '' + The URL oof your self-hosted PinePods server. + The app will navigate directly to this address on launch. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ + (makePinepods { serverUrl = cfg.server; }) + ]; + }; + }; + + nixosModules.default = self.nixosModules.pinepods; + + devShells.${system}.default = pkgs.mkShell { + buildInputs = with pkgs; [ + trunk + wasm-bindgen-cli_0_2_105 + cargo + rustc + llvmPackages.lld + binaryen + tailwindcss_3 + ]; + }; + }; +} \ No newline at end of file