diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 54b960b..24b4c08 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -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 = { diff --git a/nixos/modules-old/des/gnome/default.nix b/nixos/modules-old/des/gnome/default.nix deleted file mode 100644 index 967ccea..0000000 --- a/nixos/modules-old/des/gnome/default.nix +++ /dev/null @@ -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; - }; - }; -} diff --git a/nixos/modules/services/default.nix b/nixos/modules/services/default.nix index f7295a5..b22d263 100644 --- a/nixos/modules/services/default.nix +++ b/nixos/modules/services/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./desktop ./openssh ]; } diff --git a/nixos/modules/services/desktop/default.nix b/nixos/modules/services/desktop/default.nix new file mode 100644 index 0000000..7c1002b --- /dev/null +++ b/nixos/modules/services/desktop/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./gnome + ]; +} diff --git a/nixos/modules/services/desktop/gnome/default.nix b/nixos/modules/services/desktop/gnome/default.nix new file mode 100644 index 0000000..415211b --- /dev/null +++ b/nixos/modules/services/desktop/gnome/default.nix @@ -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 + ]); + }; +} diff --git a/nixos/modules/users/tdpeuter/default.nix b/nixos/modules/users/tdpeuter/default.nix index 692d7de..bdb653e 100644 --- a/nixos/modules/users/tdpeuter/default.nix +++ b/nixos/modules/users/tdpeuter/default.nix @@ -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;