Tmux config
This commit is contained in:
parent
d5dc0d3bf6
commit
3f02570d3c
4 changed files with 19 additions and 2 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +1,6 @@
|
|||
[submodule "submodules/beets-config"]
|
||||
path = submodules/beets-config
|
||||
url = ssh://git@gitea.pestctrl.io:2223/pestctrl/beets-config.git
|
||||
[submodule "submodules/tmux-config"]
|
||||
path = submodules/tmux-config
|
||||
url = git@github.com:pestctrl/tmux-config
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ in {
|
|||
];
|
||||
|
||||
my.beets-config.enable = true;
|
||||
my.tmux-config.enable = true;
|
||||
|
||||
my.flakeLocation = lib.mkIf (builtins.hasAttr "osConfig" args) args.osConfig.my.flakeLocation;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ inputs, config, pkgs, lib, ... }@args:
|
||||
let
|
||||
beets-cfg = config.my.beets-config;
|
||||
tmux-cfg = config.my.tmux-config;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
|
@ -10,14 +11,15 @@ in
|
|||
type = lib.types.nullOr lib.types.path;
|
||||
};
|
||||
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
|
||||
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
|
||||
};
|
||||
|
||||
config = lib.mkIf beets-cfg.enable {
|
||||
config = {
|
||||
# xdg.configFile."beets/config.yaml".source = ./beets-config/config.yaml;
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/beets/config.yaml" = lib.mkIf (!(
|
||||
".config/beets/config.yaml" = lib.mkIf (beets-cfg.enable && !(
|
||||
config.my.flakeLocation == null &&
|
||||
(lib.warn
|
||||
"Didn't set 'my.flakeLocation', I won't symlink beets' config.yaml into place"
|
||||
|
|
@ -31,6 +33,16 @@ in
|
|||
#
|
||||
# recursive = true;
|
||||
};
|
||||
|
||||
".config/tmux/tmux.conf" = lib.mkIf (tmux-cfg.enable && !(
|
||||
config.my.flakeLocation == null &&
|
||||
(lib.warn
|
||||
"Didn't set 'my.flakeLocation', I won't symlink tmux's tmux.conf into place"
|
||||
true)
|
||||
)) {
|
||||
source = config.lib.file.mkOutOfStoreSymlink
|
||||
"${config.my.flakeLocation}/submodules/tmux-config/tmux.conf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
1
submodules/tmux-config
Submodule
1
submodules/tmux-config
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e5aa35f4f8ed5aad24844d56d2782ba924a38c8a
|
||||
Loading…
Reference in a new issue