feat: ssh
This commit is contained in:
parent
16f2e7fd18
commit
80db008bb7
11 changed files with 51 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
./stylix
|
||||
|
||||
./programs
|
||||
./services
|
||||
|
||||
./profiles.nix
|
||||
./home.nix
|
||||
|
|
|
@ -20,6 +20,10 @@ in {
|
|||
nix-output-monitor = enabled;
|
||||
ripgrep = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = enabled; # required for agenix
|
||||
};
|
||||
}
|
||||
#
|
||||
#
|
||||
|
|
5
modules/base/services/default.nix
Normal file
5
modules/base/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./openssh.nix
|
||||
];
|
||||
}
|
19
modules/base/services/openssh.nix
Normal file
19
modules/base/services/openssh.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.services.openssh;
|
||||
in {
|
||||
options.marleyos.services.openssh.enable = lib.mkEnableOption "openssh";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
modules/darwin/services/default.nix
Normal file
5
modules/darwin/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./openssh.nix
|
||||
];
|
||||
}
|
13
modules/darwin/services/openssh.nix
Normal file
13
modules/darwin/services/openssh.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.services.openssh;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh.extraConfig = ''
|
||||
PermitRootLogin prohibit-password
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -28,6 +28,7 @@ in {
|
|||
man = enabled;
|
||||
nh = enabled;
|
||||
ripgrep = enabled;
|
||||
ssh = enabled;
|
||||
};
|
||||
}
|
||||
#
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
./neovim.nix
|
||||
./nh.nix
|
||||
./ripgrep.nix
|
||||
./ssh.nix
|
||||
./waybar.nix
|
||||
|
||||
# TODO: uncomment when swaylock is figured out
|
||||
|
|
|
@ -12,13 +12,11 @@ in {
|
|||
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
{
|
||||
programs = {
|
||||
fish = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
|
||||
services = {
|
||||
docker = enabled;
|
||||
openssh = enabled; # needed for agenix
|
||||
};
|
||||
}
|
||||
#
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
}: let
|
||||
cfg = config.marleyos.services.openssh;
|
||||
in {
|
||||
options.marleyos.services.openssh.enable = lib.mkEnableOption "openssh";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
services.openssh.settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue