Full Refactor and history reset
This commit is contained in:
34
scripts/new-elixir.nix
Normal file
34
scripts/new-elixir.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "new-elixir" ''
|
||||
nix-shell -p elixir --run "mix new $1 --sup"
|
||||
cd $1
|
||||
echo '
|
||||
{
|
||||
description = "$1";
|
||||
|
||||
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
erlang = pkgs.beam.packages.erlang_26.erlang;
|
||||
elixir = pkgs.beam.packages.erlang_26.elixir;
|
||||
in {
|
||||
devShells.''${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.fswatch
|
||||
erlang
|
||||
elixir
|
||||
pkgs.inotify-tools
|
||||
pkgs.lexical
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
' > flake.nix
|
||||
echo 'use flake' > .envrc
|
||||
direnv allow
|
||||
git init
|
||||
''
|
||||
8
scripts/nixclean.nix
Normal file
8
scripts/nixclean.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "nixclean" ''
|
||||
nix-collect-garbage -d
|
||||
sudo -v
|
||||
sudo nix-collect-garbage -d
|
||||
rebuild
|
||||
''
|
||||
9
scripts/nixupdate.nix
Normal file
9
scripts/nixupdate.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "nixupdate" ''
|
||||
cd /home/joe/.config/nix
|
||||
nix flake update
|
||||
sudo -v
|
||||
sudo nixos-rebuild --flake .#$hostname boot
|
||||
sudo reboot
|
||||
''
|
||||
7
scripts/rebuild-boot.nix
Normal file
7
scripts/rebuild-boot.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "rebuild-boot" ''
|
||||
sudo -v
|
||||
cd /home/joe/.config/nix
|
||||
sudo nixos-rebuild --flake .#$hostname boot
|
||||
''
|
||||
7
scripts/rebuild-dry.nix
Normal file
7
scripts/rebuild-dry.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "rebuild-dry" ''
|
||||
sudo -v
|
||||
cd /home/joe/.config/nix
|
||||
sudo nixos-rebuild --flake .#$hostname dry-build
|
||||
''
|
||||
7
scripts/rebuild.nix
Normal file
7
scripts/rebuild.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "rebuild" ''
|
||||
sudo -v
|
||||
cd /home/joe/.config/nix
|
||||
sudo nixos-rebuild --flake .#$hostname switch
|
||||
''
|
||||
7
scripts/sat-connect.nix
Normal file
7
scripts/sat-connect.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs }:
|
||||
|
||||
# nmcli dev wifi connect SIGMASat password `gpg -dq /home/joe/.wifi-password.gpg`
|
||||
pkgs.writeShellScriptBin "sat-connect" ''
|
||||
nmcli dev wifi list
|
||||
nmcli dev wifi connect SIGMASat password itsallstars
|
||||
''
|
||||
5
scripts/tat.nix
Normal file
5
scripts/tat.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellScriptBin "tat" ''
|
||||
tmux new -A -s $(basename $(pwd))
|
||||
''
|
||||
Reference in New Issue
Block a user