diff --git a/assets/favicon-kitchenowl.png b/assets/favicon-kitchenowl.png new file mode 100644 index 0000000..581923c Binary files /dev/null and b/assets/favicon-kitchenowl.png differ diff --git a/home/desktop/default.nix b/home/desktop/default.nix index ed0e878..ef8b204 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -1,12 +1,24 @@ -{ pkgs, ... }: { - xdg.desktopEntries = { - paperless = { - name = "Paperless"; - exec = "${pkgs.xdg-utils}/bin/xdg-open https://paperless.ccnlc.eu"; + self, + pkgs, + lib, + ... +}: +let + inherit (lib.my) slugify; + + mkURLEntry = name: url: icon: { + name = slugify name; + value = { + inherit name icon; terminal = false; - categories = [ "Office" ]; - icon = ../../assets/favicon-paperless.png; + 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") + ]; } diff --git a/home/graphical/default.nix b/home/graphical/default.nix index 1fb972e..da57e3e 100644 --- a/home/graphical/default.nix +++ b/home/graphical/default.nix @@ -6,5 +6,6 @@ ./lollypop ./fuzzel.nix ./gammastep.nix # default because I need to protect my peepers + ./swww.nix ]; } diff --git a/home/graphical/swww.nix b/home/graphical/swww.nix new file mode 100644 index 0000000..c6ecaa8 --- /dev/null +++ b/home/graphical/swww.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + systemd.user.services.swww = { + Install.WantedBy = [ "graphical-session.target" ]; + + Unit = { + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.swww}/bin/swww-daemon"; + Restart = "on-failure"; + }; + }; +} diff --git a/options/nysh.nix b/options/nysh.nix index dc043e2..1f24e15 100644 --- a/options/nysh.nix +++ b/options/nysh.nix @@ -32,19 +32,5 @@ in Restart = "on-failure"; }; }; - - # systemd.user.services.nysh = { - #Install.WantedBy = [ "graphical-session.target" ]; - - #Unit = { - #After = [ "graphical-session-pre.target" ]; - #PartOf = [ "graphical-session.target" ]; - #}; - #Service = { - #Type = "simple"; - #ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh"; - #Restart = "on-failure"; - #}; - #}; }; } diff --git a/options/server/paperless-ngx/default.nix b/options/server/paperless-ngx/default.nix index 2f19250..71b474a 100644 --- a/options/server/paperless-ngx/default.nix +++ b/options/server/paperless-ngx/default.nix @@ -2,7 +2,6 @@ config, options, lib, - pkgs, ... }: let diff --git a/parts/lib/functions.nix b/parts/lib/functions.nix index 758cd51..4475ef0 100644 --- a/parts/lib/functions.nix +++ b/parts/lib/functions.nix @@ -60,4 +60,10 @@ in }; }; }; + + slugify = + let + inherit (lib.strings) sanitizeDerivationName; + in + str: (sanitizeDerivationName (lib.toLower str)); }