moved aliases to common file and imported to all home.nix variants

new file:   common/aliases.nix
	modified:   common/home.nix
	modified:   hosts/nixos/home.nix
This commit is contained in:
2025-07-20 21:15:31 +10:00
parent fa76fb0f13
commit af2f4263cc
3 changed files with 38 additions and 26 deletions

24
common/aliases.nix Normal file
View File

@@ -0,0 +1,24 @@
{ config, pkgs, lib, ... }:
let
mySwitchCmd = ''
sudo nixos-rebuild switch \
--no-write-lock-file \
--refresh \
--flake git+https://gitea.lan.ddnsgeek.com/beatzaplenty/nixos.git#$(hostname)
'';
myTestCmd = ''
sudo nixos-rebuild test \
--no-write-lock-file \
--refresh \
--flake git+https://gitea.lan.ddnsgeek.com/beatzaplenty/nixos.git#$(hostname)
'';
in {
programs.bash = {
enable = true;
shellAliases = {
"Switch-nix" = mySwitchCmd;
"Test-nix" = myTestCmd;
};
};
}