diff --git a/home/qenya/default.nix b/home/qenya/default.nix index f367f63..47c64dd 100644 --- a/home/qenya/default.nix +++ b/home/qenya/default.nix @@ -1,6 +1,7 @@ { imports = [ ./dconf + ./feishin.nix ./firefox.nix ./fonts.nix ./git.nix diff --git a/home/qenya/feishin.nix b/home/qenya/feishin.nix new file mode 100644 index 0000000..e3c7360 --- /dev/null +++ b/home/qenya/feishin.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, osConfig, ... }: + +# Feishin ideally wants to see mpv at runtime, but this isn't catered for by +# the derivation in nixpkgs as it isn't strictly necessary. +# An easier way to do this would be to write mpv's full nix store path to +# Feishin's config. But Feishin has one JSON file for config and state, and +# we'd rather not overwrite the latter. Until and unless home-manager grows +# support for partially patching files, we live with this. + +let + inherit (lib) mkIf; + isGraphical = osConfig.services.xserver.enable; +in +{ + home.packages = mkIf isGraphical [ + (pkgs.feishin.overrideAttrs (originalAttrs: { + buildInputs = originalAttrs.buildInputs ++ [ pkgs.mpv ]; + postFixup = '' + ${originalAttrs.postFixup or ""} + wrapProgram $out/bin/feishin --prefix PATH : ${lib.makeBinPath [ pkgs.mpv ]} + ''; + })) + ]; +} diff --git a/home/qenya/packages.nix b/home/qenya/packages.nix index b9a59da..df281b6 100644 --- a/home/qenya/packages.nix +++ b/home/qenya/packages.nix @@ -23,7 +23,6 @@ in ] ++ optionals isGraphical [ bitwarden discord - feishin gimp-with-plugins jellyfin-media-player tor-browser-bundle-bin