Home manager preset

On the nix subsystem can I add this to my configuration.nix

users.users.elite = {
    isNormalUser = true;
    home-manager.useUserPackages = true;
    home-manager.useGlobalPkgs = true;
};

an have my home.nix not get reset every sudo nixos-rebuild switch

i have added garuda.excludes.home-manager-modules.excludeAll = true; but no luck

I would be more then happy to give more information if needed.

inxi -F
System:
  Host: elite-garuda Kernel: 6.12.1-cachyos arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.3 Distro: NixOS 25.05 (Warbler)
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-PRO v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 5013
    date: 03/22/2024
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP cache: L2: 4 MiB
  Speed (MHz): avg: 4310 min/max: 550/4426 cores: 1: 4323 2: 4311 3: 4302
    4: 4314 5: 4299 6: 4309 7: 4301 8: 4320 9: 4325 10: 4322 11: 4322 12: 4307
    13: 4305 14: 4301 15: 4303 16: 4304
Graphics:
  Message: Required tool lspci not installed. Check --recommends
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: N/A resolution: 3440x1440~144Hz
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: BurrBrown from Texas Instruments USB AUDIO CODEC
    driver: hid-generic,snd-usb-audio,usbhid type: USB
  API: ALSA v: k6.12.1-cachyos status: kernel-api
  Server-1: PipeWire v: 1.2.6 status: active
Network:
  Message: Required tool lspci not installed. Check --recommends
  IF-ID-1: enp6s0 state: up speed: 1000 Mbps duplex: full
    mac: d4:5d:64:d2:92:85
  IF-ID-2: wlan0 state: down mac: 8a:5c:27:3c:cd:90
Bluetooth:
  Device-1: N/A driver: btusb type: USB
  Report: hciconfig ID: hci0 state: up address: 48:51:B7:A3:19:51 bt-v: 4.0
Drives:
  Local Storage: total: 4.68 TiB used: 2.84 TiB (60.6%)
  ID-1: /dev/nvme0n1 vendor: HP model: SSD EX920 1TB size: 953.87 GiB
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 2TB size: 1.82 TiB
  ID-3: /dev/sda vendor: OCZ model: VERTEX3 size: 111.79 GiB
  ID-4: /dev/sdb vendor: Western Digital model: WD20EZAZ-00L9GB0
    size: 1.82 TiB
Partition:
  ID-1: / size: 1.8 TiB used: 1.38 TiB (76.7%) fs: btrfs dev: /dev/nvme1n1p2
Swap:
  ID-1: swap-1 type: zram size: 28.13 GiB used: 1.01 GiB (3.6%)
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 17.07 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme1n1p3
Sensors:
  System Temperatures: cpu: 47.0 C mobo: 44.0 C gpu: amdgpu temp: 62.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 606
Info:
  Memory: total: 32 GiB available: 31.25 GiB used: 7.87 GiB (25.2%)
  Processes: 457 Uptime: 0h 56m Shell: fish inxi: 3.3.35

In a recent issue (Disabling home-manager (#1) · Issues · Garuda Linux 🦅 / Garuda Nix Subsystem · GitLab), it was mentioned that for garuda.excludes.home-manager-modules.excludeAll = true; to work, you need to update to at least this configuration: fix: Add missing gCreateExclusionOption option entries (bfaa05a8) · Commits · Garuda Linux 🦅 / Garuda Nix Subsystem · GitLab

2 Likes

I did add garuda.excludes.home-manager-modules.excludeAll = true; And i do update when I wake up so i think I should be on that patch if not more current. Unless I had to change a config.

Note I use garuda-update then sudo nixos-rebuild switch then depending reboot.
I know I dont need the rebuild but its habbit now.

From the top of my config

{ config, pkgs, lib, ... }:
with lib;
{
    imports = [
    ./hardware-configuration.nix
    ];
    # Do not remove these subsystem settings
    garuda.subsystem.enable = true;
    garuda.managed.config = ./garuda-managed.json;

    garuda.dr460nized.enable = true;
    garuda.dr460nized.themePackage = null; # Null to bypass
    garuda.create-home.skel = "/dev/null";
    programs.fish.shellInit = "nitch";

     

    # This should never be changed unless you know exactly what you are doing.
    # This has no impact on any package updates or OS version.
    system.stateVersion = "24.05";

    #  imports = [ "${pkgs.home-manager}/modules/home-manager" ];

  # Enable LightDM
  services.xserver.displayManager.lightdm.enable = true;

  # Set the default session
  services.displayManager.defaultSession = "plasma"; # or "pantheon"

  # Enable Pantheon 
  services.xserver.desktopManager.pantheon.enable = true;

  # Enable Plasma 6 
  services.desktopManager.plasma6.enable = true;

  # Enable SDDM
  services.displayManager.sddm.enable = false;
# services.displayManager.sddm.wayland.enable = true;
  
  
fonts.enableDefaultPackages = false;
environment.variables = {
  GTK_THEME = lib.mkForce "";  # Or another theme of your choice
  QT_STYLE_OVERRIDE = "";
};


  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;
  
  # Programs & Services
  services.flatpak.enable = true;
  programs.steam.enable = true;
  programs.fish.enable = true;
  services.dbus.enable = true;
  services.ratbagd.enable = true;
  garuda.excludes.home-manager-modules.excludeAll = true;
1 Like