Skip to content
/ nixpm Public

An easy nix-env alternative that is actually reproducible.

License

Notifications You must be signed in to change notification settings

auth-xyz/nixpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Setting up (manual)

Its a bash script, for god's sake, git clone the repo and chmod +x the script.

git clone https://github.com/auth-xyz/nixpm
cd nixpm
chmod +x ./nixpm.sh

Setting up (home-manager)

This is the fun version of the setup. No need for git cloning this repo. Instead, you'll edit the flake.nix file on your home-manager

{
         inputs = {
           nixpm.url = "github:auth-xyz/nixpm";
         };

         outputs = { nixpkgs, home-manager, nixpm, ... }:
         let
            the two things here
         in {
            homeConfigurations thing {
                  inherit pkgs;
                  modules = [ ./home.nix ];
                  extraSpecialArgs = { inherit nixpm; };
            }
         };
}

Basically, add the nixpm.url to inputs, add nixpm to outputs, and the extraSpecialArgs. now moving to home.nix:

Almost the same thing, but in the first line

#{ config,pkgs,...} # you'll add nixpm, so
{ config, pkgs, nixpm, ... }:
{
 # ... the rest of your home
 home.packages = with pkgs; [ nixpm.packages.${pkgs.stdenv.hostPlatform.system}.nixpkg ];
}

And then, rebuild your home-manager. And you have nixpm installed.


Usage

./nixpm.sh packages here separated by spaces # this will go to .config/home-manager/
sudo ./nixpm.sh same thing as above # but the packages will be sent to /etc/nixos/


# ^-- basic usage 

nixpm.sh -r/--remove <packages>
         -a/--add (default) <packages>
         -h/--help 

Contributing

Feel free to contribute in any way you'd like, just make a PR. If you have any questions on how to use the source code/edit the code dm me on Discord <actually.auth>

About

An easy nix-env alternative that is actually reproducible.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published