Skip to content

Commit

Permalink
server: simplify deployment options using lib.mkIf
Browse files Browse the repository at this point in the history
We build on target if the target server is not x86_64-linux.
  • Loading branch information
1sixth committed Sep 6, 2024
1 parent 134770b commit 73a0537
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion modules/profiles/server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
}:

{
deployment.targetHost = lib.mkDefault "${config.networking.hostName}.9875321.xyz";
deployment = {
buildOnTarget = lib.mkIf (config.nixpkgs.system != "x86_64-linux") true;
targetHost = lib.mkDefault "${config.networking.hostName}.9875321.xyz";
};

environment = {
persistence."/persistent/impermanence".files = [
Expand Down
2 changes: 0 additions & 2 deletions nixos/nrt0/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
./vaultwarden.nix
];

deployment.buildOnTarget = true;

networking.hostName = "nrt0";

security.acme.certs."shinta.ro".domain = "*.shinta.ro";
Expand Down
2 changes: 0 additions & 2 deletions nixos/nrt1/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
{
imports = [ ./hardware.nix ];

deployment.buildOnTarget = true;

networking.hostName = "nrt1";

sops.defaultSopsFile = ./secrets.yaml;
Expand Down

0 comments on commit 73a0537

Please sign in to comment.