Skip to content

Commit

Permalink
Merge pull request #28 from flokli/morph
Browse files Browse the repository at this point in the history
deployment.nix: init morph
  • Loading branch information
flokli authored Jul 19, 2024
2 parents 114337c + be4f230 commit bf062c7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ rec {
rustc
pkg-config
stdenv.cc

# Deployment
morph
]);
};
}
Expand Down
50 changes: 50 additions & 0 deletions nix/deployment.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
let
nixpkgs = (import ./sources.nix { inherit system; }).nixpkgs;
system = builtins.currentSystem;
pkgs = import nixpkgs {
inherit system;
overlays = [ (import ./overlay.nix) ];
};
pkgsAArch64 = import nixpkgs {
localSystem = system;
crossSystem = "aarch64-linux";
overlays = [ (import ./overlay.nix) ];
};

common = {
# https://github.com/DBCDK/morph/issues/106
nixpkgs.pkgs = pkgsAArch64;
nixpkgs.localSystem.system = "aarch64-linux";

imports = [ ./configuration-cm3.nix ];
deployment.substituteOnDestination = true;
deployment.targetUser = "root";
};
in
{
network = {
inherit pkgs;
};

"screen1" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n1.screens.wip.bar";
};
"screen2" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n2.screens.wip.bar";
};
"screen3" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n3.screens.wip.bar";
};
"screen4" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n4.screens.wip.bar";
};
"screen5" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n5.screens.wip.bar";
};
"screen6" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n6.screens.wip.bar";
};
"screen7" = { config, pkgs, ... }: common // {
deployment.targetHost = "root@n7.screens.wip.bar";
};
}

0 comments on commit bf062c7

Please sign in to comment.