feat: use my go note program instead of script
This commit is contained in:
parent
76c32d89ce
commit
32eab8a42d
5 changed files with 128 additions and 82 deletions
151
flake.lock
generated
151
flake.lock
generated
|
|
@ -171,11 +171,11 @@
|
|||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760986121,
|
||||
"narHash": "sha256-ilwuwZDPh0pNPTUYKUQQarAnwJwsggr60lQyae5R1vc=",
|
||||
"lastModified": 1761326352,
|
||||
"narHash": "sha256-DoR4mHaStX6Dg2Gilc2Dqr/XaxXmQTOQS5cZ5xKPQJY=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "45286364d2570149037013a4fa098709776bdb41",
|
||||
"rev": "6492dc810f2f250ef95096910a44f03eea6a594f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -559,7 +559,25 @@
|
|||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_11"
|
||||
"systems": "systems_9"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_5": {
|
||||
"inputs": {
|
||||
"systems": "systems_12"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
|
|
@ -575,9 +593,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_5": {
|
||||
"flake-utils_6": {
|
||||
"inputs": {
|
||||
"systems": "systems_12"
|
||||
"systems": "systems_13"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
|
|
@ -781,6 +799,31 @@
|
|||
}
|
||||
},
|
||||
"gomod2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"note",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"note",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759991118,
|
||||
"narHash": "sha256-pDyrtUQyeP1lVTMIYqJtftzDtsXEZaJjYy9ZQ/SGhL8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"rev": "7f8d7438f5870eb167abaf2c39eea3d2302019d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gomod2nix_2": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"upfast",
|
||||
|
|
@ -879,11 +922,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760929667,
|
||||
"narHash": "sha256-nZh6uvc71nVNaf/y+wesnjwsmJ6IZZUnP2EzpZe48To=",
|
||||
"lastModified": 1761266473,
|
||||
"narHash": "sha256-QxCyKWBmuzI+eMhYV1JmbZsiUnBNATRP1EW34OBt5Vg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "189c21cf879669008ccf06e78a553f17e88d8ef0",
|
||||
"rev": "5c71d4a730bd3c972befff343bb074421e345937",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1356,11 +1399,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760534924,
|
||||
"narHash": "sha256-OIOCC86DxTxp1VG7xAiM+YABtVqp6vTkYIoAiGQMqso=",
|
||||
"lastModified": 1761202163,
|
||||
"narHash": "sha256-6RySf5VQElrm7RYGWxlIkNttemDp4FF0aH+LX435G2Y=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "100b4e000032b865563a9754e5bca189bc544764",
|
||||
"rev": "47976126007d9658ca4ac4dd933bea8846170fd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1715,6 +1758,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_14": {
|
||||
"locked": {
|
||||
"lastModified": 1760524057,
|
||||
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"locked": {
|
||||
"lastModified": 1759386674,
|
||||
"narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=",
|
||||
|
|
@ -1730,7 +1789,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"nixpkgs_16": {
|
||||
"locked": {
|
||||
"lastModified": 1709237383,
|
||||
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
||||
|
|
@ -1746,7 +1805,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_16": {
|
||||
"nixpkgs_17": {
|
||||
"locked": {
|
||||
"lastModified": 1704842529,
|
||||
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
|
||||
|
|
@ -1796,11 +1855,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1760878510,
|
||||
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
|
||||
"lastModified": 1761114652,
|
||||
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
|
||||
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1944,6 +2003,26 @@
|
|||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"note": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"gomod2nix": "gomod2nix",
|
||||
"nixpkgs": "nixpkgs_14"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761426592,
|
||||
"narHash": "sha256-xFiFhWyy6Jx3kvdteIQWuKKxMBRMkKob5aPF+cw8hsA=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "e6eaf8db54d2d0c4cafce37fa3800aa83e4056ff",
|
||||
"revCount": 5,
|
||||
"type": "git",
|
||||
"url": "https://git.cronyakatsuki.xyz/crony/note"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.cronyakatsuki.xyz/crony/note"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
|
|
@ -1974,8 +2053,8 @@
|
|||
"flake-compat": "flake-compat_8",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"mnw": "mnw",
|
||||
"nixpkgs": "nixpkgs_14",
|
||||
"systems": "systems_9"
|
||||
"nixpkgs": "nixpkgs_15",
|
||||
"systems": "systems_10"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761112426,
|
||||
|
|
@ -2039,9 +2118,9 @@
|
|||
"pre-commit-hooks_3": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_9",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"gitignore": "gitignore_5",
|
||||
"nixpkgs": "nixpkgs_16",
|
||||
"nixpkgs": "nixpkgs_17",
|
||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -2079,6 +2158,7 @@
|
|||
"nix-index-database": "nix-index-database",
|
||||
"nix-on-droid": "nix-on-droid",
|
||||
"nixpkgs": "nixpkgs_13",
|
||||
"note": "note",
|
||||
"nvf": "nvf",
|
||||
"stylix": "stylix",
|
||||
"upfast": "upfast",
|
||||
|
|
@ -2111,11 +2191,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760927964,
|
||||
"narHash": "sha256-+TjujgwBpeN0aaQ/lZQ8UPsWl9oEaihgbt6FvxTlpZk=",
|
||||
"lastModified": 1761273263,
|
||||
"narHash": "sha256-6d6ojnu6A6sVxIjig8OL6E1T8Ge9st3YGgVwg5MOY+Q=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6b1e691089a62d0852f9d3fd6693ee027bc98ac3",
|
||||
"rev": "28405834d4fdd458d28e123fae4db148daecec6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -2171,7 +2251,7 @@
|
|||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur",
|
||||
"systems": "systems_10",
|
||||
"systems": "systems_11",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
|
|
@ -2252,6 +2332,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_13": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
|
|
@ -2476,9 +2571,9 @@
|
|||
},
|
||||
"upfast": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"gomod2nix": "gomod2nix",
|
||||
"nixpkgs": "nixpkgs_15",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"gomod2nix": "gomod2nix_2",
|
||||
"nixpkgs": "nixpkgs_16",
|
||||
"pre-commit-hooks": "pre-commit-hooks_3"
|
||||
},
|
||||
"locked": {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@
|
|||
# My selfhosted service, inspired by 0x0.st
|
||||
upfast.url = "git+https://git.cronyakatsuki.xyz/crony/UpFast";
|
||||
|
||||
# My note management app
|
||||
note.url = "git+https://git.cronyakatsuki.xyz/crony/note";
|
||||
|
||||
# My custom script for downloading humble bundle bundle's
|
||||
hb-downloader.url = "git+https://git.cronyakatsuki.xyz/crony/hb-downloader";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
cd "$SECOND_BRAIN"/notes || exit 1
|
||||
nvim .
|
||||
exit 0
|
||||
fi
|
||||
|
||||
open_file() {
|
||||
cd "$SECOND_BRAIN"/notes || exit 1
|
||||
nvim "${1}.md"
|
||||
}
|
||||
|
||||
remove_file() {
|
||||
cd "$SECOND_BRAIN"/notes || exit 1
|
||||
if [ -f "${1}.md" ]; then
|
||||
rm "${1}.md"
|
||||
else
|
||||
echo "File didn't exist"
|
||||
fi
|
||||
}
|
||||
|
||||
list_notes() {
|
||||
cd "$SECOND_BRAIN"/notes || exit 1
|
||||
eza --icons always --git --group-directories-first -l
|
||||
}
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
case "$1" in
|
||||
"-l")
|
||||
list_notes
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
open_file "$1"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
elif [ $# -ne 2 ]; then
|
||||
echo "You need to provide action and file name."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
"-d")
|
||||
remove_file "$2"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -29,7 +29,5 @@ with pkgs;
|
|||
--prefix PATH : ${lib.makeBinPath [ffmpeg cudatoolkit]}
|
||||
|
||||
# Add dependencis for note script
|
||||
wrapProgram $out/bin/note \
|
||||
--prefix PATH : ${lib.makeBinPath [eza]}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
inputs.agenix.packages.${system}.default
|
||||
inputs.deploy-rs.packages.${system}.default
|
||||
inputs.hb-downloader.packages.${system}.default
|
||||
inputs.note.packages.${system}.default
|
||||
beets
|
||||
croc
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue