mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 02:53:55 -05:00
add gnome modules (#108)
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
* firefox: add gnome browser connector * lavaridge: remove commented gnome settings * nixos: add gnome module * nix fmt * vscode: use custom titlebar on gnome * theme: check for gnome before adding extraCss * firefox: browsers in titlebar when gnome is enabled * home: add gnome settings * desktop: set gtk window decorations * gnome: remove gsconnect * Merge branch 'master' into add-gnome
This commit is contained in:
parent
e30d92fd70
commit
7798d01cae
|
@ -8,7 +8,8 @@
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nativeMessagingHosts =
|
nativeMessagingHosts =
|
||||||
lib.optional (config.ar.home.apps.keepassxc.enable) pkgs.keepassxc;
|
lib.optionals (config.ar.home.desktop.gnome.enable) [pkgs.gnome-browser-connector]
|
||||||
|
++ lib.optional (config.ar.home.apps.keepassxc.enable) pkgs.keepassxc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,12 @@ in {
|
||||||
"terminal.integrated.fontSize" = config.stylix.fonts.sizes.terminal + 3;
|
"terminal.integrated.fontSize" = config.stylix.fonts.sizes.terminal + 3;
|
||||||
"update.mode" = "none";
|
"update.mode" = "none";
|
||||||
"window.menuBarVisibility" = "hidden";
|
"window.menuBarVisibility" = "hidden";
|
||||||
"window.titleBarStyle" = lib.mkDefault "native";
|
|
||||||
|
"window.titleBarStyle" =
|
||||||
|
if config.ar.home.desktop.gnome.enable
|
||||||
|
then "custom"
|
||||||
|
else "native";
|
||||||
|
|
||||||
"window.zoomPerWindow" = false;
|
"window.zoomPerWindow" = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./gnome
|
||||||
./hyprland
|
./hyprland
|
||||||
./sway
|
./sway
|
||||||
./wayland
|
./wayland
|
||||||
|
@ -19,6 +20,12 @@
|
||||||
dconf = {
|
dconf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
"org/gnome/desktop/wm/preferences".button-layout =
|
||||||
|
if config.ar.home.desktop.gnome.enable
|
||||||
|
then "appmenu:minimize,maximize,close"
|
||||||
|
else "";
|
||||||
|
|
||||||
|
"org/gnome/nm-applet".disable-connected-notifications = true;
|
||||||
"org/gtk/gtk4/settings/file-chooser".sort-directories-first = true;
|
"org/gtk/gtk4/settings/file-chooser".sort-directories-first = true;
|
||||||
"org/gtk/settings/file-chooser".sort-directories-first = true;
|
"org/gtk/settings/file-chooser".sort-directories-first = true;
|
||||||
|
|
||||||
|
|
65
homeManagerModules/desktop/gnome/default.nix
Normal file
65
homeManagerModules/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.ar.home.desktop.gnome.enable {
|
||||||
|
dconf = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
"org/gnome/desktop/datetime".automatic-timezone = true;
|
||||||
|
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
clock-format = "12h";
|
||||||
|
enable-hot-corners = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
|
||||||
|
"org/gnome/desktop/search-providers".enabled = "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']";
|
||||||
|
"org/gnome/desktop/wm/preferences".auto-raise = true;
|
||||||
|
|
||||||
|
"org/gnome/mutter" = {
|
||||||
|
dynamic-workspaces = true;
|
||||||
|
edge-tiling = true;
|
||||||
|
workspaces-only-on-primary = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell".enabled-extensions = [
|
||||||
|
"appindicatorsupport@rgcjonas.gmail.com"
|
||||||
|
"blur-my-shell@aunetx"
|
||||||
|
"noannoyance-fork@vrba.dev"
|
||||||
|
"tailscale-status@maxgallup.github.com"
|
||||||
|
"tiling-assistant@leleat-on-github"
|
||||||
|
"drive-menu@gnome-shell-extensions.gcampax.github.com"
|
||||||
|
];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3;
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/blur-my-shell/panel" = {
|
||||||
|
blur = false;
|
||||||
|
customize = true;
|
||||||
|
override-background = false;
|
||||||
|
override-background-dynamically = false;
|
||||||
|
style-panel = 0;
|
||||||
|
unblur-in-overview = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/system/location".enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gnome-shell = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extensions = [
|
||||||
|
{package = pkgs.gnomeExtensions.appindicator;}
|
||||||
|
{package = pkgs.gnomeExtensions.blur-my-shell;}
|
||||||
|
{package = pkgs.gnomeExtensions.noannoyance-fork;}
|
||||||
|
{package = pkgs.gnomeExtensions.tailscale-status;}
|
||||||
|
{package = pkgs.gnomeExtensions.tiling-assistant;}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -21,14 +21,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
dconf = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
"org/gnome/desktop/wm/preferences".button-layout = "";
|
|
||||||
"org/gnome/nm-applet".disable-connected-notifications = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
blueberry
|
blueberry
|
||||||
gnome.file-roller
|
gnome.file-roller
|
||||||
|
|
|
@ -95,6 +95,12 @@ in {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gnome.enable = lib.mkOption {
|
||||||
|
description = "GNOME with sane defaults.";
|
||||||
|
default = osConfig.ar.desktop.gnome.enable;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
description = "Hyprland with full desktop session components.";
|
description = "Hyprland with full desktop session components.";
|
||||||
|
|
|
@ -36,7 +36,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix.targets.gtk.extraCss = builtins.concatStringsSep "\n" [
|
stylix.targets.gtk.extraCss = builtins.concatStringsSep "\n" [
|
||||||
(lib.optionalString (cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) ''
|
(lib.optionalString ((cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) && !cfg.desktop.gnome.enable) ''
|
||||||
window.background { border-radius: ${toString cfg.theme.borders.radius}; }
|
window.background { border-radius: ${toString cfg.theme.borders.radius}; }
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
|
@ -52,14 +52,14 @@ in {
|
||||||
}'')
|
}'')
|
||||||
|
|
||||||
(lib.optionalString (
|
(lib.optionalString (
|
||||||
(cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) && (config.stylix.polarity == "light")
|
(cfg.desktop.hyprland.enable || cfg.desktop.sway.enable) && (config.stylix.polarity == "light") && !cfg.desktop.gnome.enable
|
||||||
) ''
|
) ''
|
||||||
tooltip {
|
tooltip {
|
||||||
&.background { background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups}); }
|
&.background { background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups}); }
|
||||||
background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups});
|
background-color: alpha(${config.lib.stylix.colors.withHashtag.base05}, ${builtins.toString config.stylix.opacity.popups});
|
||||||
}'')
|
}'')
|
||||||
|
|
||||||
(lib.optionalString cfg.theme.gtk.hideTitleBar ''
|
(lib.optionalString (cfg.theme.gtk.hideTitleBar && !cfg.desktop.gnome.enable) ''
|
||||||
/* No (default) title bar on wayland */
|
/* No (default) title bar on wayland */
|
||||||
headerbar.default-decoration {
|
headerbar.default-decoration {
|
||||||
/* You may need to tweak these values depending on your GTK theme */
|
/* You may need to tweak these values depending on your GTK theme */
|
||||||
|
|
|
@ -39,9 +39,6 @@
|
||||||
environment.variables.GDK_SCALE = "2";
|
environment.variables.GDK_SCALE = "2";
|
||||||
networking.hostName = "lavaridge";
|
networking.hostName = "lavaridge";
|
||||||
programs.firefox.policies.Preferences."media.ffmpeg.vaapi.enabled" = lib.mkForce false;
|
programs.firefox.policies.Preferences."media.ffmpeg.vaapi.enabled" = lib.mkForce false;
|
||||||
# services.xserver.enable = true;
|
|
||||||
# services.xserver.displayManager.gdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
ar = {
|
ar = {
|
||||||
|
|
|
@ -76,7 +76,12 @@
|
||||||
Preferences = {
|
Preferences = {
|
||||||
"browser.aboutConfig.showWarning" = false;
|
"browser.aboutConfig.showWarning" = false;
|
||||||
"browser.bookmarks.addedImportButton" = false;
|
"browser.bookmarks.addedImportButton" = false;
|
||||||
"browser.tabs.inTitlebar" = 0;
|
|
||||||
|
"browser.tabs.inTitlebar" =
|
||||||
|
if config.ar.desktop.gnome.enable
|
||||||
|
then 1
|
||||||
|
else 0;
|
||||||
|
|
||||||
"datareporting.policy.dataSubmissionPolicyAccepted" = true;
|
"datareporting.policy.dataSubmissionPolicyAccepted" = true;
|
||||||
"dom.security.https_only_mode" = true;
|
"dom.security.https_only_mode" = true;
|
||||||
"extensions.autoDisableScopes" = 0;
|
"extensions.autoDisableScopes" = 0;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./greetd
|
./greetd
|
||||||
|
./gnome
|
||||||
./hyprland
|
./hyprland
|
||||||
./sway
|
./sway
|
||||||
./waylandComp.nix
|
./waylandComp.nix
|
||||||
|
@ -13,7 +14,8 @@
|
||||||
|
|
||||||
config =
|
config =
|
||||||
lib.mkIf (
|
lib.mkIf (
|
||||||
config.ar.desktop.hyprland.enable
|
config.ar.desktop.gnome.enable
|
||||||
|
|| config.ar.desktop.hyprland.enable
|
||||||
|| config.ar.desktop.steam.enable
|
|| config.ar.desktop.steam.enable
|
||||||
|| config.ar.desktop.sway.enable
|
|| config.ar.desktop.sway.enable
|
||||||
) {
|
) {
|
||||||
|
|
66
nixosModules/desktop/gnome/default.nix
Normal file
66
nixosModules/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf config.ar.desktop.gnome.enable {
|
||||||
|
# nixpkgs.overlays = [
|
||||||
|
# # GNOME 46: triple-buffering-v4-46
|
||||||
|
# (final: prev: {
|
||||||
|
# gnome = prev.gnome.overrideScope (gnomeFinal: gnomePrev: {
|
||||||
|
# mutter = gnomePrev.mutter.overrideAttrs (old: {
|
||||||
|
# src = pkgs.fetchFromGitLab {
|
||||||
|
# domain = "gitlab.gnome.org";
|
||||||
|
# owner = "vanvugt";
|
||||||
|
# repo = "mutter";
|
||||||
|
# rev = "triple-buffering-v4-46";
|
||||||
|
# hash = "sha256-nz1Enw1NjxLEF3JUG0qknJgf4328W/VvdMjJmoOEMYs=";
|
||||||
|
# };
|
||||||
|
# });
|
||||||
|
# });
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
|
||||||
|
security.pam.services = {
|
||||||
|
login.fprintAuth = false;
|
||||||
|
|
||||||
|
gdm = {
|
||||||
|
enableGnomeKeyring = true;
|
||||||
|
gnupg.enable = true;
|
||||||
|
kwallet.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) {
|
||||||
|
text = ''
|
||||||
|
auth required pam_shells.so
|
||||||
|
auth requisite pam_nologin.so
|
||||||
|
auth requisite pam_faillock.so preauth
|
||||||
|
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||||
|
auth optional pam_permit.so
|
||||||
|
auth required pam_env.so
|
||||||
|
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
|
||||||
|
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
||||||
|
|
||||||
|
account include login
|
||||||
|
|
||||||
|
password required pam_deny.so
|
||||||
|
|
||||||
|
session include login
|
||||||
|
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable GNOME and GDM.
|
||||||
|
services = {
|
||||||
|
gnome.tracker-miners.enable = true;
|
||||||
|
udev.packages = with pkgs; [gnome.gnome-settings-daemon];
|
||||||
|
|
||||||
|
xserver = {
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -29,6 +29,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gnome.enable = lib.mkEnableOption "GNOME desktop session.";
|
||||||
hyprland.enable = lib.mkEnableOption "Hyprland wayland session.";
|
hyprland.enable = lib.mkEnableOption "Hyprland wayland session.";
|
||||||
steam.enable = lib.mkEnableOption "Steam + Gamescope session.";
|
steam.enable = lib.mkEnableOption "Steam + Gamescope session.";
|
||||||
sway.enable = lib.mkEnableOption "Sway wayland session.";
|
sway.enable = lib.mkEnableOption "Sway wayland session.";
|
||||||
|
|
Loading…
Reference in a new issue