dotnix @main -
refs -
log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
feat: prospect-mail
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmSoOzEACgkQuFOtpdp7
v3p+0A//ULmAFXP7qnIbj4XikPs4GLENZIADyQpVsW6z1/e7eYe6ekQu1y17evnN
ZhIPaEi6L0P5k8meGVCEY4SyX9u9lLWus2A6OHkkrUs64RMEAMymGZV12dFQLtSO
o2mkLAG8UlDESrh51aj7cDeP6O3ZUp6d6HmBOkqSaX9K2z5ksA6Telw5KnXo1jVm
TXxrOmldEVzPdh0VCey4I+hHp5n0+8tgiGKAZ5cPeJjEHl3LWv4GqMhevU7Aa4/s
sUmOuJraUMhGtNE9lvkPGngePBPo7rMbVw1YEdP0yN0TFgOegYzx9XZekcM0RQFV
KjlzO5IFI66RrqVQ4yY5GzxAhStXEk7BA8wmzDsBO4hKYwJNB0Mug8maC1BmelaB
/+jsVihkR20h3pmuTf/Db5iKu7PQv++YEEsAopvvdVx5yvEGvNylJMcNooEhbWDL
JHt+PTJzDkZOeCMovieL4pQFCSe4GU6TomSNh/3U0scUMBjcwHgO4IgU2IqOW9om
h1Cl1y7lT5NgKV+kRVedhxvVG1llhZ9OSdUG4CMTkowQnPmIlec/BMav0gf74Mez
HgR8GHyTATU4EEXr4jmqQQE9bUwZbOwpci6MzNc55R1L1EXYKGRCoqsfysQjS7p9
dxPGO4TfgTHA7JVm80KGxAw65v7rhLeAsNTGBpubesUPofhWjOE=
=VME2
-----END PGP SIGNATURE-----
4 changed files, 129 additions(+), 0 deletions(-)
diff --git a/apps/git.nix b/apps/git.nix
index 261293fe10d83410ee5b977c6886209ce05b1494..c22cf3ba5342777be4b111621bd96b5af91b2011 100644
--- a/apps/git.nix
+++ b/apps/git.nix
@@ -1,4 +1,9 @@
+{
+ programs.git = {
let
+ config,
+ ...
+}: let
key = "0xB853ADA5DA7BBF7A";
in {
programs.git = {
@@ -38,5 +43,11 @@ line-numbers = true;
side-by-side = true;
};
};
+ includes = [
+ {
+ condition = "gitdir:~/ndlegis/";
+ path = "${config.xdg.configHome}/git/work-config";
+ }
+ ];
};
}
diff --git a/apps/ssh/config b/apps/ssh/config
index 31146af30da7d56b8c48d6b40b4ef261e9acfbdf..3335133799510523867890cd2002767d79368602 100644
--- a/apps/ssh/config
+++ b/apps/ssh/config
@@ -32,4 +32,10 @@ Host codeberg.org
HostName codeberg.org
User git
IdentityFile ~/.ssh/github
+ IdentitiesOnly yes
+
+Host ssh.dev.azure.com
+ HostName ssh.dev.azure.com
+ User git
+ IdentityFile ~/.ssh/ndlegis
IdentitiesOnly yes
\ No newline at end of file
diff --git a/machines/chai/default.nix b/machines/chai/default.nix
index 3f198f26cf2646b5edd98f431cfa862af028fa0f..c61f315a2bbe6dc5556d56248659ac565ce06ef4 100644
--- a/machines/chai/default.nix
+++ b/machines/chai/default.nix
@@ -43,6 +43,9 @@ isNormalUser = true;
shell = pkgs.nushell;
};
+ nixpkgs.config.permittedInsecurePackages = [
+ "nodejs-16.20.1"
+ ];
environment.systemPackages = with pkgs; [
globalprotect-openconnect
jetbrains.pycharm-professional
@@ -49,7 +53,11 @@ jetbrains.idea-ultimate
jetbrains.datagrip
subversion
imports = [./hardware.nix ../common];
+ kernelPackages = pkgs.linuxPackages_latest;
xorg.xauth
+
+ # Custom packages
+ (callPackage ../../pkgs/prospect-mail {})
];
system.stateVersion = "22.11";
diff --git a/pkgs/prospect-mail/default.nix b/pkgs/prospect-mail/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..cf8675e14c544e09b4152184955a7315742bff9f
--- /dev/null
+++ b/pkgs/prospect-mail/default.nix
@@ -0,0 +1,105 @@
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ makeWrapper,
+ makeDesktopItem,
+ copyDesktopItems,
+ nodejs_16,
+ fetchYarnDeps,
+ fixup_yarn_lock,
+ electron,
+ libpulseaudio,
+ pipewire,
+ alsa-utils,
+ which,
+}:
+stdenv.mkDerivation rec {
+ pname = "prospect-mail";
+ version = "0.4.0";
+
+ src = fetchFromGitHub {
+ owner = "julian-alarcon";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "sha256-MIQgJFTqXuhShEU+iAV1VS2TAq1d/fQXU1Rct1XIEsM=";
+ };
+
+ offlineCache = fetchYarnDeps {
+ yarnLock = "${src}/yarn.lock";
+ sha256 = "sha256-rN15aGTROnfUgws7f+U8DXcj5dL6MC8DqUE+uxfH1Zo=";
+ };
+
+ nativeBuildInputs = [nodejs_16.pkgs.yarn fixup_yarn_lock nodejs_16 copyDesktopItems makeWrapper];
+
+ configurePhase = ''
+ runHook preConfigure
+
+ export HOME=$(mktemp -d)
+ yarn config --offline set yarn-offline-mirror $offlineCache
+ fixup_yarn_lock yarn.lock
+ yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
+ patchShebangs node_modules/
+
+ runHook postConfigure
+ '';
+
+ buildPhase = ''
+ runHook preBuild
+
+ yarn --offline electron-builder \
+ --dir ${
+ if stdenv.isDarwin
+ then "--macos"
+ else "--linux"
+ } ${
+ if stdenv.hostPlatform.isAarch64
+ then "--arm64"
+ else "--x64"
+ } \
+ -c.electronDist=${electron}/lib/electron \
+ -c.electronVersion=${electron.version}
+
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out/share/{applications,prospect-mail}
+ cp dist/${
+ if stdenv.isDarwin
+ then "darwin-"
+ else "linux-"
+ }${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked/resources/app.asar $out/share/prospect-mail/
+
+ pushd build/icons
+ for image in *png; do
+ mkdir -p $out/share/icons/hicolor/''${image%.png}/apps
+ cp -r $image $out/share/icons/hicolor/''${image%.png}/apps/prospect-mail.png
+ done
+ popd
+
+ # Linux needs 'aplay' for notification sounds, 'libpulse' for meeting sound, and 'libpipewire' for screen sharing
+ makeWrapper '${electron}/bin/electron' "$out/bin/prospect-mail" \
+ ${lib.optionalString stdenv.isLinux ''
+ --prefix PATH : ${lib.makeBinPath [alsa-utils which]} \
+ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libpulseaudio pipewire]} \
+ ''} \
+ --add-flags "$out/share/prospect-mail/app.asar" \
+ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
+
+ runHook postInstall
+ '';
+
+ desktopItems = [
+ (makeDesktopItem {
+ name = pname;
+ exec = pname;
+ icon = pname;
+ desktopName = "Outlook for Linux";
+ comment = "Outlook wrapper client for Linux";
+ categories = ["Network" "Email"];
+ })
+ ];
+}