This commit is contained in:
2026-05-21 20:37:54 +09:00
parent 8efe0b9341
commit df41182acd
20 changed files with 152 additions and 57 deletions
+1
View File
@@ -7,5 +7,6 @@ All of stuff(Wallpapers, Scripts, etc.) packaged in single nix deriv.
* `zh.jpeg` - [じんだいじ-JINDAIJI-](https://jindaiji.fanbox.cc/posts/10183122)
* `cap_blow.png`[^1] - [シャポコ](https://www.pixiv.net/artworks/107214767)
* `cap_filter.png`[^1] - [シャポコ](https://www.pixiv.net/artworks/91199411)
* `su-30sm.png` - [Kerian_](https://www.pixiv.net/artworks/89246817)
[^1]: Not included as original file due to licensing. Download by yourself before compiling. When building/`nixos-rebuild`-ing with these gitignored files, please explicitly use `path:` directives to not using nix's git check/ignoring.
+1
View File
@@ -22,6 +22,7 @@
default = my-ricing-assets;
my-wallpapers = pkgs.callPackage ./wallpapers {};
my-scripts = pkgs.callPackage ./scripts {};
my-xkb-config = pkgs.callPackage ./xkb {};
};
overlays.default = final: prev: { my-ricing-assets = final.callPackage ./package.nix {}; };
}
+2
View File
@@ -2,11 +2,13 @@
let
my-scripts = pkgs.callPackage ./scripts {};
my-wallpapers = pkgs.callPackage ./wallpapers {};
my-xkb-config = pkgs.callPackage ./xkb {};
in
pkgs.symlinkJoin {
name = "my-ricing-assets";
paths = [
my-scripts
my-wallpapers
my-xkb-config
];
}
+5 -1
View File
@@ -1,8 +1,12 @@
{ pkgs, ... }:
let
misskey-scripts = pkgs.callPackage ./misskey.nix {};
feh-wallpaper = pkgs.callPackage ./feh-wallpaper.nix {};
in
pkgs.symlinkJoin {
name = "my-scripts";
paths = [misskey-scripts];
paths = [
misskey-scripts
feh-wallpaper
];
}
+19
View File
@@ -0,0 +1,19 @@
{ pkgs, ... }:
let
feh-wallpaper-getRandom = pkgs.writeShellApplication {
name = "feh-wallpaper-getRandom";
runtimeInputs = with pkgs; [
feh
];
text = ''
bgs=$MY_RICING_ASSETS_PATH/usr/local/share/wallpapers
feh --bg-fill --randomize "$bgs"/*
'';
};
in
pkgs.symlinkJoin {
name = "feh-wallpaper";
paths = [
feh-wallpaper-getRandom
];
}
+11 -12
View File
@@ -7,25 +7,24 @@ let
jq
];
text = ''
if [ ! -e /tmp//misskey-scripts/getLatestN1.fifo ]; then
if [ ! -e /tmp//misskey-scripts/getLatestN.fifo ]; then
mkdir -p /tmp/misskey-scripts
mkfifo /tmp/misskey-scripts/getLatestN1.fifo
fi
if [ ! -e /tmp//misskey-scripts/getLatestN2.fifo ]; then
mkdir -p /tmp/misskey-scripts
mkfifo /tmp/misskey-scripts/getLatestN2.fifo
mkfifo /tmp/misskey-scripts/getLatestN.fifo
fi
pipeLocation1=/tmp/misskey-scripts/getLatestN1.fifo
pipeLocation2=/tmp/misskey-scripts/getLatestN2.fifo
limitNum=$1
delim=$2
pipeLocation=/tmp/misskey-scripts/getLatestN.fifo
queryText='.[].text + '
queryText+='"'
queryText+="$delim"
queryText+='"'
curl https://misskey.io/api/notes -s --request POST --header 'Content-Type: application/json' --data "{\"local\": true, \"reply\": false, \"renote\": false, \"withFiles\": false, \"poll\": false, \"limit\": $1}" > "$pipeLocation1" &
jq -M -r '.[].text' < $pipeLocation1 > $pipeLocation2 &
jq -M -r "$queryText" <(curl https://misskey.io/api/notes -s --request POST --header 'Content-Type: application/json' --data "{\"local\": true, \"reply\": false, \"renote\": false, \"withFiles\": false, \"poll\": false, \"limit\": $limitNum}") > $pipeLocation &
while read -r line; do
echo "$line"
done < $pipeLocation2
done < $pipeLocation
wait
'';
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

+9
View File
@@ -0,0 +1,9 @@
{ stdenv, lib, ... }:
stdenv.mkDerivation {
name = "my-wallpapers";
src = ./.;
installPhase = ''
mkdir -p $out/usr/local/share/xkb
cp -r symbols $out/usr/local/share/xkb/
'';
}
+18
View File
@@ -0,0 +1,18 @@
partial alphanumeric_keys
xkb_symbols "my-sym" {
include "us(basic)"
include "inet(evdev)"
name[Group1] = "English (US) with modified right side keys";
key <RALT> {[ Return ], type[group1] = "ONE_LEVEL" };
key <RCTL> {[ Escape ], type[group1] = "ONE_LEVEL" };
key <DEL> { [ F13, Delete ], type[group1] = "TWO_LEVEL" };
key <INS> { [ F14, Insert ], type[group1] = "TWO_LEVEL" };
key <ESC> {[ F15 ]};
key <RET> {[ Control_R ], type[group1] = "ONE_LEVEL" };
replace key <CAPS> {[ Control_L ], type[group1] = "ONE_LEVEL" };
replace key <LCTL> {[ Caps_Lock ]};
modifier_map Control { <CAPS> };
modifier_map Lock { <LCTL> };
};
+18
View File
@@ -0,0 +1,18 @@
partial alphanumeric_keys modifier_keys
xkb_symbols "my-sym-dvp" {
include "us(dvp)"
include "inet(evdev)"
name[Group1] = "English (US, Programmer Dvorak) with modified right side keys";
key <RALT> {[ Return ], type[group1] = "ONE_LEVEL" };
key <RCTL> {[ Escape ], type[group1] = "ONE_LEVEL" };
key <DEL> { [ F13, Delete ], type[group1] = "TWO_LEVEL" };
key <INS> { [ F14, Insert ], type[group1] = "TWO_LEVEL" };
key <ESC> {[ F15 ]};
key <RET> {[ Control_R ], type[group1] = "ONE_LEVEL" };
replace key <CAPS> {[ Control_L ], type[group1] = "ONE_LEVEL" };
replace key <LCTL> {[ Caps_Lock ]};
modifier_map Control { <CAPS> };
modifier_map Lock { <LCTL> };
};