home: ssh: move 'mosh' configuration

This commit is contained in:
Bruno BELANYI 2023-12-07 14:31:32 +00:00
parent 0b9c2309da
commit 0164d12087
2 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,6 @@ in
config.home.packages = with pkgs; lib.mkIf cfg.enable ([
fd
file
mosh
ripgrep
] ++ cfg.additionalPackages);
}

View File

@ -1,10 +1,16 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.ssh;
in
{
options.my.home.ssh = with lib; {
enable = my.mkDisableOption "ssh configuration";
mosh = {
enable = my.mkDisableOption "mosh configuration";
package = mkPackageOption pkgs "mosh" { };
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
@ -54,5 +60,11 @@ in
'';
};
}
(lib.mkIf cfg.mosh.enable {
home.packages = [
cfg.mosh.package
];
})
]);
}