Skip to content

Commit 98a3a0d

Browse files
committed
piper wip
1 parent babb422 commit 98a3a0d

File tree

7 files changed

+101
-7
lines changed

7 files changed

+101
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.direnv
22
result
33
dist-newstyle
4+
bak
5+
out

cfg/q3.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ set xp_name Functora
7575
set l1 "echo GAUNTLET"
7676
set l2 "echo MINIGUN"
7777
set l3 "echo SHOTGUN"
78-
set l4 "echo GRENADE"
78+
set l4 "echo LIGHTNING"
7979
set l5 "echo PLASMA"
80-
set l6 "echo LIGHTNING"
80+
set l6 "echo GRENADE"
8181
set l7 "echo ROCKET"
8282
set l8 "echo RAILGIN"
8383
set l9 "echo BFG"
8484

8585
set w1 "weapon 1"
8686
set w2 "weapon 2"
8787
set w3 "weapon 3"
88-
set w4 "weapon 4"
88+
set w4 "weapon 6"
8989
set w5 "weapon 8"
90-
set w6 "weapon 6"
90+
set w6 "weapon 4"
9191
set w7 "weapon 5"
9292
set w8 "weapon 7"
9393
set w9 "weapon 9"
@@ -108,9 +108,9 @@ set c9 "vstr l9; vstr w9; set l vstr l9; set w vstr w9; set fast vstr best"
108108
bind 1 "vstr c1"
109109
bind x "vstr c2"
110110
bind t "vstr c3"
111-
bind g "vstr c4"
111+
bind z "vstr c4"
112112
bind v "vstr c5"
113-
bind z "vstr c6"
113+
bind g "vstr c6"
114114
bind f "vstr c7"
115115
bind c "vstr c8"
116116
bind b "vstr c9"

nix/bak.nix

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
let
2+
pkgs = import ./nixpkgs.nix;
3+
prev = "bak-v0.1.0.0";
4+
next = "bak-v0.1.0.0";
5+
# prev-derivation = builtins.fetchurl {
6+
# url = "https://github.com/functora/functora.github.io/releases/download/${prev}/${prev}.tar.gz.age";
7+
# sha256 = "";
8+
# };
9+
in {
10+
bak-status = pkgs.writeShellApplication {
11+
name = "bak-status";
12+
text = ''
13+
cd ${toString ../.}/bak
14+
sha256sum -c checksums.txt 2>&1 | grep -v ': OK$' || true
15+
find . -type f ! -name checksums.txt -exec sh -c 'f="''${1#./}"; grep -q "$f" checksums.txt || echo "$1 NEW"' sh {} \;
16+
echo "bak-status ==> completed ${next}"
17+
'';
18+
};
19+
bak-commit = pkgs.writeShellApplication {
20+
name = "bak-commit";
21+
text = ''
22+
cd ${toString ../.}/bak
23+
find . -type f ! -name 'checksums.txt' \
24+
-exec sha256sum {} \; > checksums.txt
25+
echo "bak-commit ==> completed ${next}"
26+
'';
27+
};
28+
bak-encrypt = pkgs.writeShellApplication {
29+
name = "bak-encrypt";
30+
text = ''
31+
cd ${toString ../.}
32+
tar -czf ./out/${next}.tar.gz ./bak
33+
${pkgs.age}/bin/age \
34+
--encrypt \
35+
--passphrase \
36+
--output ./out/${next}.tar.gz.age \
37+
./out/${next}.tar.gz
38+
echo "bak-encrypt ==> completed ${next}"
39+
'';
40+
};
41+
# bak-decrypt = pkgs.writeShellApplication {
42+
# name = "bak-decrypt";
43+
# text = ''
44+
# cd ${toString ../.}
45+
# ${pkgs.age}/bin/age \
46+
# --decrypt \
47+
# --output ./out/${pkg}.tar.gz \
48+
# ${prev-derivation}
49+
# tar -xzf ./out/${pkg}.tar.gz ./
50+
# '';
51+
# };
52+
}

nix/configuration.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ in {
408408
"activision_blizzard"
409409
"aliexpress"
410410
"amazon_streaming"
411-
"amazon"
411+
# "amazon"
412412
"amino"
413413
"apple_streaming"
414414
"battle_net"
@@ -850,6 +850,11 @@ in {
850850
import ./tabby-admin.nix {sock = "./tabby.sock";}
851851
}/bin/tabby-admin";
852852
}
853+
// fj.mkFirejailCustom {
854+
pkg = "piper";
855+
dir = "piper";
856+
exe = "${import ./piper.nix}/bin/piper";
857+
}
853858
// fj.mkFirejailOffline {
854859
pkg = "vi";
855860
exe = "${
@@ -918,6 +923,7 @@ in {
918923
qmk
919924
qmk-setup
920925
# cura
926+
git-lfs
921927
lesspass-cli
922928
# mkdir -p ~/macos/Public
923929
# cd ~/macos
@@ -938,6 +944,7 @@ in {
938944
];
939945
programs.git = {
940946
enable = true;
947+
lfs.enable = true;
941948
userName = "functora";
942949
userEmail = "[email protected]";
943950
};

nix/piper-voices.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
let
2+
pkgs = import ./nixpkgs.nix;
3+
in
4+
pkgs.fetchgit {
5+
url = "https://huggingface.co/rhasspy/piper-voices";
6+
rev = "e1686869b0722bd873ee3154fe19d32e5f593322";
7+
sha256 = "sha256-sldoRdODmy1HAfA2y0ozonjq3s63IZSvpkKoMHhXvO0=";
8+
fetchLFS = true;
9+
}

nix/piper.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let
2+
pkgs = import ./nixpkgs.nix;
3+
in
4+
pkgs.writeShellApplication {
5+
name = "piper";
6+
text = ''
7+
export PIPER_VOICES="${import ./piper-voices.nix}"
8+
cmd="$*"
9+
eval "set -- $cmd"
10+
echo "==> show"
11+
echo "$@"
12+
echo "==> eval"
13+
${pkgs.piper-tts}/bin/piper "$@"
14+
'';
15+
}

nix/shell.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
with (import ./project.nix {}); let
2+
bak = import ./bak.nix;
23
misc = import ./misc.nix;
34
newpkgs = import ./newpkgs.nix;
45
in
@@ -20,6 +21,10 @@ in
2021
pkgs.elixir
2122
newpkgs.litecli
2223
misc.nix-bundle
24+
bak.bak-status
25+
bak.bak-commit
26+
bak.bak-encrypt
27+
# bak.bak-decrypt
2328
]
2429
++ (import ./tools.nix)
2530
++ (import ./../pub/dazzle/nix/tools.nix)
@@ -29,4 +34,8 @@ in
2934
++ (pkgs.lib.optional
3035
(builtins.pathExists ./../prv/nix/tools.nix)
3136
(import ./../prv/nix/tools.nix));
37+
shellHook = ''
38+
mkdir -p ${toString ../.}/bak
39+
mkdir -p ${toString ../.}/out
40+
'';
3241
}

0 commit comments

Comments
 (0)