feat: packages
This commit is contained in:
parent
39f91ed113
commit
40f300f95a
7 changed files with 33 additions and 1 deletions
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