flake-parts 2
This commit is contained in:
parent
0cc521ea8b
commit
afd6aa4072
1 changed files with 25 additions and 26 deletions
51
flake.nix
51
flake.nix
|
@ -28,32 +28,31 @@
|
|||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ self, withSystem, ... }: {
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ self, ... }: {
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
flake = {
|
||||
# deploy = {
|
||||
# sshUser = "root";
|
||||
# fastConnection = true;
|
||||
# nodes = withSystem "x86_64-linux" (ctx@{ deployPkgs, ... }: {
|
||||
# smolboi = {
|
||||
# hostname = "smolboi";
|
||||
# profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos
|
||||
# self.nixosConfigurations.smolboi;
|
||||
# };
|
||||
# zeus = {
|
||||
# hostname = "zeus";
|
||||
# profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos
|
||||
# self.nixosConfigurations.zeus;
|
||||
# };
|
||||
# }) // withSystem "aarch64-linux" (ctx@{ deployPkgs, ... }: {
|
||||
# orangepihole = {
|
||||
# hostname = "orangepihole";
|
||||
# profiles.system.path = deployPkgs.deploy-rs.lib.activate.nixos
|
||||
# self.nixosConfigurations.orangepihole;
|
||||
# };
|
||||
# });
|
||||
# };
|
||||
deploy = {
|
||||
sshUser = "root";
|
||||
fastConnection = true;
|
||||
nodes = {
|
||||
smolboi = {
|
||||
hostname = "smolboi";
|
||||
profiles.system.path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.smolboi;
|
||||
};
|
||||
zeus = {
|
||||
hostname = "zeus";
|
||||
profiles.system.path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.zeus;
|
||||
};
|
||||
orangepihole = {
|
||||
hostname = "orangepihole";
|
||||
profiles.system.path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos
|
||||
self.nixosConfigurations.orangepihole;
|
||||
};
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
smolboi = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
|
@ -107,7 +106,7 @@
|
|||
};
|
||||
};
|
||||
perSystem = { pkgs, inputs', system, ... }: {
|
||||
# _module.args.deployPkgs = import inputs'.nixpkgs {
|
||||
# _module.args.pkgs = import inputs'.nixpkgs {
|
||||
# inherit system;
|
||||
# overlays = [
|
||||
# inputs.deploy-rs.overlay
|
||||
|
@ -119,8 +118,8 @@
|
|||
# })
|
||||
# ];
|
||||
# };
|
||||
devshells.default = { packages = [ pkgs.deploy-rs pkgs.sops ]; };
|
||||
# checks = inputs.deploy-rs.lib.${system}.deployChecks self.deploy;
|
||||
devshells.default = { packages = with pkgs; [ deploy-rs sops ]; };
|
||||
checks = inputs.deploy-rs.lib.${system}.deployChecks self.deploy;
|
||||
formatter = pkgs.nixfmt;
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue