Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
17 lines
747 B
Nix
17 lines
747 B
Nix
# `nix run .#<app>`: install and key/secret helpers (see ../pkgs).
|
|
{ pkgs, ... }:
|
|
let
|
|
app = pkg: description: {
|
|
type = "app";
|
|
program = pkgs.lib.getExe pkg;
|
|
meta.description = description;
|
|
};
|
|
in
|
|
{
|
|
install = app pkgs.install-system "Install this flake onto this machine from the NixOS installer (wipes the configured disks)";
|
|
create-keys = app pkgs.create-keys "Create the SSH host key and Secure Boot keys in keys/<host>/";
|
|
set-password = app pkgs.set-password "Encrypt the login password into secrets/<user>-password.age";
|
|
secret-from-file = app pkgs.secret-from-file "Encrypt an existing file (e.g. an SSH key) as secrets/<name>.age";
|
|
switch = app pkgs.switch-system "Rebuild and switch this machine from the flake";
|
|
}
|