support other hosts

This commit is contained in:
jaina heartles 2024-08-29 17:12:14 -04:00
parent 45e80b2048
commit f7066a383a
2 changed files with 49 additions and 42 deletions

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. 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).
{ config, pkgs, lib, unstable, ... }: { config, pkgs, lib, unstable, hostName, ... }:
with lib; with lib;
with builtins; with builtins;
@ -107,7 +107,6 @@ in {
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
networking.hostName = "harrowhark"; # Define your hostname.
programs.extra-container.enable = true; programs.extra-container.enable = true;
# Pick only one of the below networking options. # Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -147,18 +146,18 @@ in {
# }; # };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.config = '' # services.xserver.config = ''
Section "Device" # Section "Device"
#Identifier "Intel Corporation Alder Lake-P Integrated Graphics" # #Identifier "Intel Corporation Alder Lake-P Integrated Graphics"
Identifier "Intel Graphics" # Identifier "Intel Graphics"
#Identifier "Intel(R) Graphics" # #Identifier "Intel(R) Graphics"
BusID "PCI:0:2:0" # BusID "PCI:0:2:0"
Driver "Intel" # Driver "Intel"
Option "DRI" "3" # Option "DRI" "3"
EndSection # EndSection
''; # '';
services.xserver.enable = true; # services.xserver.enable = true;
services.xserver.displayManager.startx.enable = true; # services.xserver.displayManager.startx.enable = true;
# Enable the GNOME Desktop Environment. # Enable the GNOME Desktop Environment.
#services.xserver.displayManager.gdm.enable = true; #services.xserver.displayManager.gdm.enable = true;

View file

@ -11,7 +11,9 @@
}; };
}; };
outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: { outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: {
nixosConfigurations.harrowhark = nixpkgs.lib.nixosSystem rec { nixosConfigurations = let
mkNixosConfig = hostName:
nixpkgs.lib.nixosSystem rec {
pkgs = let pkgs = let
nixpkgsConfig = { nixpkgsConfig = {
inherit system; inherit system;
@ -31,6 +33,7 @@
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs # This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
({ config, pkgs, options, ... }: { ({ config, pkgs, options, ... }: {
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
networking.hostName = hostName; # Define your hostname.
}) })
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
@ -38,8 +41,13 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.jaina = import ./home-manager/home.nix; home-manager.users.jaina = import ./home-manager/home.nix;
home-manager.backupFileExtension = "hmbackup";
} }
]; ];
}; };
in {
harrowhark = mkNixosConfig "harrowhark";
murray = mkNixosConfig "murray";
};
}; };
} }