This commit is contained in:
parent
88b33598d7
commit
cfec181d0d
42
flake.lock
42
flake.lock
@ -47,6 +47,47 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"deploy-rs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": [
|
||||||
|
"flake-utils"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711973905,
|
||||||
|
"narHash": "sha256-UFKME/N1pbUtn+2Aqnk+agUt8CekbpuqwzljivfIme8=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"rev": "88b3059b020da69cbe16526b8d639bd5e0b51c8b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
@ -137,6 +178,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"deploy-rs": "deploy-rs",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
|
21
flake.nix
21
flake.nix
@ -13,11 +13,15 @@
|
|||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
impermanence.url = "github:nix-community/impermanence/master";
|
impermanence.url = "github:nix-community/impermanence/master";
|
||||||
|
|
||||||
|
deploy-rs.url = "github:serokell/deploy-rs/master";
|
||||||
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
deploy-rs.inputs.utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
description = "Hillion Nix flake";
|
description = "Hillion Nix flake";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, agenix, home-manager, impermanence, ... }@inputs: {
|
outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, agenix, home-manager, impermanence, deploy-rs, ... }@inputs: {
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
let
|
let
|
||||||
fqdns = builtins.attrNames (builtins.readDir ./hosts);
|
fqdns = builtins.attrNames (builtins.readDir ./hosts);
|
||||||
@ -55,6 +59,21 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
nixpkgs.lib.genAttrs fqdns mkHost;
|
nixpkgs.lib.genAttrs fqdns mkHost;
|
||||||
|
|
||||||
|
deploy = {
|
||||||
|
nodes = builtins.mapAttrs
|
||||||
|
(name: value: {
|
||||||
|
hostname = name;
|
||||||
|
profiles.system = {
|
||||||
|
user = "root";
|
||||||
|
remoteBuild = true;
|
||||||
|
path = deploy-rs.lib.aarch64-darwin.activate.nixos self.nixosConfigurations.${name};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
self.nixosConfigurations;
|
||||||
|
};
|
||||||
|
|
||||||
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
} // flake-utils.lib.eachDefaultSystem (system: {
|
} // flake-utils.lib.eachDefaultSystem (system: {
|
||||||
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
|
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user