From 1e4100494744fd3d48fc265d8fefa46430f4ee62 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Mon, 22 Jan 2024 14:49:42 +0000 Subject: [PATCH] added flake and isntructions Signed-off-by: Brendan Golden --- README.md | 2 ++ flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 31 ++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/README.md b/README.md index cb0af4b..5140a6d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ Taking inspiration from https://git.dbyte.xyz/distro/redbrick-open-governance we are making our decisions open. +To view in Obsidian you can either download and install from https://obsidian.md/. +Or if you have nix installed you can do ``nix develop``. \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ee166fd --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1705856552, + "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..438e4fb --- /dev/null +++ b/flake.nix @@ -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 + ''; + }; + }); +}