mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
mood script
This commit is contained in:
parent
79480e57a9
commit
f8f29e8457
3 changed files with 14 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
# Dev
|
||||
gh
|
||||
fuckport
|
||||
mood
|
||||
];
|
||||
|
||||
home.shellAliases = rec {
|
||||
|
|
|
|||
12
packages/mood.nix
Normal file
12
packages/mood.nix
Normal 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;"
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
self: super: {
|
||||
fuckport = self.callPackage ./fuckport.nix { };
|
||||
mood = self.callPackage ./mood.nix { };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue