Johan Rong 1 ay önce
ebeveyn
işleme
dd0e99ff27
2 değiştirilmiş dosya ile 54 ekleme ve 45 silme
  1. 54 0
      hosts/ideapad/configuration.nix
  2. 0 45
      hosts/ideapad/hardware.nix

+ 54 - 0
hosts/ideapad/configuration.nix

@@ -0,0 +1,54 @@
+{ config, pkgs, lib, ... }:
+
+let 
+  hosts = import ../../config/hosts.nix;
+in
+{
+  imports = [
+    ./hardware.nix
+
+    ../../nixos/hardware/networking
+    ../../nixos/hardware/gpu/nvidia.nix
+    ../../nixos/hardware/sound
+    ../../nixos/hardware/bluetooth
+    ../../nixos/flavors/desktop/hyprland
+    ../../nixos/flavors/desktop/hyprland/greeter-default.nix
+    ../../nixos/flavors/application/workstation
+    ../../nixos/flavors/application/development
+    ../../nixos/flavors/application/gaming
+    ../../nixos/flavors/application/school
+    ../../nixos/features/system/users.nix
+  ];
+
+  boot.kernelParams = [
+    "resume=UUID=b0e53493-71b7-4adc-bc9a-37c16ed9672b"
+  ];
+
+  nixpkgs.config.allowUnfree = true;
+  hardware.enableAllFirmware = true;
+
+  nix.settings.experimental-features = [ "nix-command" "flakes" ];
+
+  networking.hostName = hosts.ideapad.hostname;
+
+  hardware.nvidia = {
+    powerManagement = {
+      enable = true;
+      finegrained = true;
+    };
+
+    prime = {
+      offload = {
+        enable = true;
+        enableOffloadCmd = true;
+      };
+
+      intelBusId = "PCI:0:2:0";
+      nvidiaBusId = "PCI:2:0:0";
+    };
+  };
+
+  boot.loader.systemd-boot.enable = true;
+  boot.loader.efi.canTouchEfiVariables = true;
+  system.stateVersion = "26.05";
+}

+ 0 - 45
hosts/ideapad/hardware.nix

@@ -1,45 +0,0 @@
-# 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, ... }:
-
-{
-  imports =
-    [ (modulesPath + "/installer/scan/not-detected.nix")
-    ];
-
-  boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-intel" ];
-  boot.extraModulePackages = [ ];
-
-  fileSystems."/" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-    };
-
-  fileSystems."/home" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-      options = [ "subvol=home" ];
-    };
-
-  fileSystems."/nix" =
-    { device = "/dev/disk/by-uuid/91e157c0-f607-491d-93ad-4a00f08ae338";
-      fsType = "btrfs";
-      options = [ "subvol=nix" ];
-    };
-
-  fileSystems."/boot" =
-    { device = "/dev/disk/by-uuid/0996-8DC7";
-      fsType = "vfat";
-      options = [ "fmask=0077" "dmask=0077" ];
-    };
-
-  swapDevices =
-    [ { device = "/dev/disk/by-uuid/b0e53493-71b7-4adc-bc9a-37c16ed9672b"; }
-    ];
-
-  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}