diff --git a/configuration.nix b/configuration.nix index a1230be..94b6e2a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -78,8 +78,18 @@ layout = "us"; xkbVariant = "alt-intl"; - displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; + + # Sddm + displayManager = { + sddm.enable = true; + defaultSession = "plasmawayland"; + + # autoLogin = { + # enable = true; + # user = "tristand"; + # }; + }; }; services.printing.enable = true; @@ -97,13 +107,6 @@ jack.enable = true; }; - # Define a user account. Don't forget to set a password with ‘passwd’. - - # Enable automatic login for the user. - services.xserver.displayManager.defaultSession = "plasmawayland"; - services.xserver.displayManager.autoLogin.enable = true; - services.xserver.displayManager.autoLogin.user = "tristand"; - environment.sessionVariables = { EDITOR = "nvim"; MOZ_USE_XINPUT2 = "1"; diff --git a/hardware.nix b/hardware.nix index 16a30f3..35d14ef 100644 --- a/hardware.nix +++ b/hardware.nix @@ -40,12 +40,26 @@ }; }; - defaultGateway = { - address = "192.168.0.5"; - interface = "enp5s0f4u1u1c2"; - }; + # TODO delete if network specific gateway is validated to work + # defaultGateway = { + # address = "192.168.0.5"; + # interface = "enp5s0f4u1u1c2"; + # }; }; + # TODO validate his works + systemd.network.networks.enp5s0f4u1u1c2.gateway = "192.168.0.5"; + + # This manually configures the automatically created network-adresses service to be more flexible + # regarding booting without the the device being available on boot + # It prevents slow timeouts & errors on boot while preserving Plug & Play ability + systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.ConditionPathExists = "/sys/class/net/enp5s0f4u1u1c2"; + systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.BindsTo = lib.mkForce null; + services.udev.extraRules = '' + ACTION=="add", KERNEL=="enp5s0f4u1u1c2", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-enp5s0f4u1u1c2.service" + ACTION=="remove", KERNEL=="enp5s0f4u1u1c2", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-enp5s0f4u1u1c2.service" + ''; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware = {