new beginning
This commit is contained in:
62
outputs.nix
Normal file
62
outputs.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
self,
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
nurpkgs,
|
||||
deploy,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs:
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages = import ./pkgs {inherit pkgs;};
|
||||
|
||||
devShell = pkgs.callPackage ./shell.nix {
|
||||
# inherit (deploy.packages.${system}) deploy-rs;
|
||||
inherit (home-manager.packages.${system}) home-manager;
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
}))
|
||||
// {
|
||||
homeConfigurations = import ./home/configurations.nix (inputs // {inherit inputs;});
|
||||
|
||||
nixosConfigurations = import ./nixos/configurations.nix (inputs // {inherit inputs;});
|
||||
|
||||
colmena =
|
||||
{
|
||||
meta = {
|
||||
# Default nixpkgs
|
||||
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
# Per Node nixpkgs override
|
||||
nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) self.nixosConfigurations;
|
||||
# Per Node additional specialArgs
|
||||
nodeSpecialArgs = builtins.mapAttrs (name: value: value._module.specialArgs) self.nixosConfigurations;
|
||||
};
|
||||
}
|
||||
// builtins.mapAttrs (name: value: {
|
||||
deployment = {
|
||||
targetHost = value.config.remote.ip;
|
||||
targetPort = value.config.remote.sshPort;
|
||||
buildOnTarget = value.config.remote.remoteBuild;
|
||||
inherit (value.config.remote) allowLocalDeployment;
|
||||
};
|
||||
imports = value._module.args.modules;
|
||||
})
|
||||
self.nixosConfigurations;
|
||||
|
||||
# deploy.nodes =
|
||||
# builtins.mapAttrs (name: value: {
|
||||
# hostname = value.config.remote.ip;
|
||||
# profiles.system = {
|
||||
# sshUser = value.config.remote.sshUser;
|
||||
# sshOpts = ["-p" (builtins.toString value.config.remote.sshPort)];
|
||||
# remoteBuild = value.config.remote.remoteBuild;
|
||||
# path = deploy.lib.x86_64-linux.activate.nixos value;
|
||||
# };
|
||||
# })
|
||||
# self.nixosConfigurations;
|
||||
|
||||
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy.lib;
|
||||
}
|
Reference in New Issue
Block a user