snowfallorg / nix-software-center

A simple gtk4/libadwaita software center to easily install and manage nix packages
GNU General Public License v3.0
598 stars 18 forks source link

Support for `home-manager` #22

Open Victor239 opened 1 year ago

Victor239 commented 1 year ago

I use non-NixOS, instead home-manager to manage my Nix packages. It would be appreciated if there was README information for how to install this software for this kind of setup.

ShalokShalom commented 7 months ago

I second that.

I tried the following:

{ config, pkgs, ... }:
let
  nix-software-center = import (pkgs.fetchFromGitHub {
    owner = "snowfallorg";
    repo = "nix-software-center";
    rev = "0.1.2";
    sha256 = "xiqF1mP8wFubdsAQ1BmfjzCgOD3YZf7EGWl9i69FTls=";
  }) {};
in
{
  # Home Manager needs a bit of information about you and the paths it should
  # manage.
  home.username = "shalokshalom";
  home.homeDirectory = "/home/shalokshalom";

  # This value determines the Home Manager release that your configuration is
  # compatible with. This helps avoid breakage when a new Home Manager release
  # introduces backwards incompatible changes.
  #
  # You should not change this value, even if you update Home Manager. If you do
  # want to update the value, then make sure to first check the Home Manager
  # release notes.
  home.stateVersion = "23.11"; # Please read the comment before changing.

  home.packages = with pkgs; [
    nix-software-center
  ];

  # Home Manager is pretty good at managing dotfiles. The primary way to manage
  # plain files is through 'home.file'.
  home.file = {
  };

  home.sessionVariables = {
    # EDITOR = "emacs";
  };

  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
}
home-manager switch  
                                                                               127 
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating linkGeneration
Cleaning up orphan links from /home/shalokshalom
No change so reusing latest profile generation 1
Creating home file links in /home/shalokshalom
Activating onFilesChange
Activating reloadSystemd
The user systemd session is degraded:
  UNIT                            LOAD   ACTIVE SUB    DESCRIPTION                          
● drkonqi-coredump-pickup.service loaded failed failed Consume pending crashes using DrKonqi

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

1 loaded units listed.
Attempting to reload services anyway...

There are 147 unread and relevant news items.
Read them by running the command "home-manager news".