Split combinators into files
The `lib/combinators.nix` file was getting quite long and some ideas I have for future combinators may even require ancillary files. To help scale these changes, this commit breaks each combinator into its own file under the `lib/combinators` directory.
This commit is contained in:
parent
8fa6d132e1
commit
6181276ae1
54 changed files with 1531 additions and 1260 deletions
43
lib/combinators/gui.nix
Normal file
43
lib/combinators/gui.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ combinators, ... }:
|
||||
let
|
||||
inherit (combinators)
|
||||
add-runtime
|
||||
compose
|
||||
fwd-env
|
||||
noescape
|
||||
pipewire
|
||||
pulse
|
||||
readonly
|
||||
readonly-paths-from-var
|
||||
runtime-deep-ro-bind
|
||||
try-fwd-env
|
||||
wayland
|
||||
;
|
||||
in
|
||||
{
|
||||
sig = "Permission";
|
||||
doc = ''
|
||||
Exposes everything required to get graphical applications to work.
|
||||
|
||||
This composes [pulse](#pulse), [pipewire](#pipewire),
|
||||
[wayland](#wayland), and forwards/binds a few other paths to get fonts
|
||||
and cursor to render correctly.
|
||||
'';
|
||||
impl = compose [
|
||||
(add-runtime "mkdir -p ~/.config/dconf")
|
||||
pulse
|
||||
pipewire
|
||||
wayland
|
||||
(runtime-deep-ro-bind (noescape "/etc/fonts"))
|
||||
(readonly (noescape "~/.config/dconf"))
|
||||
(fwd-env "XDG_RUNTIME_DIR")
|
||||
(fwd-env "XDG_DATA_DIRS")
|
||||
(readonly-paths-from-var "XDG_DATA_DIRS" ":")
|
||||
|
||||
# Cursor
|
||||
(try-fwd-env "XCURSOR_THEME")
|
||||
(try-fwd-env "XCURSOR_PATH")
|
||||
(try-fwd-env "XCURSOR_SIZE")
|
||||
(readonly-paths-from-var "XCURSOR_PATH" " ")
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue