1
1
Fork 0

gnome: add minimal option with core-os-services

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-12-26 19:06:11 -05:00
parent 4a3bb40314
commit 48e84a857d
Signed by: Myned
GPG key ID: C7224454F7881A34
6 changed files with 55 additions and 26 deletions

View file

@ -8,7 +8,13 @@ with lib; let
in { in {
options.custom.desktops = { options.custom.desktops = {
enable = mkOption {default = config.custom.minimal;}; enable = mkOption {default = config.custom.minimal;};
desktop = mkOption {default = "niri";};
desktop = mkOption {
default =
if config.custom.full
then "niri"
else "gnome";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
with lib; let with lib; let
@ -10,22 +9,23 @@ in {
options.custom.desktops.gnome = { options.custom.desktops.gnome = {
enable = mkOption {default = false;}; enable = mkOption {default = false;};
gdm = mkOption {default = true;}; gdm = mkOption {default = true;};
minimal = mkOption {default = false;};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/GNOME
# FIXME: xdg-desktop-portal-[gnome|gtk] not working through steam # FIXME: xdg-desktop-portal-[gnome|gtk] not working through steam
services = { services = {
xserver = { xserver = mkIf (!cfg.minimal) {
enable = true; enable = true;
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
displayManager.gdm.enable = cfg.gdm; displayManager.gdm.enable = cfg.gdm;
}; };
gnome.gnome-browser-connector.enable = true; # Install extensions from browser gnome = {
core-os-services.enable = mkIf cfg.minimal true;
gnome-browser-connector.enable = !cfg.minimal;
};
}; };
# Remove default packages
# https://wiki.nixos.org/wiki/GNOME#Excluding_GNOME_Applications
environment.gnome.excludePackages = [pkgs.gnome-shell-extensions];
}; };
} }

View file

@ -10,13 +10,20 @@ in {
options.custom.desktops.hyprland.enable = mkOption {default = false;}; options.custom.desktops.hyprland.enable = mkOption {default = false;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom.desktops.hyprland = mkIf config.custom.full { custom.desktops = mkIf config.custom.full {
hyprland = {
binds.enable = true; binds.enable = true;
plugins.enable = true; plugins.enable = true;
rules.enable = true; rules.enable = true;
settings.enable = true; settings.enable = true;
}; };
gnome = {
enable = true;
minimal = true;
};
};
# https://github.com/hyprwm/Hyprland # https://github.com/hyprwm/Hyprland
programs.hyprland.enable = true; programs.hyprland.enable = true;

View file

@ -15,7 +15,8 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom.desktops.niri = mkIf config.custom.full { custom.desktops = mkIf config.custom.full {
niri = {
binds.enable = true; binds.enable = true;
input.enable = true; input.enable = true;
layout.enable = true; layout.enable = true;
@ -23,6 +24,12 @@ in {
rules.enable = true; rules.enable = true;
}; };
gnome = {
enable = true;
minimal = true;
};
};
# https://github.com/YaLTeR/niri # https://github.com/YaLTeR/niri
# https://github.com/sodiboo/niri-flake # https://github.com/sodiboo/niri-flake
# https://github.com/sodiboo/niri-flake/blob/main/docs.md # https://github.com/sodiboo/niri-flake/blob/main/docs.md

View file

@ -9,7 +9,8 @@ in {
options.custom.desktops.sway.enable = mkOption {default = false;}; options.custom.desktops.sway.enable = mkOption {default = false;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
custom.desktops.sway = mkIf config.custom.full { custom.desktops = mkIf config.custom.full {
sway = {
binds.enable = true; binds.enable = true;
input.enable = true; input.enable = true;
output.enable = true; output.enable = true;
@ -18,6 +19,12 @@ in {
swayfx.enable = true; swayfx.enable = true;
}; };
gnome = {
enable = true;
minimal = true;
};
};
# https://wiki.nixos.org/wiki/Sway # https://wiki.nixos.org/wiki/Sway
# https://wiki.archlinux.org/title/Sway # https://wiki.archlinux.org/title/Sway
# https://github.com/swaywm/sway # https://github.com/swaywm/sway

View file

@ -97,12 +97,14 @@ in {
gnome-calendar # Calendar gnome-calendar # Calendar
gnome-clocks # Clock gnome-clocks # Clock
gnome-connections # Remote desktop client gnome-connections # Remote desktop client
gnome-contacts # Contact editor
gnome-disk-utility # Disk formatter gnome-disk-utility # Disk formatter
gnome-firmware # Firmware updater gnome-firmware # Firmware updater
gnome-font-viewer # Font viewer gnome-font-viewer # Font viewer
gnome-graphs # Data plotter gnome-graphs # Data plotter
gnome-maps # OpenStreetMap client gnome-maps # OpenStreetMap client
gnome-obfuscate # Image redacter gnome-obfuscate # Image redacter
gnome-online-accounts-gtk # GNOME accounts
gnome-podcasts # Podcast feed gnome-podcasts # Podcast feed
gnome-resources # System monitor gnome-resources # System monitor
gnome-software # Flatpak manager gnome-software # Flatpak manager