use networkd
This commit is contained in:
parent
e63568518c
commit
624be0a4d0
18
common.nix
18
common.nix
|
@ -90,6 +90,19 @@ in
|
||||||
# allow all firmware
|
# allow all firmware
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
|
# networking via networkd
|
||||||
|
systemd.network.enable = true;
|
||||||
|
systemd.network.networks."10-lan" = {
|
||||||
|
networkConfig = {
|
||||||
|
# start a DHCP Client for IPv4 Addressing/Routing
|
||||||
|
DHCP = "ipv4";
|
||||||
|
# accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
|
IPv6AcceptRA = true;
|
||||||
|
};
|
||||||
|
# make routing on this interface a dependency for network-online.target
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
|
||||||
# ensure firewall is up, allow ssh and http in
|
# ensure firewall is up, allow ssh and http in
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
networking.firewall.allowedTCPPorts = [ 22 80 ];
|
networking.firewall.allowedTCPPorts = [ 22 80 ];
|
||||||
|
@ -133,6 +146,7 @@ in
|
||||||
# X11 settings
|
# X11 settings
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
upscaleDefaultCursor = false;
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
layout = "eu";
|
layout = "eu";
|
||||||
|
@ -147,9 +161,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
displayManager.defaultSession = "plasmawayland";
|
displayManager.defaultSession = "plasmawayland";
|
||||||
|
|
||||||
upscaleDefaultCursor = false;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
|
@ -529,6 +540,7 @@ in
|
||||||
sqlitebrowser
|
sqlitebrowser
|
||||||
unrar
|
unrar
|
||||||
unzip
|
unzip
|
||||||
|
wine64
|
||||||
xdotool
|
xdotool
|
||||||
|
|
||||||
# retroarch with some emulators
|
# retroarch with some emulators
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on the right ethernet interface.
|
# setup our network for later config in common.nix
|
||||||
networking.interfaces.enp1s0.useDHCP = true;
|
systemd.network.networks."10-lan".matchConfig.Name = "enp1s0";
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on the right ethernet interface.
|
# setup our network for later config in common.nix
|
||||||
networking.interfaces.eno1.useDHCP = true;
|
systemd.network.networks."10-lan".matchConfig.Name = "eno1";
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on the right ethernet interface.
|
# setup our network for later config in common.nix
|
||||||
networking.interfaces.enp8s0.useDHCP = true;
|
systemd.network.networks."10-lan".matchConfig.Name = "enp8s0";
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
|
Loading…
Reference in a new issue