packages/nixpak: use sloth values

This commit is contained in:
Max Headroom 2022-12-05 17:00:03 +01:00
parent 925bec76c9
commit 4b68fe8310
3 changed files with 20 additions and 16 deletions

View file

@ -1,7 +1,7 @@
{ mkNixPak, callPackage }:
mkNixPak {
config = {
config = { sloth, ... }: {
imports = [ ../modules/gui-base.nix ];
dbus.policies = {
"org.mpris.MediaPlayer2.*" = "own";
@ -9,10 +9,10 @@ mkNixPak {
flatpak.appId = "io.bassi.Amberol";
bubblewrap = {
bind.rw = [
"$HOME/.cache/amberol"
(sloth.concat' sloth.xdgCacheHome "/amberol")
];
bind.ro = [
"$HOME/Music"
(sloth.concat' sloth.homeDir "/Music")
];
};
app.package = callPackage ./amberol.nix {};

View file

@ -1,7 +1,7 @@
{ mkNixPak, fragments }:
mkNixPak {
config = {
config = { sloth, ... }: {
imports = [ ../modules/gui-base.nix ];
flatpak.appId = "de.haeckerfelix.Fragments";
app.package = fragments;
@ -14,7 +14,7 @@ mkNixPak {
"/etc/hosts"
];
bind.rw = [
"$HOME/.config/fragments"
(sloth.concat' sloth.xdgConfigHome "/fragments")
];
};
};

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, sloth, ... }:
{
config = {
@ -18,18 +18,22 @@
bubblewrap = {
network = lib.mkDefault false;
bind.rw = [
"$HOME/.cache/fontconfig"
"$HOME/.cache/mesa_shader_cache"
"$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
"$XDG_RUNTIME_DIR/at-spi/bus"
"$XDG_RUNTIME_DIR/gvfsd"
"$XDG_RUNTIME_DIR/pulse"
(sloth.concat' sloth.xdgCacheHome "fontconfig")
(sloth.concat' sloth.xdgCacheHome "mesa_shader_cache")
(sloth.concat [
(sloth.env "XDG_RUNTIME_DIR")
"/"
(sloth.env "WAYLAND_DISPLAY")
])
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/at-spi/bus")
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/gvfsd")
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/pulse")
];
bind.ro = [
"$XDG_RUNTIME_DIR/doc"
"$HOME/.config/gtk-2.0"
"$HOME/.config/gtk-3.0"
"$HOME/.config/gtk-4.0"
(sloth.concat' (sloth.env "XDG_RUNTIME_DIR") "/doc")
(sloth.concat' sloth.xdgConfigHome "/gtk-2.0")
(sloth.concat' sloth.xdgConfigHome "/gtk-3.0")
(sloth.concat' sloth.xdgConfigHome "/gtk-4.0")
];
env = {
XDG_DATA_DIRS = lib.makeSearchPath "share" [