Use bridge on Kell

This commit is contained in:
Thomas Avé 2024-09-28 17:16:27 +02:00
parent f54ad78da1
commit e5d274e7a7
2 changed files with 20 additions and 18 deletions

View File

@ -1,4 +1,4 @@
{ inputs, config, pkgs, ... }: { lib, inputs, config, pkgs, ... }:
let let
serverIP = "192.168.1.2"; serverIP = "192.168.1.2";
in { in {
@ -18,17 +18,15 @@ in {
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
services.logind.extraConfig = ''HandlePowerKey=suspend''; services.logind.extraConfig = ''HandlePowerKey=suspend'';
programs.nix-ld.enable = true;
# Virtualization # Virtualization
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ]; users.users.user.extraGroups = [ "libvirtd" ];
services.ollama = { # services.ollama = {
enable = true; # enable = true;
}; # };
# hardware.graphics.extraPackages = with pkgs; [ # hardware.graphics.extraPackages = with pkgs; [
# rocmPackages.clr.icd # rocmPackages.clr.icd
@ -50,7 +48,16 @@ in {
}]; }];
}; };
}; };
programs.gnupg.agent.enable = true;
networking.bridges = {
"br0" = {
interfaces = [ "enp5s0" ];
};
};
networking.interfaces.br0.useDHCP = lib.mkDefault true;
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
boot.kernel.sysctl."net.ipv6.conf.enp5s0.disable_ipv6" = true;
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = { networking.wireless.iwd.settings = {
IPv6 = { IPv6 = {
@ -61,9 +68,13 @@ in {
}; };
}; };
# Programs & Services
programs.nix-ld.enable = true;
programs.gnupg.agent.enable = true;
services.sunshine = { services.sunshine = {
enable = true; enable = true;
autoStart = true; autoStart = false;
capSysAdmin = true; capSysAdmin = true;
openFirewall = true; openFirewall = true;
}; };

View File

@ -1,6 +1,3 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
@ -25,13 +22,7 @@
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking networking.useDHCP = lib.mkDefault false;
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = hardware.cpu.amd.updateMicrocode =