Last active
February 15, 2024 10:19
-
-
Save AdamWorley/4ea1fc91412741361098aa303543473e to your computer and use it in GitHub Desktop.
EvoOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
let | |
unstable = import <nixos-unstable> { | |
config = { allowUnfree = true; }; | |
}; | |
in | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Bootloader. | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.supportedFilesystems = [ "ntfs" ]; | |
# for fancy boot/loading screen, because duh | |
# took this from a collection at: https://github.com/adi1090x/plymouth-themes | |
# unfortunately, it only lasts for a second or 2... | |
#plymouth = { | |
# enable = true; | |
# themePackages = [ pkgs.adi1090x-plymouth ]; | |
# theme = "metal_ball"; | |
#}; | |
# modules to load early in the boot process, for nicer boot splash at correct rez | |
#initrd = { | |
# verbose = false; | |
# kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; | |
#}; | |
networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Enable networking | |
networking.networkmanager.enable = true; | |
# Fingerprint reader | |
services.fprintd.enable = true; | |
services.fprintd.tod.enable = true; | |
services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; | |
# Set your time zone. | |
time.timeZone = "Europe/London"; | |
# Select internationalisation properties. | |
i18n.defaultLocale = "en_GB.UTF-8"; | |
i18n.extraLocaleSettings = { | |
LC_ADDRESS = "en_GB.UTF-8"; | |
LC_IDENTIFICATION = "en_GB.UTF-8"; | |
LC_MEASUREMENT = "en_GB.UTF-8"; | |
LC_MONETARY = "en_GB.UTF-8"; | |
LC_NAME = "en_GB.UTF-8"; | |
LC_NUMERIC = "en_GB.UTF-8"; | |
LC_PAPER = "en_GB.UTF-8"; | |
LC_TELEPHONE = "en_GB.UTF-8"; | |
LC_TIME = "en_GB.UTF-8"; | |
}; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
# Enable the GNOME Desktop Environment. | |
services.xserver.displayManager.gdm.enable = true; | |
services.xserver.desktopManager.gnome.enable = true; | |
# Configure keymap in X11 | |
services.xserver = { | |
layout = "us"; | |
xkbVariant = ""; | |
}; | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
# Add controllers | |
services.udev.extraRules = '' | |
# May vary depending on your controller model, find product id using 'lsusb' | |
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3106", ATTR{manufacturer}=="8BitDo", RUN+="${pkgs.systemd}/bin/systemctl start 8bitdo-ultimate-xinput@2dc8:3106" | |
# This device (2dc8:3016) is "connected" when the above device disconnects | |
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3016", ATTR{manufacturer}=="8BitDo", RUN+="${pkgs.systemd}/bin/systemctl stop 8bitdo-ultimate-xinput@2dc8:3106" | |
# 8Bitdo F30 P1 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo FC30 GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo F30 P2 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo FC30 II", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo N30 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo NES30 GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo SF30 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SFC30 GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo SN30 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SNES30 GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo F30 Pro | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo FC30 Pro", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo N30 Pro | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo NES30 Pro", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo SF30 Pro | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SF30 Pro", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo SN30 Pro | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SN30 Pro", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8BitDo SN30 Pro+; Bluetooth; USB | |
SUBSYSTEM=="input", ATTRS{name}=="8BitDo SN30 Pro+", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SF30 Pro 8BitDo SN30 Pro+", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo F30 Arcade | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo Joy", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo N30 Arcade | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo NES30 Arcade", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo ZERO | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo Zero GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8Bitdo Retro-Bit xRB8-64 | |
SUBSYSTEM=="input", ATTRS{name}=="8Bitdo N64 GamePad", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
# 8BitDo Pro 2; Bluetooth; USB | |
SUBSYSTEM=="input", ATTRS{name}=="8BitDo Pro 2", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
SUBSYSTEM=="input", ATTR{id/vendor}=="2dc8", ATTR{id/product}=="6003", ENV{ID_INPUT_JOYSTICK}="1", TAG+="uaccess" | |
''; | |
# Systemd service which starts xboxdrv in xbox360 mode | |
systemd.services."8bitdo-ultimate-xinput@" = { | |
unitConfig.Description = "8BitDo Ultimate Controller XInput mode xboxdrv daemon"; | |
serviceConfig = { | |
Type = "simple"; | |
ExecStart = "${pkgs.xboxdrv}/bin/xboxdrv --mimic-xpad --silent --type xbox360 --device-by-id %I --force-feedback"; | |
}; | |
}; | |
# 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; | |
# If you want to use JACK applications, uncomment this | |
#jack.enable = true; | |
# use the example session manager (no others are packaged yet so this is enabled by default, | |
# no need to redefine it in your config for now) | |
#media-session.enable = true; | |
}; | |
# Enable touchpad support (enabled default in most desktopManager). | |
# services.xserver.libinput.enable = true; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.users.adam = { | |
isNormalUser = true; | |
description = "Adam Worley"; | |
extraGroups = [ "networkmanager" "wheel" ]; | |
packages = with pkgs; [ | |
floorp | |
# thunderbird | |
]; | |
}; | |
# Allow unfree packages | |
nixpkgs.config.allowUnfree = true; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
neovim | |
wget | |
neofetch | |
git | |
alacritty | |
yuzu-mainline | |
bitwarden | |
unstable.goldwarden | |
zathura | |
xclip | |
]; | |
programs.steam = { | |
enable = true; | |
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play | |
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server | |
}; | |
# Enable OpenGL | |
hardware.opengl = { | |
enable = true; | |
driSupport = true; | |
driSupport32Bit = true; | |
}; | |
# Load nvidia driver for Xorg and Wayland | |
services.xserver.videoDrivers = ["nvidia"]; | |
hardware.nvidia = { | |
# Modesetting is required. | |
modesetting.enable = true; | |
# Nvidia power management. Experimental, and can cause sleep/suspend to fail. | |
powerManagement.enable = false; | |
# Fine-grained power management. Turns off GPU when not in use. | |
# Experimental and only works on modern Nvidia GPUs (Turing or newer). | |
powerManagement.finegrained = false; | |
# Use the NVidia open source kernel module (not to be confused with the | |
# independent third-party "nouveau" open source driver). | |
# Support is limited to the Turing and later architectures. Full list of | |
# supported GPUs is at: | |
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus | |
# Only available from driver 515.43.04+ | |
# Currently alpha-quality/buggy, so false is currently the recommended setting. | |
open = false; | |
# Enable the Nvidia settings menu, | |
# accessible via `nvidia-settings`. | |
nvidiaSettings = true; | |
# Optionally, you may need to select the appropriate driver version for your specific GPU. | |
# package = config.boot.kernelPackages.nvidiaPackages.stable; | |
}; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
# programs.gnupg.agent = { | |
# enable = true; | |
# enableSSHSupport = true; | |
# }; | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
# services.openssh.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# 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. It‘s 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.11"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment