added flake and isntructions

Signed-off-by: Brendan Golden <git@brendan.ie>
This commit is contained in:
silver 2024-01-22 14:49:42 +00:00
parent dc95a2bda8
commit 1e41004947
3 changed files with 93 additions and 0 deletions

31
flake.nix Normal file
View file

@ -0,0 +1,31 @@
{
description = "UL Computer Society Open Governance";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
system = "${system}";
config = {
allowUnfree = true;
permittedInsecurePackages = [
"electron-25.9.0"
];
};
};
in rec {
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ obsidian ];
shellHook = ''
${pkgs.obsidian}/bin/obsidian &
BG_PID=$!
trap "kill -9 $BG_PID" EXIT
'';
};
});
}