motd/flake.nix

40 lines
969 B
Nix

{
description = "A flake of MOTD files.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) symlinkJoin;
in
{
formatter = pkgs.nixfmt-rfc-style;
packages.default = self.packages.${system}.motd;
packages.motd = symlinkJoin {
name = "motd";
paths = [ ./motd ];
passthru =
let
motd = "${self.packages.${system}.motd}";
in
{
"40k" = "${motd}/40k-thought-for-the-day.txt";
rebirth = "${motd}/boi-rebirth-fortunes.txt";
bofh = "${motd}/bofh-excuses.txt";
discordium = "${motd}/discordium.txt";
};
};
}
);
}