2023-01-07 20:16:37 +02:00
|
|
|
{ mkNixPak, ungoogled-chromium }:
|
|
|
|
|
|
|
|
mkNixPak {
|
|
|
|
config = { config, sloth, ... }: {
|
|
|
|
app.package = ungoogled-chromium;
|
2023-01-07 22:55:46 +02:00
|
|
|
flatpak = {
|
|
|
|
appId = "org.chromium.Chromium";
|
|
|
|
desktopFile = "chromium-browser.desktop";
|
|
|
|
};
|
2023-01-07 20:16:37 +02:00
|
|
|
imports = [
|
|
|
|
../modules/gui-base.nix
|
|
|
|
../modules/network.nix
|
2023-05-03 02:15:20 +03:00
|
|
|
../modules/mpris2-player.nix
|
2023-01-07 20:16:37 +02:00
|
|
|
];
|
2023-05-03 02:15:20 +03:00
|
|
|
# chromium doesn't use the expected MPRIS2 name format
|
|
|
|
dbus.policies = {
|
|
|
|
"org.mpris.MediaPlayer2.chromium.*" = "own";
|
|
|
|
};
|
2023-01-07 20:16:37 +02:00
|
|
|
bubblewrap = {
|
2023-06-17 10:14:13 +03:00
|
|
|
# for hidraw access (WebAuthn keys)
|
|
|
|
bind.dev = [ "/dev" ];
|
2023-01-07 20:16:37 +02:00
|
|
|
bind.rw = [
|
|
|
|
[
|
|
|
|
(sloth.mkdir (sloth.concat [
|
|
|
|
sloth.appCacheDir
|
|
|
|
"/nixpak-app-shared-tmp"
|
|
|
|
]))
|
|
|
|
"/tmp"
|
|
|
|
]
|
2023-01-07 20:24:33 +02:00
|
|
|
[
|
|
|
|
(sloth.mkdir (sloth.concat' sloth.appCacheDir "/chromium"))
|
|
|
|
(sloth.concat' sloth.xdgCacheHome "/chromium")
|
|
|
|
]
|
2023-01-07 20:40:48 +02:00
|
|
|
[
|
|
|
|
# home-manager does some funny things
|
|
|
|
(sloth.concat [
|
|
|
|
sloth.xdgConfigHome
|
|
|
|
"/nixpak-ungoogled-chromium"
|
|
|
|
])
|
|
|
|
(sloth.concat [
|
|
|
|
sloth.xdgConfigHome
|
|
|
|
"/chromium"
|
|
|
|
])
|
|
|
|
]
|
2023-01-07 20:16:37 +02:00
|
|
|
(sloth.concat' sloth.homeDir "/Downloads")
|
2023-01-07 20:29:18 +02:00
|
|
|
"/tmp/.X11-unix"
|
|
|
|
(sloth.envOr "XAUTHORITY" "/no-xauth")
|
2023-01-07 20:16:37 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|