nix-da/home/desktop/default.nix

28 lines
653 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 = {
userDirs.enable = true;
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")
(mkURLEntry "Discord" "https://discord.com/app" "${self}/assets/favicon-discord.png")
];
};
}