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 ([ config.home.packages = with pkgs; lib.mkIf cfg.enable ([
fd fd
file file
mosh
ripgrep ripgrep
] ++ cfg.additionalPackages); ] ++ cfg.additionalPackages);
} }

View file

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