mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-23 02:45:29 +03:00
0cce7924f1
* rename eval-format.nix to nixos-generate.nix Make it clear that it's meant to be used by the nixos-generate script * rename config.nix to configuration.nix Bring the name closer to /etc/nixos/configuration.nix * fix the NIXOS_CONFIG this is the env name that nixos-rebuild uses * use -I to load the configuration and format This has a nice side-effect of allowing URLs as configuration * add Travis CI * cleanSource * gitignore nix result files * use modulesPath everywhere this makes sure that the passed pkgs in nixos-generate.nix is the same one we use to load these other modules * use toString to avoid evaluation error
14 lines
372 B
Makefile
14 lines
372 B
Makefile
PREFIX ?= /usr/local
|
|
SHARE ?= $(PREFIX)/share/nixos-generator
|
|
|
|
all:
|
|
|
|
install:
|
|
mkdir -p $(PREFIX)/bin $(SHARE)
|
|
sed \
|
|
-e "s|libexec_dir=\".*\"|libexec_dir=\"$(SHARE)\"|" \
|
|
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
|
|
nixos-generate > $(PREFIX)/bin/nixos-generate
|
|
chmod 755 $(PREFIX)/bin/nixos-generate
|
|
cp -r formats configuration.nix nixos-generate.nix $(SHARE)
|