From d108d50793501af524b4bd7fefe7729835a54654 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Wed, 16 Jul 2025 19:18:54 +1000 Subject: [PATCH] added switch and test aliases modified: common/home.nix --- common/home.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/common/home.nix b/common/home.nix index a110dac..b0e0657 100644 --- a/common/home.nix +++ b/common/home.nix @@ -1,12 +1,31 @@ { 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 switch \ + --no-write-lock-file \ + --refresh \ + --flake git+https://gitea.lan.ddnsgeek.com/beatzaplenty/nixos.git#$(hostname) + ''; +in { home.username = "nixos"; # your actual username home.homeDirectory = "/home/nixos"; home.stateVersion = "25.05"; # match your NixOS stateVersion programs.home-manager.enable = true; # mandatory to activate HM + home.shellAliases = { + Switch-nix = mySwitchCmd; + Test-nix = myTestCmd; + }; + + # Optional: packages home.packages = with pkgs; [ git