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

View file

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

View file

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