Switch to tridactyl

This commit is contained in:
Alexander Bantyev 2023-02-07 17:00:04 +04:00
parent 99248a56c2
commit b7b56fdb98
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 52 additions and 6 deletions

View File

@ -1022,7 +1022,8 @@
"rycee": "rycee", "rycee": "rycee",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"simple-osd-daemons": "simple-osd-daemons", "simple-osd-daemons": "simple-osd-daemons",
"sonoff-lan": "sonoff-lan" "sonoff-lan": "sonoff-lan",
"tridactyl-native-messenger": "tridactyl-native-messenger"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -1150,6 +1151,22 @@
"type": "github" "type": "github"
} }
}, },
"tridactyl-native-messenger": {
"flake": false,
"locked": {
"lastModified": 1663952229,
"narHash": "sha256-YGDVcfFcI9cRCCZ4BrO5xTuI9mrGq1lfbEITB7o3vQQ=",
"owner": "tridactyl",
"repo": "native_messenger",
"rev": "62f19dba573b924703829847feb1bfee68885514",
"type": "github"
},
"original": {
"owner": "tridactyl",
"repo": "native_messenger",
"type": "github"
}
},
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,

View File

@ -99,6 +99,12 @@
remapper.url = "github:balsoft/remapper"; remapper.url = "github:balsoft/remapper";
helix.url = "github:helix-editor/helix"; helix.url = "github:helix-editor/helix";
tridactyl-native-messenger = {
url = "github:tridactyl/native_messenger";
flake = false;
};
}; };
outputs = { nixpkgs, self, nix, deploy-rs, ... }@inputs: outputs = { nixpkgs, self, nix, deploy-rs, ... }@inputs:
@ -119,9 +125,7 @@
import inputs.nixpkgs { import inputs.nixpkgs {
overlays = [ self.overlay ]; overlays = [ self.overlay ];
localSystem = { inherit system; }; localSystem = { inherit system; };
config = { config = { android_sdk.accept_license = true; };
android_sdk.accept_license = true;
};
}; };
in { in {
nixosModules = builtins.listToAttrs (findModules ./modules); nixosModules = builtins.listToAttrs (findModules ./modules);

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, inputs, ... }:
let let
thm = pkgs.my-lib.thmHash config.themes.colors; thm = pkgs.my-lib.thmHash config.themes.colors;
fonts = config.themes.fonts; fonts = config.themes.fonts;
@ -42,6 +42,31 @@ in {
]; ];
}; };
home.file.".mozilla/native-messaging-hosts/tridactyl.json".text = let
tridactyl = with pkgs.nimPackages; buildNimPackage {
pname = "tridactyl_native";
version = "dev";
nimBinOnly = true;
src = inputs.tridactyl-native-messenger;
buildInputs = [ tempfile ];
};
in builtins.toJSON {
name = "tridactyl";
description = "Tridactyl native command handler";
path = "${tridactyl}/bin/native_main";
type = "stdio";
allowed_extensions = [
"tridactyl.vim@cmcaine.co.uk"
"tridactyl.vim.betas@cmcaine.co.uk"
"tridactyl.vim.betas.nonewtab@cmcaine.co.uk"
];
};
xdg.configFile."tridactyl/tridactylrc".text = ''
js tri.config.set("editorcmd", "alacritty -e hx")
'';
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.firefox-wayland; package = pkgs.firefox-wayland;
@ -115,7 +140,7 @@ in {
adsum-notabs adsum-notabs
ublock-origin ublock-origin
browserpass browserpass
vimium-c tridactyl
]; ];
}; };
}; };