Replace machineConfig
variable
This commit is contained in:
parent
0e092d427b
commit
b227f1865f
3 changed files with 10 additions and 15 deletions
|
@ -92,10 +92,6 @@
|
||||||
name = hostname;
|
name = hostname;
|
||||||
config = (pkgs.callPackage config { });
|
config = (pkgs.callPackage config { });
|
||||||
};
|
};
|
||||||
|
|
||||||
machineConfig = (pkgs.callPackage config { }) // {
|
|
||||||
inherit hostname;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
@ -136,7 +132,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
machineConfig
|
|
||||||
username
|
username
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, machineConfig, machineInfo, ... }: {
|
{ lib, machineInfo, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/custom-build-vm.nix
|
./modules/custom-build-vm.nix
|
||||||
./modules/custom-sops-nix.nix
|
./modules/custom-sops-nix.nix
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
vmVariantWithBootLoader = vmConfig;
|
vmVariantWithBootLoader = vmConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.myUsers = machineConfig.users;
|
users.myUsers = machineInfo.config.users;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
@ -50,19 +50,19 @@
|
||||||
} // args);
|
} // args);
|
||||||
}
|
}
|
||||||
else {})
|
else {})
|
||||||
machineConfig.users;
|
machineInfo.config.users;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.hostName = machineInfo.name;
|
networking.hostName = machineInfo.name;
|
||||||
|
|
||||||
# Set time zone
|
# Set time zone
|
||||||
time.timeZone = machineConfig.timeZone;
|
time.timeZone = machineInfo.config.timeZone;
|
||||||
|
|
||||||
# Configure keyboard layout
|
# Configure keyboard layout
|
||||||
console.keyMap = machineConfig.keyMap;
|
console.keyMap = machineInfo.config.keyMap;
|
||||||
services.xserver.xkb.layout = machineConfig.keyboardLayout;
|
services.xserver.xkb.layout = machineInfo.config.keyboardLayout;
|
||||||
|
|
||||||
i18n.extraLocaleSettings = machineConfig.localeSettings;
|
i18n.extraLocaleSettings = machineInfo.config.localeSettings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, machineConfig, ... }: {
|
{ lib, machineInfo, ... }: {
|
||||||
config = {
|
config = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (
|
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) (
|
||||||
let
|
let
|
||||||
names =
|
names =
|
||||||
(lib.optional machineConfig.xone "xow_dongle-firmware") ++
|
(lib.optional machineInfo.config.xone "xow_dongle-firmware") ++
|
||||||
(lib.optionals machineConfig.nvidia [
|
(lib.optionals machineInfo.config.nvidia [
|
||||||
"cuda_cccl"
|
"cuda_cccl"
|
||||||
"cuda_cudart"
|
"cuda_cudart"
|
||||||
"cuda_cuobjdump"
|
"cuda_cuobjdump"
|
||||||
|
|
Loading…
Reference in a new issue