mirror of
https://github.com/ItsDrike/nixdots
synced 2024-09-20 04:19:42 +00:00
Compare commits
No commits in common. "d3d8ad15b33ba6983ebff8935ac00941637d56ca" and "f2f7aecb978308266931f5144d97f6ac25b17d5f" have entirely different histories.
d3d8ad15b3
...
f2f7aecb97
|
@ -1,8 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"${pkgs.systemd}/bin/systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"${pkgs.systemd}/bin/dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
|
||||
# TODO: Add this (probably only vesktop)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
hyprPkgs = (import ./packages {inherit pkgs;});
|
||||
|
||||
# TODO: Switch to flake
|
||||
hyprlandPkg = pkgs.hyprland;
|
||||
xdgDesktopPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||
|
||||
cfg = osConfig.myOptions.home-manager.wms.hyprland;
|
||||
in {
|
||||
imports = [
|
||||
|
@ -34,19 +30,10 @@ in {
|
|||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = hyprlandPkg;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [hyprlandPkg];
|
||||
extraPortals = [
|
||||
xdgDesktopPortalHyprlandPkg
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -37,9 +37,7 @@ start_recording() {
|
|||
|
||||
# Wee need 'y' stdin to confirm that we want to override the file
|
||||
# since mktemp creates a blank file there already
|
||||
# TODO: The -x 420p is a temporary fix to address the recordings appearing
|
||||
# corrupted in firefox/discord/... See: <https://github.com/ammen99/wf-recorder/issues/218>
|
||||
echo "y" | wf-recorder -g "$geom" -f "$file" -x yuv420p
|
||||
echo "y" | wf-recorder -g "$geom" -f "$file"
|
||||
|
||||
# If wf-recorder process ends directly, rather than a trap being hit
|
||||
# we also want to run the save_file func
|
||||
|
|
|
@ -4,11 +4,5 @@
|
|||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
# Specify which portals should be used by the individual interfaces
|
||||
# see: <https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in>
|
||||
config.common = {
|
||||
# Use this portal for every interface, unless a specific override is present
|
||||
default = ["gtk"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,6 +4,5 @@
|
|||
./programs
|
||||
./fonts.nix
|
||||
./runners.nix
|
||||
./display
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./wayland
|
||||
];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./wms
|
||||
./xdg-portals.nix
|
||||
./xwayland.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf getExe;
|
||||
|
||||
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||
in {
|
||||
config = mkIf cfgEnabled {
|
||||
systemd.services = {
|
||||
# Seat management daemon
|
||||
# (Takes care of mediating access to shared devices (graphics, input), without requiring
|
||||
# applications like Wayland compositors being granted root privileges)
|
||||
seatd = {
|
||||
enable = true;
|
||||
description = "Seat management daemon";
|
||||
script = "${getExe pkgs.seatd} -g wheel";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = "1";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland
|
||||
];
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfgEnabled = config.myOptions.home-manager.wms.hyprland.enable;
|
||||
|
||||
# TODO: Switch to flake
|
||||
hyprlandPkg = pkgs.hyprland;
|
||||
xdgDesktopPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||
in {
|
||||
config = mkIf cfgEnabled {
|
||||
services.displayManager.sessionPackages = [hyprlandPkg];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [hyprlandPkg];
|
||||
extraPortals = [xdgDesktopPortalHyprlandPkg];
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = hyprlandPkg;
|
||||
portalPackage = xdgDesktopPortalHyprlandPkg;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||
cfgHyprlandEnabled = config.myOptions.home-manager.wms.hyprland.enable;
|
||||
in {
|
||||
config = mkIf cfgEnabled {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
|
||||
# Specify which portals should be used by the individual interfaces
|
||||
# see: <https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in>
|
||||
config.common = let
|
||||
# Note: this assumes a wlroots based compositor if it's not hyprland
|
||||
# which may not always actually be the case, however, I can't be bothered to handle
|
||||
# everything here and I don't plan on moving WMs any time soon.
|
||||
portal = if cfgHyprlandEnabled then "hyprland" else "wlr";
|
||||
in {
|
||||
# Use this portal for every interface, unless a specific override is present
|
||||
default = ["gtk"];
|
||||
|
||||
# Fix flameshot on hyprland / wlroots compositors
|
||||
"org.freedesktop.impl.portal.Screencast" = [portal];
|
||||
"org.freedesktop.impl.portal.Screenshot" = [portal];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||
in {
|
||||
config = mkIf cfgEnabled {
|
||||
programs.xwayland.enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue