diff --git a/README.md b/README.md new file mode 100644 index 0000000..92a059f --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Setup + +on formatted drive: + +```sh +nixos-generate-config --root /mnt +vim /mnt/etc/nixos/hardware-configuration.nix +``` +insert +```nix +boot.loader.grub.device = "/dev/ d i s k "; +networking.hostName = "TudbuT-Nix m a c h i n e";' +``` +quit and: +```sh +nix-shell -p git +rm configuration.nix +cd /mnt/etc/nixos +git clone https://git.tudbut.de/tudbut/nix-setup +exit +nixos-install +``` diff --git a/dropfile.script.nix b/dropfile.script.nix new file mode 100644 index 0000000..0d89875 --- /dev/null +++ b/dropfile.script.nix @@ -0,0 +1,12 @@ +with import {}; + +pkgs.writeShellScriptBin "dropfile" '' + #!/bin/bash + echo dropping files: + for f in $@ ; do + echo "https://data.tudbut.de/$(basename $f)" + done + sleep 2 + + echo "rm $(for f in $@ ; do basename "$f" ; done)" | sftp -P 23 root@tudbut.de:/var/www/html/ +'' diff --git a/pushfile.script.nix b/pushfile.script.nix new file mode 100644 index 0000000..f06b096 --- /dev/null +++ b/pushfile.script.nix @@ -0,0 +1,10 @@ +with import {}; + +pkgs.writeShellScriptBin "pushfile" '' + #!/bin/bash + echo pushing files to data.tudbut.de: + scp -P 23 $@ root@tudbut.de:/var/www/html + for f in $@ ; do + echo "https://data.tudbut.de/$(basename $f)" + done +''