feat: ssh

This commit is contained in:
punkfairie 2025-05-28 18:35:36 -07:00
parent 16f2e7fd18
commit 80db008bb7
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
11 changed files with 51 additions and 10 deletions

View file

@ -6,6 +6,7 @@
./stylix
./programs
./services
./profiles.nix
./home.nix

View file

@ -20,6 +20,10 @@ in {
nix-output-monitor = enabled;
ripgrep = enabled;
};
services = {
openssh = enabled; # required for agenix
};
}
#
#

View file

@ -0,0 +1,5 @@
{
imports = [
./openssh.nix
];
}

View 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";
};
};
};
}

View file

@ -0,0 +1,5 @@
{
imports = [
./openssh.nix
];
}

View 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
'';
};
}

View file

@ -28,6 +28,7 @@ in {
man = enabled;
nh = enabled;
ripgrep = enabled;
ssh = enabled;
};
}
#

View file

@ -25,6 +25,7 @@
./neovim.nix
./nh.nix
./ripgrep.nix
./ssh.nix
./waybar.nix
# TODO: uncomment when swaylock is figured out

View file

@ -12,13 +12,11 @@ in {
# Universal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
programs = {
fish = enabled;
nh = enabled;
};
services = {
docker = enabled;
openssh = enabled; # needed for agenix
};
}
#

View file

@ -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";
};
};
}