Refactoring config preparing for server
This commit is contained in:
parent
2bffc8d711
commit
6992836cfe
18 changed files with 165 additions and 10 deletions
30
modules/desktop/gaming/default.nix
Normal file
30
modules/desktop/gaming/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession = {
|
||||
enable = true;
|
||||
args = [
|
||||
"--rt"
|
||||
# "--mangoapp"
|
||||
# "--hdr-enabled"
|
||||
"--adaptive-sync"
|
||||
];
|
||||
# env = {
|
||||
# MANGOHUD = "1";
|
||||
# MANGOHUD_CONFIG = "fps,cpu_temp,gpu_temp,ram,vram";
|
||||
# };
|
||||
};
|
||||
package = pkgs.steam.override {
|
||||
extraArgs = "-forcedesktopscaling 1.5";
|
||||
};
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wineWowPackages.waylandFull
|
||||
mangohud
|
||||
protonup
|
||||
];
|
||||
}
|
||||
39
modules/desktop/gnome/default.nix
Normal file
39
modules/desktop/gnome/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
# Fingerprint
|
||||
# security.pam.services.login.fprintAuth = false;
|
||||
# security.pam.services.gdm-fingerprint.text = ''
|
||||
# auth required pam_shells.so
|
||||
# auth requisite pam_nologin.so
|
||||
# auth requisite pam_faillock.so preauth
|
||||
# auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
# auth optional pam_permit.so
|
||||
# auth required pam_env.so
|
||||
# auth [success=ok default=1] ${pkgs.gdm}/lib/security/pam_gdm.so
|
||||
# auth optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
||||
|
||||
# account include login
|
||||
|
||||
# password required pam_deny.so
|
||||
|
||||
# session include login
|
||||
# session optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
||||
# '';
|
||||
|
||||
# GNOME
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
environment.gnome.excludePackages = [ pkgs.evince ];
|
||||
|
||||
# KDE Connect
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = lib.mkDefault pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
}
|
||||
105
modules/desktop/gnome/packages.nix
Normal file
105
modules/desktop/gnome/packages.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Web
|
||||
fragments
|
||||
varia
|
||||
whatip
|
||||
epiphany
|
||||
|
||||
# Image
|
||||
drawing
|
||||
loupe
|
||||
snapshot
|
||||
|
||||
# Video
|
||||
kooha
|
||||
video-trimmer
|
||||
|
||||
# Audio
|
||||
shortwave
|
||||
gnome-podcasts
|
||||
gnome-sound-recorder
|
||||
|
||||
# Reading
|
||||
papers
|
||||
|
||||
# Note taking
|
||||
apostrophe
|
||||
setzer
|
||||
|
||||
# Programming
|
||||
# devtoolbox
|
||||
|
||||
# Containers & VMs
|
||||
gnome-boxes
|
||||
|
||||
# System
|
||||
gnome-firmware
|
||||
|
||||
# Utilities
|
||||
impression
|
||||
resources
|
||||
file-roller
|
||||
baobab
|
||||
|
||||
# Customization
|
||||
gnome-tweaks
|
||||
gnome-extension-manager
|
||||
adw-gtk3
|
||||
paper-icon-theme
|
||||
];
|
||||
|
||||
services.flatpak = lib.mkIf (config?services.flatpak.packages) {
|
||||
remotes = lib.mkOptionDefault [{
|
||||
name = "gnome-nightly";
|
||||
location = "https://nightly.gnome.org/gnome-nightly.flatpakrepo";
|
||||
}];
|
||||
|
||||
packages = [
|
||||
# Image
|
||||
"page.kramo.Sly"
|
||||
|
||||
# Video
|
||||
"org.nickvision.tubeconverter"
|
||||
|
||||
# Audio
|
||||
"io.github.revisto.drum-machine"
|
||||
|
||||
# Reading
|
||||
"com.github.johnfactotum.Foliate"
|
||||
|
||||
# Science
|
||||
"com.github.alexhuntley.Plots"
|
||||
|
||||
# Office
|
||||
"com.belmoussaoui.Obfuscate"
|
||||
"com.github.muriloventuroso.pdftricks"
|
||||
"com.github.flxzt.rnote"
|
||||
"com.github.jeromerobert.pdfarranger"
|
||||
"garden.jamie.Morphosis"
|
||||
|
||||
# Utilities
|
||||
"com.belmoussaoui.Decoder"
|
||||
"io.github.nokse22.minitext"
|
||||
"io.github.fabrialberio.pinapp"
|
||||
"re.sonny.Eloquent"
|
||||
|
||||
# Customization
|
||||
"ca.desrt.dconf-editor"
|
||||
"app.drey.Damask"
|
||||
"com.github.GradienceTeam.Gradience"
|
||||
|
||||
# Games
|
||||
"dev.tchx84.Gameeky"
|
||||
"dev.tchx84.Gameeky.ThematicPack.FreedomValley"
|
||||
"dev.tchx84.Gameeky.ThematicPack.Blasterman"
|
||||
"dev.tchx84.Gameeky.ThematicPack.Wackman"
|
||||
|
||||
# Programming
|
||||
{ appId = "org.gnome.Builder.Devel"; origin = "gnome-nightly"; }
|
||||
"app.drey.Biblioteca"
|
||||
];
|
||||
};
|
||||
}
|
||||
15
modules/desktop/specialisations/gaming.nix
Normal file
15
modules/desktop/specialisations/gaming.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
specialisation = {
|
||||
gaming.configuration = {
|
||||
hardware.nvidia = {
|
||||
prime.sync.enable = lib.mkForce true;
|
||||
prime.offload = {
|
||||
enable = lib.mkForce false;
|
||||
enableOffloadCmd = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/desktop/specialisations/kde-gaming.nix
Normal file
23
modules/desktop/specialisations/kde-gaming.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
specialisation = {
|
||||
kde-gaming.configuration = {
|
||||
hardware.nvidia = {
|
||||
prime.sync.enable = lib.mkForce true;
|
||||
prime.offload = {
|
||||
enable = lib.mkForce false;
|
||||
enableOffloadCmd = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
|
||||
# GNOME
|
||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
||||
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
|
||||
|
||||
# KDE
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/desktop/specialisations/kde.nix
Normal file
15
modules/desktop/specialisations/kde.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
specialisation = {
|
||||
kde.configuration = {
|
||||
# GNOME
|
||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
||||
services.xserver.desktopManager.gnome.enable = lib.mkForce false;
|
||||
|
||||
# KDE
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/desktop/specialisations/old-kernel.nix
Normal file
9
modules/desktop/specialisations/old-kernel.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
specialisation = {
|
||||
old-kernel.configuration = {
|
||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_6_1;
|
||||
};
|
||||
};
|
||||
}
|
||||
47
modules/desktop/sway/default.nix
Normal file
47
modules/desktop/sway/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let xwayland-sway =
|
||||
(pkgs.writeScriptBin "Xwayland-sway" ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
exec ${pkgs.xwayland}/bin/Xwayland "$@" -hidpi
|
||||
'');
|
||||
in
|
||||
{
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
extraSessionCommands = ''
|
||||
# SDL:
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# QT (needs qt5.qtwayland in systemPackages):
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
# Fix for some Java AWT applications (e.g. Android Studio),
|
||||
# use this if they aren't displayed properly:
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export WLR_XWAYLAND=${xwayland-sway}/bin/Xwayland-sway
|
||||
'';
|
||||
extraPackages = with pkgs; [
|
||||
brightnessctl
|
||||
grim
|
||||
swayidle
|
||||
swaylock
|
||||
wmenu
|
||||
mako
|
||||
waybar
|
||||
poweralertd
|
||||
lxsession
|
||||
networkmanagerapplet
|
||||
wofi
|
||||
wlogout
|
||||
slurp
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
xwayland-sway
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue