diff options
author | notgne2 | 2020-09-29 21:27:52 -0700 |
---|---|---|
committer | notgne2 | 2020-09-29 21:27:52 -0700 |
commit | 05a997558400f093c7278decd6300ce09044227b (patch) | |
tree | 9600f882d720a9d00de7c28fad6993d2b5fc5007 /examples/system/flake.nix | |
parent | a0328dbcf76b7c551e92fd25060cfc7d7e4d9ebe (diff) | |
parent | 8d21dd335e5259dadf832a5d1a7c72b9dd1f4400 (diff) |
Merge branch 'master' of github.com:notgne2/deploy-rs into master
Diffstat (limited to 'examples/system/flake.nix')
-rw-r--r-- | examples/system/flake.nix | 17 |
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; }; } |