Systemd integration #33

Merged
oysteikt merged 3 commits from systemd-integration into main 2024-10-20 23:11:47 +02:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 9934b11766 - Show all commits

View File

@ -4,6 +4,7 @@
, rustPlatform , rustPlatform
, makeWrapper , makeWrapper
, mpv , mpv
, wrapped ? false
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
@ -36,7 +37,7 @@ rustPlatform.buildRustPackage rec {
}; };
}; };
postInstall = '' postInstall = lib.optionalString wrapped ''
wrapProgram $out/bin/greg-ng \ wrapProgram $out/bin/greg-ng \
--prefix PATH : '${lib.makeBinPath [ mpv ]}' --prefix PATH : '${lib.makeBinPath [ mpv ]}'
''; '';

View File

@ -35,7 +35,7 @@
apps = forAllSystems (system: pkgs: _: { apps = forAllSystems (system: pkgs: _: {
default = self.apps.${system}.greg-ng; default = self.apps.${system}.greg-ng;
greg-ng = let greg-ng = let
package = self.packages.${system}.greg-ng; package = self.packages.${system}.greg-ng-wrapped;
in { in {
type = "app"; type = "app";
program = lib.getExe package; program = lib.getExe package;
@ -63,6 +63,9 @@
packages = forAllSystems (system: pkgs: _: { packages = forAllSystems (system: pkgs: _: {
default = self.packages.${system}.greg-ng; default = self.packages.${system}.greg-ng;
greg-ng = pkgs.callPackage ./default.nix { }; greg-ng = pkgs.callPackage ./default.nix { };
greg-ng-wrapped = pkgs.callPackage ./default.nix {
wrapped = true;
};
}); });
} // { } // {
nixosModules.default = ./module.nix; nixosModules.default = ./module.nix;