nixos-systems/modules/home/fish.nix
2025-07-17 17:08:06 +00:00

28 lines
692 B
Nix

{ config, configFiles, lib, pkgs, ... }:
with lib;
{
options.myModules.home.fish = {
enable = mkEnableOption "custom fish configuration";
user = mkOption {
type = types.str;
description = "Username for user-specific config";
};
};
config = mkIf config.myModules.home.fish.enable (
let
userConfigPath = "${configFiles}/users/${config.myModules.home.fish.user}/fish";
# Use user-specific config if it exists, otherwise fall back to shared
configPath = (configFiles + "/users/${config.myModules.home.fish.user}/fish");
in {
# Use the correct Home Manager option
home.file.".config/fish" = {
source = configPath;
recursive = true;
};
}
);
}