diff --git a/flake.nix b/flake.nix index b380577..da5a9e4 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,7 @@ fantomitechno-laptop = commonSystem "laptop"; fantomitechno-desktop = commonSystem "desktop"; fantomitechno-msi = commonSystem "msi"; + conseil = commonSystem "conseil"; }; }; } diff --git a/hosts/conseil/default.nix b/hosts/conseil/default.nix new file mode 100644 index 0000000..f961ce3 --- /dev/null +++ b/hosts/conseil/default.nix @@ -0,0 +1,22 @@ +{ + pkgs, + ... +}: + +{ + imports = [ + ./hardware-configuration.nix + ../server.nix + ]; + + # Bootloader + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + kernelPackages = pkgs.linuxPackages; + }; + + system.stateVersion = "26.05"; +} diff --git a/hosts/server.nix b/hosts/server.nix new file mode 100644 index 0000000..0cfa4d1 --- /dev/null +++ b/hosts/server.nix @@ -0,0 +1,19 @@ +{ hostname, ... }: { + imports = builtins.map (i: ../modules/${i}) ([ + "cli-apps" + "fastfetch" + "git" + "docker.nix" + "ssh.nix" + ]); + + networking.hostName = "${hostname}"; + + services.xserver.xkb = { + layout = "fr"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "fr"; +} diff --git a/modules/ssh.nix b/modules/ssh.nix new file mode 100644 index 0000000..f50bd63 --- /dev/null +++ b/modules/ssh.nix @@ -0,0 +1,14 @@ +{ ... }: { + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + PermitRootLogin = "no"; + AllowUsers = [ "fantomitechno" ]; + MaxAuthTries = 3; + PerSourcePenalties = "crash:3600s authfail:3600s max:86400s"; + }; + }; +}