aboutsummaryrefslogtreecommitdiff
path: root/examples/system/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'examples/system/flake.nix')
-rw-r--r--examples/system/flake.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/examples/system/flake.nix b/examples/system/flake.nix
index 383960b..5179258 100644
--- a/examples/system/flake.nix
+++ b/examples/system/flake.nix
@@ -1,7 +1,10 @@
+# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io/>
+#
+# SPDX-License-Identifier: MPL-2.0
+
{
description = "Deploy a full system with hello service as a separate profile";
-
outputs = { self, nixpkgs }: {
nixosConfigurations.example-nixos-system = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@@ -10,7 +13,8 @@
nixosConfigurations.bare = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
- modules = [ ./bare.nix "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ];
+ modules =
+ [ ./bare.nix "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ];
};
# This is the application we actually want to run
@@ -24,7 +28,8 @@
system = {
sshUser = "admin";
activate = "$PROFILE/bin/switch-to-configuration switch";
- path = self.nixosConfigurations.example-nixos-system.config.system.build.toplevel;
+ path =
+ self.nixosConfigurations.example-nixos-system.config.system.build.toplevel;
user = "root";
};
hello = {
@@ -38,9 +43,9 @@
checks = builtins.mapAttrs (_: pkgs: {
jsonschema = pkgs.runCommandNoCC "jsonschema-deploy-system" { }
- "${pkgs.python3.pkgs.jsonschema}/bin/jsonschema -i ${
- pkgs.writeText "deploy.json" (builtins.toJSON self.deploy)
- } ${../../interface/deploy.json} && touch $out";
+ "${pkgs.python3.pkgs.jsonschema}/bin/jsonschema -i ${
+ pkgs.writeText "deploy.json" (builtins.toJSON self.deploy)
+ } ${../../interface/deploy.json} && touch $out";
}) nixpkgs.legacyPackages;
};
}