[gnome] Move into proper module

This commit is contained in:
Tibo De Peuter 2023-10-18 20:30:40 +02:00
parent 4b1beee759
commit bab3778f18
6 changed files with 89 additions and 79 deletions

View file

@ -4,8 +4,6 @@
imports = [
./hardware-configuration.nix
../../modules-old/hardware/nvidia.nix
../../modules-old/des/gnome
];
sisyphus = {
@ -16,6 +14,7 @@
ssh.enable = true;
zellij.enable = true;
};
services.desktop.gnome.enable = true;
};
boot = {

View file

@ -1,76 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.xserver = {
enable = true;
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
excludePackages = with pkgs; [
xterm
];
};
environment.systemPackages = with pkgs; [
gnomeExtensions.launch-new-instance
];
# We do not want these packages automatically
environment.gnome.excludePackages = (with pkgs; [
baobab
epiphany # Web browser
evince # Document viewer
gnome-connections # Remote desktop client
gnome-console
gnome-photos
gnome-text-editor
gnome-tour
]) ++ (with pkgs.gnome; [
eog # Image viewer
file-roller # Archive manager
geary # Mail client
gedit
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-disk-utility
gnome-maps
gnome-music
gnome-system-monitor
gnome-weather
simple-scan
totem # Movie player
yelp # Help viewer
]);
# GNOME ricing
# Browse available settings by running:
# gsettings list-schemas | xargs -I % sh -c 'echo %; gsettings list-keys %' | less
home-manager.users.tdpeuter.dconf.settings = {
"org/gnome/desktop/background" = {
picture-uri = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg";
picture-uri-dark = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg-dark";
};
"org/gnome/desktop/interface" = {
enable-animations = false;
enable-hot-corners = false;
};
"org/gnome/desktop/notifications" = {
show-in-lock-screen = false;
};
"org/gnome/desktop/peripherals.touchpad" = {
tap-to-click = true;
};
"org/gnome/mutter" = {
dynamic-workspaces = true;
workspaces-only-on-primary = false;
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = true;
};
};
}

View file

@ -1,5 +1,6 @@
{
imports = [
./desktop
./openssh
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./gnome
];
}

View file

@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sisyphus.services.desktop.gnome;
in {
options.sisyphus.services.desktop.gnome.enable = lib.mkEnableOption "GNOME";
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
excludePackages = with pkgs; [
xterm
];
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
# Start a new instance of application instead of going to that window.
environment.systemPackages = with pkgs.gnomeExtensions; [
launch-new-instance
];
# Do not use these packages
environment.gnome.excludePackages = (with pkgs; [
baobab
epiphany # Web browser
evince # Document viewer
gnome-connections # Remote desktop client
gnome-console
gnome-photos
gnome-text-editor
gnome-tour
]) ++ (with pkgs.gnome; [
eog # Image viewer
file-roller # Archive manager
geary # Mail client
gedit
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-disk-utility
gnome-maps
gnome-music
gnome-system-monitor
gnome-weather
simple-scan
totem # Movie player
yelp # Help viewer
]);
};
}

View file

@ -70,7 +70,7 @@ in {
".config/mpv" = lib.mkIf (builtins.elem pkgs-unstable.mpv installedPkgs) {
source = ../../../../stow/mpv/.config/mpv;
};
".ssh/config" = { # Always put SSH configuration
".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable {
source = ../../../../stow/ssh/.ssh/config;
};
# Put Vifm files separately so history fill still works.
@ -89,6 +89,33 @@ in {
};
};
# GNOME ricing
# Browse available settings by running:
# gsettings list-schemas | xargs -I % sh -c 'echo %; gsettings list-keys %' | less
dconf.settings = lib.mkIf config.sisyphus.services.desktop.gnome.enable {
"org/gnome/desktop/background" = {
picture-uri = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg";
picture-uri-dark = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg-dark";
};
"org/gnome/desktop/interface" = {
enable-animations = false;
enable-hot-corners = false;
};
"org/gnome/desktop/notifications" = {
show-in-lock-screen = false;
};
"org/gnome/desktop/peripherals.touchpad" = {
tap-to-click = true;
};
"org/gnome/mutter" = {
dynamic-workspaces = true;
workspaces-only-on-primary = false;
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = true;
};
};
xdg.mimeApps = {
enable = true;