mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Start migrating config to NixOS modules
This commit is contained in:
parent
c1211cb4e5
commit
c0d929be0b
11 changed files with 283 additions and 183 deletions
|
|
@ -1,9 +1,20 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.services.openssh;
|
||||
in
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "prohibit-password";
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../ssh_keys/phfroidmont-desktop.pub
|
||||
../ssh_keys/froidmpa-laptop.pub
|
||||
];
|
||||
options.custom.services.openssh = {
|
||||
enable = mkEnableOption "openssh";
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "prohibit-password";
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../ssh_keys/phfroidmont-desktop.pub
|
||||
../ssh_keys/froidmpa-laptop.pub
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue