This commit is contained in:
Daniella / Tove 2024-09-30 17:57:30 +02:00
parent db88269036
commit f426085c43
3 changed files with 44 additions and 0 deletions

22
README.md Normal file
View file

@ -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
```

12
dropfile.script.nix Normal file
View file

@ -0,0 +1,12 @@
with import <nixpkgs> {};
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/
''

10
pushfile.script.nix Normal file
View file

@ -0,0 +1,10 @@
with import <nixpkgs> {};
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
''