Skip to content

Commit

Permalink
feat(nixos): move openssh configuration to a separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
tyriis committed Apr 4, 2024
1 parent 200dc5e commit d93039d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 1 addition & 14 deletions infra/nixos/hosts/dell/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
./hardware-configuration.nix
../../users.nix
../../fonts.nix
../../modules/openssh.nix
];

# enable nix-flakes
Expand Down Expand Up @@ -185,20 +186,6 @@

# List services that you want to enable:

# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
# openFirewall = true;
};

# Start the SSH Agent at login.
programs.ssh.startAgent = true;

# Enable zsh.
programs.zsh.enable = true;

Expand Down
15 changes: 15 additions & 0 deletions infra/nixos/modules/openssh.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
openFirewall = true;
};

# Start the SSH Agent at login.
programs.ssh.startAgent = true;
}

0 comments on commit d93039d

Please sign in to comment.