mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
- Add the agent profile (modules/nixos/agent.nix: rootless Podman, linger, nix-ld) with home/linux/tui.nix as its home role; ruby, kana and aquamarine use it, so hosts no longer import from hosts/idols-ruby. - Gate nushell's ~/.secrets source behind modules.shell.secrets.enable, off on agent hosts. - Persist the TUI home state on aquamarine's tmpfs root. - Document host profiles in hosts/README.md; add tests/agent-profile and drop the x86_64 colmena-parity test, which needs mysecrets. Assisted-by: Claude Code (claude-opus-5-5)
63 lines
2.2 KiB
Nix
63 lines
2.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
nu_scripts,
|
|
...
|
|
}:
|
|
{
|
|
options.modules.shell.secrets.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Source ~/.secrets/nushell-secrets.nu, which only the desktops sync.";
|
|
};
|
|
|
|
config.programs.nushell = {
|
|
# the file must exist, otherwise nushell will complain about it!
|
|
#
|
|
# currently, nushell does not support conditional sourcing of files
|
|
# https://github.com/nushell/nushell/issues/8214
|
|
extraConfig = ''
|
|
${lib.optionalString config.modules.shell.secrets.enable ''
|
|
# decrypted secret: AI agents must not read it
|
|
source ${config.home.homeDirectory}/.secrets/nushell-secrets.nu
|
|
''}
|
|
|
|
# Directories in this constant are searched by the
|
|
# `use` and `source` commands.
|
|
const NU_LIB_DIRS = $NU_LIB_DIRS ++ ['${nu_scripts}']
|
|
|
|
# -*- completion -*-
|
|
use custom-completions/cargo/cargo-completions.nu *
|
|
use custom-completions/curl/curl-completions.nu *
|
|
use custom-completions/git/git-completions.nu *
|
|
use custom-completions/glow/glow-completions.nu *
|
|
use custom-completions/just/just-completions.nu *
|
|
use custom-completions/make/make-completions.nu *
|
|
use custom-completions/man/man-completions.nu *
|
|
use custom-completions/nix/nix-completions.nu *
|
|
use custom-completions/ssh/ssh-completions.nu *
|
|
use custom-completions/tar/tar-completions.nu *
|
|
use custom-completions/tcpdump/tcpdump-completions.nu *
|
|
use custom-completions/zoxide/zoxide-completions.nu *
|
|
|
|
# -*- alias -*-
|
|
use aliases/git/git-aliases.nu *
|
|
use aliases/eza/eza-aliases.nu *
|
|
use aliases/bat/bat-aliases.nu *
|
|
use ${./aliases/gcloud.nu} *
|
|
|
|
# -*- modules -*-
|
|
# argx & lg is required by the kubernetes module
|
|
# NOTE: use a prefixed import (not `*`), otherwise argx's `parse` command
|
|
# would shadow nushell's builtin `parse`, breaking scripts that rely on
|
|
# the builtin (e.g. fzf's nushell integration uses `parse --regex`)
|
|
use modules/argx
|
|
use modules/lg
|
|
# k8s/helm aliases, completions,
|
|
use modules/kubernetes *
|
|
# a wrapper around the jc cli tool, convert cli outputs to nushell tables
|
|
# use modules/jc
|
|
'';
|
|
};
|
|
}
|