make copernicus have a static ip
This commit is contained in:
parent
f387a27386
commit
9f2ecb2329
@ -97,6 +97,15 @@
|
|||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "copernicus";
|
hostName = "copernicus";
|
||||||
|
interfaces.eno1 = {
|
||||||
|
useDHCP = true;
|
||||||
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.1.201";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces = {
|
interfaces = {
|
||||||
|
@ -28,13 +28,6 @@
|
|||||||
[ { device = "/dev/disk/by-uuid/fc5366cc-2cec-415e-85dd-7c01a4e4fb4f"; }
|
[ { device = "/dev/disk/by-uuid/fc5366cc-2cec-415e-85dd-7c01a4e4fb4f"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
|
./sshd.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
17
boxes/copernicus/services/sshd.nix
Normal file
17
boxes/copernicus/services/sshd.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ machines, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.usr.openssh.authorizedKeys.keys = [
|
||||||
|
machines.copernicus.pubkey
|
||||||
|
machines.aristotle.pubkey
|
||||||
|
machines.phone.pubkey
|
||||||
|
];
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, config, pkgs, machines, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
Loading…
Reference in New Issue
Block a user