fix up box config

This commit is contained in:
Anish L 2022-04-24 14:57:29 +10:00
parent f02500fcfb
commit b43727dc65
2 changed files with 27 additions and 17 deletions

View file

@ -6,7 +6,8 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -35,7 +36,7 @@
allowDiscards = true; allowDiscards = true;
keyFile = "/keyfile0.bin"; keyFile = "/keyfile0.bin";
}; };
}; };
# Data mount # Data mount
fileSystems."/data" = { fileSystems."/data" = {
@ -48,30 +49,29 @@
}; };
}; };
networking.interfaces.enp2s0 = { networking.interfaces.enp2s0 = {
ipv4.addresses = [{ ipv4.addresses = [{
address = "192.168.1.240"; address = "192.168.1.240";
prefixLength = 24; prefixLength = 24;
} ]; }];
ipv4.routes = [ { address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }]; ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
useDHCP = false; useDHCP = false;
}; };
#networking.nameservers = [ "172.16.11.240" ]; #networking.nameservers = [ "172.16.11.240" ];
networking.nameservers = [ "192.168.1.1" ]; networking.nameservers = [ "192.168.1.1" ];
networking.defaultGateway = { networking.defaultGateway = {
address = "192.168.1.1"; address = "192.168.1.1";
interface = "enp2s0"; interface = "enp2s0";
}; };
networking.hostName = "box"; # Define your hostname. networking.hostName = "box"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour. # replicates the default behaviour.
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.wlp3s0.useDHCP = true; networking.interfaces.wlp3s0.useDHCP = true;
networking.interfaces.enp2s0.useDHCP = false;
# Set your time zone. # Set your time zone.
time.timeZone = "Australia/Brisbane"; time.timeZone = "Australia/Brisbane";

10
hosts/box/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ profiles, suites, ... }:
{
imports = [
./configuration.nix
] ++ suites.box;
home-manager.users.anish = { self, suites, ... }: {
imports = [ ] ++ suites.hmBase;
};
}