The 'user' config was only used by this fish module, and became silly as soon as I had to duplicate it to the git module. Instead I set it once in the home config and reference it. In addition this change includes enabling the fish shell. This makes it possible to do things like set session variables, which I'll do in the next commit.
25 lines
545 B
Nix
25 lines
545 B
Nix
{ config, configFiles, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
options.myModules.home.fish = {
|
|
enable = mkEnableOption "custom fish configuration";
|
|
};
|
|
|
|
config = mkIf config.myModules.home.fish.enable (
|
|
let
|
|
# Use user-specific config if it exists, otherwise fall back to shared
|
|
configPath = (configFiles + "/users/${config.myModules.home.user}/fish");
|
|
in {
|
|
# Use the correct Home Manager option
|
|
home.file.".config/fish" = {
|
|
source = configPath;
|
|
recursive = true;
|
|
};
|
|
programs.fish = {
|
|
enable = true;
|
|
};
|
|
}
|
|
);
|
|
}
|