feat: add deploy-rs
This commit is contained in:
parent
183b98a728
commit
d9f0ada04f
2 changed files with 57 additions and 13 deletions
25
flake.lock
25
flake.lock
|
@ -73,6 +73,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"deploy-rs": {
|
||||
"inputs": {
|
||||
"flake-compat": [],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": [
|
||||
"flake-utils"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718194053,
|
||||
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
|
@ -235,6 +259,7 @@
|
|||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"attic": "attic",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
|
|
45
flake.nix
45
flake.nix
|
@ -3,6 +3,7 @@
|
|||
flake-parts,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
self,
|
||||
...
|
||||
} @ inputs: let
|
||||
overlays = [
|
||||
|
@ -34,6 +35,17 @@
|
|||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
|
||||
|
||||
deploy.nodes.main-node = {
|
||||
hostname = "winston.sh";
|
||||
profiles.system = {
|
||||
user = "winston";
|
||||
remoteBuild = true;
|
||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.main-node;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
|
@ -48,6 +60,20 @@
|
|||
inherit overlays system;
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inherit (config.pre-commit.devShell) shellHook;
|
||||
buildInputs = [
|
||||
inputs'.agenix.packages.agenix
|
||||
pkgs.age-plugin-yubikey
|
||||
pkgs.unstable.deploy-rs
|
||||
pkgs.unstable.nh
|
||||
pkgs.unstable.nixd
|
||||
self'.formatter
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
|
||||
pre-commit = {
|
||||
check.enable = true;
|
||||
settings.excludes = ["_sources/"];
|
||||
|
@ -60,19 +86,6 @@
|
|||
shellcheck.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inherit (config.pre-commit.devShell) shellHook;
|
||||
buildInputs = [
|
||||
inputs'.agenix.packages.agenix
|
||||
pkgs.age-plugin-yubikey
|
||||
pkgs.unstable.nh
|
||||
pkgs.unstable.nil
|
||||
self'.formatter
|
||||
];
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
|
||||
imports = [inputs.pre-commit-hooks.flakeModule];
|
||||
|
@ -106,6 +119,12 @@
|
|||
inputs.flake-compat.follows = "";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.flake-compat.follows = "";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.utils.follows = "flake-utils";
|
||||
};
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs.flake-compat.follows = "";
|
||||
|
|
Loading…
Reference in a new issue