1
0
Fork 0

Setup deploy-ts

This commit is contained in:
Daniel Kempkens 2023-05-12 17:39:09 +02:00
parent c68d920fa6
commit 2e7d3954e0
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
10 changed files with 125 additions and 27 deletions

View file

@ -20,6 +20,7 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#nixosConfigurations.attic.pkgs.attic-server' - run: nix build '.#nixosConfigurations.attic.pkgs.attic-server'
- run: nix build '.#nixosConfigurations.attic.pkgs.attic-client' - run: nix build '.#nixosConfigurations.attic.pkgs.attic-client'
- run: nix build '.#nixosConfigurations.attic.pkgs.deploy-rs'
build-arm64-linux: build-arm64-linux:
runs-on: buildjet-2vcpu-ubuntu-2204-arm runs-on: buildjet-2vcpu-ubuntu-2204-arm
@ -33,3 +34,4 @@ jobs:
name: nifoc name: nifoc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build '.#nixosConfigurations.adsb-antenna.pkgs.attic-client' - run: nix build '.#nixosConfigurations.adsb-antenna.pkgs.attic-client'
- run: nix build '.#nixosConfigurations.adsb-antenna.pkgs.deploy-rs'

View file

@ -98,6 +98,28 @@
"type": "github" "type": "github"
} }
}, },
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1683779844,
"narHash": "sha256-sIeOU0GsCeQEn5TpqE/jFRN4EGsPsjqVRsPdrzIDABM=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "c80189917086e43d49eece2bd86f56813500a0eb",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -114,6 +136,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -190,11 +228,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683833146, "lastModified": 1683892466,
"narHash": "sha256-ELF0oXgg0NYGyKtU74HW8CeLstFJwwCGbuahnQla67I=", "narHash": "sha256-/zN3pQ4xoyolJoxrtn9oLU4JMjG5+c5K7BeLxZ7BR8o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "cc9f65d104e5227d103a529a9fc3687ef4ccb117", "rev": "70c8bd08e6c186e5c628a4e5af6f7ad67cd344b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -304,6 +342,7 @@
"agenix": "agenix", "agenix": "agenix",
"attic": "attic", "attic": "attic",
"darwin": "darwin", "darwin": "darwin",
"deploy-rs": "deploy-rs",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nifoc-overlay": "nifoc-overlay", "nifoc-overlay": "nifoc-overlay",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
@ -335,6 +374,21 @@
"repo": "rust-overlay", "repo": "rust-overlay",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -27,42 +27,37 @@
url = "github:nifoc/nix-overlay"; url = "github:nifoc/nix-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs@{ self, ... }: outputs = inputs@{ self, ... }:
let let
Styx = import ./system/flakes/Styx.nix { Styx = import ./system/flakes/Styx.nix {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs home-manager darwin;
inherit (inputs) home-manager;
inherit (inputs) darwin;
inherit inputs; inherit inputs;
}; };
sail = import ./system/flakes/sail.nix { sail = import ./system/flakes/sail.nix {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs deploy-rs home-manager agenix;
inherit (inputs) home-manager;
inherit (inputs) agenix;
inherit inputs; inherit inputs;
}; };
attic = import ./system/flakes/attic.nix { attic = import ./system/flakes/attic.nix {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs deploy-rs home-manager agenix attic;
inherit (inputs) home-manager;
inherit (inputs) agenix;
inherit (inputs) attic;
inherit inputs; inherit inputs;
}; };
mediaserver = import ./system/flakes/mediaserver.nix { mediaserver = import ./system/flakes/mediaserver.nix {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs deploy-rs home-manager agenix;
inherit (inputs) home-manager;
inherit (inputs) agenix;
inherit inputs; inherit inputs;
}; };
adsb-antenna = import ./system/flakes/adsb-antenna.nix { adsb-antenna = import ./system/flakes/adsb-antenna.nix {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs home-manager;
inherit (inputs) home-manager;
inherit inputs; inherit inputs;
}; };
in in
@ -77,5 +72,11 @@
mediaserver = mediaserver.system; mediaserver = mediaserver.system;
adsb-antenna = adsb-antenna.system; adsb-antenna = adsb-antenna.system;
}; };
deploy.nodes = {
sail = sail.deployment;
attic = attic.deployment;
mediaserver = mediaserver.deployment;
};
}; };
} }

View file

@ -48,6 +48,7 @@ args@{ pkgs, config, lib, ... }:
awscli2 awscli2
curlHTTP3 curlHTTP3
dasel dasel
deploy-rs
exa exa
exiftool exiftool
fd fd

View file

