gnome: add minimal option with core-os-services
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
4a3bb40314
commit
48e84a857d
6 changed files with 55 additions and 26 deletions
|
@ -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 {
|
||||
|
|
|
@ -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];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,13 +10,20 @@ in {
|
|||
options.custom.desktops.hyprland.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
custom.desktops.hyprland = mkIf config.custom.full {
|
||||
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
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
custom.desktops.niri = mkIf config.custom.full {
|
||||
custom.desktops = mkIf config.custom.full {
|
||||
niri = {
|
||||
binds.enable = true;
|
||||
input.enable = true;
|
||||
layout.enable = true;
|
||||
|
@ -23,6 +24,12 @@ in {
|
|||
rules.enable = true;
|
||||
};
|
||||
|
||||
gnome = {
|
||||
enable = true;
|
||||
minimal = true;
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/YaLTeR/niri
|
||||
# https://github.com/sodiboo/niri-flake
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md
|
||||
|
|
|
@ -9,7 +9,8 @@ in {
|
|||
options.custom.desktops.sway.enable = mkOption {default = false;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
custom.desktops.sway = mkIf config.custom.full {
|
||||
custom.desktops = mkIf config.custom.full {
|
||||
sway = {
|
||||
binds.enable = true;
|
||||
input.enable = true;
|
||||
output.enable = true;
|
||||
|
@ -18,6 +19,12 @@ in {
|
|||
swayfx.enable = true;
|
||||
};
|
||||
|
||||
gnome = {
|
||||
enable = true;
|
||||
minimal = true;
|
||||
};
|
||||
};
|
||||
|
||||
# https://wiki.nixos.org/wiki/Sway
|
||||
# https://wiki.archlinux.org/title/Sway
|
||||
# https://github.com/swaywm/sway
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue