1
1
Fork 0
nixos/options/custom/scripts/flakegen.sh
Myned 53c8575116
git: migrate to forgejo
Squashes 1,331 commits

Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 19:41:21 -05:00

16 lines
324 B
Bash

#! /usr/bin/env bash
# Generate flake.nix via flakegen
# https://github.com/jorsn/flakegen
cd /etc/nixos || exit 1
if [[ "${1-}" == '-r' ]]; then
# Nuke and reinitialize
rm flake.nix
nix flake init --template github:jorsn/flakegen
else
# Generate and track all files
nix run .#genflake flake.nix
git add .
fi