Skip to content

Commit

Permalink
Add remarkable app
Browse files Browse the repository at this point in the history
  • Loading branch information
FaustXVI committed Sep 27, 2024
1 parent d6ef9e0 commit 9069ae1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions modules/system/remarkable.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ pkgs, ... }:
let
version = "3.14.1.889";
installerUrl = "https://downloads.remarkable.com/desktop/production/win/reMarkable-${version}-win64.exe";
installer = pkgs.fetchurl {
url = installerUrl;
hash = "sha256-uSsLL95YYrLEXBbZMGQX34hz0KX/vil7GWH+cqZn/z0=";
};
binaryName = "reMarkable.exe";
installDirectory = ''''${HOME}/remarkable'';
targetDirectory = ''''${HOME}/.remarkable'';
expectedPath = "${targetDirectory}/${binaryName}";
wine = "${pkgs.wine64Packages.staging}/bin/wine64";
remarkable = pkgs.writeShellScriptBin "remarkable" ''
if [ ! -f ${expectedPath} ]
then
mkdir -p ${installDirectory}
echo "Install the app in ${installDirectory}, it will later be renamed ${targetDirectory}"
${wine} ${installer} 2>/dev/null >/dev/null
mv ${installDirectory} ${targetDirectory}
fi
${wine} ${expectedPath} 2>/dev/null >/dev/null
'';
in
{
environment = {
systemPackages = [ remarkable ];
};
}

0 comments on commit 9069ae1

Please sign in to comment.