diff --git a/configuration.nix b/configuration.nix index bda013a..234996a 100755 --- a/configuration.nix +++ b/configuration.nix @@ -1,9 +1,12 @@ -{ config, lib, pkgs, ... }: +{ config, pkgs, ... }: { + imports = [ + ./hardware-configuration.nix + ]; hardware.graphics.enable = true; - services.xserver.videoDrivers = lib.mkIf (config.networking.hostName == "nerv") [ "nvidia" ]; - hardware.nvidia = lib.mkIf (config.networking.hostName == "nerv") { + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { modesetting.enable = true; open = true; package = config.boot.kernelPackages.nvidiaPackages.new_feature; @@ -13,7 +16,7 @@ boot.loader.efi.canTouchEfiVariables = true; boot.loader.limine = { enable = true; - extraEntries = lib.mkIf (config.networking.hostName == "nerv") '' + extraEntries = '' /Windows 11 protocol: efi path: uuid(6E25-7E8D):/EFI/Microsoft/Boot/bootmgfw.efi @@ -21,7 +24,7 @@ }; boot.kernelPackages = pkgs.linuxPackages_latest; - + networking.hostName = "nerv"; networking.networkmanager.enable = true; time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/flake.nix b/flake.nix index e81f003..4e061cd 100755 --- a/flake.nix +++ b/flake.nix @@ -24,38 +24,17 @@ nix-maid, mangowm, }: - let - mods = [ - nix-maid.nixosModules.default - nixcord.nixosModules.nixcord - mangowm.nixosModules.mango - ./configuration.nix - ./maid.nix - ]; - in { nixosConfigurations.nerv = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; system = "x86_64-linux"; modules = [ - ({ config, ... }: { - imports = [ ./hosts/desktop/hardware-configuration.nix ]; - networking.hostName = "nerv"; - }) - ] - ++ mods; - }; - - nixosConfigurations.seele = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - system = "x86_64-linux"; - modules = [ - ({ config, ... }: { - imports = [ ./hosts/laptop/hardware-configuration.nix ]; - networking.hostName = "seele"; - }) - ] - ++ mods; + nixcord.nixosModules.nixcord + nix-maid.nixosModules.default + mangowm.nixosModules.mango + ./configuration.nix + ./maid.nix + ]; }; }; } diff --git a/hosts/desktop/hardware-configuration.nix b/hardware-configuration.nix similarity index 100% rename from hosts/desktop/hardware-configuration.nix rename to hardware-configuration.nix diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix deleted file mode 100644 index 3b021ca..0000000 --- a/hosts/laptop/hardware-configuration.nix +++ /dev/null @@ -1,33 +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" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/629196f0-60e9-476e-b294-0d22fd7279c4"; - fsType = "xfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2474-C1E6"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/166d1fb4-527f-4fda-a6bf-85aad4a4f917"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}