@ -418,12 +418,12 @@ in
}; };
neoformat = buildVimPluginFrom2Nix { neoformat = buildVimPluginFrom2Nix {
pname = "neoformat"; pname = "neoformat";
version = "2023-04-14"; version = "2023-05-12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sbdchd"; owner = "sbdchd";
repo = "neoformat"; repo = "neoformat";
rev = "aca320ad601338c93eca50ab4c86fca964a18d96"; rev = "2d5d071d5957681ae677ee06f6eb879a61b7b618";
sha256 = "17wcvqwddw4nlcpfvlaxxkcyl93axb1hqdcn73xb4c1yr8fdwaxi"; sha256 = "17rs8k6xzy4c8nkiap84h5n7m0wcam06r6mv2z207di0cck2f4pk";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };

View file

@ -6,6 +6,7 @@ let
overlay-x86 = _: _: { pkgs-x86 = import nixpkgs { system = "x86_64-darwin"; }; }; overlay-x86 = _: _: { pkgs-x86 = import nixpkgs { system = "x86_64-darwin"; }; };
overlay-agenix = inputs.agenix.overlays.default; overlay-agenix = inputs.agenix.overlays.default;
overlay-attic = inputs.attic.overlays.default; overlay-attic = inputs.attic.overlays.default;
overlay-deploy-rs = _: _: { inherit (inputs.deploy-rs.packages.${default-system}) deploy-rs; };
overlay-nifoc = inputs.nifoc-overlay.overlay; overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = { nixpkgsConfig = {
@ -13,6 +14,7 @@ let
overlay-x86 overlay-x86
overlay-agenix overlay-agenix
overlay-attic overlay-attic
overlay-deploy-rs
overlay-nifoc overlay-nifoc
]; ];

View file

@ -4,11 +4,13 @@ let
default-system = "aarch64-linux"; default-system = "aarch64-linux";
overlay-attic = inputs.attic.overlays.default; overlay-attic = inputs.attic.overlays.default;
overlay-deploy-rs = _: _: { inherit (inputs.deploy-rs.packages.${default-system}) deploy-rs; };
overlay-nifoc = inputs.nifoc-overlay.overlay; overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = { nixpkgsConfig = {
overlays = [ overlays = [
overlay-attic overlay-attic
overlay-deploy-rs
overlay-nifoc overlay-nifoc
]; ];

View file

@ -1,12 +1,14 @@
{ nixpkgs, home-manager, agenix, attic, inputs, ... }: { nixpkgs, deploy-rs, home-manager, agenix, attic, inputs, ... }:
let let
default-system = "x86_64-linux"; default-system = "x86_64-linux";
overlay-deploy-rs = _: _: { inherit (deploy-rs.packages.${default-system}) deploy-rs; };
overlay-nifoc = inputs.nifoc-overlay.overlay; overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = { nixpkgsConfig = {
overlays = [ overlays = [
overlay-deploy-rs
overlay-nifoc overlay-nifoc
]; ];
@ -16,7 +18,7 @@ let
}; };
}; };
in in
{ rec {
system = nixpkgs.lib.nixosSystem { system = nixpkgs.lib.nixosSystem {
system = default-system; system = default-system;
modules = [ modules = [
@ -38,4 +40,14 @@ in
} }
]; ];
}; };
deployment = {
hostname = "builder-attic";
sshUser = "root";
remoteBuild = true;
profiles.system = {
path = deploy-rs.lib.${default-system}.activate.nixos system;
};
};
} }

View file

@ -1,14 +1,16 @@
{ nixpkgs, home-manager, agenix, inputs, ... }: { nixpkgs, deploy-rs, home-manager, agenix, inputs, ... }:
let let
default-system = "x86_64-linux"; default-system = "x86_64-linux";
overlay-attic = inputs.attic.overlays.default; overlay-attic = inputs.attic.overlays.default;
overlay-deploy-rs = _: _: { inherit (deploy-rs.packages.${default-system}) deploy-rs; };
overlay-nifoc = inputs.nifoc-overlay.overlay; overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = { nixpkgsConfig = {
overlays = [ overlays = [
overlay-attic overlay-attic
overlay-deploy-rs
overlay-nifoc overlay-nifoc
]; ];
@ -18,7 +20,7 @@ let
}; };
}; };
in in
{ rec {
system = nixpkgs.lib.nixosSystem { system = nixpkgs.lib.nixosSystem {
system = default-system; system = default-system;
modules = [ modules = [
@ -38,4 +40,14 @@ in
} }
]; ];
}; };
deployment = {
hostname = "builder-mediaserver";
sshUser = "root";
remoteBuild = true;
profiles.system = {
path = deploy-rs.lib.${default-system}.activate.nixos system;
};
};
} }

View file

@ -1,14 +1,16 @@
{ nixpkgs, home-manager, agenix, inputs, ... }: { nixpkgs, deploy-rs, home-manager, agenix, inputs, ... }:
let let
default-system = "x86_64-linux"; default-system = "x86_64-linux";
overlay-attic = inputs.attic.overlays.default; overlay-attic = inputs.attic.overlays.default;
overlay-deploy-rs = _: _: { inherit (deploy-rs.packages.${default-system}) deploy-rs; };
overlay-nifoc = inputs.nifoc-overlay.overlay; overlay-nifoc = inputs.nifoc-overlay.overlay;
nixpkgsConfig = { nixpkgsConfig = {
overlays = [ overlays = [
overlay-attic overlay-attic
overlay-deploy-rs
overlay-nifoc overlay-nifoc
]; ];
@ -18,7 +20,7 @@ let
}; };
}; };
in in
{ rec {
system = nixpkgs.lib.nixosSystem { system = nixpkgs.lib.nixosSystem {
system = default-system; system = default-system;
modules = [ modules = [
@ -38,4 +40,14 @@ in
} }
]; ];
}; };
deployment = {
hostname = "builder-sail";
sshUser = "root";
remoteBuild = true;
profiles.system = {
path = deploy-rs.lib.${default-system}.activate.nixos system;
};
};
} }