pass system

This commit is contained in:
Kiara Grouwstra 2025-08-26 17:15:23 +02:00
parent 08e3bc9a4d
commit 3c341af08b
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 12 additions and 3 deletions

View file

@ -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

View file

@ -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;