Add gamescope as separate desktop option

This commit is contained in:
Evie Litherland-Smith 2023-08-05 18:06:21 +01:00
parent 1336f5da84
commit 14d8b5683c
8 changed files with 79 additions and 64 deletions

10
home/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
bitwarden
signal-desktop
libreoffice
zotero
];
}

View file

@ -14,7 +14,7 @@ in {
home = {
inherit username homeDirectory;
stateVersion = "23.05";
packages = with pkgs; [ gcc ];
packages = with pkgs; [coreutils-prefixed];
};
programs = {
home-manager.enable = true;

View file

@ -12,7 +12,6 @@ in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../hyprland.nix
../../services/${hostName}.nix
];
@ -28,7 +27,7 @@ in {
opengl.driSupport32Bit = true;
steam-hardware.enable = true;
};
system.autoUpgrade.enable = true;
system.autoUpgrade.enable = false;
environment.systemPackages = with pkgs; [mesa];
programs = {
xwayland.enable = true;

View file

@ -1,26 +1,18 @@
{shellConfig, ...}: let
{ shellConfig, ... }:
let
username = "xenia";
homeDirectory = "/home/${username}";
in {
in
{
imports = [
shellConfig
../../home/git/personal.nix
../../home/ssh/personal.nix
../../home/tui
../../home/hyprland
];
home = {
inherit username homeDirectory;
stateVersion = "22.11";
};
programs.home-manager.enable = true;
xdg.configFile."hypr/display.conf".text = ''
monitor=DP-1,highrr,auto,1
monitor=DP-2,highrr,auto,1
monitor=HDMI-1,highres,auto,2
monitor=HDMI-2,highres,auto,2
'';
xdg.configFile."hypr/autostart.conf".text = ''
exec-once=gamescope -w 1920 -h 1080 -W 3840 -H 2160 -U -f --hdr-enabled -e -- steam -gamepadui
'';
}

View file

@ -1,6 +1,8 @@
{ pkgs, shell, ... }:
let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
in {
let
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
in
{
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
gc = {
@ -18,52 +20,16 @@ in {
localBinInPath = true;
systemPackages = with pkgs; [ distrobox ];
shellAliases = {
nou = "sudo nixos-rebuild switch --flake ${flakeURL}";
nou = "sudo nixos-rebuild switch --flake \"${flakeURL}\"";
noul = "sudo nixos-rebuild switch --flake $HOME/.config/home-manager";
hms = "${pkgs.home-manager}/bin/home-manager switch --flake ${flakeURL}";
hms = "${pkgs.home-manager}/bin/home-manager switch --flake \"${flakeURL}\"";
hmsl = "${pkgs.home-manager}/bin/home-manager switch --flake $HOME/.config/home-manager";
};
};
networking.networkmanager.enable = true;
services.power-profiles-daemon.enable = true;
virtualisation.podman.enable = true;
programs = {
${shell}.enable = true;
ssh.startAgent = true;
dconf.enable = true;
};
fonts = {
packages = with pkgs; [
# icon fonts
material-symbols
# normal fonts
jost
lexend
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
# nerdfonts
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
fontconfig = {
enable = true;
# user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
defaultFonts = {
serif = [ "Noto Serif" "Noto Color Emoji" ];
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
monospace = [ "FiraCode Nerd Font" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
services.xserver = {
layout = "gb";
xkbVariant = "";
};
console.keyMap = "uk";
programs.${shell}.enable = true;
# Set your time zone.
time.timeZone = "Europe/London";
i18n = {

View file

@ -2,13 +2,7 @@
{
imports = [ ./common.nix ];
environment.systemPackages = with pkgs; [
libnotify
bitwarden
signal-desktop
libreoffice
zotero
];
environment.systemPackages = with pkgs; [ libnotify ];
security.rtkit.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
@ -25,6 +19,33 @@
};
};
console.keyMap = "uk";
programs.ssh.startAgent = true;
programs.dconf.enable = true;
xdg.portal.enable = true;
fonts = {
packages = with pkgs; [
# icon fonts
material-symbols
# normal fonts
jost
lexend
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
# nerdfonts
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
fontconfig = {
enable = true;
# user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
defaultFonts = {
serif = [ "Noto Serif" "Noto Color Emoji" ];
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
monospace = [ "FiraCode Nerd Font" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
}

26
hosts/gamescope.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
let
sessionCommand = " gamescope -w 1920 -h 1080 -W 3840 -H 2160 -U -f --hdr-enabled -e -- steam -gamepadui";
in
{
imports = [ ./desktop.nix ];
services = {
blueman.enable = true;
greetd.settings = {
default_session.command = sessionCommand;
initial_session.command = sessionCommand;
};
};
programs = {
xwayland.enable = true;
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
gamescopeSession.enable = true;
};
};
}

View file

@ -14,6 +14,7 @@
initial_session.command = "Hyprland";
};
};
xdg.portal.enable = true;
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
programs = {
hyprland.enable = true;