From 1f04150ff2c9922f3472435de3846d665401bf0e Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Fri, 28 Feb 2025 05:43:14 +0800 Subject: [PATCH] refactor: move remaining config into home-utils.nix to finalise modularising home-manager configuration --- modules/home-utils.nix | 21 +++++++++++++++++++++ users/rafiq/default.nix | 27 ++++++++------------------- 2 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 modules/home-utils.nix diff --git a/modules/home-utils.nix b/modules/home-utils.nix new file mode 100644 index 0000000..734c82b --- /dev/null +++ b/modules/home-utils.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + fastfetch # system info + wl-clipboard # provides cli copy and paste commands + ]; + + programs = { + # man page summaries (activate with tldr ) + tealdeer = { + enable = true; + enableAutoUpdates = true; + }; + }; + + services = { + # clipboard history (depends on wl-clipboard) + cliphist.enable = true; + }; +} diff --git a/users/rafiq/default.nix b/users/rafiq/default.nix index 6bef381..9eb22c6 100644 --- a/users/rafiq/default.nix +++ b/users/rafiq/default.nix @@ -8,30 +8,19 @@ ../../modules/home-wm.nix # window manager configs ../../modules/home-editor.nix # editor specific configs ../../modules/home-terminal.nix # terminal emulator configs + ../../modules/home-utils.nix # miscellaneous utilities ]; + # This enables using home-manager from the command line. + programs.home-manager.enable = true; + home = { username = "rafiq"; homeDirectory = "/home/rafiq"; - packages = [ - pkgs.fastfetch - pkgs.wl-clipboard - ]; + # This defines the version home-manager + # was originally bulit against on this system. + # Do not change it. + stateVersion = "25.05"; }; - - programs = { - tealdeer = { - enable = true; - enableAutoUpdates = true; - }; - - home-manager.enable = true; - }; - - services = { - cliphist.enable = true; - }; - - home.stateVersion = "25.05"; }