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
AWS_FILE=$(eval echo "~$SUDO_USER/.aws/credentials") | |
if eval [ -e "$AWS_FILE" ]; then | |
if [ -z "${AWS_PROFILE+UNSET}" ]; then | |
printf 'AWS credentials file(%s) exists. Use [ --no-aws | --aws profile ].' "~$SUDO_USER/.aws/credentials" | |
exit 2 | |
fi | |
if [ ! -z "$AWS_PROFILE" ]; then | |
{ read AWS_ACCESS_KEY_ID; | |
read AWS_SECRET_ACCESS_KEY; |
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
{ | |
services.duplicity-system.extraExcludes = [ | |
/desktop | |
/desktop-new | |
/etc/nixos/nixpkgs | |
/etc/nixos/nixpkgs-3.0 | |
/hdd | |
/home | |
/root | |
/zfs |
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
read -r -d '' CONFIGURATION <<EOF | |
{ | |
imports = | |
[ <restore/configuration.nix> | |
/etc/nixos/duplicity-backup-config.nix | |
]; | |
NixOSEncryptedLiveCD.rootdevice = "$ROOT_DEV"; | |
NixOSEncryptedLiveCD.bootdevice = "$BOOT_DEV"; |
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
cat <<EOF | |
y="1" | |
${X+x="$X"} | |
EOF | |
y="1" | |
x=1 |
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
{ pkgs | |
, ... | |
}: | |
{ | |
imports = [ | |
/home/myrl/Development/nix-duplicity-backup/duplicity-backup.nix | |
/home/myrl/Development/nix-duplicity-backup/duplicity-system.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
struct event | |
event_getevent() | |
{ | |
for (;;) | |
{ | |
errno = 0; | |
int c = getch(); | |
switch (c) |
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
[ 8.596] | |
X.Org X Server 1.20.4 | |
X Protocol Version 11, Revision 0 | |
[ 8.596] Build Operating System: Linux 4.19.17 x86_64 | |
[ 8.596] Current Operating System: Linux myrl 4.19.48 #1-NixOS SMP Tue Jun 4 06:02:35 UTC 2019 x86_64 | |
[ 8.596] Kernel command line: initrd=\efi\nixos\y913a6rdn89lz55za32bjzfb3lb71507-initrd-initrd.efi systemConfig=/nix/store/835wsx0x5hb32a9gf43kwjg97mgk8ibh-nixos-system-myrl-19.03.git.caacbe9 init=/nix/store/835wsx0x5hb32a9gf43kwjg97mgk8ibh-nixos-system-myrl-19.03.git.caacbe9/init loglevel=4 | |
[ 8.596] Build Date: 26 February 2019 07:29:26PM | |
[ 8.596] | |
[ 8.596] Current version of pixman: 0.36.0 | |
[ 8.596] Before reporting problems, check http://wiki.x.org |
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
(let ((bootstrap-file (concat user-emacs-directory "straight/repos/straight.el/bootstrap.el")) | |
(bootstrap-version 3)) | |
(unless (file-exists-p bootstrap-file) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" | |
'silent 'inhibit-cookies) | |
(goto-char (point-max)) | |
(eval-print-last-sexp))) | |
(load bootstrap-file nil 'nomessage)) |
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
case Enum.at(threads, index + 1) do | |
nil -> model | |
selected_ -> Map.replace!(model, :selected, selected_) | |
end |
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
index = Enum.find_index(threads, &(selected == &1)) | |
if index == length threads - 1 do | |
model | |
else | |
Map.replace!(model, :selected, Enum.at(threads, index + 1)) | |
end |