diff --git a/configuration.nix b/configuration.nix index 234996a..bda013a 100755 --- a/configuration.nix +++ b/configuration.nix @@ -1,12 +1,9 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ]; hardware.graphics.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { + services.xserver.videoDrivers = lib.mkIf (config.networking.hostName == "nerv") [ "nvidia" ]; + hardware.nvidia = lib.mkIf (config.networking.hostName == "nerv") { modesetting.enable = true; open = true; package = config.boot.kernelPackages.nvidiaPackages.new_feature; @@ -16,7 +13,7 @@ boot.loader.efi.canTouchEfiVariables = true; boot.loader.limine = { enable = true; - extraEntries = '' + extraEntries = lib.mkIf (config.networking.hostName == "nerv") '' /Windows 11 protocol: efi path: uuid(6E25-7E8D):/EFI/Microsoft/Boot/bootmgfw.efi @@ -24,7 +21,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 8230f55..e81f003 100755 --- a/flake.nix +++ b/flake.nix @@ -24,34 +24,38 @@ nix-maid, mangowm, }: - let - mods = [ - nixcord.nixosModules.nixcord - mangowm.nixosModules.mango - ./configuration.nix - ./maid.nix - ]; - in + 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 = [ - ./hosts/desktop/hardware-configuration.nix - ] ++ mods; - ({ config, ...}: { - networking.hostname = "nerv"; - }); + ({ 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; }; }; - nixosConfigurations.seele = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - system = "x86_64-linux"; - modules = [ - ./hosts/laptop/hardware-configuration.nix - ] ++ mods; - ({ config, ...}: { - networking.hostname = "seele"; - }); - } }