Initial commit
This commit is contained in:
commit
430194beda
109 changed files with 9066 additions and 0 deletions
40
modules/nixos/common/networking.nix
Normal file
40
modules/nixos/common/networking.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault;
|
||||
inherit (lib.utils) isNotEmptyStr;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = isNotEmptyStr config.networking.domain;
|
||||
message = "synix/nixos/common: config.networking.domain cannot be empty.";
|
||||
}
|
||||
{
|
||||
assertion = isNotEmptyStr config.networking.hostName;
|
||||
message = "synix/nixos/common: config.networking.hostName cannot be empty.";
|
||||
}
|
||||
];
|
||||
|
||||
networking = {
|
||||
domain = mkDefault "${config.networking.hostName}.local";
|
||||
hostId = mkDefault "8425e349"; # same as NixOS install ISO and nixos-anywhere
|
||||
|
||||
# NetworkManager
|
||||
useDHCP = false;
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
networkmanager-openconnect
|
||||
networkmanager-openvpn
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue