mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-12-22 05:12:56 -05:00
home/defaultApps: add forceMimeAssociations option
This commit is contained in:
parent
628b6d3a98
commit
5f4fdf1c09
|
@ -42,7 +42,7 @@ in {
|
|||
WebBrowser=${builtins.baseNameOf (lib.getExe cfg.webBrowser)}
|
||||
'';
|
||||
|
||||
mimeApps = {
|
||||
mimeApps = lib.mkIf cfg.forceMimeAssociations {
|
||||
enable = true;
|
||||
|
||||
defaultApplications = let
|
||||
|
@ -93,7 +93,8 @@ in {
|
|||
NoDisplay = "true";
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
lib.mkIf cfg.forceMimeAssociations {
|
||||
defaultAudioPlayer = mkDefaultEntry "Audio Player" cfg.audioPlayer;
|
||||
defaultEditor = mkDefaultEntry "Editor" cfg.editor;
|
||||
defaultFileManager = mkDefaultEntry "File Manager" cfg.fileManager;
|
||||
|
|
|
@ -77,6 +77,8 @@ in {
|
|||
|
||||
defaultApps = {
|
||||
enable = lib.mkEnableOption "Declaratively set default apps and file associations.";
|
||||
forceMimeAssociations = lib.mkEnableOption "Force mime associations for defaultApps.";
|
||||
|
||||
audioPlayer = lib.mkPackageOption pkgs "audio player" {default = ["celluloid"];};
|
||||
editor = lib.mkPackageOption pkgs "text editor" {default = ["vscodium"];};
|
||||
fileManager = lib.mkPackageOption pkgs "file manager" {default = ["nemo"];};
|
||||
|
|
Loading…
Reference in a new issue