split ssh away from nix

This commit is contained in:
Johannes Jöns 2024-01-11 00:19:11 +01:00
parent 08e8414488
commit dff0d40777
9 changed files with 26 additions and 13 deletions

View file

@ -18,6 +18,7 @@
./plasma/6.nix
./printing
./repo-sync
./ssh
./steam
./users
self.inputs.home-manager.nixosModules.home-manager

View file

@ -59,14 +59,6 @@ in {
};
system.stateVersion = "24.05";
services.openssh = {
enable = true;
banner = "Hackers are in Your System!!!";
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000;
};
}

18
modules/ssh/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, self, ... }:
let cfg = config.jopejoe1.ssh;
in {
options.jopejoe1.ssh = { enable = lib.mkEnableOption "Enable ssh"; };
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
banner = "Hackers are in Your System!!!";
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
};
}

View file

@ -11,6 +11,7 @@
overlays.enable = true;
jopejoe1.enable = true;
root.enable = true;
ssh.enable = true;
};
networking = {

View file

@ -27,6 +27,7 @@
plasma.enable = true;
root.enable = true;
jopejoe1.enable = true;
ssh.enable = true;
};
networking = {

View file

@ -23,6 +23,7 @@
printing.enable = true;
overlays.enable = true;
steam.enable = true;
ssh.enable = true;
asf.enable = true;
minecraft-server.enable = true;
repo-sync.enable = true;
@ -93,7 +94,6 @@
mumble
sshfs
# Theming
catppuccin-kvantum
catppuccin-kde

View file

@ -17,8 +17,7 @@
nvidiaBusId = "PCI:1:0:0";
};
boot.initrd.availableKernelModules =
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -73,6 +72,5 @@
#nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -17,6 +17,7 @@
nix.enable = true;
root.enable = true;
boot.systemd.enable = true;
ssh.enable = true;
};
networking = { hostName = "tuny"; };

View file

@ -15,6 +15,7 @@
printing.enable = true;
jopejoe1.enable = true;
root.enable = true;
ssh.enable = true;
};
networking = {