mood script

This commit is contained in:
Sridhar Ratnakumar 2023-10-06 12:55:50 -04:00
parent 79480e57a9
commit f8f29e8457
3 changed files with 14 additions and 0 deletions

View file

@ -20,6 +20,7 @@
# Dev
gh
fuckport
mood
];
home.shellAliases = rec {

12
packages/mood.nix Normal file
View file

@ -0,0 +1,12 @@
{ writeShellApplication, sqlite, ... }:
writeShellApplication {
name = "mood";
runtimeInputs = [ sqlite ];
text = ''
echo "Inserting mood: $1"
sqlite3 ~/.dioxus-desktop-template.db "INSERT INTO mood VALUES (CURRENT_TIMESTAMP, $1);"
echo "Displaying recent entries:"
sqlite3 ~/.dioxus-desktop-template.db "SELECT * FROM mood ORDER BY datetime DESC LIMIT 10;"
'';
}

View file

@ -1,3 +1,4 @@
self: super: {
fuckport = self.callPackage ./fuckport.nix { };
mood = self.callPackage ./mood.nix { };
}