Hello,
i have a flake.nix from here and changed it so that it works with the newest version.
My configuration looks like this:
/etc/nixos/flake.nix
{
description = "NixOS Flake configuration";
inputs = {
# NixOS official package source, using the nixos-25.11 branch here
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
# home-manager, used for managing user configuration
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
tinyMediaManager-flake = {
url = "/home/lukas/Documents/tinyMediaManager-flake/";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, tinyMediaManager-flake, ... }@inputs: {
# Please replace my-nixos with your hostname
nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit tinyMediaManager-flake; };
home-manager.users.lukas = import ./home.nix;
}
];
};
};
}
/etc/nixos/home.nix
{ config, pkgs, tinyMediaManager-flake, ... }:
{
home.username = "lukas";
home.homeDirectory = "/home/lukas";
# Packages that should be installed to the user profile.
home.packages = [
pkgs.kdePackages.kate
tinyMediaManager-flake
];
programs.bash.enable = true;
home.stateVersion = "25.11";
}
/home/lukas/Documents/tinyMediaManager-flake/flake.nix
{
description = "tinyMediaManager NixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
### modify this to update ###
version = "5.2.10";
sha256 = "sha256-JbNb3Ze2YLF1LswWph77K1xXNcTtl2tJkjZrzNcBkQg=";
#############################
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.default = pkgs.stdenv.mkDerivation {
pname = "tinyMediaManager";
version = version;
src = pkgs.fetchurl {
url = "https://archive.tinymediamanager.org/v${version}/tinyMediaManager-${version}-linux-amd64.tar.xz";
sha256 = sha256;
};
nativeBuildInputs = [ pkgs.autoPatchelfHook pkgs.unzip ];
buildInputs = with pkgs; [
zlib glibc fontconfig alsa-lib
xorg.libX11 xorg.libXext xorg.libXrender
xorg.libXtst xorg.libXi wayland
gcc13.cc.lib
libzen libmediainfo
zenity # GUI file dialog
];
installPhase = ''
mkdir -p $out/opt/tmm
cp -r * $out/opt/tmm
mkdir -p $out/bin
cat > $out/bin/tinyMediaManager << EOF
#!/bin/sh
export LD_LIBRARY_PATH=${pkgs.libzen}/lib:${pkgs.libmediainfo}/lib:\$LD_LIBRARY_PATH
export PATH=${pkgs.zenity}/bin:\$PATH
cd $out/opt/tmm
exec ${pkgs.zulu25}/bin/java -Djava.library.path=./native -cp "tmm.jar:lib/*" org.tinymediamanager.TinyMediaManager "\$@"
EOF
chmod +x $out/bin/tinyMediaManager
'';
};
});
}
If i want to start the flake i can do this with nix run but i want to “install” the flake like all the other packages i have from pkgs like pkgs.kdePackages.kate.
After nixos-rebuild switch i don’t have tinyMediaManager in my start menu/ search.
How can i add the flake to my configuration so that i can start the application through the search like i can start firefox or any other pkgs package?