From f06011e890850a6536018176164ba7f64837de58 Mon Sep 17 00:00:00 2001 From: jasmine Date: Sat, 8 Mar 2025 12:02:30 +0800 Subject: [PATCH] chore: refactor --- .../sajenim/features/desktop/default.nix | 16 ++++----- .../sajenim/features/desktop/gtk/default.nix | 15 -------- .../features/desktop/thunar/default.nix | 6 ++++ home-manager/sajenim/fuchsia.nix | 35 ++++++++++++------- nixos/common/global/env.nix | 3 +- nixos/common/users/sajenim/xmonad/default.nix | 14 ++++++++ nixos/fuchsia/configuration.nix | 6 ---- 7 files changed, 50 insertions(+), 45 deletions(-) delete mode 100644 home-manager/sajenim/features/desktop/gtk/default.nix create mode 100644 home-manager/sajenim/features/desktop/thunar/default.nix diff --git a/home-manager/sajenim/features/desktop/default.nix b/home-manager/sajenim/features/desktop/default.nix index 11fee0f..8423839 100644 --- a/home-manager/sajenim/features/desktop/default.nix +++ b/home-manager/sajenim/features/desktop/default.nix @@ -1,27 +1,23 @@ -{ - inputs, - pkgs, - ... -}: { +{inputs, ...}: { imports = [ ./cava ./discord ./dunst - ./gtk ./picom ./rofi + ./thunar ./wezterm ]; - home.packages = with pkgs; [ - feh - ]; - home.file = { + # Install patched fonts ".local/share/fonts" = { recursive = true; source = "${inputs.self}/pkgs/patched-fonts"; }; + # https://www.sainnhe.dev/post/patch-fonts-with-cursive-italic-styles/ + + # Configure the initialization of xinit ".xinitrc".source = ./xinitrc; }; } diff --git a/home-manager/sajenim/features/desktop/gtk/default.nix b/home-manager/sajenim/features/desktop/gtk/default.nix deleted file mode 100644 index fd8927f..0000000 --- a/home-manager/sajenim/features/desktop/gtk/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ...}: { - gtk = { - enable = true; - theme = { - name = "Gruvbox-Material-Dark"; - package = pkgs.unstable.gruvbox-material-gtk-theme; - }; - iconTheme.name = "Gruvbox-Material-Dark"; - }; - - home.packages = with pkgs; [ - xfce.thunar - xfce.ristretto - ]; -} diff --git a/home-manager/sajenim/features/desktop/thunar/default.nix b/home-manager/sajenim/features/desktop/thunar/default.nix new file mode 100644 index 0000000..81d7102 --- /dev/null +++ b/home-manager/sajenim/features/desktop/thunar/default.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + xfce.thunar + xfce.ristretto + ]; +} diff --git a/home-manager/sajenim/fuchsia.nix b/home-manager/sajenim/fuchsia.nix index 6ff1602..d2396c4 100644 --- a/home-manager/sajenim/fuchsia.nix +++ b/home-manager/sajenim/fuchsia.nix @@ -9,18 +9,27 @@ ./features/university ]; - home = { - packages = with pkgs; [ - # Graphics - gimp - # Hardware - piper - pulsemixer - # Multimedia - mpc-cli - ncmpcpp - # Browsers - firefox - ]; + # Packages for our user environment + home.packages = with pkgs; [ + # Graphics + gimp + # Hardware + piper + pulsemixer + # Multimedia + mpc-cli + ncmpcpp + # Browsers + firefox + ]; + + # Configure GTK 2/3 applications to use gruvbox-material + gtk = { + enable = true; + theme = { + name = "Gruvbox-Material-Dark"; + package = pkgs.unstable.gruvbox-material-gtk-theme; + }; + iconTheme.name = "Gruvbox-Material-Dark"; }; } diff --git a/nixos/common/global/env.nix b/nixos/common/global/env.nix index 306c743..5815294 100644 --- a/nixos/common/global/env.nix +++ b/nixos/common/global/env.nix @@ -19,7 +19,8 @@ nmap # network mapper xclip # clipboard ripgrep # searches the current directory for a regex pattern - sshfs # Mount filesystems over SSH + sshfs # mount filesystems over SSH + feh # image viewer # HTTP curl # transfer dato to/from server diff --git a/nixos/common/users/sajenim/xmonad/default.nix b/nixos/common/users/sajenim/xmonad/default.nix index 9df0e98..18472b9 100644 --- a/nixos/common/users/sajenim/xmonad/default.nix +++ b/nixos/common/users/sajenim/xmonad/default.nix @@ -3,7 +3,21 @@ inputs, ... }: { + # Install our XMonad and Xmobar configuration environment = { systemPackages = [inputs.xmonad-config.packages.${pkgs.system}.default]; }; + + # Required dependencies for our xfce/gtk programs + programs = { + # Configuration storage system for xfce + xfconf.enable = true; + }; + + services = { + # Mount, trash, and other functionalities + gvfs.enable = true; + # Thumbnail support for images + tumbler.enable = true; + }; } diff --git a/nixos/fuchsia/configuration.nix b/nixos/fuchsia/configuration.nix index b03032e..95b3234 100644 --- a/nixos/fuchsia/configuration.nix +++ b/nixos/fuchsia/configuration.nix @@ -37,18 +37,12 @@ direnv.enable = true; # Android debug bridge: communicate with devices adb.enable = true; - # Configuration storage system for xfce - xfconf.enable = true; }; # Configure services services = { # Access smart cards using SCard API pcscd.enable = true; - # Mount, trash, and other functionalities - gvfs.enable = true; - # Thumbnail support for images - tumbler.enable = true; }; # Manage linux containers