blob: abc68a39ea65d228c661afbed5681fcea6f3888e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{ options, config, lib, pkgs, namespace, ... }:
with lib; with lib.${namespace}; let
cfg = config.${namespace}.tools.rebuild;
in {
options.${namespace}.tools.rebuild = with types; {
enable = mkEnableOption "rebuild scripts";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(writeShellScriptBin "rb" "sudo nixos-rebuild switch --flake /etc/nixos")
(writeShellScriptBin "rbf" "sudo nixos-rebuild switch --flake path:/etc/nixos")
(writeShellScriptBin "rbb" "sudo nixos-rebuild build --flake path:/etc/nixos")
];
};
}
|