feat: packages
This commit is contained in:
parent
39f91ed113
commit
40f300f95a
7 changed files with 33 additions and 1 deletions
10
flake.nix
10
flake.nix
|
|
@ -50,6 +50,9 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
self.overlay
|
self.overlay
|
||||||
neovim-nightly-overlay.overlay
|
neovim-nightly-overlay.overlay
|
||||||
|
(final: prev: {
|
||||||
|
my = self.packages.${prev.system};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -130,5 +133,10 @@
|
||||||
daedalus = darwinSystem "aarch64-darwin" [ ./hosts/daedalus/default.nix ]; # TODO
|
daedalus = darwinSystem "aarch64-darwin" [ ./hosts/daedalus/default.nix ]; # TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
} // utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in {
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [lefthook nixpkgs-fmt];
|
||||||
|
};
|
||||||
|
packages = lib.my.mapModules ./packages (p: pkgs.callPackage p { inputs = inputs;});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
||||||
|
my.scripts
|
||||||
nnn
|
nnn
|
||||||
bat
|
bat
|
||||||
htop
|
htop
|
||||||
|
|
|
||||||
0
packages/.gitkeep
Normal file
0
packages/.gitkeep
Normal file
9
packages/scripts.nix
Normal file
9
packages/scripts.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ stdenv, ...}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "scripts";
|
||||||
|
src = ./scripts;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp * $out/bin
|
||||||
|
'';
|
||||||
|
}
|
||||||
8
packages/scripts/nosrebuild
Executable file
8
packages/scripts/nosrebuild
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
REV=$(curl https://api.github.com/repos/ragon000/nixos-config/branches/main | jq -r .commit.sha)
|
||||||
|
if [[ $(uname) == "Linux" ]]; then
|
||||||
|
sudo nixos-rebuild switch --flake "github:ragon000/nixos-config?rev=$REV"
|
||||||
|
else # Darwin
|
||||||
|
/nix/var/nix/profiles/system/sw/bin/darwin-rebuild switch --flake "github:ragon000/nixos-config?rev=$REV"
|
||||||
|
fi
|
||||||
3
packages/scripts/nr
Executable file
3
packages/scripts/nr
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
nix run nixpkgs#$1
|
||||||
3
packages/scripts/ns
Executable file
3
packages/scripts/ns
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
nix shell nixpkgs#$1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue