parent
b5993b95be
commit
d3c866bd53
12
apps/git.nix
12
apps/git.nix
|
@ -1,4 +1,8 @@
|
||||||
let
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
key = "0xB853ADA5DA7BBF7A";
|
key = "0xB853ADA5DA7BBF7A";
|
||||||
in {
|
in {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
@ -38,5 +42,11 @@ in {
|
||||||
side-by-side = true;
|
side-by-side = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
includes = [
|
||||||
|
{
|
||||||
|
condition = "gitdir:~/ndlegis/";
|
||||||
|
path = "${config.xdg.configHome}/git/work-config";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,3 +33,9 @@ Host codeberg.org
|
||||||
User git
|
User git
|
||||||
IdentityFile ~/.ssh/github
|
IdentityFile ~/.ssh/github
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host ssh.dev.azure.com
|
||||||
|
HostName ssh.dev.azure.com
|
||||||
|
User git
|
||||||
|
IdentityFile ~/.ssh/ndlegis
|
||||||
|
IdentitiesOnly yes
|
|
@ -43,14 +43,20 @@ in {
|
||||||
shell = pkgs.nushell;
|
shell = pkgs.nushell;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"nodejs-16.20.1"
|
||||||
|
];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
globalprotect-openconnect
|
globalprotect-openconnect
|
||||||
jetbrains.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
jetbrains.datagrip
|
jetbrains.datagrip
|
||||||
subversion
|
subversion
|
||||||
teams
|
teams-for-linux
|
||||||
xorg.xauth
|
xorg.xauth
|
||||||
|
|
||||||
|
# Custom packages
|
||||||
|
(callPackage ../../pkgs/prospect-mail {})
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
|
|
|
@ -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"];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Reference in New Issue