dev.fron.io rc / 1d7541d
delta: promote base network config from legacy Tony Olagbaiye 1 year, 7 months ago
4 changed file(s) with 42 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22 {
33 imports = [
44 ../../legacy/delta/configuration.nix
5 ../../legacy/delta/network/services/openssh.nix
6 ../../legacy/delta/network/tinc.nix
57 ../../profiles/meta/fatal-warnings.nix
68 ../../profiles/misc/disable-mitigations.nix
79 ../../profiles/misc/guix.nix
0 { config, lib, pkgs, ... }:
1
2 {
3 networking.wireless = {
4 enable = true;
5 interfaces = [ "wlp3s0" ];
6 #iwd.enable = true; # pending https://github.com/NixOS/nixpkgs/pull/75800
7 networks = import ../../secrets/wifi.networks.nix;
8 userControlled.enable = true;
9 };
10
11 networking.useNetworkd = true;
12 networking.useDHCP = false;
13 networking.enableIPv6 = true;
14 networking.defaultGateway = "192.168.0.1";
15 networking.nameservers = [ "9.9.9.9" ];
16 networking.interfaces.eno1 = {
17 useDHCP = true;
18 ipv4.addresses = [{ address = "192.168.0.254"; prefixLength = 24; }];
19 };
20 networking.interfaces.enp5s0u1 = {
21 useDHCP = true;
22 ipv4.addresses = [{ address = "192.168.0.252"; prefixLength = 24; }];
23 };
24 networking.interfaces.wlp3s0 = {
25 useDHCP = true;
26 ipv4.addresses = [{ address = "192.168.0.253"; prefixLength = 24; }];
27 };
28
29 networking.firewall.enable = false;
30
31 assertions = [
32 {
33 assertion = with config; networking.useDHCP == false;
34 message = ''
35 The global useDHCP flag is deprecated. Per-interface useDHCP will be mandatory in the future.
36 '';
37 }
38 ];
39 }
legacy/delta/network/default.nix less more
Binary diff not shown
Binary diff not shown