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 {
options.custom.desktops = {
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 {

View file

@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
@ -10,22 +9,23 @@ in {
options.custom.desktops.gnome = {
enable = mkOption {default = false;};
gdm = mkOption {default = true;};
minimal = mkOption {default = false;};
};
config = mkIf cfg.enable {
# https://wiki.nixos.org/wiki/GNOME
# FIXME: xdg-desktop-portal-[gnome|gtk] not working through steam
services = {
xserver = {
xserver = mkIf (!cfg.minimal) {
enable = true;
desktopManager.gnome.enable = true;
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,11 +10,18 @@ in {
options.custom.desktops.hyprland.enable = mkOption {default = false;};
config = mkIf cfg.enable {
custom.desktops.hyprland = mkIf config.custom.full {
binds.enable = true;
plugins.enable = true;
rules.enable = true;
settings.enable = true;
custom.desktops = mkIf config.custom.full {
hyprland = {
binds.enable = true;
plugins.enable = true;
rules.enable = true;
settings.enable = true;
};
gnome = {
enable = true;
minimal = true;
};
};
# https://github.com/hyprwm/Hyprland

View file

@ -15,12 +15,19 @@ in {
};
config = mkIf cfg.enable {
custom.desktops.niri = mkIf config.custom.full {
binds.enable = true;
input.enable = true;
layout.enable = true;
misc.enable = true;
rules.enable = true;
custom.desktops = mkIf config.custom.full {
niri = {
binds.enable = true;
input.enable = true;
layout.enable = true;
misc.enable = true;
rules.enable = true;
};
gnome = {
enable = true;
minimal = true;
};
};
# https://github.com/YaLTeR/niri

View file

@ -9,13 +9,20 @@ in {
options.custom.desktops.sway.enable = mkOption {default = false;};
config = mkIf cfg.enable {
custom.desktops.sway = mkIf config.custom.full {
binds.enable = true;
input.enable = true;
output.enable = true;
rules.enable = true;
settings.enable = true;
swayfx.enable = true;
custom.desktops = mkIf config.custom.full {
sway = {
binds.enable = true;
input.enable = true;
output.enable = true;
rules.enable = true;
settings.enable = true;
swayfx.enable = true;
};
gnome = {
enable = true;
minimal = true;
};
};
# https://wiki.nixos.org/wiki/Sway

View file

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