Now tmux is managed by home-manager

This commit is contained in:
Benson Chu 2025-08-08 15:46:20 -05:00
parent 5859351283
commit d313177cdd
2 changed files with 30 additions and 0 deletions

View file

@ -3,6 +3,7 @@
{ {
imports = [ imports = [
../modules ../modules
../../submodules
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
@ -13,6 +14,11 @@
home.homeDirectory = "/home/a0487752"; home.homeDirectory = "/home/a0487752";
# my.bash-config.enable = true; # my.bash-config.enable = true;
my = {
flakeLocation = "/scratch/benson/_repos-personal/nixos-config";
tmux-config.enable = true;
# work-bash-config.enable = true;
};
nix = (lib.mkIf (!config.submoduleSupport.enable) { nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix; package = pkgs.nix;

View file

@ -2,6 +2,7 @@
let let
beets-cfg = config.my.beets-config; beets-cfg = config.my.beets-config;
tmux-cfg = config.my.tmux-config; tmux-cfg = config.my.tmux-config;
work-bash-cfg = config.my.work-bash-config;
mkIfFlakeLoc = condition: errorMsg: value: mkIfFlakeLoc = condition: errorMsg: value:
(lib.mkIf (condition && (lib.mkIf (condition &&
!(config.my.flakeLocation == null && !(config.my.flakeLocation == null &&
@ -18,9 +19,25 @@ in
}; };
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file"; my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file"; my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
my.work-bash-config.enable = lib.mkEnableOption "Enable work bash configurations";
}; };
config = { config = {
home.file = (mkIfFlakeLoc work-bash-cfg.enable
"I won't symlink bashrc and bash_profile into place"
{
".bashrc" = {
source = config.lib.file.mkOutOfStoreSymlink
"${config.my.flakeLocation}/submodules/work-bash-config/dot-bashrc.sh";
};
".bash_profile" = {
source = config.lib.file.mkOutOfStoreSymlink
"${config.my.flakeLocation}/submodules/work-bash-config/dot-bash_profile.sh";
};
}
);
xdg = { xdg = {
configFile = { configFile = {
"beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable "beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable
@ -48,6 +65,13 @@ in
source = config.lib.file.mkOutOfStoreSymlink source = config.lib.file.mkOutOfStoreSymlink
"${config.my.flakeLocation}/submodules/wezterm-config/"; "${config.my.flakeLocation}/submodules/wezterm-config/";
}); });
"bash/" = (mkIfFlakeLoc work-bash-cfg.enable
"I won't symlink bash config folder into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${config.my.flakeLocation}/submodules/work-bash-config/dot-config-bash/";
});
}; };
dataFile = { dataFile = {