Init GNOME desktop config

This commit is contained in:
Curt Spark 2024-06-01 22:58:11 +01:00
parent 7425d5b06c
commit e158bda697
4 changed files with 139 additions and 2 deletions

View File

@ -10,6 +10,7 @@
./hardware-configuration.nix
./../../modules/nixos/cspark-single-gpu-passthru/module.nix
./../../modules/nixos/cspark-desktop-plasma/module.nix
./../../modules/nixos/cspark-desktop-gnome/module.nix
./../../modules/nixos/cspark-desktop-sway/module.nix
./../../modules/nixos/cspark-desktop-niri/module.nix
inputs.home-manager.nixosModules.default
@ -27,8 +28,9 @@
# Custom desktop environments
# cspark-desktop-plasma.enable = true;
cspark-desktop-gnome.enable = true;
# cspark-desktop-sway.enable = true;
cspark-desktop-niri.enable = true;
# cspark-desktop-niri.enable = true;
# My audio interface has issues after coming out from suspend/hibernate, this will reset it to fix it when necessary.
systemd.services.audiointerface-reset-unbind = {

View File

@ -6,6 +6,7 @@
# Global Config, always to be included
./../../global-home.nix
./../../modules/nixos/cspark-desktop-plasma/home.nix
./../../modules/nixos/cspark-desktop-gnome/home.nix
./../../modules/nixos/cspark-desktop-sway/home.nix
./../../modules/nixos/cspark-desktop-niri/home.nix
];
@ -16,8 +17,9 @@
# Custom Desktop Configurations
# cspark-desktop-plasma-config-1.enable = true;
cspark-desktop-gnome-config-1.enable = true;
# cspark-desktop-sway-config-1.enable = true;
cspark-desktop-niri-config-1.enable = true;
# cspark-desktop-niri-config-1.enable = true;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.

View File

@ -0,0 +1,23 @@
{ lib, config, pkgs, modulesPath, ... }:
let
cfg = config.cspark-desktop-gnome-config-1;
in
{
options.cspark-desktop-gnome-config-1 = {
enable
= lib.mkEnableOption "Enable Custom GNOME Desktop Setup 1";
};
config = lib.mkIf cfg.enable {
home.sessionVariables = {
TERM = "foot";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
MOZ_ENABLE_WAYLAND = "1";
# Enable native wayland support for chromium and electron based applications
NIXOS_OZONE_WL = "1";
};
};
}

View File

@ -0,0 +1,110 @@
{ lib, config, pkgs, modulesPath, ... }:
let
cfg = config.cspark-desktop-gnome;
in
{
options.cspark-desktop-gnome = {
enable
= lib.mkEnableOption "Enable GNOME Plasma Desktop Setup";
};
config = lib.mkIf cfg.enable {
services.xserver = {
# Enable the X11 windowing system.
enable = true;
# Remove/disable xterm, we are using Foot.
desktopManager.xterm.enable = false;
excludePackages = with pkgs; [ xterm ];
# Enable the GDM display manager
displayManager.gdm = {
enable = true;
wayland = true;
};
# Enable the GNOME Desktop Environment.
desktopManager.gnome.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# libinput.enable = true;
};
# Exclude default GNOME applications
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
]) ++ (with pkgs.gnome; [
cheese # webcam tool
gnome-music
gnome-terminal
gedit # text editor
epiphany # web browser
geary # email reader
evince # document viewer
gnome-characters
totem # video player
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
]);
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
services.dbus.packages = with pkgs; [ gnome2.GConf ];
# GTK themes are not applied in Wayland applications / Window Decorations missing / Cursor looks different
programs.dconf.enable = true;
# 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;
# 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;
};
# Set konsole to be default terminal
environment.sessionVariables = {
TERM = "foot";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
MOZ_ENABLE_WAYLAND = "1";
# Enable native wayland support for chromium and electron based applications
NIXOS_OZONE_WL = "1";
};
environment.variables = {
TERM = "foot";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
MOZ_ENABLE_WAYLAND = "1";
# Enable native wayland support for chromium and electron based applications
NIXOS_OZONE_WL = "1";
};
environment.systemPackages = with pkgs; [
# GNOME plugins
gnomeExtensions.appindicator
foot # Terminal Emulator
wl-clipboard
wev # Clone of X11 xev for wayland
];
};
}