Implement FileChooser portal proxy with virtiofsd mount
This commit is contained in:
parent
116839fb59
commit
eefb000865
6 changed files with 718 additions and 26 deletions
18
flake.nix
18
flake.nix
|
|
@ -15,7 +15,13 @@
|
|||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
|
||||
|
||||
buildEnvVars = {
|
||||
BIN_XDG_PERMISSION_STORE = "${pkgs.xdg-desktop-portal}/libexec/xdg-permission-store";
|
||||
BIN_XDG_DOCUMENT_PORTAL = "${pkgs.xdg-desktop-portal}/libexec/xdg-document-portal";
|
||||
BIN_VIRTIOFSD = "${pkgs.virtiofsd}/bin/virtiofsd";
|
||||
};
|
||||
|
||||
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
|
|
@ -32,11 +38,13 @@
|
|||
"busd-0.4.0" = "sha256-UzTclEJ8lRMmiuLJJi+gsm7vkx+MLfnDdi5s9OVT1HE=";
|
||||
};
|
||||
buildAndTestSubdir = crate;
|
||||
env = buildEnvVars;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [ rustToolchain ];
|
||||
env = buildEnvVars;
|
||||
};
|
||||
|
||||
packages.sidebus-agent = rustPackage "sidebus-agent";
|
||||
|
|
@ -58,6 +66,14 @@
|
|||
};
|
||||
documentation = [ "https://git.clan.lol/valpackett/sidebus" ];
|
||||
};
|
||||
systemd.mounts = [
|
||||
{
|
||||
type = "virtiofs";
|
||||
what = "vm-doc-portal";
|
||||
where = "/run/vm-doc-portal";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue