ljkdasjlasdklj

This commit is contained in:
2025-11-14 19:06:59 +01:00
parent 5b8e2ff529
commit b2e9e284b7
6 changed files with 39 additions and 18 deletions

View File

@@ -295,7 +295,7 @@
envrc-pkgs = [
self.packages.${system}.nom-nixos-rebuild
self.packages.${system}.nom-nixos-rebuild-ng
self.packages.${system}.nom-home-manager
# self.packages.${system}.nom-home-manager
pkgs.nix-output-monitor
pkgs.age
pkgs.sops
@@ -315,7 +315,7 @@
remoteenv = mkShell { } [
self.packages.${system}.nom-nixos-rebuild
self.packages.${system}.nom-nixos-rebuild-ng
self.packages.${system}.nom-home-manager
# self.packages.${system}.nom-home-manager
pkgs.age
pkgs.ssh-to-age
pkgs.just

View File

@@ -108,6 +108,23 @@ push $hostname=`just _a_host` cmd=`gum choose test switch boot --header "Select
set -x; NIX_NO_NOM=1 nixos-rebuild {{cmd}} --flake .#"$hostname" --target-host "root@$target_host" --use-substitutes
fi
home-build *_:
#!/usr/bin/env -S bash -euo pipefail
# home-manager build --flake .#nixosConfigurations.$(hostname).config.home-manager.users.$(whoami)
nix build .#nixosConfigurations."$(hostname)".config.home-manager.users."$(whoami)".home.activationPackage "${@:1}"
# TODO: fallback to .#homeConfigurations.$(whoami) ?
# TODO: alternative behaviour for system-manager and nix-darwin
home-build-diff: home-build
#!/usr/bin/env -S bash -euo pipefail
# nvd diff /home/pbsds/.local/state/home-manager/gcroots/current-home result # python based, slow
dix /home/pbsds/.local/state/home-manager/gcroots/current-home result # rust based, fast, nixos-unstable only
home-switch *_:
#!/usr/bin/env -S bash -euo pipefail
# home-manager switch --flake .#nixosConfigurations.$(hostname).config.home-manager.users.$(whoami)
nix run .#nixosConfigurations."$(hostname)".config.home-manager.users."$(whoami)".home.activationPackage "${@:1}"
# test-files $hostname=`just _a_host` *filenames:
# #!/usr/bin/env -S bash -euo pipefail
# # TODO: remember previous choices

View File

@@ -4,6 +4,8 @@
#nixpkgs.config.allowUnfree = true;
home.stateVersion = "23.11";
home.preferXdgDirectories = true;
imports = [
./profiles/bashrc.d
#./profiles/sops.nix

View File

@@ -5,6 +5,7 @@ foreground = #d3d7cf
#palette = 0=#d3d7cf
#window-decoration = false
gtk-wide-tabs = false
#bell-features = "system,attention,title" # available from v1.2
#font-synthetic-style = true
#font-style = false

View File

@@ -79,12 +79,13 @@ in
"--bind 'end:last'"
"--cycle"
# https://man.archlinux.org/man/extra/fzf/fzf.1.en#PREVIEW_WINDOW
# bat is installed in bat.nix
#"--preview 'head {}'"
# "--preview 'bat {}'"
# "--preview 'tail -n$LINES {} | bat --file-name {} --paging never --style plain'"
# "--preview 'tail -n$FZF_LINES {} | bat --file-name {} --paging never --style plain'"
# "--preview 'bat {} --paging never --style plain' --preview-window follow"
"--preview 'if [[ -f {} ]]; then tail -n$LINES {} | bat --paging=never --style=plain --color=always --file-name {} ; elif [[ -e {}/.git ]]; then git -C {} status else file {} ; fi' --preview-window follow"
"--preview 'if [[ -f {} ]]; then tail -n$FZF_LINES {} | bat --paging=never --style=plain --color=always --file-name {} ; elif [[ -e {}/.git ]]; then git -C {} status else file {} ; fi' --preview-window follow"
# https://github.com/junegunn/fzf/discussions/3363#discussioncomment-6419463
"--bind 'ctrl-a:reload:eval $FZF_DEFAULT_COMMAND --no-ignore'"

View File

@@ -9,19 +9,19 @@
# python based
# module from https://infosec.exchange/@wyndon/110662698348958506
home.activation.show-hm-closure-diff = config.lib.dag.entryAnywhere (
if pkgs ? dix then
''
if [[ -v oldGenPath ]]; then
${pkgs.dix}/bin/dix $oldGenPath $newGenPath
fi
''
else
''
if [[ -v oldGenPath ]]; then
${pkgs.nvd}/bin/nvd diff $oldGenPath $newGenPath
fi
''
);
home.activation.show-hm-closure-diff = config.lib.dag.entryAnywhere ''
if [[ -v oldGenPath ]]; then
${
if pkgs ? dix then
''
${pkgs.dix}/bin/dix $oldGenPath $newGenPath
''
else
''
${pkgs.nvd}/bin/nvd diff $oldGenPath $newGenPath
''
}
fi
'';
}