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,35 +11,43 @@
}; };
}; };
outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: { outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: {
nixosConfigurations.harrowhark = nixpkgs.lib.nixosSystem rec { nixosConfigurations = let
pkgs = let mkNixosConfig = hostName:
nixpkgsConfig = { nixpkgs.lib.nixosSystem rec {
inherit system; pkgs = let
config.allowUnfree = true; nixpkgsConfig = {
}; inherit system;
in import nixpkgs (nixpkgsConfig // { config.allowUnfree = true;
overlays = [ };
(new: prev: { in import nixpkgs (nixpkgsConfig // {
unstable = import unstable nixpkgsConfig; overlays = [
stable = import stable nixpkgsConfig; (new: prev: {
}) unstable = import unstable nixpkgsConfig;
]; stable = import stable nixpkgsConfig;
}); })
system = "x86_64-linux"; ];
modules = [ });
./configuration.nix system = "x86_64-linux";
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs modules = [
({ config, pkgs, options, ... }: { ./configuration.nix
nix.registry.nixpkgs.flake = nixpkgs; # This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
}) ({ config, pkgs, options, ... }: {
nix.registry.nixpkgs.flake = nixpkgs;
networking.hostName = hostName; # Define your hostname.
})
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
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";
}; };
}; };
} }