Replace machineConfig variable

This commit is contained in:
Manuel Thalmann 2024-05-11 20:02:43 +02:00
parent 0e092d427b
commit b227f1865f
3 changed files with 10 additions and 15 deletions

View file

@ -92,10 +92,6 @@
name = hostname;
config = (pkgs.callPackage config { });
};
machineConfig = (pkgs.callPackage config { }) // {
inherit hostname;
};
};
})
home-manager.nixosModules.home-manager
@ -136,7 +132,6 @@
};
inherit
machineConfig
username
;

View file

@ -1,4 +1,4 @@
{ lib, machineConfig, machineInfo, ... }: {
{ lib, machineInfo, ... }: {
imports = [
./modules/custom-build-vm.nix
./modules/custom-sops-nix.nix
@ -28,7 +28,7 @@
vmVariantWithBootLoader = vmConfig;
};
users.myUsers = machineConfig.users;
users.myUsers = machineInfo.config.users;
home-manager = {
useUserPackages = true;
@ -50,19 +50,19 @@
} // args);
}
else {})
machineConfig.users;
machineInfo.config.users;
};
# Networking
networking.hostName = machineInfo.name;
# Set time zone
time.timeZone = machineConfig.timeZone;
time.timeZone = machineInfo.config.timeZone;
# Configure keyboard layout
console.keyMap = machineConfig.keyMap;
services.xserver.xkb.layout = machineConfig.keyboardLayout;
console.keyMap = machineInfo.config.keyMap;
services.xserver.xkb.layout = machineInfo.config.keyboardLayout;
i18n.extraLocaleSettings = machineConfig.localeSettings;
i18n.extraLocaleSettings = machineInfo.config.localeSettings;
};
}

View file

@ -1,11 +1,11 @@
{ lib, machineConfig, ... }: {
{ lib, machineInfo, ... }: {
config = {
nixpkgs = {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (
let
names =
(lib.optional machineConfig.xone "xow_dongle-firmware") ++
(lib.optionals machineConfig.nvidia [
(lib.optional machineInfo.config.xone "xow_dongle-firmware") ++
(lib.optionals machineInfo.config.nvidia [
"cuda_cccl"
"cuda_cudart"
"cuda_cuobjdump"