grimm-nixos-laptop/common/portals.nix

38 lines
913 B
Nix
Raw Normal View History

2024-04-10 16:51:28 +02:00
{ pkgs, config, lib, ... }:
let
2024-03-24 16:59:47 +01:00
cfg = config.grimmShared;
2024-04-10 16:51:28 +02:00
in
{
2024-03-24 16:59:47 +01:00
config = with cfg; lib.mkIf (enable && portals) {
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-kde
xdg-desktop-portal-gtk
];
2024-04-11 10:56:21 +02:00
wlr.enable = true;
2024-04-11 10:56:21 +02:00
wlr.settings = lib.mapAttrs'
(name: value: lib.nameValuePair ("screencast_" + name) {
output_name = value.id;
max_fps = value.fps;
chooser_type = "simple";
chooser_cmd = "${lib.getExe pkgs.slurp} -f %o -or";
2024-04-11 10:56:21 +02:00
})
cfg.screens;
2024-03-24 16:59:47 +01:00
};
environment.sessionVariables = {
XDG_CONFIG_HOME = "$HOME/.config";
2024-04-10 16:51:28 +02:00
FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
2024-03-24 16:59:47 +01:00
};
environment.systemPackages = with pkgs; [
xwaylandvideobridge
];
2024-03-24 16:59:47 +01:00
fonts.fontDir.enable = true;
};
}