added yazi as filechooser for xdg, and added override for some
conflicted package
This commit is contained in:
1 parent
fd79c661a1
commit
24216aca9d
9 files changed
+93
-16
No files matched your search
Generated
+13
-13
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791306979,
|
||||
"narHash": "sha256-KuLePuhwJM9NLt/gTLHzXaOoSZKGoB3m7NfXjiQ98HY=",
|
||||
"lastModified": 1792668857,
|
||||
"narHash": "sha256-chUrnAqBhBLvXBUsLFxFYBIl8c0GWp06wdjmAMS8l+U=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fae6e9e42c3b762ab47635cddcfaf6f52374a61b",
|
||||
"rev": "cb7de2c7e589afe7531d4832c71ad4df144624ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1791260994,
|
||||
"narHash": "sha256-MFBjw66d4h06MvpW6lIl7RwarLteD0sk859CncGwb1Q=",
|
||||
"rev": "151fa4e8ddfdd8dd25d945ad94ed54a13de9f6e4",
|
||||
"lastModified": 1792502884,
|
||||
"narHash": "sha256-ij8QUxzTOHovLrNOxVRx+RAhGQFOMsJbji0veiatH5k=",
|
||||
"rev": "02c087f3fe673c9e317f206a627cb6b910336dbe",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1086391.151fa4e8ddfd/nixexprs.tar.zst"
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1097682.02c087f3fe67/nixexprs.tar.zst"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
@@ -71,11 +71,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791203262,
|
||||
"narHash": "sha256-+RlIyHipr7BOLsIC9jnpzbkLBsY6XbLhuPinAwJsYjo=",
|
||||
"lastModified": 1792070459,
|
||||
"narHash": "sha256-qGSyMXPHiXWp9/nE5Zs1DJN5NmZFvoxaBS5Y9i7p0Pc=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "ae88928f7334556d298b8d9552abdf395931931b",
|
||||
"rev": "97a89cec53eb4f8788386a574450dd94c0538754",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -94,11 +94,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791266850,
|
||||
"narHash": "sha256-F/scdmE9Y03TfSQWrBHaJWTRTr3rRQBqvJSDgF48g1c=",
|
||||
"lastModified": 1792595242,
|
||||
"narHash": "sha256-kH/E0uJDslOgYcnmU+c0cm6HrUjsEtvZQKZtuQ1+uvo=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "d9e4e25d6ade5d541074045d332d887c044e11f5",
|
||||
"rev": "f19490ac889eabb05bdb7e8dcb85225ee75bd87b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -47,6 +47,9 @@ environment {
|
||||
// Electron/Chromium: Automatically flags apps (VS Code, Discord, Obsidian) to use Wayland.
|
||||
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
||||
|
||||
// GTK: Route file dialogs through the XDG portal (yazi file picker).
|
||||
GDK_DEBUG "portals"
|
||||
|
||||
// =========================================================================
|
||||
// 5. DESKTOP SESSION IDENTIFICATION
|
||||
// =========================================================================
|
||||
|
||||
@@ -16,6 +16,7 @@ binds {
|
||||
Mod+Down { focus-workspace-down; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+Shift+R { switch-preset-column-width-back; }
|
||||
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ layout {
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
proportion 1.0
|
||||
}
|
||||
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
@@ -3,6 +3,13 @@ window-rule {
|
||||
open-floating true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match title="^termfilechooser$"
|
||||
open-floating true
|
||||
default-column-width { proportion 0.6; }
|
||||
default-window-height { proportion 0.6; }
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 12
|
||||
clip-to-geometry true
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
imports = [
|
||||
./shell.nix
|
||||
./dotfiles.nix
|
||||
./portal.nix
|
||||
./packages
|
||||
];
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ in
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
setAsDefaultBrowser = true;
|
||||
profiles.default.sine.enable = true;
|
||||
profiles.default = {
|
||||
sine.enable = true;
|
||||
# Use the XDG portal (yazi, see home/portal.nix) for file dialogs.
|
||||
settings."widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
termfilechooser = pkgs.xdg-desktop-portal-termfilechooser;
|
||||
in
|
||||
{
|
||||
# Use yazi (in alacritty) as the file picker for every app that goes through
|
||||
# the XDG FileChooser portal.
|
||||
#
|
||||
# Portal/D-Bus files are found through XDG_DATA_DIRS (user profile), so we
|
||||
# deliberately don't enable HM's `xdg.portal`: it would point
|
||||
# NIX_XDG_DESKTOP_PORTAL_DIR at the user profile only and hide the
|
||||
# system-wide gnome/gtk portals that niri relies on.
|
||||
home.packages = [ termfilechooser ];
|
||||
|
||||
# The D-Bus activation file references this unit by name, and HM doesn't
|
||||
# link `share/systemd/user` from packages.
|
||||
systemd.user.services.xdg-desktop-portal-termfilechooser = {
|
||||
Unit = {
|
||||
Description = "Portal service (terminal file chooser implementation)";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.impl.portal.desktop.termfilechooser";
|
||||
ExecStart = "${termfilechooser}/libexec/xdg-desktop-portal-termfilechooser";
|
||||
Environment = [ "PATH=${config.home.profileDirectory}/bin:/run/current-system/sw/bin" ];
|
||||
Restart = "on-failure";
|
||||
Slice = "session.slice";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
# Overrides niri's shipped niri-portals.conf, so its entries are repeated here.
|
||||
"xdg-desktop-portal/niri-portals.conf".text = ''
|
||||
[preferred]
|
||||
default=gnome;gtk;
|
||||
org.freedesktop.impl.portal.Access=gtk;
|
||||
org.freedesktop.impl.portal.Notification=gtk;
|
||||
org.freedesktop.impl.portal.Secret=gnome-keyring;
|
||||
org.freedesktop.impl.portal.FileChooser=termfilechooser;
|
||||
'';
|
||||
|
||||
"xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
[filechooser]
|
||||
cmd=${termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
||||
default_dir=$HOME
|
||||
env=TERMCMD=alacritty --title termfilechooser -e
|
||||
open_mode=suggested
|
||||
save_mode=suggested
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# TODO: drop the extend once NixOS/nixpkgs#575861 lands (v4l2loopback ships
|
||||
# depmod files that conflict with the kernel's in linux-*-modules).
|
||||
kernelPackages = pkgs.linuxPackages_latest.extend (
|
||||
_: prev: {
|
||||
v4l2loopback = prev.v4l2loopback.overrideAttrs (old: {
|
||||
installFlags = (old.installFlags or [ ]) ++ [ "DEPMOD=true" ];
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
||||
Reference in new issue
Block a user