diff --git a/home/base.nix b/home/base.nix index effff74..1f48cc0 100644 --- a/home/base.nix +++ b/home/base.nix @@ -1,12 +1,9 @@ { pkgs, ... }: - { home.username = "ayman"; home.homeDirectory = "/home/ayman"; home.stateVersion = "24.11"; - programs.home-manager.enable = true; - imports = [ ./modules/theme.nix ./modules/zsh.nix @@ -14,7 +11,6 @@ ./modules/git.nix ./modules/env.nix ]; - home.packages = with pkgs; [ ripgrep fd diff --git a/home/modules/env.nix b/home/modules/env.nix index 91d3316..9b0ec89 100644 --- a/home/modules/env.nix +++ b/home/modules/env.nix @@ -1,31 +1,13 @@ -{ ... }: - +{ lib, ... }: { home.sessionPath = [ "$HOME/.local/bin" - "$HOME/.config/emacs/bin" ]; - systemd.user.sessionVariables = { - # Terminal - TERMINAL = "kitty"; - - # Wayland - ELECTRON_OZONE_PLATFORM_HINT = "auto"; - NIXOS_OZONE_WL = "1"; - MOZ_ENABLE_WAYLAND = "1"; - QT_QPA_PLATFORM = "wayland"; - GDK_BACKEND = "wayland"; - SDL_VIDEODRIVER = "wayland"; - _JAVA_AWT_WM_NONREPARENTING = "1"; - - # Editor - EDITOR = "emacsclient -c -a nvim"; - VISUAL = "emacsclient -c -a nvim"; - SUDO_EDITOR = "nvim"; - - # Pager - PAGER = "bat --color auto"; - MANPAGER = "bat -plman"; + EDITOR = lib.mkDefault "nvim"; + VISUAL = lib.mkDefault "nvim"; + SUDO_EDITOR = "nvim"; + PAGER = "bat --color auto"; + MANPAGER = "bat -plman"; }; } diff --git a/home/profiles/desktop.nix b/home/profiles/desktop.nix index c9cc5f6..8b84462 100644 --- a/home/profiles/desktop.nix +++ b/home/profiles/desktop.nix @@ -7,7 +7,22 @@ ../modules/niri.nix ../modules/dms.nix ]; + home.sessionPath = [ + "$HOME/.config/emacs/bin" + ]; + systemd.user.sessionVariables = { + TERMINAL = "kitty"; + EDITOR = "emacsclient -c -a nvim"; + VISUAL = "emacsclient -c -a nvim"; + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + QT_QPA_PLATFORM = "wayland"; + GDK_BACKEND = "wayland"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + }; home.packages = with pkgs; [ -#desktop specific + # add desktop-specific packages here ]; } diff --git a/home/profiles/notebook.nix b/home/profiles/notebook.nix index 347b475..36448d9 100644 --- a/home/profiles/notebook.nix +++ b/home/profiles/notebook.nix @@ -1,5 +1,4 @@ { pkgs, ... }: - { imports = [ ../modules/kitty.nix @@ -8,6 +7,21 @@ ../modules/niri.nix ../modules/dms.nix ]; + home.sessionPath = [ + "$HOME/.config/emacs/bin" + ]; + systemd.user.sessionVariables = { + TERMINAL = "kitty"; + EDITOR = "emacsclient -c -a nvim"; + VISUAL = "emacsclient -c -a nvim"; + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + QT_QPA_PLATFORM = "wayland"; + GDK_BACKEND = "wayland"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + }; home.packages = with pkgs; [ powertop acpi