Rename variable holding machine infos
This commit is contained in:
parent
b227f1865f
commit
58b2763c92
3 changed files with 14 additions and 14 deletions
|
@ -88,7 +88,7 @@
|
||||||
(
|
(
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
config._module.args = {
|
config._module.args = {
|
||||||
machineInfo = machine // {
|
machine = machine // {
|
||||||
name = hostname;
|
name = hostname;
|
||||||
config = (pkgs.callPackage config { });
|
config = (pkgs.callPackage config { });
|
||||||
};
|
};
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
(
|
(
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
config._module.args = {
|
config._module.args = {
|
||||||
machineInfo = machine // {
|
machine = machine // {
|
||||||
name = hostname;
|
name = hostname;
|
||||||
config = machineConfig;
|
config = machineConfig;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, machineInfo, ... }: {
|
{ lib, machine, ... }: {
|
||||||
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 = machineInfo.config.users;
|
users.myUsers = machine.config.users;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
users =
|
users =
|
||||||
lib.attrsets.concatMapAttrs (username: user:
|
lib.attrsets.concatMapAttrs (username: user:
|
||||||
let
|
let
|
||||||
hostname = machineInfo.name;
|
hostname = machine.name;
|
||||||
getUserConfig = import ./utils/user-config.nix { inherit lib; };
|
getUserConfig = import ./utils/user-config.nix { inherit lib; };
|
||||||
configPath = getUserConfig { inherit hostname username; };
|
configPath = getUserConfig { inherit hostname username; };
|
||||||
in
|
in
|
||||||
|
@ -50,19 +50,19 @@
|
||||||
} // args);
|
} // args);
|
||||||
}
|
}
|
||||||
else {})
|
else {})
|
||||||
machineInfo.config.users;
|
machine.config.users;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.hostName = machineInfo.name;
|
networking.hostName = machine.name;
|
||||||
|
|
||||||
# Set time zone
|
# Set time zone
|
||||||
time.timeZone = machineInfo.config.timeZone;
|
time.timeZone = machine.config.timeZone;
|
||||||
|
|
||||||
# Configure keyboard layout
|
# Configure keyboard layout
|
||||||
console.keyMap = machineInfo.config.keyMap;
|
console.keyMap = machine.config.keyMap;
|
||||||
services.xserver.xkb.layout = machineInfo.config.keyboardLayout;
|
services.xserver.xkb.layout = machine.config.keyboardLayout;
|
||||||
|
|
||||||
i18n.extraLocaleSettings = machineInfo.config.localeSettings;
|
i18n.extraLocaleSettings = machine.config.localeSettings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, machineInfo, ... }: {
|
{ lib, machine, ... }: {
|
||||||
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 machineInfo.config.xone "xow_dongle-firmware") ++
|
(lib.optional machine.config.xone "xow_dongle-firmware") ++
|
||||||
(lib.optionals machineInfo.config.nvidia [
|
(lib.optionals machine.config.nvidia [
|
||||||
"cuda_cccl"
|
"cuda_cccl"
|
||||||
"cuda_cudart"
|
"cuda_cudart"
|
||||||
"cuda_cuobjdump"
|
"cuda_cuobjdump"
|
||||||
|
|
Loading…
Reference in a new issue