mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
feat: add secret-backed kmeat ssh config
This commit is contained in:
parent
7be0d2eafc
commit
725e9f6d87
7 changed files with 180 additions and 36 deletions
49
Justfile
49
Justfile
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# List all the just commands
|
||||
default:
|
||||
@just --list
|
||||
@just --list
|
||||
|
||||
############################################################################
|
||||
#
|
||||
|
|
@ -11,18 +11,24 @@ default:
|
|||
############################################################################
|
||||
|
||||
[group('desktop')]
|
||||
darwin hostname:
|
||||
nix build .#darwinConfigurations.{{hostname}}.system \
|
||||
--extra-experimental-features 'nix-command flakes'
|
||||
dry-run hostname:
|
||||
nix build .#darwinConfigurations.{{ hostname }}.system \
|
||||
--dry-run \
|
||||
--extra-experimental-features 'nix-command flakes'
|
||||
|
||||
sudo -E ./result/sw/bin/darwin-rebuild switch --flake .#{{hostname}}
|
||||
[group('desktop')]
|
||||
darwin hostname:
|
||||
nix build .#darwinConfigurations.{{ hostname }}.system \
|
||||
--extra-experimental-features 'nix-command flakes'
|
||||
|
||||
sudo -E ./result/sw/bin/darwin-rebuild switch --flake .#{{ hostname }}
|
||||
|
||||
[group('desktop')]
|
||||
darwin-debug hostname:
|
||||
nix build .#darwinConfigurations.{{hostname}}.system --show-trace --verbose \
|
||||
--extra-experimental-features 'nix-command flakes'
|
||||
nix build .#darwinConfigurations.{{ hostname }}.system --show-trace --verbose \
|
||||
--extra-experimental-features 'nix-command flakes'
|
||||
|
||||
sudo -E ./result/sw/bin/darwin-rebuild switch --flake .#{{hostname}} --show-trace --verbose
|
||||
sudo -E ./result/sw/bin/darwin-rebuild switch --flake .#{{ hostname }} --show-trace --verbose
|
||||
|
||||
############################################################################
|
||||
#
|
||||
|
|
@ -33,46 +39,45 @@ darwin-debug hostname:
|
|||
# Update all the flake inputs
|
||||
[group('nix')]
|
||||
up:
|
||||
nix flake update
|
||||
nix flake update
|
||||
|
||||
# Update specific input
|
||||
# Usage: just upp nixpkgs
|
||||
[group('nix')]
|
||||
upp input:
|
||||
nix flake update {{input}}
|
||||
nix flake update {{ input }}
|
||||
|
||||
# List all generations of the system profile
|
||||
[group('nix')]
|
||||
history:
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
|
||||
# Open a nix shell with the flake
|
||||
[group('nix')]
|
||||
repl:
|
||||
nix repl -f flake:nixpkgs
|
||||
nix repl -f flake:nixpkgs
|
||||
|
||||
# remove all generations older than 7 days
|
||||
# on darwin, you may need to switch to root user to run this command
|
||||
[group('nix')]
|
||||
clean:
|
||||
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d
|
||||
|
||||
# Garbage collect all unused nix store entries
|
||||
[group('nix')]
|
||||
gc:
|
||||
# garbage collect all unused nix store entries(system-wide)
|
||||
sudo nix-collect-garbage --delete-older-than 7d
|
||||
# garbage collect all unused nix store entries(for the user - home-manager)
|
||||
# https://github.com/NixOS/nix/issues/8508
|
||||
nix-collect-garbage --delete-older-than 7d
|
||||
# garbage collect all unused nix store entries(system-wide)
|
||||
sudo nix-collect-garbage --delete-older-than 7d
|
||||
# garbage collect all unused nix store entries(for the user - home-manager)
|
||||
# https://github.com/NixOS/nix/issues/8508
|
||||
nix-collect-garbage --delete-older-than 7d
|
||||
|
||||
[group('nix')]
|
||||
fmt range:
|
||||
# format the nix files in this repo
|
||||
nix fmt {{range}}
|
||||
# format the nix files in this repo
|
||||
nix fmt {{ range }}
|
||||
|
||||
# Show all the auto gc roots in the nix store
|
||||
[group('nix')]
|
||||
gcroot:
|
||||
ls -al /nix/var/nix/gcroots/auto/
|
||||
|
||||
ls -al /nix/var/nix/gcroots/auto/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue