Add support for multiple machines
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
|
# Shared configuration across all machines
|
||||||
# Help is available in the configuration.nix(5) man page
|
# Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||||
# man configuration.nix
|
# man configuration.nix
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -19,8 +18,6 @@
|
|||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.hostName = "TrudePC";
|
|
||||||
#networking.wireless.enable = true;
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
time.timeZone = "Europe/Lisbon";
|
time.timeZone = "Europe/Lisbon";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|||||||
@@ -11,12 +11,23 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs: {
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
nixosConfigurations.TrudePC = nixpkgs.lib.nixosSystem {
|
nixosConfigurations = {
|
||||||
|
TrudePC = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
./hosts/TrudePC
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Add future machines here following the same pattern:
|
||||||
|
# MachineName = nixpkgs.lib.nixosSystem {
|
||||||
|
# specialArgs = { inherit inputs; };
|
||||||
|
# modules = [
|
||||||
|
# ./common.nix
|
||||||
|
# ./hosts/MachineName
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
11
nixos/hosts/TrudePC/default.nix
Normal file
11
nixos/hosts/TrudePC/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# TrudePC-specific configuration
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Machine-specific settings
|
||||||
|
networking.hostName = "TrudePC";
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
Reference in New Issue
Block a user