From 8d21dd335e5259dadf832a5d1a7c72b9dd1f4400 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Tue, 29 Sep 2020 15:10:06 -0700 Subject: Add license information, reformat Nix files, clean up --- examples/system/flake.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'examples/system/flake.nix') 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 +# +# 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; }; } -- cgit v1.2.3