Refactored nix config for multihost support

This commit is contained in:
Niklas Hermanns 2024-07-02 01:07:15 +02:00
parent 5f051fac2b
commit 932f37c6e6
3 changed files with 11 additions and 20 deletions

View File

@ -5,24 +5,7 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nix = {
settings = {
experimental-features = "nix-command flakes";
};
};
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "nos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
nix.settings = { experimental-features = "nix-command flakes"; };
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";

View File

@ -10,7 +10,7 @@ outputs = { self, nixpkgs }@inputs:
nixosConfigurations = {
nos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./configuration.nix];
modules = [ ./nos.nix];
};
};
};

View File

@ -4,7 +4,15 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
imports = [ ./configuration.nix ];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "nos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
boot.initrd.availableKernelModules = [ "ata_piix" "mptspi" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];