52 lines
917 B
Nix
Raw Normal View History

2024-12-31 06:59:22 -05:00
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
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
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
};
me.install.user.root.file = {
".ssh/config" = {
source = ./files/ssh_config_root;
};
};
me.install.user.talexander.file = {
".ssh/config" = {
source = ./files/ssh_config;
};
};
2025-08-10 15:34:29 -04:00
};
2024-12-31 06:59:22 -05:00
}