mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
added passFF extension
This commit is contained in:
parent
b92d485213
commit
6ecf0632cd
3 changed files with 44 additions and 6 deletions
|
|
@ -5,13 +5,38 @@ let
|
||||||
cfg = config.modules.user.gui.browser.firefox;
|
cfg = config.modules.user.gui.browser.firefox;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.gui.browser.firefox = { enable = mkEnableOption "Enable Firefox browser"; };
|
{
|
||||||
|
options.modules.user.gui.browser.firefox = { enable = mkEnableOption "Enable Firefox browser"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
passff-host
|
||||||
|
];
|
||||||
|
home.file = {
|
||||||
|
".mozilla/native-messaging-hosts/passff.json" = {
|
||||||
|
text = ''
|
||||||
|
{
|
||||||
|
"name": "passff",
|
||||||
|
"description": "Host for communicating with zx2c4 pass",
|
||||||
|
"path": "${pkgs.passff-host}/share/passff-host/passff.py",
|
||||||
|
"type": "stdio",
|
||||||
|
"allowed_extensions": [ "passff@invicem.pro" ]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
assertions =
|
||||||
|
let
|
||||||
|
pinentry = config.services.gpg-agent.pinentryPackage;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
assertion = pinentry != pkgs.pinentry-curses || pinentry != pkgs.pinentry-tty;
|
||||||
|
message = "Firefox plugin passff requires graphical pinentry";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nativeMessagingHosts = with pkgs; [
|
|
||||||
passff-host
|
|
||||||
];
|
|
||||||
profiles = {
|
profiles = {
|
||||||
"default" = {
|
"default" = {
|
||||||
bookmarks = config.user.bookmarks;
|
bookmarks = config.user.bookmarks;
|
||||||
|
|
@ -83,6 +108,7 @@ in
|
||||||
|
|
||||||
"browser.urlbar.suggest.history" = false;
|
"browser.urlbar.suggest.history" = false;
|
||||||
"browser.urlbar.suggest.topsites" = false;
|
"browser.urlbar.suggest.topsites" = false;
|
||||||
|
"browser.urlbar.sponsoredTopSites" = false;
|
||||||
"browser.urlbar.autoFill" = false;
|
"browser.urlbar.autoFill" = false;
|
||||||
"browser.toolbars.bookmarks.showOtherBookmarks" = false;
|
"browser.toolbars.bookmarks.showOtherBookmarks" = false;
|
||||||
|
|
||||||
|
|
@ -260,6 +286,8 @@ in
|
||||||
"security.tls.version.enable-deprecated" = false;
|
"security.tls.version.enable-deprecated" = false;
|
||||||
"extensions.webcompat-reporter.enabled" = false;
|
"extensions.webcompat-reporter.enabled" = false;
|
||||||
"extensions.quarantinedDomains.enabled" = true;
|
"extensions.quarantinedDomains.enabled" = true;
|
||||||
|
|
||||||
|
"media.videocontrols.picture-in-picture.enabled" = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ in
|
||||||
|
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
"float, title:(Android Emulator)"
|
"float, title:(Android Emulator)"
|
||||||
|
"float, title: Extension: (PassFF)"
|
||||||
];
|
];
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,13 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.user.security.gpg;
|
cfg = config.modules.user.security.gpg;
|
||||||
|
gui = config.modules.user.gui.wm;
|
||||||
|
wm = {
|
||||||
|
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.security.gpg = { enable = mkEnableOption "user.security.gpg"; };
|
{ options.modules.user.security.gpg = { enable = mkEnableOption "Enable GPG module"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -22,7 +26,12 @@ in
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableScDaemon = true;
|
enableScDaemon = true;
|
||||||
pinentryPackage = pkgs.pinentry-tty;
|
|
||||||
|
pinentryPackage =
|
||||||
|
if wm.enable then
|
||||||
|
pkgs.pinentry-gtk2
|
||||||
|
else
|
||||||
|
pkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue