You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/Makefile

73 lines
1.4 KiB
Makefile

all: rebuild-switch
date
##--------- Commandes spécifiques pour NixOS
clean:
nix-collect-garbage -d --delete-older-than 15d
clean-aggressive:
nix-collect-garbage -d --delete-older-than 1d
clean-total:
nix-collect-garbage -d
clean-log:
journalctl --vacuum-size=1G
full-auto: submodules-update upgrade clean optimise
optimise:
nix-store --optimise
rebuild-switch:
nixos-rebuild switch --fallback --show-trace
store-repair:
nix-store --verify --check-contents --repair
upgrade:
nixos-rebuild switch --upgrade --fallback --show-trace
##--------- Commandes spécifiques pour GIT
push: submodules-push
git push --all
git push --tags
submodules-update:
#git submodule update --remote
git submodule foreach git co master
git submodule foreach git ff
submodules-push:
git submodule foreach git push --all
git submodule foreach git push --tags
submodules-tag:
git submodule foreach git tag -f "$$(date +%F)-$$(hostname -s)"
template:
find . -name "*.nix" -exec meld /etc/nixos/base/module-template.nix {} \;
tag: submodules-tag
git tag -f "$$(date +%F)-$$(hostname -s)"
##--------- Munin
munin:
pushd /var/www/munin/ ; python -m SimpleHTTPServer 8000
##--------- Gestion d'un système de fichier monté en mémoire
tmpfs-create:
mkdir -p /mnt/tmpfs
tmpfs-mount: tmpfs-create
mount -t tmpfs -o size=10G tmpfs /mnt/tmpfs
tmpfs-umount:
umount /mnt/tmpfs
tmpfs-destroy: tmpfs-umount
rmdir /mnt/tmpfs