aboutsummaryrefslogtreecommitdiff
path: root/examples/system/flake.nix
diff options
context:
space:
mode:
authornotgne22020-09-29 15:10:06 -0700
committernotgne22020-09-29 15:10:06 -0700
commit8d21dd335e5259dadf832a5d1a7c72b9dd1f4400 (patch)
treebc73e231777d5e0f7f2efa8e9a760a34e95950d1 /examples/system/flake.nix
parente3c55575ca6bfd0c9166c52b4aac76b3761bb313 (diff)
Add license information, reformat Nix files, clean up
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;
};
}