feat: aliases to system preset

This commit is contained in:
2025-06-11 22:34:24 +00:00
parent 8631eac0d4
commit 0ab2061776
2 changed files with 8 additions and 4 deletions

View File

@@ -280,7 +280,7 @@
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICrbBG+U07f7OKvOxYIGYCaNvyozzxQF+I9Fb5TYZErK yukkop vm-postgres'' ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICrbBG+U07f7OKvOxYIGYCaNvyozzxQF+I9Fb5TYZErK yukkop vm-postgres''
]; ];
programs.zsh.shellAliases = self.lib.sharedShellAliases; programs.zsh.shellAliases = self.lib.sharedShellAliasesForDevVm;
virtualisation = { virtualisation = {
vmVariant = { vmVariant = {
@@ -362,7 +362,7 @@
journalctl -u postgresql.service | grep postgresql-post-start | sed 's|psql:/nix/store/[^:]*:[0-9]*: ||' | sed 's|^[^:]*:[^:]*:[^:]*: ||' | grep -v '^\[.*\]' | ${hectic.prettify-log}/bin/prettify-log --color-output journalctl -u postgresql.service | grep postgresql-post-start | sed 's|psql:/nix/store/[^:]*:[0-9]*: ||' | sed 's|^[^:]*:[^:]*:[^:]*: ||' | grep -v '^\[.*\]' | ${hectic.prettify-log}/bin/prettify-log --color-output
'') '')
]; ];
programs.zsh.shellAliases = self.lib.sharedShellAliases // { programs.zsh.shellAliases = self.lib.sharedShellAliasesForDevVm // {
conn = "sudo su postgres -c 'psql -p 64317'"; conn = "sudo su postgres -c 'psql -p 64317'";
}; };
@@ -408,6 +408,7 @@
]; ];
services.getty.autologinUser = "root"; services.getty.autologinUser = "root";
programs.zsh.shellAliases = self.lib.sharedShellAliases;
programs.zsh.enable = true; programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
@@ -625,9 +626,12 @@
jc = ''journalctl''; jc = ''journalctl'';
sc = ''journalctl''; sc = ''journalctl'';
nv = ''nvim''; nv = ''nvim'';
sd = "shutdown now";
}; };
sharedShellAliasesForDevVm = self.lib.sharedShellAliases // {
sd = "shutdown now";
};
readEnvironment = { envVarsToRead, prefix ? "" }: readEnvironment = { envVarsToRead, prefix ? "" }:
builtins.listToAttrs builtins.listToAttrs
(map (name: { (map (name: {

View File

@@ -1,6 +1,6 @@
{pkgs, ...}: {pkgs, ...}:
pkgs.writeShellScriptBin "pager" '' pkgs.writeShellScriptBin "pager" ''
nvim -R --clean NONE \ nvim -R -u NONE \
-c 'nnoremap q :q!<CR>' \ -c 'nnoremap q :q!<CR>' \
-c 'set buftype=nofile nowrap' \ -c 'set buftype=nofile nowrap' \
-c 'set runtimepath^=${pkgs.vimPlugins.vim-plugin-AnsiEsc}' \ -c 'set runtimepath^=${pkgs.vimPlugins.vim-plugin-AnsiEsc}' \