Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
flake/hosts/skynet/configuration.nix

159 lines
4.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, lib, ... }:
{
imports = [ ./hardware-configuration.nix ];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "nodev";
boot.loader.grub.useOSProber = true;
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.kernelPackages = let linux_relms_pkg = {kernelPatches, lib, ...}: pkgs.linuxKernel.manualConfig {
lib = lib;
stdenv = pkgs.llvmPackages_14.stdenv;
configfile = ./kernel-config;
allowImportFromDerivation = true;
version = "${pkgs.linux_6_1.version}-relms";
modDirVersion = pkgs.linux_6_1.modDirVersion;
src = builtins.fetchurl {
url = "https://github.com/Relms12345/linux/archive/9d2f6060fe4c3b49d0cdc1dce1c99296f33379c8.tar.gz";
sha256 = "1e798bfcd26cf606659ec32ec862e0ec92b831c552b3066e9540b9d920cc3a35";
};
};
linux_relms = pkgs.callPackage linux_relms_pkg{};
in
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_relms);
# Enable XBox Controller
hardware.xpadneo.enable = true;
# Networking
networking.hostName = "skynet";
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.autorun = true;
services.xserver.excludePackages = [ pkgs.xterm ];
# Install various graphics drivers
hardware.opengl.extraPackages = with pkgs; [
intel-compute-runtime
mesa_drivers
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
# Enable the GNOME Desktop Environment.
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.gnome.core-utilities.enable = false;
services.gnome.gnome-browser-connector.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.relms = {
isNormalUser = true;
description = "Daryl Ronningen";
extraGroups = [ "networkmanager" "wheel" "docker" ];
shell = pkgs.fish;
};
# Install fish
programs.fish.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Manage CPU speed
services.cpupower-gui.enable = true;
# Fingerprint
services.fprintd.enable = true;
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
};
# Thermals
services.thermald.enable = true;
# Flatpak
services.flatpak.enable = true;
# Firmware Updater
services.fwupd.enable = true;
services.fwupd.enableTestRemote = true;
services.fwupd.extraRemotes = [ "lvfs-testing" ];
# Docker
virtualisation.docker.enable = true;
# Enable ZRAM
zramSwap.enable = true;
zramSwap.priority = 100;
# Setup some basic fonts
fonts = {
enableDefaultFonts = true;
enableGhostscriptFonts = true;
fontDir.enable = true;
fonts = [ pkgs.nerdfonts ];
};
# Fix firmware update on framework laptop
environment.etc."fwupd/uefi_capsule.conf".text = lib.mkForce ''
[uefi_capsule]
DisableCapsuleUpdateOnDisk=true
OverrideESPMountPoint=/boot/efi
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}