networking: added option to disable waiting for network

This commit is contained in:
Tigor Hutasuhut 2024-07-02 14:06:20 +07:00
parent 23f6d58671
commit 190e7c9cda
3 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@
hostname = lib.mkOption { hostname = lib.mkOption {
type = lib.types.str; type = lib.types.str;
}; };
networking.disableWaitOnline = lib.mkEnableOption "disable waiting for network";
networking.externalInterface = lib.mkOption { networking.externalInterface = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "eth0"; default = "eth0";

View file

@ -7,6 +7,7 @@
profile = { profile = {
hostname = "homeserver"; hostname = "homeserver";
networking.externalInterface = "enp9s0"; networking.externalInterface = "enp9s0";
networking.disableWaitOnline = true;
user = { user = {
name = "homeserver"; name = "homeserver";
fullName = "Homeserver"; fullName = "Homeserver";

View file

@ -14,6 +14,7 @@
security.sudo.wheelNeedsPassword = config.profile.security.sudo.wheelNeedsPassword; security.sudo.wheelNeedsPassword = config.profile.security.sudo.wheelNeedsPassword;
networking.hostName = config.profile.hostname; networking.hostName = config.profile.hostname;
systemd.services.NetworkManager-wait-online.enable = !config.profile.networking.disableWaitOnline;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;