diff options
| author | Fuwn <[email protected]> | 2024-09-23 01:01:28 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-23 01:01:28 -0700 |
| commit | 1ead23b7e642a0306733b6552f3d56ffed85937a (patch) | |
| tree | 915404df4317daf9d109b03f53041d4ca64b8844 /home/ebisu | |
| parent | server: add beszel (diff) | |
| download | nixos-config-1ead23b7e642a0306733b6552f3d56ffed85937a.tar.xz nixos-config-1ead23b7e642a0306733b6552f3d56ffed85937a.zip | |
ebisu: set up rui notifier
Diffstat (limited to 'home/ebisu')
| -rw-r--r-- | home/ebisu/fortune/nix/default.nix | 13 | ||||
| -rw-r--r-- | home/ebisu/fortune/nix/rui.nix | 28 | ||||
| -rw-r--r-- | home/ebisu/fortune/scripts/default.nix | 25 | ||||
| -rw-r--r-- | home/ebisu/fortune/system/sops.nix | 1 |
4 files changed, 43 insertions, 24 deletions
diff --git a/home/ebisu/fortune/nix/default.nix b/home/ebisu/fortune/nix/default.nix index d2193d8..0de3430 100644 --- a/home/ebisu/fortune/nix/default.nix +++ b/home/ebisu/fortune/nix/default.nix @@ -1,14 +1,13 @@ { pkgs, inputs, - flakeDirectory, - config, ... }: { imports = [ ./development ./direnv.nix + ./rui.nix ]; home.packages = @@ -31,14 +30,4 @@ omnix.packages.${pkgs.system}.default nix-search.packages.${system}.default ]; - - programs.rui = { - enable = true; - - settings = { - notify = true; - editor = "code"; - flake = "${config.home.homeDirectory}/${flakeDirectory}"; - }; - }; } diff --git a/home/ebisu/fortune/nix/rui.nix b/home/ebisu/fortune/nix/rui.nix new file mode 100644 index 0000000..30afb5d --- /dev/null +++ b/home/ebisu/fortune/nix/rui.nix @@ -0,0 +1,28 @@ +{ + config, + flakeDirectory, + ... +}: +{ + programs.rui = { + enable = true; + + settings = { + notify = true; + # notifier = "${lib.getExe ( + # pkgs.writeShellScriptBin "rui-notifier" '' + # curl -X "POST" "https://api.day.app/$(cat ${config.sops.secrets.bark_api_key.path})" \ + # -H 'Content-Type: application/json; charset=utf-8' \ + # --silent \ + # -d '{ + # "body": "'"$2"'", + # "title": "'"$1"'", + # "icon": "https://nixos.wiki/images/thumb/2/20/Home-nixos-logo.png/207px-Home-nixos-logo.png" + # }' + # '' + # )}"; + editor = "code"; + flake = "${config.home.homeDirectory}/${flakeDirectory}"; + }; + }; +} diff --git a/home/ebisu/fortune/scripts/default.nix b/home/ebisu/fortune/scripts/default.nix index fe83721..26a1231 100644 --- a/home/ebisu/fortune/scripts/default.nix +++ b/home/ebisu/fortune/scripts/default.nix @@ -1,15 +1,16 @@ { pkgs, ... }: -let - scriptDir = ./scripts; - - generateScripts = builtins.listToAttrs ( - builtins.map (name: { - inherit name; - - value = pkgs.writeShellScriptBin name (builtins.readFile "${scriptDir}/${name}"); - }) (builtins.attrNames (builtins.readDir scriptDir)) - ); -in { - home.packages = builtins.attrValues generateScripts; + home.packages = + let + scriptsDirectory = ./scripts; + in + builtins.attrValues ( + builtins.listToAttrs ( + builtins.map (name: { + inherit name; + + value = pkgs.writeShellScriptBin name (builtins.readFile "${scriptsDirectory}/${name}"); + }) (builtins.attrNames (builtins.readDir scriptsDirectory)) + ) + ); } diff --git a/home/ebisu/fortune/system/sops.nix b/home/ebisu/fortune/system/sops.nix index 970c1dc..e0fb581 100644 --- a/home/ebisu/fortune/system/sops.nix +++ b/home/ebisu/fortune/system/sops.nix @@ -13,6 +13,7 @@ secrets = { openai_api_key = { }; suzuri_token = { }; + bark_api_key = { }; "proxy/i2p/http" = { }; "proxy/i2p/https" = { }; "proxy/i2p/socks5" = { }; |