[NixOS] Move ssh functionality into its own file

This commit is contained in:
Kat Huang 2023-08-02 17:54:14 +00:00
parent fd90a0f638
commit d2f86e197d
3 changed files with 26 additions and 23 deletions

View File

@ -1,10 +1,11 @@
{ config, pkgs, options, inputs, ... }: { config, pkgs, options, inputs, ... }:
{ {
imports = [ imports = [
./nix.nix
./users.nix
./essential.nix
./environment.nix ./environment.nix
./essential.nix
./nix.nix
./ssh.nix
./users.nix
]; ];
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
@ -46,22 +47,6 @@
''; '';
}; };
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
domain = true;
workstation = true;
userServices = true;
addresses = true;
hinfo = true;
};
extraServiceFiles = {
ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
# Audio # Audio
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
@ -88,8 +73,6 @@
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
services.openssh.enable = true;
services.locate.enable = true; services.locate.enable = true;
virtualisation.docker.enable = true; virtualisation.docker.enable = true;

20
nixos/ssh.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
domain = true;
workstation = true;
userServices = true;
addresses = true;
hinfo = true;
};
extraServiceFiles = {
ssh = "''${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
services.openssh.enable = true;
}

View File

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
inputs.nixos-wsl.nixosModules.wsl inputs.nixos-wsl.nixosModules.wsl
./ssh.nix
./environment.nix ./environment.nix
./essential.nix ./essential.nix
./fonts.nix ./fonts.nix
@ -22,8 +23,7 @@
startMenuLaunchers = true; startMenuLaunchers = true;
nativeSystemd = true; nativeSystemd = true;
# Enable native Docker support docker-native.enable = true;
# docker-native.enable = true;
# Enable integration with Docker Desktop (needs to be installed) # Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true; # docker-desktop.enable = true;