nix-eval move to lessen secrets in store

This commit is contained in:
kat witch 2021-03-15 17:04:17 +00:00
parent 2e7495ef2e
commit e2752d1926
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
3 changed files with 4 additions and 5 deletions

View file

@ -3,7 +3,7 @@
with pkgs.lib;
(mapAttrs (name: hosts:
pkgs.writeScript "deploy-group-${name}" ''
''
#!${pkgs.runtimeShell}
export PATH=
${concatMapStrings (host: ''

View file

@ -53,8 +53,7 @@ in {
}) config.deploy.profiles);
deploy.groups = [ "all" ];
system.build.deployScript =
pkgs.writeScript "deploy-${config.networking.hostName}" ''
system.build.deployScript = ''
#!${pkgs.runtimeShell}
set -xeo pipefail
export PATH=${with pkgs; lib.makeBinPath [ coreutils openssh nix ]}

4
nyx
View file

@ -5,7 +5,7 @@ usage() {
echo example: $0 build samhain boot
}
build() {
deploy() {
HOST=$1
if [ $# -gt 2 ]; then
METHOD=$2
@ -13,7 +13,7 @@ build() {
METHOD="switch"
fi
nix build -f . deploy.$HOST && ./result $METHOD
nix eval --raw deploy.${HOST} -f . | bash -s -- ${METHOD}
}
install() {