pinwheel: Add timing script t
This commit is contained in:
@@ -120,6 +120,7 @@
|
||||
keyboard.enable = true;
|
||||
docker.enable = true;
|
||||
podman.enable = false;
|
||||
scripts.enable = true;
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
./docker
|
||||
./podman
|
||||
./k8s
|
||||
./scripts
|
||||
|
||||
./work
|
||||
];
|
||||
|
||||
22
hosts/pinwheel/modules/scripts/default.nix
Normal file
22
hosts/pinwheel/modules/scripts/default.nix
Normal 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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user