Update fish home module to user user config, and enable shell
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.
This commit is contained in:
parent
6bdcc2ccfe
commit
852fe09471
1 changed files with 4 additions and 7 deletions
|
|
@ -5,24 +5,21 @@ 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");
|
||||
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;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue