fix noti and pushover
This commit is contained in:
parent
e47040cace
commit
b26401cb83
5 changed files with 49 additions and 9 deletions
|
@ -1081,11 +1081,11 @@
|
|||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1688508041,
|
||||
"narHash": "sha256-A4o4KjFY+PhJXbSHppGLqs63nSAIqWvpyghYlrLbBjo=",
|
||||
"lastModified": 1692771442,
|
||||
"narHash": "sha256-ZyPeoIoDGh4Sfgpcx0grNDVDXNDmR1YHgU1K3z4x2EE=",
|
||||
"ref": "main",
|
||||
"rev": "b6f84d68d11029e1442b31a599f25b2a6aab4c6b",
|
||||
"revCount": 53,
|
||||
"rev": "0a13af540fe8fea07ca020be953b14923a80d25c",
|
||||
"revCount": 55,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-secrets.git"
|
||||
},
|
||||
|
|
|
@ -16,6 +16,7 @@ with lib;
|
|||
./kmonad.nix
|
||||
./taskwarrior.nix
|
||||
./style.nix
|
||||
./noti.nix
|
||||
];
|
||||
|
||||
config = mkIf config.components.gui.enable {
|
||||
|
|
|
@ -18,10 +18,6 @@ with lib;
|
|||
|
||||
home-manager.users.mainUser = {
|
||||
|
||||
# notify me when a command is finished
|
||||
programs.noti.enable = true;
|
||||
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Ingolf Wagner";
|
||||
|
|
37
nixos/components/gui/noti.nix
Normal file
37
nixos/components/gui/noti.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
# notify me when a command is finished
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.components.gui.noti.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.components.gui.enable;
|
||||
};
|
||||
|
||||
config = mkIf (config.components.gui.noti.enable) {
|
||||
|
||||
sops.secrets.pushover_user_key = { };
|
||||
sops.secrets.pushover_api_key = { };
|
||||
sops.templates."noti.yaml".owner = config.users.users.mainUser.name;
|
||||
sops.templates."noti.yaml".group = config.users.users.mainUser.group;
|
||||
sops.templates."noti.yaml".content = ''
|
||||
pushover:
|
||||
userKey: ${config.sops.placeholder.pushover_user_key}
|
||||
apiToken: ${config.sops.placeholder.pushover_api_key}
|
||||
'';
|
||||
|
||||
home-manager.users.mainUser = {
|
||||
home.packages = [
|
||||
(pkgs.writers.writeBashBin "noti" ''
|
||||
${pkgs.noti}/bin/noti --file ${config.sops.templates."noti.yaml".path} "$@"
|
||||
'')
|
||||
(pkgs.writers.writeBashBin "noti-pushover" ''
|
||||
${pkgs.noti}/bin/noti --pushover --file ${config.sops.templates."noti.yaml".path} "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
## not working :(
|
||||
#programs.noti.enable = true;
|
||||
#xdg.configFile."noti/noti.yaml".source = toString config.sops.templates."noti.yaml".path;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
# nixos-generate-config --no-filesystems --root /mnt
|
||||
# vim /mnt/configuration.nix
|
||||
# nixos-install
|
||||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
raid_disks = {
|
||||
"TOSHIBA_1360A003FVGG" = "/dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_1360A003FVGG";
|
||||
|
@ -13,6 +13,12 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
# ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when i nix build something.
|
||||
# copied from : https://github.com/numtide/srvos/blob/main/nixos/common/zfs.nix
|
||||
services.udev.extraRules = lib.optionalString (config.boot.zfs.enabled) ''
|
||||
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none"
|
||||
'';
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
root = {
|
||||
|
|
Loading…
Reference in a new issue