pinwheel: Add timing script t
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
./docker
|
./docker
|
||||||
./podman
|
./podman
|
||||||
./k8s
|
./k8s
|
||||||
|
./scripts
|
||||||
|
|
||||||
./work
|
./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