nix package installer
This commit is contained in:
parent
9e859af388
commit
9d5b4ddecd
3 changed files with 27 additions and 7 deletions
|
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Tell this script to exit if there are any errors.
|
|
||||||
# You should have this in every custom script, to ensure that your completed
|
|
||||||
# builds actually ran successfully without any errors!
|
|
||||||
set -oue pipefail
|
|
||||||
23
files/scripts/nixpkgs.sh
Normal file
23
files/scripts/nixpkgs.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/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
|
||||||
|
|
@ -60,10 +60,13 @@ modules:
|
||||||
# If no repo information is specified, Flathub will be used by default
|
# If no repo information is specified, Flathub will be used by default
|
||||||
install: # system flatpaks we want all users to have and not remove
|
install: # system flatpaks we want all users to have and not remove
|
||||||
- net.waterfox.waterfox
|
- net.waterfox.waterfox
|
||||||
- com.vscodium.codium
|
|
||||||
- org.telegram.desktop
|
- org.telegram.desktop
|
||||||
remove: # replace default Firefox with Waterfox
|
remove: # replace default Firefox with Waterfox
|
||||||
- org.mozilla.firefox
|
- org.mozilla.firefox
|
||||||
- scope: user # Also add Flathub user repo, but no user packages
|
- scope: user # Also add Flathub user repo, but no user packages
|
||||||
|
|
||||||
|
- type: script
|
||||||
|
scripts:
|
||||||
|
- nixpkgs.sh
|
||||||
|
|
||||||
- type: signing # this sets up the proper policy & signing files for signed images to work fully
|
- type: signing # this sets up the proper policy & signing files for signed images to work fully
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue