Skip to content

Commit

Permalink
feat: add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Nov 23, 2023
1 parent 3cb433c commit a2ec7c2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
HOST=$(shell hostname)
.MAIN: switch
.DEFAULT_GOAL: switch

#=-=-=-=-#
# Switch #
#-=-=-=-=#
switch:
nixos-rebuild switch --flake .#$(HOST) --use-remote-sudo

#=-=-=-=#
# Hosts #
#-=-=-=-#
dekomori:
nixos-rebuild switch --flake .#dekomori --use-remote-sudo
mitama:
nixos-rebuild switch --flake .#mitama --use-remote-sudo

#=-=-=-=-#
# Update #
#-=-=-=-=#
up:
nix flake update
upp:
nix flake lock --update-input $(i)

#=-=-=-=#
# Stuff #
#-=-=-=-#
format:
alejandra ./
history:
nix profile history --profile /nix/var/nix/profiles/system
gc:
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
sudo nix store gc --debug

0 comments on commit a2ec7c2

Please sign in to comment.