flocon/home/programs/niri/default.nix
Anthony Rodriguez d0466f96da
repo: add ags, a gtk shell
commit 75cf6a4d67
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Fri Oct 11 15:34:14 2024 +0200

    home/programs/niri: use gtk portals for most things, and gnome for screencast

commit 5ccb424079
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Oct 10 21:19:33 2024 +0200

    home/programs/niri: add play/pause, add settings button on fn key f12

commit 8b7164739d
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Oct 10 00:32:40 2024 +0200

    home/programs/niri: replace desktop-portal-gtk with gnome

commit fe40c6c72c
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Oct 10 00:21:31 2024 +0200

    home/programs/niri: add xdg-desktop-portal-gtk

commit 74b7df1245
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Oct 10 00:21:14 2024 +0200

    home/programs: add fractal

commit 3773095069
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Thu Oct 10 00:21:05 2024 +0200

    home/programs/gtk: use color-scheme for gtk4.0

commit 8fef768f4f
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Oct 9 19:22:43 2024 +0200

    system/services/regreet: ensure that regreet starts dbus session

commit fcd88bfa8e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Oct 9 19:22:20 2024 +0200

    repo: implement ags

    Implement ags, a wayland bar / GTK shell. Also added a few dependencies
    required for it to work properly.
2024-10-11 17:57:55 +02:00

90 lines
2.2 KiB
Nix

{
inputs,
lib,
pkgs,
osConfig,
...
}: let
colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette;
in {
imports = [./binds.nix];
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring];
config = {
common = {
default = ["gtk"];
"org.freedesktop.impl.portal.ScreenCast" = ["gnome"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
};
};
programs.niri = {
settings = {
input.keyboard.xkb = {
layout = "us";
options = "compose:ralt";
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
layout = {
focus-ring = {
enable = true;
active.color = "#${colors.base0E}";
};
always-center-single-column = true;
};
window-rules = [
{
draw-border-with-background = false;
geometry-corner-radius = let
r = 8.0;
in {
top-left = r;
top-right = r;
bottom-left = r;
bottom-right = r;
};
clip-to-geometry = true;
}
{
matches = [
{app-id = "foot";}
];
default-column-width = {proportion = 0.5;};
}
];
environment = {
"NIXOS_OZONE_WL" = "1";
"DISPLAY" = ":0";
"_JAVA_AWT_WM_NONREPARENTING" = "1"; # https://wiki.archlinux.org/title/Sway#Java_applications
};
};
};
# copied from https://github.com/linyinfeng/dotfiles/blob/c00fe3b1562ad947672863a43e455bc2f01a56b6/home-manager/profiles/niri/default.nix#L594-L611
systemd.user.services.xwayland-satellite = {
Unit = {
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
};
Install = {
WantedBy = ["niri.service"];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe pkgs.xwayland-satellite} :0";
NotifyAccess = "all";
StandardOutput = "journal";
Restart = "on-failure";
};
};
}