This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ journalctl -f -u XXXXXXXX.service | |
| -- Logs begin at Sat 2019-06-08 19:04:55 -05. -- | |
| Aug 11 21:16:07 auto systemd[1]: XXXXXXXX.service: Succeeded. | |
| Aug 11 21:16:07 auto systemd[1]: Started XXXXXXXX.service. | |
| Aug 11 21:20:06 auto systemd[1]: Starting XXXXXXXX.service... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ systemctl list-timers --all | |
| NEXT LEFT LAST PASSED UNIT ACTIVATES | |
| Mon 2019-08-12 00:00:00 -05 3h 0min left n/a n/a borgbackup-job-main.timer borgbackup-job-main.service | |
| Mon 2019-08-12 00:00:00 -05 3h 0min left n/a n/a docker-prune.timer docker-prune.service | |
| Mon 2019-08-12 00:00:00 -05 3h 0min left n/a n/a nix-gc.timer nix-gc.service | |
| Mon 2019-08-12 00:00:00 -05 3h 0min left n/a n/a restic-backups-home.timer restic-backups-home.service | |
| Mon 2019-08-12 01:41:24 -05 4h 42min left Sun 2019-08-11 19:41:24 -05 1h 17min ago update-dnscrypt-resolvers.timer update-dnscrypt-resolvers.service | |
| Mon 2019-08-12 19:51:35 -05 22h left Sun 2019-08-11 19:51:35 -05 1h 7min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sign-up at https://www.borgbase.com/ | |
| # Generate key pair (password? luks?) | |
| $ ssh-keygen -o -a 100 -t ed25519 | |
| # Upload public key to borgbase as APPEND-ONLY | |
| $ cat ~/.ssh/id_ed25519.pub | |
| # Check plan capacity vs total backup size, then pay! ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sign-up at https://www.backblaze.com/ and raise the CAPS | |
| # Setup parameters on the environment | |
| $ export B2_ACCOUNT_ID=X | |
| $ export B2_ACCOUNT_KEY=Y | |
| $ export RESTIC_REPOSITORY=b2:ralvarezc:auto | |
| $ export RESTIC_PASSWORD_FILE=$HOME/.secrets/restic | |
| # Install restic | |
| $ nix-env -i restic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cryptsetup luksDump /dev/nvme0n1p1 | |
| (only one slot used) | |
| $ dd if=/dev/urandom of=./keyfile.bin bs=1024 count=4 | |
| $ cryptsetup luksAddKey /dev/nvme0n1p1 ./keyfile.bin | |
| (two slots used, 0 for passphrase, 1 for keyfile) | |
| $ cryptsetup luksDump /dev/nvme0n1p1 | |
| $ sudo su - | |
| # echo ./keyfile.bin | cpio -o -H newc -R +0:+0 --reproducible | gzip -9 > /boot/initrd.keys.gz | |
| ## Edit configuration.nix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nix-env -e vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nix-env -i vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nix-env -qaP '*'|grep vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ralvarez@auto ~ sudo nixos-rebuild switch --upgrade --keep-going |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ralvarez@auto ~ du -sh /nix | |
| 47G /nix | |
| ralvarez@auto ~ sudo nix-store --optimise | |
| 13313.45 MiB freed by hard-linking 1486666 files | |
| ralvarez@auto ~ du -sh /nix | |
| 30G /nix |