This commit is contained in:
m3tam3re 2023-04-24 19:14:11 +02:00
parent 06da56bacd
commit 4840a49f58
6 changed files with 99 additions and 7 deletions

View File

@ -3,6 +3,7 @@
imports = [ imports = [
./crypto.nix ./crypto.nix
./design.nix ./design.nix
#./espanso.nix
./extrafonts.nix ./extrafonts.nix
./media.nix ./media.nix
./office.nix ./office.nix
@ -10,7 +11,6 @@
./syncthing.nix ./syncthing.nix
./waybar.nix ./waybar.nix
./wofi.nix ./wofi.nix
# ./wofi-pass.nix
]; ];
xdg.mimeApps = { xdg.mimeApps = {

View File

@ -1,3 +1,9 @@
{ pkgs, outputs, ...}:
let
espanso = outputs.packages.x86_64-linux.espanso;
in
{ {
#services.espanso.enable = true; home.packages = [
espanso
];
} }

View File

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./adguard.nix
./container.nix ./container.nix
./gitea.nix ./gitea.nix
./invidious.nix ./invidious.nix

View File

@ -70,7 +70,7 @@
[{ url = "http://localhost:3006/"; }]; [{ url = "http://localhost:3006/"; }];
wireguard.loadBalancer.servers = wireguard.loadBalancer.servers =
[{ url = "http://localhost:3007/"; }]; [{ url = "http://localhost:3007/"; }];
adguard.loadBalancer.servers = [{ url = "http://localhost:3008/"; }]; mautic.loadBalancer.servers = [{ url = "http://localhost:3008/"; }];
briefkasten.loadBalancer.servers = briefkasten.loadBalancer.servers =
[{ url = "http://localhost:3009/"; }]; [{ url = "http://localhost:3009/"; }];
littlelink-lanakk.loadBalancer.servers = littlelink-lanakk.loadBalancer.servers =
@ -201,11 +201,11 @@
middlewares = "auth"; middlewares = "auth";
entrypoints = "websecure"; entrypoints = "websecure";
}; };
adguard = { mautic = {
rule = "Host(`ab.lanakk.com`)"; rule = "Host(`ma.lanakk.com`)";
tls = { tls = {
certResolver = "godaddy"; certResolver = "godaddy";
domains = "ab.lanakk.com"; domains = "ma.lanakk.com";
}; };
service = "adguard"; service = "adguard";
middlewares = "auth"; middlewares = "auth";

View File

@ -1,4 +1,6 @@
{ pkgs ? import <nixpkgs> { } }: { { pkgs ? import <nixpkgs> { } }: {
wofi-pass = pkgs.callPackage ./wofi-pass { }; wofi-pass = pkgs.callPackage ./wofi-pass { };
espanso = pkgs.callPackage ./espanso { };
} }

85
pkgs/espanso/default.nix Normal file
View File

@ -0,0 +1,85 @@
{ lib
, fetchFromGitHub
, rustPlatform
, cargo-make
, pkg-config
, extra-cmake-modules
, dbus
, libX11
, libXi
, libXtst
, libnotify
, libxkbcommon
, openssl
, xclip
, xdotool
, setxkbmap
, wl-clipboard
, wxGTK32
, makeWrapper
, stdenv
, waylandSupport ? true,
}:
rustPlatform.buildRustPackage rec {
pname = "espanso";
version = "2.1.8";
src = fetchFromGitHub {
owner = "espanso";
repo = pname;
rev = "v${version}";
sha256 = "06wzrjdvssixgd9rnrv4cscbfiyvp5pjpnrih48r0ral3pj2hdg5";
};
cargoSha256 = "sha256-U2ccF7DM16TtX3Kc4w4iNV4WsswHJ0FpO3+sWCL1Li8=";
nativeBuildInputs = [
extra-cmake-modules
pkg-config
makeWrapper
cargo-make
wxGTK32
];
NO_X11 = "true";
buildInputs = [
libXi
libXtst
openssl
] ++ lib.optionals stdenv.isLinux [
dbus
libnotify
libX11
libxkbcommon
xclip
xdotool
wxGTK32
wl-clipboard
];
# Some tests require networking
doCheck = false;
preBuild = lib.optionalString waylandSupport ''
export NO_X11=true
'';
postInstall = ''
wrapProgram $out/bin/espanso \
--prefix PATH : ${lib.makeBinPath [ libnotify xclip wl-clipboard setxkbmap ]}
'';
meta = with lib; {
description = "Cross-platform Text Expander written in Rust";
homepage = "https://espanso.org";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kimat thehedgeh0g ];
platforms = platforms.unix;
longDescription = ''
Espanso detects when you type a keyword and replaces it while you're typing.
'';
};
}