support other hosts
This commit is contained in:
parent
45e80b2048
commit
f7066a383a
2 changed files with 49 additions and 42 deletions
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, lib, unstable, ... }:
|
||||
{ config, pkgs, lib, unstable, hostName, ... }:
|
||||
|
||||
with lib;
|
||||
with builtins;
|
||||
|
@ -107,7 +107,6 @@ in {
|
|||
|
||||
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
|
||||
|
||||
networking.hostName = "harrowhark"; # Define your hostname.
|
||||
programs.extra-container.enable = true;
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
@ -147,18 +146,18 @@ in {
|
|||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.config = ''
|
||||
Section "Device"
|
||||
#Identifier "Intel Corporation Alder Lake-P Integrated Graphics"
|
||||
Identifier "Intel Graphics"
|
||||
#Identifier "Intel(R) Graphics"
|
||||
BusID "PCI:0:2:0"
|
||||
Driver "Intel"
|
||||
Option "DRI" "3"
|
||||
EndSection
|
||||
'';
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.startx.enable = true;
|
||||
# services.xserver.config = ''
|
||||
# Section "Device"
|
||||
# #Identifier "Intel Corporation Alder Lake-P Integrated Graphics"
|
||||
# Identifier "Intel Graphics"
|
||||
# #Identifier "Intel(R) Graphics"
|
||||
# BusID "PCI:0:2:0"
|
||||
# Driver "Intel"
|
||||
# Option "DRI" "3"
|
||||
# EndSection
|
||||
# '';
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.displayManager.startx.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
#services.xserver.displayManager.gdm.enable = true;
|
||||
|
|
64
flake.nix
64
flake.nix
|
@ -11,35 +11,43 @@
|
|||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: {
|
||||
nixosConfigurations.harrowhark = nixpkgs.lib.nixosSystem rec {
|
||||
pkgs = let
|
||||
nixpkgsConfig = {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in import nixpkgs (nixpkgsConfig // {
|
||||
overlays = [
|
||||
(new: prev: {
|
||||
unstable = import unstable nixpkgsConfig;
|
||||
stable = import stable nixpkgsConfig;
|
||||
})
|
||||
];
|
||||
});
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
|
||||
({ config, pkgs, options, ... }: {
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
})
|
||||
nixosConfigurations = let
|
||||
mkNixosConfig = hostName:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
pkgs = let
|
||||
nixpkgsConfig = {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in import nixpkgs (nixpkgsConfig // {
|
||||
overlays = [
|
||||
(new: prev: {
|
||||
unstable = import unstable nixpkgsConfig;
|
||||
stable = import stable nixpkgsConfig;
|
||||
})
|
||||
];
|
||||
});
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
# 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.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jaina = import ./home-manager/home.nix;
|
||||
}
|
||||
];
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jaina = import ./home-manager/home.nix;
|
||||
home-manager.backupFileExtension = "hmbackup";
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
harrowhark = mkNixosConfig "harrowhark";
|
||||
murray = mkNixosConfig "murray";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue