From 8aa4fb89b45cbb9c2b16c6b10f7359a970e4ff52 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sun, 4 Feb 2024 14:51:54 +0100 Subject: [PATCH] pin firefox and inellij to gnome dash --- modules/firefox.nix | 13 +++++++++++-- modules/jetbrains-ide.nix | 24 ++++++++++++++++++------ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/modules/firefox.nix b/modules/firefox.nix index ad1b709..fd5a0c6 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { users.users.yoda = { packages = with pkgs; [ @@ -7,11 +7,20 @@ }; # Touch input with Firefox under X11. - environment.sessionVariables = { + environment.sessionVariables = lib.mkIf (! config.services.xserver.displayManager.gdm.wayland) { MOZ_USE_XINPUT2 = "1"; }; + # Required for dconf.settings + programs.dconf.enable = true; + home-manager.users.yoda = { osConfig, config, pkgs, ... }: { + dconf.settings = { + "org/gnome/shell" = { + favorite-apps = ["firefox.desktop"]; + }; + }; + programs.firefox = { enable = true; profiles.default = { diff --git a/modules/jetbrains-ide.nix b/modules/jetbrains-ide.nix index d303d74..94e7ba4 100644 --- a/modules/jetbrains-ide.nix +++ b/modules/jetbrains-ide.nix @@ -1,4 +1,11 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: +let + version = ( + if (config.nixpkgs.config.allowUnfree) + then "idea-ultimate" + else "idea-community" + ); +in { # Integrated Development Environment (IDE). @@ -15,11 +22,16 @@ users.users.yoda = { packages = with pkgs; [ - ( - if (config.nixpkgs.config.allowUnfree) - then jetbrains.idea-ultimate - else jetbrains.idea-community - ) + jetbrains."${version}" ]; }; + + programs.dconf.enable = true; + home-manager.users.yoda = { osConfig, config, pkgs, lib, ... }: { + dconf.settings = { + "org/gnome/shell" = { + favorite-apps = ["${version}.desktop"]; + }; + }; + }; }