From c3cfff809e1512f6dacf8c3805bdbb6fdce78552 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Sun, 20 Dec 2020 20:12:20 +0000 Subject: [PATCH] Add Fish module --- default.nix | 1 + modules/fish.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 modules/fish.nix diff --git a/default.nix b/default.nix index 68d276d0..43fba649 100644 --- a/default.nix +++ b/default.nix @@ -3,6 +3,7 @@ ./stylix/default.nix ./modules/console.nix + ./modules/fish.nix ./modules/lightdm.nix ./modules/qutebrowser.nix ./modules/vim.nix diff --git a/modules/fish.nix b/modules/fish.nix new file mode 100644 index 00000000..229eb9a6 --- /dev/null +++ b/modules/fish.nix @@ -0,0 +1,27 @@ +{ pkgs, config, ... }: + +let + # When https://github.com/tomyun/base16-fish/pull/5 is merged, + # this can use the main repository rather than a fork + base16-fish = pkgs.fetchFromGitHub { + owner = "ngmoviedo"; + repo = "base16-fish"; + rev = "2aa139c901c8568764dbdc13934862178cb84595"; + sha256 = "ppYxLr+wD42Xwsq8dk6MLk8TrudTnlQlgvFf4ZyTjVk="; + }; + + theme = config.lib.stylix.base16.buildTemplate "fish" + "${base16-fish}/templates/default.mustache"; + + promptInit = '' + source ${theme} + base16-stylix + ''; + +in { + programs.fish.promptInit = promptInit; + + stylix.homeModule = { + programs.fish.promptInit = promptInit; + }; +}