2024-01-22 14:49:42 +00:00
|
|
|
{
|
|
|
|
description = "UL Computer Society Open Governance";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
utils.url = "github:numtide/flake-utils";
|
2024-05-09 23:24:02 +00:00
|
|
|
bfom.url = "gitlab:silver_rust/bfom";
|
2024-01-22 14:49:42 +00:00
|
|
|
};
|
|
|
|
|
2024-05-09 23:24:02 +00:00
|
|
|
outputs = { self, nixpkgs, utils, bfom }: utils.lib.eachDefaultSystem (system:
|
2024-01-22 14:49:42 +00:00
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = "${system}";
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
permittedInsecurePackages = [
|
2024-05-10 02:14:03 +00:00
|
|
|
# for obsidian
|
2024-01-22 14:49:42 +00:00
|
|
|
"electron-25.9.0"
|
2024-05-10 02:14:03 +00:00
|
|
|
# for wkhtmltopdf
|
|
|
|
"qtwebkit-5.212.0-alpha4"
|
2024-01-22 14:49:42 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in rec {
|
|
|
|
# `nix develop`
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [ obsidian ];
|
|
|
|
shellHook = ''
|
|
|
|
${pkgs.obsidian}/bin/obsidian &
|
|
|
|
BG_PID=$!
|
|
|
|
trap "kill -9 $BG_PID" EXIT
|
|
|
|
'';
|
|
|
|
};
|
2024-05-09 23:24:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
apps.bfom = {
|
|
|
|
type = "app";
|
|
|
|
program = "${bfom.defaultPackage.x86_64-linux}/bin/cargo-bfom";
|
|
|
|
};
|
|
|
|
|
2024-05-10 02:14:03 +00:00
|
|
|
packages = {
|
|
|
|
handovers = pkgs.writeShellScriptBin "format_handovers" ''
|
|
|
|
export PATH=${pkgs.lib.makeBinPath [ pkgs.wkhtmltopdf bfom.defaultPackage.x86_64-linux ]}:$PATH
|
|
|
|
${./_scripts/format_handovers.sh}
|
|
|
|
'';
|
|
|
|
};
|
2024-05-09 23:24:02 +00:00
|
|
|
|
2024-01-22 14:49:42 +00:00
|
|
|
});
|
|
|
|
}
|