Skip to content

Commit 0ceb8ca

Browse files
committed
feat: Add Nix support
1 parent 4b61758 commit 0ceb8ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ pub enum PathSource {
276276
Local,
277277
LocalDesktop,
278278
LocalFlatpak,
279+
LocalNix,
280+
Nix,
279281
System,
280282
SystemFlatpak,
281283
SystemSnap,
@@ -295,6 +297,10 @@ pub fn default_paths() -> Vec<(PathSource, PathBuf)> {
295297
PathSource::Local,
296298
home_dir.join(".local/share/applications"),
297299
),
300+
(
301+
PathSource::LocalNix,
302+
home_dir.join(".nix-profile/share/applications"),
303+
),
298304
(
299305
PathSource::SystemSnap,
300306
PathBuf::from("/var/lib/snapd/desktop/applications"),
@@ -303,6 +309,10 @@ pub fn default_paths() -> Vec<(PathSource, PathBuf)> {
303309
PathSource::SystemFlatpak,
304310
PathBuf::from("/var/lib/flatpak/exports/share/applications"),
305311
),
312+
(
313+
PathSource::Nix,
314+
PathBuf::from("/nix/var/nix/profiles/default/share/applications"),
315+
),
306316
(PathSource::System, PathBuf::from("/usr/share/applications")),
307317
]
308318
}

0 commit comments

Comments
 (0)