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
|
@ -4,6 +4,10 @@
|
||||||
gnupg.enable = true;
|
gnupg.enable = true;
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
|
imv = {
|
||||||
|
enable = true;
|
||||||
|
installPackage = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
cli = {
|
cli = {
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
|
|
|
@ -1,15 +1,27 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.application.zathura;
|
cfg = config.modules.application.imv;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.application.imv = {
|
options.modules.application.imv = {
|
||||||
enable = mkEnableOption "enable IMV image viewer";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
programs.imv = {
|
programs.imv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package =
|
||||||
|
if cfg.installPackage
|
||||||
|
then pkgs.imv
|
||||||
|
else pkgs.emptyDirectory;
|
||||||
|
|
||||||
};
|
};
|
||||||
xdg.mimeApps.defaultApplications = {
|
xdg.mimeApps.defaultApplications = {
|
||||||
"image/*" = "imv-dir.desktop";
|
"image/*" = "imv-dir.desktop";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue