2023-09-24 10:15:53 +02:00
|
|
|
modulesCfg: {
|
2023-09-09 15:54:03 +02:00
|
|
|
modulesPath,
|
|
|
|
lib,
|
|
|
|
...
|
2023-09-24 10:15:53 +02:00
|
|
|
}: let
|
|
|
|
hostName = modulesCfg.hostName;
|
|
|
|
in {
|
2023-09-09 15:54:03 +02:00
|
|
|
imports = [
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2023-09-09 19:22:11 +02:00
|
|
|
(builtins.toString ./. + "/${hostName}.nix")
|
2023-09-24 10:15:53 +02:00
|
|
|
./common-desktop.nix
|
2023-09-09 15:54:03 +02:00
|
|
|
];
|
|
|
|
|
2023-09-24 10:15:53 +02:00
|
|
|
options.my.modulesCfg.hostName = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
};
|
|
|
|
|
2023-09-09 15:54:03 +02:00
|
|
|
config = {
|
2023-09-09 19:22:11 +02:00
|
|
|
networking.hostName = hostName;
|
|
|
|
|
2023-09-09 15:54:03 +02:00
|
|
|
boot.loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
|
|
|
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
};
|
|
|
|
}
|