diff --git a/flake.nix b/flake.nix index 0efa939..fa79c88 100644 --- a/flake.nix +++ b/flake.nix @@ -88,7 +88,7 @@ ( { pkgs, ... }: { config._module.args = { - machineInfo = machine // { + machine = machine // { name = hostname; config = (pkgs.callPackage config { }); }; @@ -126,7 +126,7 @@ ( { pkgs, ... }: { config._module.args = { - machineInfo = machine // { + machine = machine // { name = hostname; config = machineConfig; }; diff --git a/lib/configuration.nix b/lib/configuration.nix index 601245a..33fcae8 100644 --- a/lib/configuration.nix +++ b/lib/configuration.nix @@ -1,4 +1,4 @@ -{ lib, machineInfo, ... }: { +{ lib, machine, ... }: { imports = [ ./modules/custom-build-vm.nix ./modules/custom-sops-nix.nix @@ -28,7 +28,7 @@ vmVariantWithBootLoader = vmConfig; }; - users.myUsers = machineInfo.config.users; + users.myUsers = machine.config.users; home-manager = { useUserPackages = true; @@ -37,7 +37,7 @@ users = lib.attrsets.concatMapAttrs (username: user: let - hostname = machineInfo.name; + hostname = machine.name; getUserConfig = import ./utils/user-config.nix { inherit lib; }; configPath = getUserConfig { inherit hostname username; }; in @@ -50,19 +50,19 @@ } // args); } else {}) - machineInfo.config.users; + machine.config.users; }; # Networking - networking.hostName = machineInfo.name; + networking.hostName = machine.name; # Set time zone - time.timeZone = machineInfo.config.timeZone; + time.timeZone = machine.config.timeZone; # Configure keyboard layout - console.keyMap = machineInfo.config.keyMap; - services.xserver.xkb.layout = machineInfo.config.keyboardLayout; + console.keyMap = machine.config.keyMap; + services.xserver.xkb.layout = machine.config.keyboardLayout; - i18n.extraLocaleSettings = machineInfo.config.localeSettings; + i18n.extraLocaleSettings = machine.config.localeSettings; }; } diff --git a/lib/modules/unfree.nix b/lib/modules/unfree.nix index 166740e..1339ee2 100644 --- a/lib/modules/unfree.nix +++ b/lib/modules/unfree.nix @@ -1,11 +1,11 @@ -{ lib, machineInfo, ... }: { +{ lib, machine, ... }: { config = { nixpkgs = { config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ( let names = - (lib.optional machineInfo.config.xone "xow_dongle-firmware") ++ - (lib.optionals machineInfo.config.nvidia [ + (lib.optional machine.config.xone "xow_dongle-firmware") ++ + (lib.optionals machine.config.nvidia [ "cuda_cccl" "cuda_cudart" "cuda_cuobjdump"