fix(home-manager): avoid imv problem on non-NixOS install
There is not access to hardware acceleration when install nix above traditonnal distribution
This commit is contained in:
parent
db84a305dc
commit
cf8a838191
2 changed files with 18 additions and 2 deletions
|
@ -1,15 +1,27 @@
|
|||
{ lib, config, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.application.zathura;
|
||||
cfg = config.modules.application.imv;
|
||||
in
|
||||
{
|
||||
options.modules.application.imv = {
|
||||
enable = mkEnableOption "enable IMV image viewer";
|
||||
|
||||
installPackage = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "install Package, if false relies on distribution packages";
|
||||
};
|
||||
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.imv = {
|
||||
enable = true;
|
||||
package =
|
||||
if cfg.installPackage
|
||||
then pkgs.imv
|
||||
else pkgs.emptyDirectory;
|
||||
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"image/*" = "imv-dir.desktop";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue