From 4b04d80d3fe6727019d07079e73df8a89c77c62f Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Fri, 26 Jul 2024 13:42:28 -0500 Subject: [PATCH] specialisations --- hosts/desktop/configuration.nix | 90 ++++++++++++++++++++++----------- hosts/desktop/home.nix | 8 +-- 2 files changed, 62 insertions(+), 36 deletions(-) diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index a0761e3..cf1ab35 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -13,9 +13,6 @@ let user = "matt"; password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; hostname = "matt-nixos"; - gnome = false; - plasma = true; - cosmic = false; resetNetworkScript = pkgs.writeScriptBin "reset-network" '' #!/usr/bin/env bash @@ -40,6 +37,66 @@ in ../default.nix ]; + specialisation = { + plasma.configuration = { + apps.discover-wrapped.enable = false; + + services = { + # Enable Desktop Environment. + displayManager = { + sddm.enable = true; + sddm.wayland.enable = true; + sddm.theme = "breeze"; + defaultSession = "plasma"; + }; + + desktopManager.plasma6.enable = true; + + # Enable Flatpak + flatpak.enable = false; + }; + + # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; + }; + + gnome.configuration = { + services = { + xserver = { + desktopManager.gnome.enable = true; + + # Enable Desktop Environment. + displayManager = { + gdm.enable = true; + gdm.wayland = true; + defaultSession = "gnome"; + }; + }; + + # Enable Flatpak + flatpak.enable = false; + }; + + environment = { + systemPackages = with pkgs; [ + gnome-tweaks + gnomeExtensions.appindicator + gnomeExtensions.arcmenu + gnomeExtensions.dash-to-panel + gnomeExtensions.tiling-assistant + ]; + }; + + # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; + + cosmic.configuration = { + services = { + desktopManager.cosmic.enable = true; + displayManager.cosmic-greeter.enable = true; + }; + }; + }; + share.hardware.amd = { enable = true; lact.enable = true; @@ -47,34 +104,13 @@ in share.gaming.enable = true; - apps.discover-wrapped.enable = plasma; - # Services configs services = { # Enable the X11 windowing system. xserver = { enable = true; - - # Enable Desktop Environment. - displayManager = { - gdm.enable = gnome; - }; - - desktopManager.gnome.enable = gnome; }; - # Enable Desktop Environment. - displayManager = { - sddm.enable = plasma; - sddm.wayland.enable = plasma; - # defaultSession = if plasma then "plasma" else "gnome"; - }; - - desktopManager.plasma6.enable = plasma; - - desktopManager.cosmic.enable = cosmic; - displayManager.cosmic-greeter.enable = cosmic; - # enable auto discovery of printers avahi = { enable = true; @@ -82,9 +118,6 @@ in openFirewall = true; }; - # Enable Flatpak - flatpak.enable = true; - borgbackup.jobs.home-matt = { encryption.mode = "repokey"; encryption.passCommand = "cat /root/borg"; @@ -155,9 +188,6 @@ in programs.gamemode.enable = true; - # xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; - # xdg.portal.extraPortals = mkIf plasma [ pkgs.xdg-desktop-portal-gtk ]; - # Configure environment environment = { # List packages installed in system profile. To search, run: diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index a9c4afc..696361e 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -23,6 +23,7 @@ shellAliases = { ll = "ls -alh"; update = "sudo nixos-rebuild switch"; + update-specialisation = "sudo nixos-rebuild switch --specialisation"; nas-update = "nixos-rebuild switch --use-remote-sudo --target-host admin@jallen-nas.local --build-host localhost --flake ~/nix-config#jallen-nas"; nas-ssh = "ssh admin@jallen-nas.local"; }; @@ -64,11 +65,6 @@ freerdp gamescope_git gamescope-wsi_git - # gnome-tweaks - # gnomeExtensions.appindicator - # gnomeExtensions.arcmenu - # gnomeExtensions.dash-to-panel - # gnomeExtensions.tiling-assistant goverlay heroic libreoffice-qt6-fresh @@ -96,7 +92,7 @@ ]; dconf = { - enable = false; + enable = true; settings = { "org/gnome/desktop/interface".clock-format = "12h"; "org/gnome/desktop/interface".color-scheme = "prefer-dark";