pinwheel: Add timing script t

This commit is contained in:
Alexander Heldt
2023-10-04 18:06:02 +02:00
parent 7216d66b89
commit fb9fa7ca9c
3 changed files with 24 additions and 0 deletions

View File

@@ -120,6 +120,7 @@
keyboard.enable = true; keyboard.enable = true;
docker.enable = true; docker.enable = true;
podman.enable = false; podman.enable = false;
scripts.enable = true;
}; };
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View File

@@ -30,6 +30,7 @@
./docker ./docker
./podman ./podman
./k8s ./k8s
./scripts
./work ./work
]; ];

View File

@@ -0,0 +1,22 @@
{ pkgs, lib, config, ... }:
let
enabled = config.mod.scripts.enable;
t = pkgs.writeShellScriptBin "t" ''
bash -c "$*"
${pkgs.libnotify}/bin/notify-send "CMD ended:" "$*"
'';
in
{
options = {
mod.scripts = {
enable = lib.mkEnableOption "add scripts module";
};
};
config = lib.mkIf enabled {
home-manager.users.alex = {
home.packages = [ t ];
};
};
}