nix-da/home/desktop/default.nix

24 lines
514 B
Nix

{
self,
pkgs,
lib,
...
}:
let
inherit (lib.my) slugify;
mkURLEntry = name: url: icon: {
name = slugify name;
value = {
inherit name icon;
terminal = false;
exec = "${pkgs.xdg-utils}/bin/xdg-open \"${url}\"";
};
};
in
{
xdg.desktopEntries = builtins.listToAttrs [
(mkURLEntry "Paperless" "https://paperless.ccnlc.eu" "${self}/assets/favicon-paperless.png")
(mkURLEntry "KitchenOwl" "https://kitchenowl.ccnlc.eu" "${self}/assets/favicon-kitchenowl.png")
];
}