From 22efec27cbdbd2b5990a60c5952c0a4806c806e0 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Mon, 21 Feb 2022 18:22:19 +0100 Subject: [PATCH] feat: added cheat --- home/cheat/default.nix | 29 +++++++++++++++++++++++++++++ home/echidna.nix | 1 + home/nixos-common.nix | 1 + 3 files changed, 31 insertions(+) create mode 100644 home/cheat/default.nix diff --git a/home/cheat/default.nix b/home/cheat/default.nix new file mode 100644 index 0000000..3165347 --- /dev/null +++ b/home/cheat/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: + +{ + home = { + packages = [ pkgs.cheat ]; + file.".config/cheat/conf.yml".text = pkgs.lib.generators.toYAML { } { + + # The editor to use with 'cheat -e '. Defaults to $EDITOR or $VISUAL. + editor = "${pkgs.neovim}/bin/nvim"; + + colorize = true; + + # chroma formatter, options are available here: + # https://github.com/alecthomas/chroma/tree/master/styles + style = "monokai"; + + # one of: "terminal", "terminal256", "terminal16m" + formatter = "terminal16m"; + + cheatpaths = [{ + name = "personal"; + path = "${config.home.homeDirectory}/configs/cheatsheets"; + tags = [ "personal" ]; + readonly = false; + }]; + + }; + }; +} diff --git a/home/echidna.nix b/home/echidna.nix index b5e5025..b2a713d 100644 --- a/home/echidna.nix +++ b/home/echidna.nix @@ -6,6 +6,7 @@ imports = [ ./alacritty/macos.nix + ./cheat ./dav/macos.nix ./gcloud ./git/echidna.nix diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 2bca8dc..1990f32 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -19,6 +19,7 @@ in { ./arduino ./barrier ./browsers + ./cheat ./dav ./fonts ./git