From db0035dc20b1b83124498ae7558fb782482edaf6 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Mon, 27 Nov 2023 18:41:49 +0100 Subject: add new kuro config --- kuro/configuration.nix | 26 ++++++++++++++------------ kuro/hardware-configuration.nix | 17 +++++++---------- 2 files changed, 21 insertions(+), 22 deletions(-) (limited to 'kuro') diff --git a/kuro/configuration.nix b/kuro/configuration.nix index b8807c8..aaeb0c9 100644 --- a/kuro/configuration.nix +++ b/kuro/configuration.nix @@ -14,19 +14,21 @@ /data/nixos/common.nix ]; - # host name - networking.hostName = "kuro"; + # amd graphics + hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ]; - # main network interface via systemd-networkd + # use systemd-networkd, fixed IPv4, dynamic IPv6 + networking.hostName = "kuro"; networking.useDHCP = false; - systemd.network.enable = true; - systemd.network.networks."10-lan" = { - matchConfig.Name = "enp2s0"; - networkConfig.DHCP = "yes"; - linkConfig.RequiredForOnline = "routable"; + networking.nameservers = [ "192.168.13.1" ]; + systemd.network = { + enable = true; + networks."10-wan" = { + matchConfig.Name = "enp2s0"; + address = [ "192.168.13.101/24" ]; + routes = [ { routeConfig.Gateway = "192.168.13.1"; } ]; + networkConfig.IPv6AcceptRA = true; + linkConfig.RequiredForOnline = "routable"; + }; }; - - # amd graphics - hardware.opengl.extraPackages = with pkgs; [ amdvlk rocm-opencl-icd rocm-opencl-runtime ]; - hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ amdvlk ]; } diff --git a/kuro/hardware-configuration.nix b/kuro/hardware-configuration.nix index 135dacc..26da79b 100644 --- a/kuro/hardware-configuration.nix +++ b/kuro/hardware-configuration.nix @@ -20,24 +20,23 @@ }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/03B1-533D"; + { device = "/dev/disk/by-uuid/263D-A89E"; fsType = "vfat"; }; - boot.initrd.luks.devices."crypt-disk1".device = "/dev/disk/by-uuid/3009a0b5-3d8a-48e3-88a7-2a27a928b648"; - boot.initrd.luks.devices."crypt-disk1".allowDiscards = true; - boot.initrd.luks.devices."crypt-disk1".bypassWorkqueues = true; + # system + boot.initrd.luks.devices."crypt-system".device = "/dev/disk/by-uuid/f4af1379-93d2-4903-9fb5-5b767d733c66"; fileSystems."/nix" = - { device = "/dev/mapper/crypt-disk1"; + { device = "/dev/mapper/crypt-system"; fsType = "btrfs"; - options = [ "subvol=nix" "noatime" "compress=zstd" ]; + options = [ "subvol=nix" "noatime" "nodiratime" ]; }; fileSystems."/data" = - { device = "/dev/mapper/crypt-disk1"; + { device = "/dev/mapper/crypt-system"; fsType = "btrfs"; - options = [ "subvol=data" "noatime" "compress=zstd" ]; + options = [ "subvol=data" "noatime" "nodiratime" ]; }; fileSystems."/home" = @@ -58,8 +57,6 @@ options = [ "bind" ]; }; - swapDevices = [ ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } -- cgit v1.2.3