2024-12-31 06:59:22 -05:00
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [ ];
|
|
|
|
|
|
2025-10-11 00:08:02 -04:00
|
|
|
options.me = {
|
|
|
|
|
ssh.enable = lib.mkOption {
|
|
|
|
|
type = lib.types.bool;
|
|
|
|
|
default = false;
|
|
|
|
|
example = true;
|
|
|
|
|
description = "Whether we want to install ssh.";
|
2025-03-26 19:53:32 -04:00
|
|
|
};
|
2024-12-31 06:59:22 -05:00
|
|
|
};
|
2025-02-10 18:14:18 -05:00
|
|
|
|
2025-10-11 00:08:02 -04:00
|
|
|
config = lib.mkIf config.me.ssh.enable {
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
sshfs
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
|
|
|
|
hideMounts = true;
|
|
|
|
|
users.talexander = {
|
|
|
|
|
files = [
|
|
|
|
|
".ssh/known_hosts"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
users.root = {
|
|
|
|
|
home = "/root";
|
|
|
|
|
files = [
|
|
|
|
|
".ssh/known_hosts"
|
|
|
|
|
];
|
|
|
|
|
};
|
2025-02-10 18:14:18 -05:00
|
|
|
};
|
2025-10-11 00:08:02 -04:00
|
|
|
|
|
|
|
|
me.install.user.root.file = {
|
|
|
|
|
".ssh/config" = {
|
|
|
|
|
source = ./files/ssh_config_root;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
me.install.user.talexander.file = {
|
|
|
|
|
".ssh/config" = {
|
|
|
|
|
source = ./files/ssh_config;
|
|
|
|
|
};
|
2025-03-23 17:07:12 -04:00
|
|
|
};
|
2025-08-10 15:34:29 -04:00
|
|
|
};
|
2024-12-31 06:59:22 -05:00
|
|
|
}
|