motd/flake.nix

40 lines
969 B
Nix
Raw Normal View History

2021-12-23 02:15:44 +00:00
{
description = "A flake of MOTD files.";
2024-07-19 06:20:16 +00:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
2021-12-23 02:15:44 +00:00
2024-07-19 06:20:16 +00:00
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
2021-12-23 02:15:44 +00:00
let
pkgs = nixpkgs.legacyPackages.${system};
2024-07-19 06:34:25 +00:00
inherit (pkgs) symlinkJoin;
2021-12-23 02:15:44 +00:00
in
{
2024-07-19 06:20:16 +00:00
formatter = pkgs.nixfmt-rfc-style;
2024-07-19 06:34:25 +00:00
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";
};
};
2021-12-23 02:15:44 +00:00
}
);
}