Add more common parts

This commit is contained in:
2024-03-27 21:36:40 +00:00
parent e8e42fb163
commit 25532dd2c7
3 changed files with 41 additions and 34 deletions

View File

@@ -2,7 +2,7 @@
{ {
imports = [ imports = [
users.nix ./users.nix
]; ];
# Set your time zone. # Set your time zone.
@@ -14,4 +14,25 @@
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
useXkbConfig = true; # use xkb.options in tty. useXkbConfig = true; # use xkb.options in tty.
}; };
programs = {
zsh.enable = true;
};
environment.systemPackages = with pkgs; [
git
gnupg
lsof
gnumake
python3
];
services = {
openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
};
};
};
} }

18
hardware/intel-uhd.nix Normal file
View File

@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
{
# Accel graphics
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
}

View File

@@ -1,7 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
@@ -9,6 +5,7 @@
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../common.nix ../../common.nix
../../hardware/intel-uhd.nix
]; ];
system.copySystemConfiguration = true; system.copySystemConfiguration = true;
@@ -53,47 +50,18 @@
# Enable sensors # Enable sensors
hardware.sensor.iio.enable = true; hardware.sensor.iio.enable = true;
# Accel graphics
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
# Define a user account. Don't forget to set a password with passwd.
# List packages installed in system profile # List packages installed in system profile
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git
gnupg
lsof
gnumake
firefox firefox
python3
]; ];
programs = { programs = {
zsh.enable = true;
flashrom.enable = true; flashrom.enable = true;
gnome-terminal.enable = true; gnome-terminal.enable = true;
}; };
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services = { services = {
openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
};
};
locate.enable = true; locate.enable = true;
upower.enable = true; upower.enable = true;
thermald.enable = true; thermald.enable = true;