liminix

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

configuration.nix (1134B)


      1 { config, pkgs, lib, ... } :
      2 let
      3   inherit (pkgs.liminix.services) oneshot longrun bundle target output;
      4   svc = config.system.service;
      5 in rec {
      6   services.lan4 = svc.network.address.build {
      7     interface = config.hardware.networkInterfaces.lan;
      8     family = "inet"; address ="192.168.19.1"; prefixLength = 24;
      9   };
     10 
     11   imports = [
     12     ../../modules/ppp
     13     ../../modules/dnsmasq
     14     ../../modules/network
     15   ];
     16 
     17   services.pppoe =
     18     svc.pppoe.build {
     19       interface = config.hardware.networkInterfaces.wan;
     20       ppp-options = [
     21         "debug" "+ipv6" "noauth"
     22         "name" "db123@a.1"
     23         "password" "NotReallyTheSecret"
     24       ];
     25     };
     26 
     27   services.defaultroute4 = svc.network.route.build {
     28     via = "$(output ${services.pppoe} address)";
     29     target = "default";
     30     dependencies = [ services.pppoe ];
     31   };
     32 
     33   services.packet_forwarding = svc.network.forward.build {
     34     dependencies = [services.pppoe];
     35   };
     36 
     37   services.dns =
     38     svc.dnsmasq.build {
     39       interface = services.lan4;
     40       ranges = ["192.168.19.10,192.168.19.253"];
     41       domain = "fake.liminix.org";
     42     };
     43 
     44   defaultProfile.packages = [ pkgs.hello ] ;
     45 }