# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: let routerConfig = { wanInterface = "wwp0s19u1u3i12"; wireless = { wleInterface = "wlp5s0"; wleSSID = "hauser"; wlePassphrase = "mifatielma"; }; lanInterfaces = [ "enp1s0" "enp2s0" "enp3s0" "enp4s0" ]; lanNetwork = { routerAddress = "10.2.1.1"; netid = "10.2.1.0"; revIpDomain = "1.2.10"; prefixLength = 24; domain = "rappi.fh2.ch"; dhcpRange = "10.2.1.2,10.2.1.249"; routerHostName = "bachtel"; }; }; in { imports = [ ../hardware/apu.nix ../hardware/wle900vx.nix ../role/base ../role/wwan (import ../role/router routerConfig) ]; fileSystems."/" = { device = "/dev/disk/by-uuid/360a6bc9-fc4e-4803-bd53-69320ac32ac5"; fsType = "btrfs"; options = [ "defaults" "subvol=nixos" "noatime" ]; }; swapDevices = [{ device = "/dev/disk/by-uuid/73f91e99-d856-4504-b6b2-d60f855d6d95"; }]; services.wwan = { enable = true; apn = "gprs.swisscom.ch"; networkInterface = routerConfig.wanInterface; }; # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; # boot.loader.grub.efiSupport = true; # boot.loader.grub.efiInstallAsRemovable = true; # boot.loader.efi.efiSysMountPoint = "/boot/efi"; # Define on which hard drive you want to install Grub. boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only networking.hostName = routerConfig.lanNetwork.routerHostName; # Define your hostname. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. #networking.wireless.networks = { # yummi = { # psk = "cookies!"; # }; #}; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Set your time zone. # time.timeZone = "Europe/Amsterdam"; # List services that you want to enable: # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # Define a user account. Don't forget to set a password with ‘passwd’. # users.users.jane = { # isNormalUser = true; # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. # }; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you # should. system.stateVersion = "19.09"; # Did you read the comment? }