adding flake option
This commit is contained in:
66
flake.nix
Normal file
66
flake.nix
Normal file
@@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user