update config, use NetworkManager

This commit is contained in:
Christoph Cullmann 2023-09-17 15:57:39 +02:00
parent b0c5f1e67e
commit 5515e4f5a5
5 changed files with 6 additions and 31 deletions

View file

@ -58,13 +58,16 @@ in
# ensure we scrub the btrfs sometimes # ensure we scrub the btrfs sometimes
services.btrfs.autoScrub = { services.btrfs.autoScrub = {
enable = true; enable = true;
fileSystems = [ "/data" ];
interval = "weekly"; interval = "weekly";
}; };
# allow all firmware # allow all firmware
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
# use NetworkManager
networking.useDHCP = false;
networking.networkmanager.enable = true;
# 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 ]; networking.firewall.allowedTCPPorts = [ 22 ];

View file

@ -17,15 +17,6 @@
# host name # host name
networking.hostName = "mini"; networking.hostName = "mini";
# main network interface via systemd-networkd
networking.useDHCP = false;
systemd.network.enable = true;
systemd.network.networks."10-lan" = {
matchConfig.Name = "eno1";
networkConfig.DHCP = "yes";
linkConfig.RequiredForOnline = "routable";
};
# amd graphics # amd graphics
hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ]; hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ];

View file

@ -4,14 +4,11 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "none"; { device = "none";
@ -68,8 +65,6 @@
options = [ "noatime" "nodiratime" ]; options = [ "noatime" "nodiratime" ];
}; };
swapDevices = [ ];
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;
} }

View file

@ -17,15 +17,6 @@
# host name # host name
networking.hostName = "neko"; networking.hostName = "neko";
# main network interface via systemd-networkd
networking.useDHCP = false;
systemd.network.enable = true;
systemd.network.networks."10-lan" = {
matchConfig.Name = "enp10s0";
networkConfig.DHCP = "yes";
linkConfig.RequiredForOnline = "routable";
};
# intel graphics # intel graphics
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ]; hardware.opengl.extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver ];

View file

@ -4,14 +4,11 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ];
boot.initrd.kernelModules = [ "i915" ]; boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "none"; { device = "none";
@ -85,8 +82,6 @@
options = [ "noatime" "nodiratime" ]; options = [ "noatime" "nodiratime" ];
}; };
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }