Compare commits

...

2 Commits

Author SHA1 Message Date
Ashhhleyyy 3b45d2e7c4
fix: silly 2023-05-23 13:55:57 +01:00
Ashhhleyyy 6f5409eb0c
feat: add home manager module 2023-05-23 13:46:13 +01:00
2 changed files with 28 additions and 0 deletions

View File

@ -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 {

27
home.nix Normal file
View File

@ -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
'';
};
}