bootstrap home manager and nix packages on login

This commit is contained in:
randogoth 2025-12-23 20:35:57 +02:00
parent 9d5b4ddecd
commit 83e657e74b
6 changed files with 67 additions and 57 deletions

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -oue pipefail
nix run github:nix-community/home-manager/release-25.11 -- init --switch
pkgs='uv micro vscodium mc lagrange'
f=~/.config/home-manager/home.nix
tmp="$(mktemp)"
{
echo " home.packages = ["
for p in $pkgs; do echo " pkgs.$p"; done
echo " ];"
} > "$tmp"
sed -i "/^[[:space:]]*home\.packages[[:space:]]*=[[:space:]]*\[/,/^[[:space:]]*];[[:space:]]*$/{
/^[[:space:]]*home\.packages[[:space:]]*=/{
r $tmp
}
d
}" "$f"
rm -f "$tmp"
home-manager switch

1
files/scripts/nixpkgs.sh Symbolic link
View file

@ -0,0 +1 @@
../system/usr/libexec/randofin-os/nixpkgs.sh