forked from Fediversity/Fediversity
pass system
This commit is contained in:
parent
08e3bc9a4d
commit
3c341af08b
2 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
system,
|
||||
inputs ? (import ../../../default.nix { }).inputs,
|
||||
sources ? import ../../../npins,
|
||||
...
|
||||
|
@ -7,7 +8,8 @@
|
|||
|
||||
let
|
||||
inherit (sources) nixpkgs;
|
||||
lib = import "${nixpkgs}/lib";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (pkgs) lib;
|
||||
deployment-config = config;
|
||||
inherit (lib) mkOption types;
|
||||
eval =
|
||||
|
@ -81,7 +83,7 @@ let
|
|||
};
|
||||
};
|
||||
applications.hello =
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
description = ''Command-line tool that will print "Hello, world!" on the terminal'';
|
||||
module =
|
||||
|
@ -107,7 +109,7 @@ let
|
|||
key-file = null;
|
||||
};
|
||||
nixos-configuration =
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -48,6 +49,7 @@ in
|
|||
};
|
||||
inherit
|
||||
((import ./deployment.nix {
|
||||
inherit (pkgs) system;
|
||||
config = deployment-config;
|
||||
}).ssh-host.ssh
|
||||
)
|
||||
|
@ -66,9 +68,14 @@ in
|
|||
|
||||
# INSTANTIATE
|
||||
command=(nix-instantiate --show-trace --expr '
|
||||
let
|
||||
system = "${pkgs.system}"; # FIXME: what system are we deploying to?
|
||||
in
|
||||
import ${pathToRoot}/deployment/nixos.nix {
|
||||
inherit system;
|
||||
configuration = (
|
||||
import ${pathToRoot}/deployment/check/data-model/deployment.nix {
|
||||
inherit system;
|
||||
config = builtins.fromJSON "${escapedJson deployment-config}";
|
||||
}
|
||||
).ssh-host.nixos-configuration;
|
||||
|
|
Loading…
Add table
Reference in a new issue