From 32138b17d745b961cdc9c7f3ef75635e051da591 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Thu, 29 Aug 2024 22:49:04 +0200 Subject: [PATCH] add some gnome customization --- hosts/spectre-x360-2018/configuration.nix | 3 +- modules/home-manager/fish.nix | 38 +++++++++++++++++ .../gnome-shell-customization.nix | 15 +++++++ modules/nixos/gdm.nix | 1 + secrets/secret1.age | Bin 334 -> 0 bytes users/remy.nix | 39 ++++-------------- 6 files changed, 63 insertions(+), 33 deletions(-) create mode 100644 modules/home-manager/fish.nix create mode 100644 modules/home-manager/gnome-shell-customization.nix delete mode 100644 secrets/secret1.age diff --git a/hosts/spectre-x360-2018/configuration.nix b/hosts/spectre-x360-2018/configuration.nix index c5902bb..47a6176 100644 --- a/hosts/spectre-x360-2018/configuration.nix +++ b/hosts/spectre-x360-2018/configuration.nix @@ -45,7 +45,8 @@ networking.networkmanager.wifi.powersave = true; - + programs.dconf.enable = true; + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "24.05"; # Did you read the comment? diff --git a/modules/home-manager/fish.nix b/modules/home-manager/fish.nix new file mode 100644 index 0000000..1c27895 --- /dev/null +++ b/modules/home-manager/fish.nix @@ -0,0 +1,38 @@ +{pkgs, ...}: +{ + programs.fzf = { + enable = true; + }; + + + programs.fish = { + enable = true; + # enableCompletion = true; + plugins = [ + { + name = "fzf-fish"; + src = pkgs.fetchFromGitHub { + owner = "PatrickF1"; + repo = "fzf.fish"; + rev = "v10.3"; + sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM="; + }; + } + # add others here + ]; + }; + + # sets the "default" shell to fish + # actually keeps bash as a posix-compliant default but starts fish if the shell is not bash + # See https://nixos.wiki/wiki/Fish + programs.bash = { + enable = true; + initExtra = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; +} diff --git a/modules/home-manager/gnome-shell-customization.nix b/modules/home-manager/gnome-shell-customization.nix new file mode 100644 index 0000000..e15bb35 --- /dev/null +++ b/modules/home-manager/gnome-shell-customization.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: +{ + ## Gnome extensions + programs.gnome-shell = { + enable = true; + extensions = [ + { package = pkgs.gnomeExtensions.dash-to-panel; } + { + id = "tilingshell@ferrarodomenico.com"; + package = pkgs.gnome.gnome-shell-extensions; + } + + ]; + }; +} diff --git a/modules/nixos/gdm.nix b/modules/nixos/gdm.nix index ce12f74..388237c 100644 --- a/modules/nixos/gdm.nix +++ b/modules/nixos/gdm.nix @@ -33,6 +33,7 @@ gnome.gnome-weather gnome-secrets gnome.gnome-characters + gnome.gnome-font-viewer ]); } diff --git a/secrets/secret1.age b/secrets/secret1.age deleted file mode 100644 index 7ccbe2be786e3da6839b97646cbc0e5aee8e878e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 334 zcmZ9_Jx+sA003YIClY5@V%!=89<7DM7zvb8ex${=Xcq$%`LPt}1NvS)f(K~g8Qhz= z8s{!vz}d+-xR}P>?*gA222?Qj7dS8DY<`k0Lb_%N>YRiyqJk-CwOD~HytY>kNTJR+lC)|ioaM$n$GTTl*0D^d^u!1# zewNxYG*8)}-yR_Ne;bZfjT?{_kbSYV=X_f?@hVUmG3rFHV`;LZ(rFM|Q)powSIsaa zd^DmP5*i6OReS~)mj(+ah*fkU&Owz&PUy|}dfu0N89`ALiGAb+c0r4Esl?GlFC1_! zrFXM53DrCY#W2dcs8J)4UlMO;7klyU=kcK4JTTkc^UaH~9ldY951+o)pU2%~fB9h? L)vse`{d@ZdKnitL diff --git a/users/remy.nix b/users/remy.nix index c005540..c737945 100644 --- a/users/remy.nix +++ b/users/remy.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: +with lib.hm.gvariant; { imports = [ + #../modules/home-manager/gnome-shell-customization.nix + ../modules/home-manager/fish.nix ../modules/home-manager/browser.nix ../modules/home-manager/code.nix ]; @@ -23,42 +26,14 @@ userEmail = "me@moll.re"; }; - programs.fish = { - enable = true; - # enableCompletion = true; - plugins = [ - { - name = "fzf-fish"; - src = pkgs.fetchFromGitHub { - owner = "PatrickF1"; - repo = "fzf.fish"; - rev = "v10.3"; - sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM="; - }; - } - # add others here - ]; - }; - - # sets the "default" shell to fish - # actually keeps bash as a posix-compliant default but starts fish if the shell is not bash - # See https://nixos.wiki/wiki/Fish - programs.bash = { - initExtra = '' - if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi - ''; - }; ## Gnome settings dconf.settings = { # set the keyboard layout to german "org/gnome/desktop/input-sources" = { - sources = "[('xkb', 'de'), ('xkb', 'ch'), ('xkb', 'us')]"; - xkb-options = "['lv3:ralt_switch']"; + current = mkUint32 0; + sources = [ (mkTuple [ "xkb" "de" ]) (mkTuple [ "xkb" "ch" ]) (mkTuple [ "xkb" "us" ]) ]; + xkb-options = [ "lv3:ralt_switch" ]; }; }; }