liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

extneder.nix (1208B)


      1 # This is not part of Liminix per se. This is a "scratchpad"
      2 # configuration for a device I'm testing with.
      3 #
      4 # Parts of it do do things that Liminix eventually needs to do, but
      5 # don't look in here for solutions - just for identifying the
      6 # problems.
      7 {
      8   config,
      9   pkgs,
     10   lib,
     11   modulesPath,
     12   ...
     13 }:
     14 let
     15   secrets = import ./extneder-secrets.nix;
     16   svc = config.system.service;
     17 in
     18 rec {
     19   boot = {
     20     tftp = {
     21       serverip = "192.168.8.148";
     22       ipaddr = "192.168.8.251";
     23     };
     24   };
     25 
     26   imports = [
     27     "${modulesPath}/profiles/wap.nix"
     28     "${modulesPath}/vlan"
     29     "${modulesPath}/ssh"
     30   ];
     31 
     32   hostname = "extneder";
     33 
     34   profile.wap = {
     35     interfaces = with config.hardware.networkInterfaces; [
     36       lan
     37       wlan
     38     ];
     39 
     40     wireless = {
     41       networks.${secrets.ssid} = {
     42         interface = config.hardware.networkInterfaces.wlan;
     43         inherit (secrets) channel wpa_passphrase;
     44         country_code = "GB";
     45         hw_mode = "g";
     46         wmm_enabled = 1;
     47         ieee80211n = 1;
     48       };
     49     };
     50   };
     51 
     52   services.sshd = svc.ssh.build { };
     53   users.root.passwd = lib.mkForce secrets.root.passwd;
     54   defaultProfile.packages = with pkgs; [
     55     nftables
     56     strace
     57     tcpdump
     58     swconfig
     59   ];
     60 }