Skip to content

Instantly share code, notes, and snippets.

@Tombert
Created June 8, 2024 03:06
Show Gist options
  • Save Tombert/cbd395b4adbae36e5a4b66fa27ffb293 to your computer and use it in GitHub Desktop.
Save Tombert/cbd395b4adbae36e5a4b66fa27ffb293 to your computer and use it in GitHub Desktop.
My Nixos gamescope setup.
# 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, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nixpkgs.config.allowUnfree = true;
networking.hostName = "nixoshtpc"; # Define your hostname.
networking.networkmanager.enable = true;
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# SteamOS stuff
nix = {
package = pkgs.nixFlakes;
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
"experimental-features = nix-command flakes";
};
services.xserver.videoDrivers = [ "amdgpu" ];
services.xserver.displayManager.lightdm.enable = false;
services.xserver.displayManager.gdm.enable = true;
services.xserver.enable = true;
programs.steam.gamescopeSession.enable = true;
programs.gamescope.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "tombert";
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
programs.steam = {
enable = true;
};
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# hardware.pulseaudio.enable = true;
# OR
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.tombert = {
isNormalUser = true;
initialPassword = "pw123";
extraGroups = [ "wheel" "networkmanager"]; # Enable ‘sudo’ for the user.
packages = with pkgs; [
tree
neovim
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
google-chrome
chromium
neovim
nss
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
system.stateVersion = "24.05"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment