restructuring3

This commit is contained in:
cnst
2024-06-23 18:20:47 +02:00
parent 686aa0f385
commit 51fa53b788
2 changed files with 86 additions and 12 deletions

View File

@@ -15,6 +15,7 @@
./gtk ./gtk
./shell ./shell
./firefox ./firefox
./steam
]; ];
nixpkgs = { nixpkgs = {
@@ -59,7 +60,6 @@
xfce.thunar-volman xfce.thunar-volman
xfce.thunar-archive-plugin xfce.thunar-archive-plugin
gnome.file-roller gnome.file-roller
gvfs
swaybg swaybg
wireguard-tools wireguard-tools
wpa_supplicant wpa_supplicant
@@ -95,18 +95,31 @@
systemd.enable = true; systemd.enable = true;
}; };
xdg.portal = { xdg = {
enable = true; userDirs = {
xdgOpenUsePortal = true; enable = true;
config = { createDirectories = true;
common.default = [ "gtk" ]; desktop = "${config.home.homeDirectory}/desktop";
hyprland.default = [ documents = "${config.home.homeDirectory}/documents";
"gtk" download = "${config.home.homeDirectory}/downloads";
"hyprland" music = "${config.home.homeDirectory}/media/music";
]; pictures = "${config.home.homeDirectory}/media/images";
publicShare = "${config.home.homeDirectory}/documents/share";
templates = "${config.home.homeDirectory}/documents/templates";
videos = "${config.home.homeDirectory}/media/videos";
};
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config = {
common.default = [ "gtk" ];
hyprland.default = [
"gtk"
"hyprland"
];
};
}; };
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
}; };
home.sessionVariables = { home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;

View File

@@ -0,0 +1,61 @@
{
pkgs,
lib,
config,
...
}:
let
steam-with-pkgs = pkgs.steam.override {
extraPkgs =
pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
gamescope
mangohud
];
};
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
steam-session =
let
gamescope = lib.concatStringsSep " " [
(lib.getExe pkgs.gamescope)
"--output-width ${toString monitor.width}"
"--output-height ${toString monitor.height}"
"--framerate-limit ${toString monitor.refreshRate}"
"--prefer-output ${monitor.name}"
"--adaptive-sync"
"--expose-wayland"
"--steam"
];
steam = lib.concatStringsSep " " [
"steam"
"steam://open/bigpicture"
];
in
pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" # ini
''
[Desktop Entry]
Name=Steam Session
Exec=${gamescope} -- ${steam}
Type=Application
'';
in
{
home.packages = [
steam-with-pkgs
steam-session
pkgs.gamescope
pkgs.mangohud
pkgs.protontricks
];
}