mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:03:56 -05:00
58 lines
1.6 KiB
Nix
58 lines
1.6 KiB
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
xdg.portal.enable = true;
|
||
|
|
||
|
services.flatpak.enable = true;
|
||
|
services.flatpak.packages = [
|
||
|
{ appId = "com.brave.Browser"; origin = "flathub"; }
|
||
|
"com.valvesoftware.Steam"
|
||
|
"org.mozilla.firefox"
|
||
|
"com.github.tchx84.Flatseal"
|
||
|
];
|
||
|
services.flatpak.overrides = {
|
||
|
global = {
|
||
|
# Force Wayland by default
|
||
|
# Context.sockets = ["wayland" "!x11" "!fallback-x11"];
|
||
|
|
||
|
# Environment = {
|
||
|
# # Fix un-themed cursor in some Wayland apps
|
||
|
# XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||
|
|
||
|
# # # Force correct theme for some GTK apps
|
||
|
# # GTK_THEME = "Adwaita:dark";
|
||
|
# };
|
||
|
};
|
||
|
|
||
|
"com.visualstudio.code".Context = {
|
||
|
filesystems = [
|
||
|
"xdg-config/git:ro" # Expose user Git config
|
||
|
"/run/current-system/sw/bin:ro" # Expose NixOS managed software
|
||
|
];
|
||
|
sockets = [
|
||
|
"gpg-agent" # Expose GPG agent
|
||
|
"pcsc" # Expose smart cards (i.e. YubiKey)
|
||
|
];
|
||
|
};
|
||
|
|
||
|
"org.onlyoffice.desktopeditors".Context.sockets = ["x11"]; # No Wayland support
|
||
|
};
|
||
|
system.fsPackages = [ pkgs.bindfs ];
|
||
|
fileSystems = let
|
||
|
mkRoSymBind = path: {
|
||
|
device = path;
|
||
|
fsType = "fuse.bindfs";
|
||
|
options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ];
|
||
|
};
|
||
|
aggregatedFonts = pkgs.buildEnv {
|
||
|
name = "system-fonts";
|
||
|
paths = config.fonts.fonts;
|
||
|
pathsToLink = [ "/share/fonts" ];
|
||
|
};
|
||
|
in {
|
||
|
# Create an FHS mount to support flatpak host icons/fonts
|
||
|
"/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons");
|
||
|
"/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts");
|
||
|
};
|
||
|
}
|