mirror of https://github.com/ashhhleyyy/fsh.git
Compare commits
2 Commits
fda28bf445
...
3b45d2e7c4
Author | SHA1 | Date |
---|---|---|
|
3b45d2e7c4 | |
|
6f5409eb0c |
|
@ -11,6 +11,7 @@
|
|||
overlays.default = final: prev: {
|
||||
inherit (self.packages.${prev.system}) fsh;
|
||||
};
|
||||
homeModules.fsh = import ./home.nix;
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.fsh;
|
||||
in
|
||||
{
|
||||
options.programs.fsh = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enables the fsh prompt for the fish shell.
|
||||
programs.fish.enable must also be set to true for this option to have effect.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.fsh ];
|
||||
programs.fish.functions.fish_prompt.body = ''
|
||||
set FSH_LAST_STATUS $status
|
||||
fsh $FSH_LAST_STATUS
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue