Testing static entry for nuc-server
This commit is contained in:
parent
39a3cf02b2
commit
bdc2404211
3 changed files with 23 additions and 10 deletions
nixos
|
@ -3,8 +3,6 @@
|
|||
# Unlock command:
|
||||
# ssh root@<Local_IP_Address> "Password"
|
||||
|
||||
boot.kernelParams = [ "ip=dhcp" ];
|
||||
|
||||
boot.initrd = {
|
||||
enable = true;
|
||||
systemd.users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
./firewall.nix
|
||||
];
|
||||
|
||||
# TODO: Set a static IP when you can
|
||||
boot.kernelParams = [ "ip=dhcp" ];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.deploy-rs.packages.${system}.deploy-rs
|
||||
pkgs.distrobox
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ inputs, config, lib, modulesPath, system, ... }: {
|
||||
{ hostname, inputs, config, lib, modulesPath, system, ... }:
|
||||
let
|
||||
ipAddress = "192.168.1.35";
|
||||
gateway = "192.168.1.1";
|
||||
netDev = "eno1";
|
||||
in {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
../../common/services/tailscale-autoconnect.nix
|
||||
|
@ -12,25 +17,32 @@
|
|||
./firewall.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.deploy-rs.packages.${system}.deploy-rs
|
||||
];
|
||||
boot.kernelParams = [ "ip=${ipAddress}::${gateway}:255.255.255.0:${hostname}:${netDev}:none" ];
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
interfaces.${netDev} = {
|
||||
ipv4.addresses = [{
|
||||
address = ipAddress;
|
||||
prefixLength = 24;
|
||||
}];
|
||||
};
|
||||
defaultGateway = gateway;
|
||||
};
|
||||
|
||||
# Allow root login, but only with SSH keys
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
# backups-rpi4: Backups
|
||||
# warsaw-ovh-01: Backups
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp2wgqFcr0LGaUXbom88/zK2631pysePUWIaCMljT0K root@backups-rpi4''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIcGPkzFaSGd1q/oy/uP5zEoOuPNr1h17ifu7oj4DaYO root@warsaw-ovh-01''
|
||||
];
|
||||
# Allow root login, but only with SSH keys
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "sd_mod" "uas" ];
|
||||
boot.initrd.kernelModules = [ "r8152" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
|
@ -38,7 +50,7 @@
|
|||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
# Set the networking hostname:
|
||||
networking.hostName = "nuc-server";
|
||||
networking.hostName = hostname;
|
||||
# networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
services.tailscale.extraUpFlags = [
|
||||
|
|
Loading…
Add table
Reference in a new issue