trying filechooser nonsense again

This commit is contained in:
Matt Nish-Lapidus 2025-06-29 20:58:23 -04:00
parent e113d9775d
commit 3efe104240
7 changed files with 155 additions and 39 deletions

131
flake.lock generated
View file

@ -261,6 +261,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1722555600,
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -458,11 +476,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1751146119, "lastModified": 1751239699,
"narHash": "sha256-gvjG95TCnUVJkvQvLMlnC4NqiqFyBdJk3o8/RwuHeaU=", "narHash": "sha256-zA1uUdAq3c26fHm26xMWMuF5COhI18EzaH7az/P2OWM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "76d0c31fce2aa0c71409de953e2f9113acd5b656", "rev": "f6deff178cc4d6049d30785dbfc831e6c6e3a219",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -604,11 +622,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1751179061, "lastModified": 1751232679,
"narHash": "sha256-E3SA2IZf72CR3wklJM+cF1ZOVjy6r8ZqbsOPXodNjWo=", "narHash": "sha256-ljpyZxr5cHjJEXItXCoJVXJ+fiHTW1Ft0fPgEY72K5A=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "cc5722e779f3b32bdd918e473777c39da67ab1b6", "rev": "d9b7ff985e454c1b3d2af1c5d09e799ecd38902d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -823,6 +841,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_4": {
"locked": {
"lastModified": 1722555339,
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1751048012, "lastModified": 1751048012,
@ -871,6 +901,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_10": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1735834308, "lastModified": 1735834308,
@ -983,6 +1029,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1723362943,
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pyproject-build-systems": { "pyproject-build-systems": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1054,6 +1116,7 @@
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"waybar": "waybar", "waybar": "waybar",
"wezterm": "wezterm", "wezterm": "wezterm",
"xdg-desktop-portal-termfilepickers": "xdg-desktop-portal-termfilepickers",
"xwayland-satellite": "xwayland-satellite", "xwayland-satellite": "xwayland-satellite",
"yazi": "yazi", "yazi": "yazi",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
@ -1292,6 +1355,24 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_3": {
"inputs": {
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1723454642,
"narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "349de7bc435bdff37785c2466f054ed1766173be",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"uv2nix": { "uv2nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1399,6 +1480,26 @@
"type": "github" "type": "github"
} }
}, },
"xdg-desktop-portal-termfilepickers": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_9",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1750511941,
"narHash": "sha256-QB7TwZR31368HdQb4C9/s6ujiDtihwEbesTxKmz3Pbg=",
"owner": "guekka",
"repo": "xdg-desktop-portal-termfilepickers",
"rev": "1fe0479476465cc9061a8c7810a489e63ddc7fd7",
"type": "github"
},
"original": {
"owner": "guekka",
"repo": "xdg-desktop-portal-termfilepickers",
"type": "github"
}
},
"xwayland-satellite": { "xwayland-satellite": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
@ -1408,11 +1509,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1751176151, "lastModified": 1751228685,
"narHash": "sha256-7bK5eoK0ySlct/cbehTrkGcTcSMOLXSnh+RJiswVzEU=", "narHash": "sha256-MENtauGBhJ+kDeFaawvWGXaFG3Il6qQzjaP0RmtfM0k=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "91d463851e24c190cc912471861b5414ac8fe65c", "rev": "557ebeb616e03d5e4a8049862bbbd1f02c6f020b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1441,11 +1542,11 @@
"xwayland-satellite-unstable": { "xwayland-satellite-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1751176151, "lastModified": 1751228685,
"narHash": "sha256-7bK5eoK0ySlct/cbehTrkGcTcSMOLXSnh+RJiswVzEU=", "narHash": "sha256-MENtauGBhJ+kDeFaawvWGXaFG3Il6qQzjaP0RmtfM0k=",
"owner": "Supreeeme", "owner": "Supreeeme",
"repo": "xwayland-satellite", "repo": "xwayland-satellite",
"rev": "91d463851e24c190cc912471861b5414ac8fe65c", "rev": "557ebeb616e03d5e4a8049862bbbd1f02c6f020b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1484,11 +1585,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1751200680, "lastModified": 1751224527,
"narHash": "sha256-sVep+p1XtL4tpArd1of+8mA3mJ9T0NsHNOCLGKxxRns=", "narHash": "sha256-Mihe18dBS7y13//qPn2LVnSMZdZXI1vvnpKpRCmJcfw=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "35ba63ea42a57e8470e605b178e5228a29edbcbe", "rev": "ee2ecf872fe6b7aa14ec90796ba610eeafdd17da",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -73,6 +73,8 @@
url = "github:wez/wezterm?dir=nix"; url = "github:wez/wezterm?dir=nix";
}; };
xdg-desktop-portal-termfilepickers.url = "github:guekka/xdg-desktop-portal-termfilepickers";
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -137,6 +139,7 @@
baseHomeModules = [ baseHomeModules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
inputs.xdg-desktop-portal-termfilepickers.homeManagerModules.default
]; ];
baseHomeManager = { baseHomeManager = {

View file

@ -1,2 +1,2 @@
#!/usr/bin/env sh #!/usr/bin/env sh
niri msg action power-off-monitors /run/current-system/sw/bin/niri msg action power-off-monitors

View file

@ -43,6 +43,10 @@
}); });
}) })
(final: prev: {
xdg-desktop-portal-termfilepickers = inputs.xdg-desktop-portal-termfilepickers.packages.${pkgs.system}.default;
})
(final: prev: { (final: prev: {
manifold = prev.manifold.overrideAttrs (old: { manifold = prev.manifold.overrideAttrs (old: {
cmakeFlags = [ cmakeFlags = [
@ -315,7 +319,6 @@
configPackages = [ pkgs.niri-unstable ]; configPackages = [ pkgs.niri-unstable ];
config = { config = {
common.default = [ "niri" ]; common.default = [ "niri" ];
# common."org.freedesktop.impl.portal.FileChooser" = [ "xdg-desktop-portal-termfilechooser" ]; # xdg-?
}; };
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-gnome pkgs.xdg-desktop-portal-gnome
@ -323,7 +326,7 @@
pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-wlr
pkgs.gnome-keyring pkgs.gnome-keyring
pkgs.xdg-desktop-portal-termfilechooser pkgs.xdg-desktop-portal-termfilepickers
]; ];
}; };

View file

@ -34,5 +34,6 @@
gnome-themes-extra gnome-themes-extra
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnome-settings-daemon gnome-settings-daemon
swayidle
]; ];
} }

View file

@ -1,4 +1,4 @@
{ pkgs, nix-config, pkgs-local, lib, ... }: { pkgs, nix-config, inputs, lib, ... }:
{ {
@ -211,6 +211,14 @@
}; };
services = { services = {
xdg-desktop-portal-termfilepickers = {
enable = true;
package = pkgs.xdg-desktop-portal-termfilepickers;
desktopEnvironments = [ "common" "niri" ];
config = {
terminal_command = lib.getExe pkgs.wezterm;
};
};
flatpak = { flatpak = {
enable = true; enable = true;
packages = [ packages = [
@ -267,24 +275,18 @@
# }; # };
# }; # };
# xdg.portal = { xdg.portal = {
# enable = true; enable = true;
# configPackages = [ pkgs.niri-unstable ]; configPackages = [ pkgs.niri-unstable ];
# extraPortals = with pkgs; [ extraPortals = with pkgs; [
# xdg-desktop-portal-gnome xdg-desktop-portal-gnome
# xdg-desktop-portal-gtk xdg-desktop-portal-gtk
# xdg-desktop-portal xdg-desktop-portal
# xdg-desktop-portal-wlr xdg-desktop-portal-wlr
# gnome-keyring gnome-keyring
# xdg-desktop-portal-termfilechooser xdg-desktop-portal-termfilepickers
# ]; ];
# config = { };
# common = {
# default = [ "gtk" ];
# # "org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
# };
# };
# };
# home.sessionVariables.TERMCMD = "wezterm --class=file_chooser"; # home.sessionVariables.TERMCMD = "wezterm --class=file_chooser";

View file

@ -2,13 +2,18 @@
{ {
services.swayidle = { services.swayidle = {
enable = true; enable = true;
systemdTarget = "graphical-session.target";
extraArgs = [ "-w" ];
events = [ events = [
{ {
event = "lock"; event = "lock";
command = "/home/emenel/.local/bin/session-lock"; command = "/home/emenel/.local/bin/session-lock";
} }
{
event = "before-sleep";
command = "${pkgs.systemd}/bin/loginctl lock-session";
}
{ {
event = "after-resume"; event = "after-resume";
command = "/home/emenel/.local/bin/on-unlock"; command = "/home/emenel/.local/bin/on-unlock";
@ -19,6 +24,7 @@
{ {
timeout = 60; timeout = 60;
command = "/home/emenel/.local/bin/dim-all-monitors"; command = "/home/emenel/.local/bin/dim-all-monitors";
resumeCommand = "/home/emenel/.local/bin/on-unlock";
} }
# battery timers # battery timers
@ -61,7 +67,7 @@
color = "000000"; color = "000000";
font-size = 32; font-size = 32;
indicator-idle-visible = true; indicator-idle-visible = true;
indicator-radius = 250; indicator-radius = 150;
line-color = "cccccc"; line-color = "cccccc";
show-failed-attempts = true; show-failed-attempts = true;
}; };