From 9528fab3ef5f712ef0cd8751717f39a4203840bf Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Tue, 18 Apr 2023 18:35:58 +0200 Subject: [PATCH] Move filesystems config to common/fs.nix --- common/fs.nix | 9 +++++++++ xeon07/hardware-configuration.nix | 18 ------------------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/common/fs.nix b/common/fs.nix index 7d8e36d..60fccef 100644 --- a/common/fs.nix +++ b/common/fs.nix @@ -1,6 +1,15 @@ { ... }: { + fileSystems."/" = + { device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-label/swap"; } + ]; + # Mount the home via NFS fileSystems."/home" = { device = "10.0.40.30:/home"; diff --git a/xeon07/hardware-configuration.nix b/xeon07/hardware-configuration.nix index b14b375..7c7a591 100644 --- a/xeon07/hardware-configuration.nix +++ b/xeon07/hardware-configuration.nix @@ -13,24 +13,6 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - - swapDevices = - [ { device = "/dev/disk/by-label/swap"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eth0.useDHCP = lib.mkDefault true; - # networking.interfaces.eth1.useDHCP = lib.mkDefault true; - # networking.interfaces.ib0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;