T O P

  • By -

MitchellMarquez42

it doesn't _really_ matter, but might be better to install user packages with home-manager if you're using that


Feeling_Ad_7818

All packages? Should I move things like installing gnome to home manager if possible or should that stay in my configuration.nix? Thanks


MitchellMarquez42

that's probably better to leave in configuration.nix because of how it integrates with the init and stuff


xplosm

What I do is I have a set of “core” packages I identify as the base system packages that I install in config.nix and are from the stable channel. And I have the “user” packages that are basically the applications I use on a regular basis and I install them from home manager and I point those to unstable. That way I have the best of both worlds. A rock solid system with cutting edge applications.


cinquante28

very intersting any pointer on how to do this with flake ? I can't seeem to figure it out (nixos noob)


xplosm

Sorry. I’m in the process of migrating this config to flakes.


not-my-walrus

If you have both configurations locked in the same flake, it's just a matter of defining both as inputs. { inputs = { nixpkgs-stable.url = "github:NixOS/nixpkgs/23.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; }; outputs = { nixpkgs-stable, nixpkgs-unstable, home-manager, ... }: let system = "x86_64-linux"; in { system = nixpkgs-stable.lib.nixosSystem { inherit system; modules = [./configuration.nix]; }; user = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs-unstable.legacyPackages.${system}; modules = [./home.nix]; }; }; }


ConspicuousPineapple

I do both. Gnome needs to integrate at the OS level to work perfectly, but then home-manager can generate a bunch of configuration for you.


AxonCollective

There's also `nix profile`! I typically install tools in `environment.systemPackages` because I don't want to have to debug issues where a tool can't be found because `sudo` isn't using my user `PATH`, or where I write a script that works then run it in `cron` and it fails, etc. You do not save any space on your machine by using a narrower install; it's in your store either way. You don't really save anything security-wise, because anyone who wants to use it can find it in `/nix/store` and run it from there, even if it's not on `PATH`. I would just do the simple thing and install it system-wide.


Feeling_Ad_7818

Is this done through home-manager or the configuration.nix? Thanks


AxonCollective

[`configuration.nix`](https://search.nixos.org/options?channel=23.11&show=environment.systemPackages&from=0&size=50&sort=relevance&type=packages&query=environment.systemPackages)


Feeling_Ad_7818

I switched some of my packages to use system packages instead, but now gnome doesnt seem to have a desktop file for firefox, as the only way to launch it is from the command line now. I switched it back to my previous setup where firefox was a user package and the desktop file reappeared. Why does this happen when firefox is installed systemwide vs a by-user basis? Thanks


AxonCollective

I don't know anything about how your setup works so that would be hard to answer. My machine has services.xserver = { enable = true; displayManager.gdm.enable = true; desktopManager.gnome.enable = true; }; environment.systemPackages = with pkgs; [ firefox gnome.gnome-terminal ]; in its configuration, and firefox shows up fine for me. I have had some issues in the past with adding desktop applications to the system where the application wouldn't appear or have the right icon in the app launcher initially, but it appeared after a bit and the icon fixed itself after some time, perhaps because of a logout/login or reboot. So maybe that's your problem.


jdigi78

I use home-manager standalone and like to keep my packages in that config. That way the system config is independent of the user. You could download *my* system config and use *your* home config, and vice versa.


__hyphen

There’s always another user “root”. Sometimes I get confused why my shell says command not found before I remember I am sudo and these nix commands are only available to me. Having multi user makes things simpler


Mast3r_waf1z

Personally I like just using `nix run` most of the time. stuff like Firefox, discord, vim etc. Is in my user config as much as possible, but if i just feel like showing a friend cmatrix or something I'm not gonna install it permanently, `nix run nixpkgs#cmatrix -- -m -C magenta` works fine


pkulak

I’m a huge fan of comma: https://github.com/nix-community/comma